generated-configure.sh revision 1713:f0b8f91a0c6f
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_SYSROOT_LDFLAGS
745BUILD_SYSROOT_CFLAGS
746BUILD_LD
747BUILD_CXX
748BUILD_CC
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_jtreg
1084enable_warnings_as_errors
1085enable_debug_symbols
1086enable_zip_debug_info
1087enable_native_coverage
1088with_stdc__lib
1089with_msvcr_dll
1090with_msvcp_dll
1091with_x
1092with_cups
1093with_cups_include
1094with_freetype
1095with_freetype_include
1096with_freetype_lib
1097with_freetype_src
1098enable_freetype_bundling
1099with_alsa
1100with_alsa_include
1101with_alsa_lib
1102with_libffi
1103with_libffi_include
1104with_libffi_lib
1105with_libjpeg
1106with_giflib
1107with_libpng
1108with_zlib
1109with_lcms
1110with_dxsdk
1111with_dxsdk_lib
1112with_dxsdk_include
1113with_num_cores
1114with_memory_size
1115with_jobs
1116with_boot_jdk_jvmargs
1117with_sjavac_server_java
1118enable_sjavac
1119enable_javac_server
1120enable_precompiled_headers
1121enable_ccache
1122with_ccache_dir
1123'
1124      ac_precious_vars='build_alias
1125host_alias
1126target_alias
1127BASENAME
1128BASH
1129CAT
1130CHMOD
1131CMP
1132COMM
1133CP
1134CUT
1135DATE
1136DIFF
1137DIRNAME
1138ECHO
1139EXPR
1140FILE
1141FIND
1142HEAD
1143LN
1144LS
1145MKDIR
1146MKTEMP
1147MV
1148NAWK
1149PRINTF
1150RM
1151RMDIR
1152SH
1153SORT
1154TAIL
1155TAR
1156TEE
1157TOUCH
1158TR
1159UNAME
1160UNIQ
1161WC
1162WHICH
1163XARGS
1164AWK
1165GREP
1166EGREP
1167FGREP
1168SED
1169CYGPATH
1170READLINK
1171DF
1172CPIO
1173NICE
1174UNZIP
1175ZIP
1176LDD
1177OTOOL
1178READELF
1179HG
1180STAT
1181TIME
1182PATCH
1183DSYMUTIL
1184XATTR
1185CODESIGN
1186SETFILE
1187PKG_CONFIG
1188JAVA
1189JAVAC
1190JAVAH
1191JAR
1192JARSIGNER
1193CC
1194CFLAGS
1195LDFLAGS
1196LIBS
1197CPPFLAGS
1198CXX
1199CXXFLAGS
1200CCC
1201CPP
1202CXXCPP
1203AS
1204AR
1205LIPO
1206STRIP
1207NM
1208GNM
1209OBJCOPY
1210OBJDUMP
1211BUILD_CC
1212BUILD_CXX
1213BUILD_LD
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-jtreg            Regression Test Harness [probed]
1947  --with-stdc++lib=<static>,<dynamic>,<default>
1948                          force linking of the C++ runtime on Linux to either
1949                          static or dynamic, default is static with dynamic as
1950                          fallback
1951  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1952                          (Windows only) [probed]
1953  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1954                          (Windows only) [probed]
1955  --with-x                use the X Window System
1956  --with-cups             specify prefix directory for the cups package
1957                          (expecting the headers under PATH/include)
1958  --with-cups-include     specify directory for the cups include files
1959  --with-freetype         specify prefix directory for the freetype package
1960                          (expecting the libraries under PATH/lib and the
1961                          headers under PATH/include)
1962  --with-freetype-include specify directory for the freetype include files
1963  --with-freetype-lib     specify directory for the freetype library
1964  --with-freetype-src     specify directory with freetype sources to
1965                          automatically build the library (experimental,
1966                          Windows-only)
1967  --with-alsa             specify prefix directory for the alsa package
1968                          (expecting the libraries under PATH/lib and the
1969                          headers under PATH/include)
1970  --with-alsa-include     specify directory for the alsa include files
1971  --with-alsa-lib         specify directory for the alsa library
1972  --with-libffi           specify prefix directory for the libffi package
1973                          (expecting the libraries under PATH/lib and the
1974                          headers under PATH/include)
1975  --with-libffi-include   specify directory for the libffi include files
1976  --with-libffi-lib       specify directory for the libffi library
1977  --with-libjpeg          use libjpeg from build system or OpenJDK source
1978                          (system, bundled) [bundled]
1979  --with-giflib           use giflib from build system or OpenJDK source
1980                          (system, bundled) [bundled]
1981  --with-libpng           use libpng from build system or OpenJDK source
1982                          (system, bundled) [bundled]
1983  --with-zlib             use zlib from build system or OpenJDK source
1984                          (system, bundled) [bundled]
1985  --with-lcms             use lcms2 from build system or OpenJDK source
1986                          (system, bundled) [bundled]
1987  --with-dxsdk            Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-dxsdk-include    Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-num-cores        number of cores in the build system, e.g.
1994                          --with-num-cores=8 [probed]
1995  --with-memory-size      memory (in MB) available in the build system, e.g.
1996                          --with-memory-size=1024 [probed]
1997  --with-jobs             number of parallel jobs to let make run [calculated
1998                          based on cores and memory]
1999  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2000                          invocations of boot JDK, overriding the default
2001                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2002                          -enableassertions"
2003  --with-sjavac-server-java
2004                          use this java binary for running the sjavac
2005                          background server [Boot JDK java]
2006  --with-ccache-dir       where to store ccache files [~/.ccache]
2007
2008Some influential environment variables:
2009  BASENAME    Override default value for BASENAME
2010  BASH        Override default value for BASH
2011  CAT         Override default value for CAT
2012  CHMOD       Override default value for CHMOD
2013  CMP         Override default value for CMP
2014  COMM        Override default value for COMM
2015  CP          Override default value for CP
2016  CUT         Override default value for CUT
2017  DATE        Override default value for DATE
2018  DIFF        Override default value for DIFF
2019  DIRNAME     Override default value for DIRNAME
2020  ECHO        Override default value for ECHO
2021  EXPR        Override default value for EXPR
2022  FILE        Override default value for FILE
2023  FIND        Override default value for FIND
2024  HEAD        Override default value for HEAD
2025  LN          Override default value for LN
2026  LS          Override default value for LS
2027  MKDIR       Override default value for MKDIR
2028  MKTEMP      Override default value for MKTEMP
2029  MV          Override default value for MV
2030  NAWK        Override default value for NAWK
2031  PRINTF      Override default value for PRINTF
2032  RM          Override default value for RM
2033  RMDIR       Override default value for RMDIR
2034  SH          Override default value for SH
2035  SORT        Override default value for SORT
2036  TAIL        Override default value for TAIL
2037  TAR         Override default value for TAR
2038  TEE         Override default value for TEE
2039  TOUCH       Override default value for TOUCH
2040  TR          Override default value for TR
2041  UNAME       Override default value for UNAME
2042  UNIQ        Override default value for UNIQ
2043  WC          Override default value for WC
2044  WHICH       Override default value for WHICH
2045  XARGS       Override default value for XARGS
2046  AWK         Override default value for AWK
2047  GREP        Override default value for GREP
2048  EGREP       Override default value for EGREP
2049  FGREP       Override default value for FGREP
2050  SED         Override default value for SED
2051  CYGPATH     Override default value for CYGPATH
2052  READLINK    Override default value for READLINK
2053  DF          Override default value for DF
2054  CPIO        Override default value for CPIO
2055  NICE        Override default value for NICE
2056  UNZIP       Override default value for UNZIP
2057  ZIP         Override default value for ZIP
2058  LDD         Override default value for LDD
2059  OTOOL       Override default value for OTOOL
2060  READELF     Override default value for READELF
2061  HG          Override default value for HG
2062  STAT        Override default value for STAT
2063  TIME        Override default value for TIME
2064  PATCH       Override default value for PATCH
2065  DSYMUTIL    Override default value for DSYMUTIL
2066  XATTR       Override default value for XATTR
2067  CODESIGN    Override default value for CODESIGN
2068  SETFILE     Override default value for SETFILE
2069  PKG_CONFIG  path to pkg-config utility
2070  JAVA        Override default value for JAVA
2071  JAVAC       Override default value for JAVAC
2072  JAVAH       Override default value for JAVAH
2073  JAR         Override default value for JAR
2074  JARSIGNER   Override default value for JARSIGNER
2075  CC          C compiler command
2076  CFLAGS      C compiler flags
2077  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2078              nonstandard directory <lib dir>
2079  LIBS        libraries to pass to the linker, e.g. -l<library>
2080  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2081              you have headers in a nonstandard directory <include dir>
2082  CXX         C++ compiler command
2083  CXXFLAGS    C++ compiler flags
2084  CPP         C preprocessor
2085  CXXCPP      C++ preprocessor
2086  AS          Override default value for AS
2087  AR          Override default value for AR
2088  LIPO        Override default value for LIPO
2089  STRIP       Override default value for STRIP
2090  NM          Override default value for NM
2091  GNM         Override default value for GNM
2092  OBJCOPY     Override default value for OBJCOPY
2093  OBJDUMP     Override default value for OBJDUMP
2094  BUILD_CC    Override default value for BUILD_CC
2095  BUILD_CXX   Override default value for BUILD_CXX
2096  BUILD_LD    Override default value for BUILD_LD
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
3746
3747
3748
3749
3750
3751# Documentation on common flags used for solstudio in HIGHEST.
3752#
3753# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3754#          done with care, there are some assumptions below that need to
3755#          be understood about the use of pointers, and IEEE behavior.
3756#
3757# -fns: Use non-standard floating point mode (not IEEE 754)
3758# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3759# -fsingle: Use single precision floating point with 'float'
3760# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3761#   (Source with excessing pointer casting and data access with mixed
3762#    pointer types are not recommended)
3763# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3764#   (If you expect perfect errno behavior, do not use this)
3765# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3766# -xrestrict: Pointer parameters to functions do not overlap
3767#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3768#    If you pass in multiple pointers to the same data, do not use this)
3769# -xlibmil: Inline some library routines
3770#   (If you expect perfect errno behavior, do not use this)
3771# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3772#   (If you expect perfect errno behavior, do not use this)
3773#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3774
3775    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3776    # Bug?
3777    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3778    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3779    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3780    #fi
3781
3782
3783
3784
3785
3786# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3787#                                   [RUN-IF-FALSE])
3788# ------------------------------------------------------------
3789# Check that the c and c++ compilers support an argument
3790
3791
3792# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3793#                                    [RUN-IF-FALSE])
3794# ------------------------------------------------------------
3795# Check that the linker support an argument
3796
3797
3798
3799
3800#
3801# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3802# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3803#
3804# This code is free software; you can redistribute it and/or modify it
3805# under the terms of the GNU General Public License version 2 only, as
3806# published by the Free Software Foundation.  Oracle designates this
3807# particular file as subject to the "Classpath" exception as provided
3808# by Oracle in the LICENSE file that accompanied this code.
3809#
3810# This code is distributed in the hope that it will be useful, but WITHOUT
3811# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3812# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3813# version 2 for more details (a copy is included in the LICENSE file that
3814# accompanied this code).
3815#
3816# You should have received a copy of the GNU General Public License version
3817# 2 along with this work; if not, write to the Free Software Foundation,
3818# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3819#
3820# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3821# or visit www.oracle.com if you need additional information or have any
3822# questions.
3823#
3824
3825
3826
3827
3828
3829cygwin_help() {
3830  case $1 in
3831    unzip)
3832      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3833      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3834      ;;
3835    zip)
3836      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3837      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3838      ;;
3839    make)
3840      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3841      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3842      ;;
3843    freetype)
3844      HELP_MSG="
3845The freetype library can now be build during the configure process.
3846Download the freetype sources and unpack them into an arbitrary directory:
3847
3848wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3849tar -xzf freetype-2.5.3.tar.gz
3850
3851Then run configure with '--with-freetype-src=<freetype_src>'. This will
3852automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3853builds or into '<freetype_src>/lib32' for 32-bit builds.
3854Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3855and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3856      ;;
3857  esac
3858}
3859
3860msys_help() {
3861  PKGHANDLER_COMMAND=""
3862}
3863
3864apt_help() {
3865  case $1 in
3866    reduced)
3867      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3868    devkit)
3869      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3870    openjdk)
3871      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3872    alsa)
3873      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3874    cups)
3875      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3876    freetype)
3877      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3878    ffi)
3879      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3880    x11)
3881      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3882    ccache)
3883      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3884  esac
3885}
3886
3887yum_help() {
3888  case $1 in
3889    devkit)
3890      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3891    openjdk)
3892      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3893    alsa)
3894      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3895    cups)
3896      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3897    freetype)
3898      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3899    x11)
3900      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3901    ccache)
3902      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3903  esac
3904}
3905
3906port_help() {
3907  PKGHANDLER_COMMAND=""
3908}
3909
3910pkgutil_help() {
3911  PKGHANDLER_COMMAND=""
3912}
3913
3914pkgadd_help() {
3915  PKGHANDLER_COMMAND=""
3916}
3917
3918# This function will check if we're called from the "configure" wrapper while
3919# printing --help. If so, we will print out additional information that can
3920# only be extracted within the autoconf script, and then exit. This must be
3921# called at the very beginning in configure.ac.
3922
3923
3924
3925
3926
3927
3928#
3929# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3930# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3931#
3932# This code is free software; you can redistribute it and/or modify it
3933# under the terms of the GNU General Public License version 2 only, as
3934# published by the Free Software Foundation.  Oracle designates this
3935# particular file as subject to the "Classpath" exception as provided
3936# by Oracle in the LICENSE file that accompanied this code.
3937#
3938# This code is distributed in the hope that it will be useful, but WITHOUT
3939# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3940# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3941# version 2 for more details (a copy is included in the LICENSE file that
3942# accompanied this code).
3943#
3944# You should have received a copy of the GNU General Public License version
3945# 2 along with this work; if not, write to the Free Software Foundation,
3946# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3947#
3948# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3949# or visit www.oracle.com if you need additional information or have any
3950# questions.
3951#
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962###############################################################################
3963#
3964# Should we build only OpenJDK even if closed sources are present?
3965#
3966
3967
3968
3969
3970###############################################################################
3971#
3972# Setup version numbers
3973#
3974
3975
3976
3977
3978
3979
3980################################################################################
3981#
3982# Gcov coverage data for hotspot
3983#
3984
3985
3986#
3987# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011# Major library component reside in separate files.
4012#
4013# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4014# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4015#
4016# This code is free software; you can redistribute it and/or modify it
4017# under the terms of the GNU General Public License version 2 only, as
4018# published by the Free Software Foundation.  Oracle designates this
4019# particular file as subject to the "Classpath" exception as provided
4020# by Oracle in the LICENSE file that accompanied this code.
4021#
4022# This code is distributed in the hope that it will be useful, but WITHOUT
4023# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4024# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4025# version 2 for more details (a copy is included in the LICENSE file that
4026# accompanied this code).
4027#
4028# You should have received a copy of the GNU General Public License version
4029# 2 along with this work; if not, write to the Free Software Foundation,
4030# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4031#
4032# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4033# or visit www.oracle.com if you need additional information or have any
4034# questions.
4035#
4036
4037################################################################################
4038# Setup alsa (Advanced Linux Sound Architecture)
4039################################################################################
4040
4041
4042#
4043# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4044# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4045#
4046# This code is free software; you can redistribute it and/or modify it
4047# under the terms of the GNU General Public License version 2 only, as
4048# published by the Free Software Foundation.  Oracle designates this
4049# particular file as subject to the "Classpath" exception as provided
4050# by Oracle in the LICENSE file that accompanied this code.
4051#
4052# This code is distributed in the hope that it will be useful, but WITHOUT
4053# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4054# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4055# version 2 for more details (a copy is included in the LICENSE file that
4056# accompanied this code).
4057#
4058# You should have received a copy of the GNU General Public License version
4059# 2 along with this work; if not, write to the Free Software Foundation,
4060# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4061#
4062# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4063# or visit www.oracle.com if you need additional information or have any
4064# questions.
4065#
4066
4067################################################################################
4068# Setup bundled libraries.
4069#
4070# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4071# OpenJDK repository. Default is to use these libraries as bundled, but they
4072# might be replaced by en external version by the user.
4073################################################################################
4074
4075
4076################################################################################
4077# Setup libjpeg
4078################################################################################
4079
4080
4081################################################################################
4082# Setup giflib
4083################################################################################
4084
4085
4086################################################################################
4087# Setup libpng
4088################################################################################
4089
4090
4091################################################################################
4092# Setup zlib
4093################################################################################
4094
4095
4096################################################################################
4097# Setup lcms (Little CMS)
4098################################################################################
4099
4100
4101#
4102# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4103# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4104#
4105# This code is free software; you can redistribute it and/or modify it
4106# under the terms of the GNU General Public License version 2 only, as
4107# published by the Free Software Foundation.  Oracle designates this
4108# particular file as subject to the "Classpath" exception as provided
4109# by Oracle in the LICENSE file that accompanied this code.
4110#
4111# This code is distributed in the hope that it will be useful, but WITHOUT
4112# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4113# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4114# version 2 for more details (a copy is included in the LICENSE file that
4115# accompanied this code).
4116#
4117# You should have received a copy of the GNU General Public License version
4118# 2 along with this work; if not, write to the Free Software Foundation,
4119# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4120#
4121# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4122# or visit www.oracle.com if you need additional information or have any
4123# questions.
4124#
4125
4126################################################################################
4127# Setup cups (Common Unix Printing System)
4128################################################################################
4129
4130
4131#
4132# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4133# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134#
4135# This code is free software; you can redistribute it and/or modify it
4136# under the terms of the GNU General Public License version 2 only, as
4137# published by the Free Software Foundation.  Oracle designates this
4138# particular file as subject to the "Classpath" exception as provided
4139# by Oracle in the LICENSE file that accompanied this code.
4140#
4141# This code is distributed in the hope that it will be useful, but WITHOUT
4142# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144# version 2 for more details (a copy is included in the LICENSE file that
4145# accompanied this code).
4146#
4147# You should have received a copy of the GNU General Public License version
4148# 2 along with this work; if not, write to the Free Software Foundation,
4149# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150#
4151# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152# or visit www.oracle.com if you need additional information or have any
4153# questions.
4154#
4155
4156################################################################################
4157# Setup libffi (Foreign Function Interface)
4158################################################################################
4159
4160
4161#
4162# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4163# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4164#
4165# This code is free software; you can redistribute it and/or modify it
4166# under the terms of the GNU General Public License version 2 only, as
4167# published by the Free Software Foundation.  Oracle designates this
4168# particular file as subject to the "Classpath" exception as provided
4169# by Oracle in the LICENSE file that accompanied this code.
4170#
4171# This code is distributed in the hope that it will be useful, but WITHOUT
4172# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4173# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4174# version 2 for more details (a copy is included in the LICENSE file that
4175# accompanied this code).
4176#
4177# You should have received a copy of the GNU General Public License version
4178# 2 along with this work; if not, write to the Free Software Foundation,
4179# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4180#
4181# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4182# or visit www.oracle.com if you need additional information or have any
4183# questions.
4184#
4185
4186################################################################################
4187# Build the freetype lib from source
4188################################################################################
4189
4190
4191################################################################################
4192# Check if a potential freeype library match is correct and usable
4193################################################################################
4194
4195
4196################################################################################
4197# Setup freetype (The FreeType2 font rendering library)
4198################################################################################
4199
4200
4201#
4202# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4203# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4204#
4205# This code is free software; you can redistribute it and/or modify it
4206# under the terms of the GNU General Public License version 2 only, as
4207# published by the Free Software Foundation.  Oracle designates this
4208# particular file as subject to the "Classpath" exception as provided
4209# by Oracle in the LICENSE file that accompanied this code.
4210#
4211# This code is distributed in the hope that it will be useful, but WITHOUT
4212# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4213# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4214# version 2 for more details (a copy is included in the LICENSE file that
4215# accompanied this code).
4216#
4217# You should have received a copy of the GNU General Public License version
4218# 2 along with this work; if not, write to the Free Software Foundation,
4219# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4220#
4221# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4222# or visit www.oracle.com if you need additional information or have any
4223# questions.
4224#
4225
4226################################################################################
4227# Setup the standard C/C++ runtime libraries.
4228#
4229# Most importantly, determine if stdc++ should be linked statically or
4230# dynamically.
4231################################################################################
4232
4233
4234#
4235# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4236# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4237#
4238# This code is free software; you can redistribute it and/or modify it
4239# under the terms of the GNU General Public License version 2 only, as
4240# published by the Free Software Foundation.  Oracle designates this
4241# particular file as subject to the "Classpath" exception as provided
4242# by Oracle in the LICENSE file that accompanied this code.
4243#
4244# This code is distributed in the hope that it will be useful, but WITHOUT
4245# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4246# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4247# version 2 for more details (a copy is included in the LICENSE file that
4248# accompanied this code).
4249#
4250# You should have received a copy of the GNU General Public License version
4251# 2 along with this work; if not, write to the Free Software Foundation,
4252# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4253#
4254# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4255# or visit www.oracle.com if you need additional information or have any
4256# questions.
4257#
4258
4259################################################################################
4260# Setup X11 Windows system
4261################################################################################
4262
4263
4264
4265################################################################################
4266# Determine which libraries are needed for this configuration
4267################################################################################
4268
4269
4270################################################################################
4271# Parse library options, and setup needed libraries
4272################################################################################
4273
4274
4275################################################################################
4276# Setup llvm (Low-Level VM)
4277################################################################################
4278
4279
4280################################################################################
4281# Setup various libraries, typically small system libraries
4282################################################################################
4283
4284
4285#
4286# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4287# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4288#
4289# This code is free software; you can redistribute it and/or modify it
4290# under the terms of the GNU General Public License version 2 only, as
4291# published by the Free Software Foundation.  Oracle designates this
4292# particular file as subject to the "Classpath" exception as provided
4293# by Oracle in the LICENSE file that accompanied this code.
4294#
4295# This code is distributed in the hope that it will be useful, but WITHOUT
4296# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4297# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4298# version 2 for more details (a copy is included in the LICENSE file that
4299# accompanied this code).
4300#
4301# You should have received a copy of the GNU General Public License version
4302# 2 along with this work; if not, write to the Free Software Foundation,
4303# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4304#
4305# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4306# or visit www.oracle.com if you need additional information or have any
4307# questions.
4308#
4309
4310# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4311# Converts autoconf style CPU name to OpenJDK style, into
4312# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4313
4314
4315# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4316# Converts autoconf style OS name to OpenJDK style, into
4317# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4318
4319
4320# Expects $host_os $host_cpu $build_os and $build_cpu
4321# and $with_target_bits to have been setup!
4322#
4323# Translate the standard triplet(quadruplet) definition
4324# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4325# OPENJDK_BUILD_OS, etc.
4326
4327
4328# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4329# accordingly. Must be done after setting up build and target system, but before
4330# doing anything else with these values.
4331
4332
4333# Setup the legacy variables, for controlling the old makefiles.
4334#
4335
4336
4337
4338
4339#%%% Build and target systems %%%
4340
4341
4342
4343
4344# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4345# Add -mX to various FLAGS variables.
4346
4347
4348
4349
4350
4351
4352#
4353# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4354# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4355#
4356# This code is free software; you can redistribute it and/or modify it
4357# under the terms of the GNU General Public License version 2 only, as
4358# published by the Free Software Foundation.  Oracle designates this
4359# particular file as subject to the "Classpath" exception as provided
4360# by Oracle in the LICENSE file that accompanied this code.
4361#
4362# This code is distributed in the hope that it will be useful, but WITHOUT
4363# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4364# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4365# version 2 for more details (a copy is included in the LICENSE file that
4366# accompanied this code).
4367#
4368# You should have received a copy of the GNU General Public License version
4369# 2 along with this work; if not, write to the Free Software Foundation,
4370# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4371#
4372# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4373# or visit www.oracle.com if you need additional information or have any
4374# questions.
4375#
4376
4377
4378
4379
4380
4381
4382
4383
4384#
4385# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4386# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4387#
4388# This code is free software; you can redistribute it and/or modify it
4389# under the terms of the GNU General Public License version 2 only, as
4390# published by the Free Software Foundation.  Oracle designates this
4391# particular file as subject to the "Classpath" exception as provided
4392# by Oracle in the LICENSE file that accompanied this code.
4393#
4394# This code is distributed in the hope that it will be useful, but WITHOUT
4395# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4396# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4397# version 2 for more details (a copy is included in the LICENSE file that
4398# accompanied this code).
4399#
4400# You should have received a copy of the GNU General Public License version
4401# 2 along with this work; if not, write to the Free Software Foundation,
4402# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4403#
4404# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4405# or visit www.oracle.com if you need additional information or have any
4406# questions.
4407#
4408
4409########################################################################
4410# This file is responsible for detecting, verifying and setting up the
4411# toolchain, i.e. the compiler, linker and related utilities. It will setup
4412# proper paths to the binaries, but it will not setup any flags.
4413#
4414# The binaries used is determined by the toolchain type, which is the family of
4415# compilers and related tools that are used.
4416########################################################################
4417
4418
4419# All valid toolchains, regardless of platform (used by help.m4)
4420VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4421
4422# These toolchains are valid on different platforms
4423VALID_TOOLCHAINS_linux="gcc clang"
4424VALID_TOOLCHAINS_solaris="solstudio"
4425VALID_TOOLCHAINS_macosx="gcc clang"
4426VALID_TOOLCHAINS_aix="xlc"
4427VALID_TOOLCHAINS_windows="microsoft"
4428
4429# Toolchain descriptions
4430TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4431TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4432TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4433TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4434TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4435
4436# Setup a number of variables describing how native output files are
4437# named on this platform/toolchain.
4438
4439
4440# Determine which toolchain type to use, and make sure it is valid for this
4441# platform. Setup various information about the selected toolchain.
4442
4443
4444# Before we start detecting the toolchain executables, we might need some
4445# special setup, e.g. additional paths etc.
4446
4447
4448# Restore path, etc
4449
4450
4451# Check if a compiler is of the toolchain type we expect, and save the version
4452# information from it. If the compiler does not match the expected type,
4453# this function will abort using AC_MSG_ERROR. If it matches, the version will
4454# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4455# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4456#
4457# $1 = compiler to test (CC or CXX)
4458# $2 = human readable name of compiler (C or C++)
4459
4460
4461# Try to locate the given C or C++ compiler in the path, or otherwise.
4462#
4463# $1 = compiler to test (CC or CXX)
4464# $2 = human readable name of compiler (C or C++)
4465# $3 = list of compiler names to search for
4466
4467
4468# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4469# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4470# archiver (AR). Verify that the compilers are correct according to the
4471# toolchain type.
4472
4473
4474# Setup additional tools that is considered a part of the toolchain, but not the
4475# core part. Many of these are highly platform-specific and do not exist,
4476# and/or are not needed on all platforms.
4477
4478
4479# Setup the build tools (i.e, the compiler and linker used to build programs
4480# that should be run on the build platform, not the target platform, as a build
4481# helper). Since the non-cross-compile case uses the normal, target compilers
4482# for this, we can only do this after these have been setup.
4483
4484
4485# Setup legacy variables that are still needed as alternative ways to refer to
4486# parts of the toolchain.
4487
4488
4489# Do some additional checks on the detected tools.
4490
4491
4492# Setup the JTReg Regression Test Harness.
4493
4494
4495#
4496# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4498#
4499# This code is free software; you can redistribute it and/or modify it
4500# under the terms of the GNU General Public License version 2 only, as
4501# published by the Free Software Foundation.  Oracle designates this
4502# particular file as subject to the "Classpath" exception as provided
4503# by Oracle in the LICENSE file that accompanied this code.
4504#
4505# This code is distributed in the hope that it will be useful, but WITHOUT
4506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4508# version 2 for more details (a copy is included in the LICENSE file that
4509# accompanied this code).
4510#
4511# You should have received a copy of the GNU General Public License version
4512# 2 along with this work; if not, write to the Free Software Foundation,
4513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4514#
4515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4516# or visit www.oracle.com if you need additional information or have any
4517# questions.
4518#
4519
4520################################################################################
4521# The order of these defines the priority by which we try to find them.
4522VALID_VS_VERSIONS="2013 2012 2010"
4523
4524VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4525VS_VERSION_INTERNAL_2010=100
4526VS_MSVCR_2010=msvcr100.dll
4527# We don't use msvcp on Visual Studio 2010
4528#VS_MSVCP_2010=msvcp100.dll
4529VS_ENVVAR_2010="VS100COMNTOOLS"
4530VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4531VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4532VS_VS_PLATFORM_NAME_2010="v100"
4533VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4534
4535VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4536VS_VERSION_INTERNAL_2012=110
4537VS_MSVCR_2012=msvcr110.dll
4538VS_MSVCP_2012=msvcp110.dll
4539VS_ENVVAR_2012="VS110COMNTOOLS"
4540VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4541VS_SDK_INSTALLDIR_2012=
4542VS_VS_PLATFORM_NAME_2012="v110"
4543VS_SDK_PLATFORM_NAME_2012=
4544
4545VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4546VS_VERSION_INTERNAL_2013=120
4547VS_MSVCR_2013=msvcr120.dll
4548VS_MSVCP_2013=msvcp120.dll
4549VS_ENVVAR_2013="VS120COMNTOOLS"
4550VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4551VS_SDK_INSTALLDIR_2013=
4552VS_VS_PLATFORM_NAME_2013="v120"
4553VS_SDK_PLATFORM_NAME_2013=
4554
4555################################################################################
4556
4557
4558
4559################################################################################
4560
4561
4562
4563################################################################################
4564# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4565# build environment and assigns it to VS_ENV_CMD
4566
4567
4568################################################################################
4569
4570
4571
4572################################################################################
4573# Check if the VS env variables were setup prior to running configure.
4574# If not, then find vcvarsall.bat and run it automatically, and integrate
4575# the set env variables into the spec file.
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590# This line needs to be here, verbatim, after all includes and the dummy hook
4591# definitions. It is replaced with custom functionality when building
4592# custom sources.
4593#CUSTOM_AUTOCONF_INCLUDE
4594
4595# Do not change or remove the following line, it is needed for consistency checks:
4596DATE_WHEN_GENERATED=1446132586
4597
4598###############################################################################
4599#
4600# Initialization / Boot-strapping
4601#
4602# The bootstrapping process needs to solve the "chicken or the egg" problem,
4603# thus it jumps back and forth, each time gaining something needed later on.
4604#
4605###############################################################################
4606
4607# If we are requested to print additional help, do that and then exit.
4608# This must be the very first call.
4609
4610  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4611    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4612    $PRINTF "Which are valid to use depends on the build platform.\n"
4613    for toolchain in $VALID_TOOLCHAINS_all; do
4614      # Use indirect variable referencing
4615      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4616      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4617      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4618    done
4619
4620    # And now exit directly
4621    exit 0
4622  fi
4623
4624
4625# Basic initialization that must happen first of all in the normal process.
4626
4627  # Save the original command line. This is passed to us by the wrapper configure script.
4628
4629  # Save the path variable before it gets changed
4630  ORIGINAL_PATH="$PATH"
4631
4632  DATE_WHEN_CONFIGURED=`LANG=C date`
4633
4634  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4635$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4636  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4637$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4638
4639
4640  # Start with tools that do not need have cross compilation support
4641  # and can be expected to be found in the default PATH. These tools are
4642  # used by configure.
4643
4644  # First are all the simple required tools.
4645
4646
4647
4648  # Publish this variable in the help.
4649
4650
4651  if [ -z "${BASENAME+x}" ]; then
4652    # The variable is not set by user, try to locate tool using the code snippet
4653    for ac_prog in basename
4654do
4655  # Extract the first word of "$ac_prog", so it can be a program name with args.
4656set dummy $ac_prog; ac_word=$2
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4658$as_echo_n "checking for $ac_word... " >&6; }
4659if ${ac_cv_path_BASENAME+:} false; then :
4660  $as_echo_n "(cached) " >&6
4661else
4662  case $BASENAME in
4663  [\\/]* | ?:[\\/]*)
4664  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4665  ;;
4666  *)
4667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670  IFS=$as_save_IFS
4671  test -z "$as_dir" && as_dir=.
4672    for ac_exec_ext in '' $ac_executable_extensions; do
4673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4674    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4676    break 2
4677  fi
4678done
4679  done
4680IFS=$as_save_IFS
4681
4682  ;;
4683esac
4684fi
4685BASENAME=$ac_cv_path_BASENAME
4686if test -n "$BASENAME"; then
4687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4688$as_echo "$BASENAME" >&6; }
4689else
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4691$as_echo "no" >&6; }
4692fi
4693
4694
4695  test -n "$BASENAME" && break
4696done
4697
4698  else
4699    # The variable is set, but is it from the command line or the environment?
4700
4701    # Try to remove the string !BASENAME! from our list.
4702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4704      # If it failed, the variable was not from the command line. Ignore it,
4705      # but warn the user (except for BASH, which is always set by the calling BASH).
4706      if test "xBASENAME" != xBASH; then
4707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4708$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4709      fi
4710      # Try to locate tool using the code snippet
4711      for ac_prog in basename
4712do
4713  # Extract the first word of "$ac_prog", so it can be a program name with args.
4714set dummy $ac_prog; ac_word=$2
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4716$as_echo_n "checking for $ac_word... " >&6; }
4717if ${ac_cv_path_BASENAME+:} false; then :
4718  $as_echo_n "(cached) " >&6
4719else
4720  case $BASENAME in
4721  [\\/]* | ?:[\\/]*)
4722  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4723  ;;
4724  *)
4725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4726for as_dir in $PATH
4727do
4728  IFS=$as_save_IFS
4729  test -z "$as_dir" && as_dir=.
4730    for ac_exec_ext in '' $ac_executable_extensions; do
4731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4732    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4734    break 2
4735  fi
4736done
4737  done
4738IFS=$as_save_IFS
4739
4740  ;;
4741esac
4742fi
4743BASENAME=$ac_cv_path_BASENAME
4744if test -n "$BASENAME"; then
4745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4746$as_echo "$BASENAME" >&6; }
4747else
4748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4749$as_echo "no" >&6; }
4750fi
4751
4752
4753  test -n "$BASENAME" && break
4754done
4755
4756    else
4757      # If it succeeded, then it was overridden by the user. We will use it
4758      # for the tool.
4759
4760      # First remove it from the list of overridden variables, so we can test
4761      # for unknown variables in the end.
4762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4763
4764      # Check if we try to supply an empty value
4765      if test "x$BASENAME" = x; then
4766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4767$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4769$as_echo_n "checking for BASENAME... " >&6; }
4770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4771$as_echo "disabled" >&6; }
4772      else
4773        # Check if the provided tool contains a complete path.
4774        tool_specified="$BASENAME"
4775        tool_basename="${tool_specified##*/}"
4776        if test "x$tool_basename" = "x$tool_specified"; then
4777          # A command without a complete path is provided, search $PATH.
4778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4779$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4780          # Extract the first word of "$tool_basename", so it can be a program name with args.
4781set dummy $tool_basename; ac_word=$2
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4783$as_echo_n "checking for $ac_word... " >&6; }
4784if ${ac_cv_path_BASENAME+:} false; then :
4785  $as_echo_n "(cached) " >&6
4786else
4787  case $BASENAME in
4788  [\\/]* | ?:[\\/]*)
4789  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4790  ;;
4791  *)
4792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793for as_dir in $PATH
4794do
4795  IFS=$as_save_IFS
4796  test -z "$as_dir" && as_dir=.
4797    for ac_exec_ext in '' $ac_executable_extensions; do
4798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4799    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4801    break 2
4802  fi
4803done
4804  done
4805IFS=$as_save_IFS
4806
4807  ;;
4808esac
4809fi
4810BASENAME=$ac_cv_path_BASENAME
4811if test -n "$BASENAME"; then
4812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4813$as_echo "$BASENAME" >&6; }
4814else
4815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4816$as_echo "no" >&6; }
4817fi
4818
4819
4820          if test "x$BASENAME" = x; then
4821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4822          fi
4823        else
4824          # Otherwise we believe it is a complete path. Use it as it is.
4825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4826$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4828$as_echo_n "checking for BASENAME... " >&6; }
4829          if test ! -x "$tool_specified"; then
4830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4831$as_echo "not found" >&6; }
4832            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4833          fi
4834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4835$as_echo "$tool_specified" >&6; }
4836        fi
4837      fi
4838    fi
4839  fi
4840
4841
4842
4843  if test "x$BASENAME" = x; then
4844    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4845  fi
4846
4847
4848
4849
4850
4851  # Publish this variable in the help.
4852
4853
4854  if [ -z "${BASH+x}" ]; then
4855    # The variable is not set by user, try to locate tool using the code snippet
4856    for ac_prog in bash
4857do
4858  # Extract the first word of "$ac_prog", so it can be a program name with args.
4859set dummy $ac_prog; ac_word=$2
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if ${ac_cv_path_BASH+:} false; then :
4863  $as_echo_n "(cached) " >&6
4864else
4865  case $BASH in
4866  [\\/]* | ?:[\\/]*)
4867  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4868  ;;
4869  *)
4870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in $PATH
4872do
4873  IFS=$as_save_IFS
4874  test -z "$as_dir" && as_dir=.
4875    for ac_exec_ext in '' $ac_executable_extensions; do
4876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879    break 2
4880  fi
4881done
4882  done
4883IFS=$as_save_IFS
4884
4885  ;;
4886esac
4887fi
4888BASH=$ac_cv_path_BASH
4889if test -n "$BASH"; then
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4891$as_echo "$BASH" >&6; }
4892else
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
4897
4898  test -n "$BASH" && break
4899done
4900
4901  else
4902    # The variable is set, but is it from the command line or the environment?
4903
4904    # Try to remove the string !BASH! from our list.
4905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4907      # If it failed, the variable was not from the command line. Ignore it,
4908      # but warn the user (except for BASH, which is always set by the calling BASH).
4909      if test "xBASH" != xBASH; then
4910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4911$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4912      fi
4913      # Try to locate tool using the code snippet
4914      for ac_prog in bash
4915do
4916  # Extract the first word of "$ac_prog", so it can be a program name with args.
4917set dummy $ac_prog; ac_word=$2
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4919$as_echo_n "checking for $ac_word... " >&6; }
4920if ${ac_cv_path_BASH+:} false; then :
4921  $as_echo_n "(cached) " >&6
4922else
4923  case $BASH in
4924  [\\/]* | ?:[\\/]*)
4925  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4926  ;;
4927  *)
4928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4929for as_dir in $PATH
4930do
4931  IFS=$as_save_IFS
4932  test -z "$as_dir" && as_dir=.
4933    for ac_exec_ext in '' $ac_executable_extensions; do
4934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4935    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4937    break 2
4938  fi
4939done
4940  done
4941IFS=$as_save_IFS
4942
4943  ;;
4944esac
4945fi
4946BASH=$ac_cv_path_BASH
4947if test -n "$BASH"; then
4948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4949$as_echo "$BASH" >&6; }
4950else
4951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4952$as_echo "no" >&6; }
4953fi
4954
4955
4956  test -n "$BASH" && break
4957done
4958
4959    else
4960      # If it succeeded, then it was overridden by the user. We will use it
4961      # for the tool.
4962
4963      # First remove it from the list of overridden variables, so we can test
4964      # for unknown variables in the end.
4965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4966
4967      # Check if we try to supply an empty value
4968      if test "x$BASH" = x; then
4969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4970$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4972$as_echo_n "checking for BASH... " >&6; }
4973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4974$as_echo "disabled" >&6; }
4975      else
4976        # Check if the provided tool contains a complete path.
4977        tool_specified="$BASH"
4978        tool_basename="${tool_specified##*/}"
4979        if test "x$tool_basename" = "x$tool_specified"; then
4980          # A command without a complete path is provided, search $PATH.
4981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4982$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4983          # Extract the first word of "$tool_basename", so it can be a program name with args.
4984set dummy $tool_basename; ac_word=$2
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
4987if ${ac_cv_path_BASH+:} false; then :
4988  $as_echo_n "(cached) " >&6
4989else
4990  case $BASH in
4991  [\\/]* | ?:[\\/]*)
4992  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4993  ;;
4994  *)
4995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996for as_dir in $PATH
4997do
4998  IFS=$as_save_IFS
4999  test -z "$as_dir" && as_dir=.
5000    for ac_exec_ext in '' $ac_executable_extensions; do
5001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5002    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5004    break 2
5005  fi
5006done
5007  done
5008IFS=$as_save_IFS
5009
5010  ;;
5011esac
5012fi
5013BASH=$ac_cv_path_BASH
5014if test -n "$BASH"; then
5015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5016$as_echo "$BASH" >&6; }
5017else
5018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019$as_echo "no" >&6; }
5020fi
5021
5022
5023          if test "x$BASH" = x; then
5024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5025          fi
5026        else
5027          # Otherwise we believe it is a complete path. Use it as it is.
5028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5029$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5031$as_echo_n "checking for BASH... " >&6; }
5032          if test ! -x "$tool_specified"; then
5033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5034$as_echo "not found" >&6; }
5035            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5036          fi
5037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5038$as_echo "$tool_specified" >&6; }
5039        fi
5040      fi
5041    fi
5042  fi
5043
5044
5045
5046  if test "x$BASH" = x; then
5047    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5048  fi
5049
5050
5051
5052
5053
5054  # Publish this variable in the help.
5055
5056
5057  if [ -z "${CAT+x}" ]; then
5058    # The variable is not set by user, try to locate tool using the code snippet
5059    for ac_prog in cat
5060do
5061  # Extract the first word of "$ac_prog", so it can be a program name with args.
5062set dummy $ac_prog; ac_word=$2
5063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5064$as_echo_n "checking for $ac_word... " >&6; }
5065if ${ac_cv_path_CAT+:} false; then :
5066  $as_echo_n "(cached) " >&6
5067else
5068  case $CAT in
5069  [\\/]* | ?:[\\/]*)
5070  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5071  ;;
5072  *)
5073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076  IFS=$as_save_IFS
5077  test -z "$as_dir" && as_dir=.
5078    for ac_exec_ext in '' $ac_executable_extensions; do
5079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5080    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082    break 2
5083  fi
5084done
5085  done
5086IFS=$as_save_IFS
5087
5088  ;;
5089esac
5090fi
5091CAT=$ac_cv_path_CAT
5092if test -n "$CAT"; then
5093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5094$as_echo "$CAT" >&6; }
5095else
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097$as_echo "no" >&6; }
5098fi
5099
5100
5101  test -n "$CAT" && break
5102done
5103
5104  else
5105    # The variable is set, but is it from the command line or the environment?
5106
5107    # Try to remove the string !CAT! from our list.
5108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5110      # If it failed, the variable was not from the command line. Ignore it,
5111      # but warn the user (except for BASH, which is always set by the calling BASH).
5112      if test "xCAT" != xBASH; then
5113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5114$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5115      fi
5116      # Try to locate tool using the code snippet
5117      for ac_prog in cat
5118do
5119  # Extract the first word of "$ac_prog", so it can be a program name with args.
5120set dummy $ac_prog; ac_word=$2
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5122$as_echo_n "checking for $ac_word... " >&6; }
5123if ${ac_cv_path_CAT+:} false; then :
5124  $as_echo_n "(cached) " >&6
5125else
5126  case $CAT in
5127  [\\/]* | ?:[\\/]*)
5128  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5129  ;;
5130  *)
5131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5132for as_dir in $PATH
5133do
5134  IFS=$as_save_IFS
5135  test -z "$as_dir" && as_dir=.
5136    for ac_exec_ext in '' $ac_executable_extensions; do
5137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5138    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5140    break 2
5141  fi
5142done
5143  done
5144IFS=$as_save_IFS
5145
5146  ;;
5147esac
5148fi
5149CAT=$ac_cv_path_CAT
5150if test -n "$CAT"; then
5151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5152$as_echo "$CAT" >&6; }
5153else
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
5156fi
5157
5158
5159  test -n "$CAT" && break
5160done
5161
5162    else
5163      # If it succeeded, then it was overridden by the user. We will use it
5164      # for the tool.
5165
5166      # First remove it from the list of overridden variables, so we can test
5167      # for unknown variables in the end.
5168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5169
5170      # Check if we try to supply an empty value
5171      if test "x$CAT" = x; then
5172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5173$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5175$as_echo_n "checking for CAT... " >&6; }
5176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5177$as_echo "disabled" >&6; }
5178      else
5179        # Check if the provided tool contains a complete path.
5180        tool_specified="$CAT"
5181        tool_basename="${tool_specified##*/}"
5182        if test "x$tool_basename" = "x$tool_specified"; then
5183          # A command without a complete path is provided, search $PATH.
5184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5185$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5186          # Extract the first word of "$tool_basename", so it can be a program name with args.
5187set dummy $tool_basename; ac_word=$2
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5189$as_echo_n "checking for $ac_word... " >&6; }
5190if ${ac_cv_path_CAT+:} false; then :
5191  $as_echo_n "(cached) " >&6
5192else
5193  case $CAT in
5194  [\\/]* | ?:[\\/]*)
5195  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5196  ;;
5197  *)
5198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201  IFS=$as_save_IFS
5202  test -z "$as_dir" && as_dir=.
5203    for ac_exec_ext in '' $ac_executable_extensions; do
5204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5205    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5207    break 2
5208  fi
5209done
5210  done
5211IFS=$as_save_IFS
5212
5213  ;;
5214esac
5215fi
5216CAT=$ac_cv_path_CAT
5217if test -n "$CAT"; then
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5219$as_echo "$CAT" >&6; }
5220else
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
5223fi
5224
5225
5226          if test "x$CAT" = x; then
5227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5228          fi
5229        else
5230          # Otherwise we believe it is a complete path. Use it as it is.
5231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5232$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5234$as_echo_n "checking for CAT... " >&6; }
5235          if test ! -x "$tool_specified"; then
5236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5237$as_echo "not found" >&6; }
5238            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5239          fi
5240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5241$as_echo "$tool_specified" >&6; }
5242        fi
5243      fi
5244    fi
5245  fi
5246
5247
5248
5249  if test "x$CAT" = x; then
5250    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5251  fi
5252
5253
5254
5255
5256
5257  # Publish this variable in the help.
5258
5259
5260  if [ -z "${CHMOD+x}" ]; then
5261    # The variable is not set by user, try to locate tool using the code snippet
5262    for ac_prog in chmod
5263do
5264  # Extract the first word of "$ac_prog", so it can be a program name with args.
5265set dummy $ac_prog; ac_word=$2
5266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5267$as_echo_n "checking for $ac_word... " >&6; }
5268if ${ac_cv_path_CHMOD+:} false; then :
5269  $as_echo_n "(cached) " >&6
5270else
5271  case $CHMOD in
5272  [\\/]* | ?:[\\/]*)
5273  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5274  ;;
5275  *)
5276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5277for as_dir in $PATH
5278do
5279  IFS=$as_save_IFS
5280  test -z "$as_dir" && as_dir=.
5281    for ac_exec_ext in '' $ac_executable_extensions; do
5282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5283    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5285    break 2
5286  fi
5287done
5288  done
5289IFS=$as_save_IFS
5290
5291  ;;
5292esac
5293fi
5294CHMOD=$ac_cv_path_CHMOD
5295if test -n "$CHMOD"; then
5296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5297$as_echo "$CHMOD" >&6; }
5298else
5299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300$as_echo "no" >&6; }
5301fi
5302
5303
5304  test -n "$CHMOD" && break
5305done
5306
5307  else
5308    # The variable is set, but is it from the command line or the environment?
5309
5310    # Try to remove the string !CHMOD! from our list.
5311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5313      # If it failed, the variable was not from the command line. Ignore it,
5314      # but warn the user (except for BASH, which is always set by the calling BASH).
5315      if test "xCHMOD" != xBASH; then
5316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5317$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5318      fi
5319      # Try to locate tool using the code snippet
5320      for ac_prog in chmod
5321do
5322  # Extract the first word of "$ac_prog", so it can be a program name with args.
5323set dummy $ac_prog; ac_word=$2
5324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5325$as_echo_n "checking for $ac_word... " >&6; }
5326if ${ac_cv_path_CHMOD+:} false; then :
5327  $as_echo_n "(cached) " >&6
5328else
5329  case $CHMOD in
5330  [\\/]* | ?:[\\/]*)
5331  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5332  ;;
5333  *)
5334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335for as_dir in $PATH
5336do
5337  IFS=$as_save_IFS
5338  test -z "$as_dir" && as_dir=.
5339    for ac_exec_ext in '' $ac_executable_extensions; do
5340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5341    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5343    break 2
5344  fi
5345done
5346  done
5347IFS=$as_save_IFS
5348
5349  ;;
5350esac
5351fi
5352CHMOD=$ac_cv_path_CHMOD
5353if test -n "$CHMOD"; then
5354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5355$as_echo "$CHMOD" >&6; }
5356else
5357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358$as_echo "no" >&6; }
5359fi
5360
5361
5362  test -n "$CHMOD" && break
5363done
5364
5365    else
5366      # If it succeeded, then it was overridden by the user. We will use it
5367      # for the tool.
5368
5369      # First remove it from the list of overridden variables, so we can test
5370      # for unknown variables in the end.
5371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5372
5373      # Check if we try to supply an empty value
5374      if test "x$CHMOD" = x; then
5375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5376$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5378$as_echo_n "checking for CHMOD... " >&6; }
5379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5380$as_echo "disabled" >&6; }
5381      else
5382        # Check if the provided tool contains a complete path.
5383        tool_specified="$CHMOD"
5384        tool_basename="${tool_specified##*/}"
5385        if test "x$tool_basename" = "x$tool_specified"; then
5386          # A command without a complete path is provided, search $PATH.
5387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5388$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5389          # Extract the first word of "$tool_basename", so it can be a program name with args.
5390set dummy $tool_basename; ac_word=$2
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392$as_echo_n "checking for $ac_word... " >&6; }
5393if ${ac_cv_path_CHMOD+:} false; then :
5394  $as_echo_n "(cached) " >&6
5395else
5396  case $CHMOD in
5397  [\\/]* | ?:[\\/]*)
5398  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5399  ;;
5400  *)
5401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402for as_dir in $PATH
5403do
5404  IFS=$as_save_IFS
5405  test -z "$as_dir" && as_dir=.
5406    for ac_exec_ext in '' $ac_executable_extensions; do
5407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410    break 2
5411  fi
5412done
5413  done
5414IFS=$as_save_IFS
5415
5416  ;;
5417esac
5418fi
5419CHMOD=$ac_cv_path_CHMOD
5420if test -n "$CHMOD"; then
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5422$as_echo "$CHMOD" >&6; }
5423else
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425$as_echo "no" >&6; }
5426fi
5427
5428
5429          if test "x$CHMOD" = x; then
5430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5431          fi
5432        else
5433          # Otherwise we believe it is a complete path. Use it as it is.
5434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5435$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5437$as_echo_n "checking for CHMOD... " >&6; }
5438          if test ! -x "$tool_specified"; then
5439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5440$as_echo "not found" >&6; }
5441            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5442          fi
5443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5444$as_echo "$tool_specified" >&6; }
5445        fi
5446      fi
5447    fi
5448  fi
5449
5450
5451
5452  if test "x$CHMOD" = x; then
5453    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5454  fi
5455
5456
5457
5458
5459
5460  # Publish this variable in the help.
5461
5462
5463  if [ -z "${CMP+x}" ]; then
5464    # The variable is not set by user, try to locate tool using the code snippet
5465    for ac_prog in cmp
5466do
5467  # Extract the first word of "$ac_prog", so it can be a program name with args.
5468set dummy $ac_prog; ac_word=$2
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5470$as_echo_n "checking for $ac_word... " >&6; }
5471if ${ac_cv_path_CMP+:} false; then :
5472  $as_echo_n "(cached) " >&6
5473else
5474  case $CMP in
5475  [\\/]* | ?:[\\/]*)
5476  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5477  ;;
5478  *)
5479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480for as_dir in $PATH
5481do
5482  IFS=$as_save_IFS
5483  test -z "$as_dir" && as_dir=.
5484    for ac_exec_ext in '' $ac_executable_extensions; do
5485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5486    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5488    break 2
5489  fi
5490done
5491  done
5492IFS=$as_save_IFS
5493
5494  ;;
5495esac
5496fi
5497CMP=$ac_cv_path_CMP
5498if test -n "$CMP"; then
5499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5500$as_echo "$CMP" >&6; }
5501else
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503$as_echo "no" >&6; }
5504fi
5505
5506
5507  test -n "$CMP" && break
5508done
5509
5510  else
5511    # The variable is set, but is it from the command line or the environment?
5512
5513    # Try to remove the string !CMP! from our list.
5514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5516      # If it failed, the variable was not from the command line. Ignore it,
5517      # but warn the user (except for BASH, which is always set by the calling BASH).
5518      if test "xCMP" != xBASH; then
5519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5520$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5521      fi
5522      # Try to locate tool using the code snippet
5523      for ac_prog in cmp
5524do
5525  # Extract the first word of "$ac_prog", so it can be a program name with args.
5526set dummy $ac_prog; ac_word=$2
5527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5528$as_echo_n "checking for $ac_word... " >&6; }
5529if ${ac_cv_path_CMP+:} false; then :
5530  $as_echo_n "(cached) " >&6
5531else
5532  case $CMP in
5533  [\\/]* | ?:[\\/]*)
5534  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5535  ;;
5536  *)
5537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538for as_dir in $PATH
5539do
5540  IFS=$as_save_IFS
5541  test -z "$as_dir" && as_dir=.
5542    for ac_exec_ext in '' $ac_executable_extensions; do
5543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5544    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546    break 2
5547  fi
5548done
5549  done
5550IFS=$as_save_IFS
5551
5552  ;;
5553esac
5554fi
5555CMP=$ac_cv_path_CMP
5556if test -n "$CMP"; then
5557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5558$as_echo "$CMP" >&6; }
5559else
5560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
5562fi
5563
5564
5565  test -n "$CMP" && break
5566done
5567
5568    else
5569      # If it succeeded, then it was overridden by the user. We will use it
5570      # for the tool.
5571
5572      # First remove it from the list of overridden variables, so we can test
5573      # for unknown variables in the end.
5574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5575
5576      # Check if we try to supply an empty value
5577      if test "x$CMP" = x; then
5578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5579$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5581$as_echo_n "checking for CMP... " >&6; }
5582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5583$as_echo "disabled" >&6; }
5584      else
5585        # Check if the provided tool contains a complete path.
5586        tool_specified="$CMP"
5587        tool_basename="${tool_specified##*/}"
5588        if test "x$tool_basename" = "x$tool_specified"; then
5589          # A command without a complete path is provided, search $PATH.
5590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5591$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5592          # Extract the first word of "$tool_basename", so it can be a program name with args.
5593set dummy $tool_basename; ac_word=$2
5594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5595$as_echo_n "checking for $ac_word... " >&6; }
5596if ${ac_cv_path_CMP+:} false; then :
5597  $as_echo_n "(cached) " >&6
5598else
5599  case $CMP in
5600  [\\/]* | ?:[\\/]*)
5601  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5602  ;;
5603  *)
5604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5605for as_dir in $PATH
5606do
5607  IFS=$as_save_IFS
5608  test -z "$as_dir" && as_dir=.
5609    for ac_exec_ext in '' $ac_executable_extensions; do
5610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5611    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5613    break 2
5614  fi
5615done
5616  done
5617IFS=$as_save_IFS
5618
5619  ;;
5620esac
5621fi
5622CMP=$ac_cv_path_CMP
5623if test -n "$CMP"; then
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5625$as_echo "$CMP" >&6; }
5626else
5627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5628$as_echo "no" >&6; }
5629fi
5630
5631
5632          if test "x$CMP" = x; then
5633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5634          fi
5635        else
5636          # Otherwise we believe it is a complete path. Use it as it is.
5637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5638$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5640$as_echo_n "checking for CMP... " >&6; }
5641          if test ! -x "$tool_specified"; then
5642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5643$as_echo "not found" >&6; }
5644            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5645          fi
5646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5647$as_echo "$tool_specified" >&6; }
5648        fi
5649      fi
5650    fi
5651  fi
5652
5653
5654
5655  if test "x$CMP" = x; then
5656    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5657  fi
5658
5659
5660
5661
5662
5663  # Publish this variable in the help.
5664
5665
5666  if [ -z "${COMM+x}" ]; then
5667    # The variable is not set by user, try to locate tool using the code snippet
5668    for ac_prog in comm
5669do
5670  # Extract the first word of "$ac_prog", so it can be a program name with args.
5671set dummy $ac_prog; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
5674if ${ac_cv_path_COMM+:} false; then :
5675  $as_echo_n "(cached) " >&6
5676else
5677  case $COMM in
5678  [\\/]* | ?:[\\/]*)
5679  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5680  ;;
5681  *)
5682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683for as_dir in $PATH
5684do
5685  IFS=$as_save_IFS
5686  test -z "$as_dir" && as_dir=.
5687    for ac_exec_ext in '' $ac_executable_extensions; do
5688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5689    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5691    break 2
5692  fi
5693done
5694  done
5695IFS=$as_save_IFS
5696
5697  ;;
5698esac
5699fi
5700COMM=$ac_cv_path_COMM
5701if test -n "$COMM"; then
5702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5703$as_echo "$COMM" >&6; }
5704else
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
5707fi
5708
5709
5710  test -n "$COMM" && break
5711done
5712
5713  else
5714    # The variable is set, but is it from the command line or the environment?
5715
5716    # Try to remove the string !COMM! from our list.
5717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5719      # If it failed, the variable was not from the command line. Ignore it,
5720      # but warn the user (except for BASH, which is always set by the calling BASH).
5721      if test "xCOMM" != xBASH; then
5722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5723$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5724      fi
5725      # Try to locate tool using the code snippet
5726      for ac_prog in comm
5727do
5728  # Extract the first word of "$ac_prog", so it can be a program name with args.
5729set dummy $ac_prog; ac_word=$2
5730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5731$as_echo_n "checking for $ac_word... " >&6; }
5732if ${ac_cv_path_COMM+:} false; then :
5733  $as_echo_n "(cached) " >&6
5734else
5735  case $COMM in
5736  [\\/]* | ?:[\\/]*)
5737  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5738  ;;
5739  *)
5740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5741for as_dir in $PATH
5742do
5743  IFS=$as_save_IFS
5744  test -z "$as_dir" && as_dir=.
5745    for ac_exec_ext in '' $ac_executable_extensions; do
5746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5747    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5749    break 2
5750  fi
5751done
5752  done
5753IFS=$as_save_IFS
5754
5755  ;;
5756esac
5757fi
5758COMM=$ac_cv_path_COMM
5759if test -n "$COMM"; then
5760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5761$as_echo "$COMM" >&6; }
5762else
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764$as_echo "no" >&6; }
5765fi
5766
5767
5768  test -n "$COMM" && break
5769done
5770
5771    else
5772      # If it succeeded, then it was overridden by the user. We will use it
5773      # for the tool.
5774
5775      # First remove it from the list of overridden variables, so we can test
5776      # for unknown variables in the end.
5777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5778
5779      # Check if we try to supply an empty value
5780      if test "x$COMM" = x; then
5781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5782$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5784$as_echo_n "checking for COMM... " >&6; }
5785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5786$as_echo "disabled" >&6; }
5787      else
5788        # Check if the provided tool contains a complete path.
5789        tool_specified="$COMM"
5790        tool_basename="${tool_specified##*/}"
5791        if test "x$tool_basename" = "x$tool_specified"; then
5792          # A command without a complete path is provided, search $PATH.
5793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5794$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5795          # Extract the first word of "$tool_basename", so it can be a program name with args.
5796set dummy $tool_basename; ac_word=$2
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5798$as_echo_n "checking for $ac_word... " >&6; }
5799if ${ac_cv_path_COMM+:} false; then :
5800  $as_echo_n "(cached) " >&6
5801else
5802  case $COMM in
5803  [\\/]* | ?:[\\/]*)
5804  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5805  ;;
5806  *)
5807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5808for as_dir in $PATH
5809do
5810  IFS=$as_save_IFS
5811  test -z "$as_dir" && as_dir=.
5812    for ac_exec_ext in '' $ac_executable_extensions; do
5813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5814    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5816    break 2
5817  fi
5818done
5819  done
5820IFS=$as_save_IFS
5821
5822  ;;
5823esac
5824fi
5825COMM=$ac_cv_path_COMM
5826if test -n "$COMM"; then
5827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5828$as_echo "$COMM" >&6; }
5829else
5830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831$as_echo "no" >&6; }
5832fi
5833
5834
5835          if test "x$COMM" = x; then
5836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5837          fi
5838        else
5839          # Otherwise we believe it is a complete path. Use it as it is.
5840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5841$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5843$as_echo_n "checking for COMM... " >&6; }
5844          if test ! -x "$tool_specified"; then
5845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5846$as_echo "not found" >&6; }
5847            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5848          fi
5849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5850$as_echo "$tool_specified" >&6; }
5851        fi
5852      fi
5853    fi
5854  fi
5855
5856
5857
5858  if test "x$COMM" = x; then
5859    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5860  fi
5861
5862
5863
5864
5865
5866  # Publish this variable in the help.
5867
5868
5869  if [ -z "${CP+x}" ]; then
5870    # The variable is not set by user, try to locate tool using the code snippet
5871    for ac_prog in cp
5872do
5873  # Extract the first word of "$ac_prog", so it can be a program name with args.
5874set dummy $ac_prog; ac_word=$2
5875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5876$as_echo_n "checking for $ac_word... " >&6; }
5877if ${ac_cv_path_CP+:} false; then :
5878  $as_echo_n "(cached) " >&6
5879else
5880  case $CP in
5881  [\\/]* | ?:[\\/]*)
5882  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5883  ;;
5884  *)
5885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5886for as_dir in $PATH
5887do
5888  IFS=$as_save_IFS
5889  test -z "$as_dir" && as_dir=.
5890    for ac_exec_ext in '' $ac_executable_extensions; do
5891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5892    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5894    break 2
5895  fi
5896done
5897  done
5898IFS=$as_save_IFS
5899
5900  ;;
5901esac
5902fi
5903CP=$ac_cv_path_CP
5904if test -n "$CP"; then
5905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5906$as_echo "$CP" >&6; }
5907else
5908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5909$as_echo "no" >&6; }
5910fi
5911
5912
5913  test -n "$CP" && break
5914done
5915
5916  else
5917    # The variable is set, but is it from the command line or the environment?
5918
5919    # Try to remove the string !CP! from our list.
5920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5922      # If it failed, the variable was not from the command line. Ignore it,
5923      # but warn the user (except for BASH, which is always set by the calling BASH).
5924      if test "xCP" != xBASH; then
5925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5926$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5927      fi
5928      # Try to locate tool using the code snippet
5929      for ac_prog in cp
5930do
5931  # Extract the first word of "$ac_prog", so it can be a program name with args.
5932set dummy $ac_prog; ac_word=$2
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934$as_echo_n "checking for $ac_word... " >&6; }
5935if ${ac_cv_path_CP+:} false; then :
5936  $as_echo_n "(cached) " >&6
5937else
5938  case $CP in
5939  [\\/]* | ?:[\\/]*)
5940  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5941  ;;
5942  *)
5943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5944for as_dir in $PATH
5945do
5946  IFS=$as_save_IFS
5947  test -z "$as_dir" && as_dir=.
5948    for ac_exec_ext in '' $ac_executable_extensions; do
5949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5950    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5952    break 2
5953  fi
5954done
5955  done
5956IFS=$as_save_IFS
5957
5958  ;;
5959esac
5960fi
5961CP=$ac_cv_path_CP
5962if test -n "$CP"; then
5963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5964$as_echo "$CP" >&6; }
5965else
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967$as_echo "no" >&6; }
5968fi
5969
5970
5971  test -n "$CP" && break
5972done
5973
5974    else
5975      # If it succeeded, then it was overridden by the user. We will use it
5976      # for the tool.
5977
5978      # First remove it from the list of overridden variables, so we can test
5979      # for unknown variables in the end.
5980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5981
5982      # Check if we try to supply an empty value
5983      if test "x$CP" = x; then
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
5985$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5987$as_echo_n "checking for CP... " >&6; }
5988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5989$as_echo "disabled" >&6; }
5990      else
5991        # Check if the provided tool contains a complete path.
5992        tool_specified="$CP"
5993        tool_basename="${tool_specified##*/}"
5994        if test "x$tool_basename" = "x$tool_specified"; then
5995          # A command without a complete path is provided, search $PATH.
5996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5997$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5998          # Extract the first word of "$tool_basename", so it can be a program name with args.
5999set dummy $tool_basename; ac_word=$2
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6001$as_echo_n "checking for $ac_word... " >&6; }
6002if ${ac_cv_path_CP+:} false; then :
6003  $as_echo_n "(cached) " >&6
6004else
6005  case $CP in
6006  [\\/]* | ?:[\\/]*)
6007  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6008  ;;
6009  *)
6010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011for as_dir in $PATH
6012do
6013  IFS=$as_save_IFS
6014  test -z "$as_dir" && as_dir=.
6015    for ac_exec_ext in '' $ac_executable_extensions; do
6016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6017    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6019    break 2
6020  fi
6021done
6022  done
6023IFS=$as_save_IFS
6024
6025  ;;
6026esac
6027fi
6028CP=$ac_cv_path_CP
6029if test -n "$CP"; then
6030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6031$as_echo "$CP" >&6; }
6032else
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034$as_echo "no" >&6; }
6035fi
6036
6037
6038          if test "x$CP" = x; then
6039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6040          fi
6041        else
6042          # Otherwise we believe it is a complete path. Use it as it is.
6043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6044$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6046$as_echo_n "checking for CP... " >&6; }
6047          if test ! -x "$tool_specified"; then
6048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6049$as_echo "not found" >&6; }
6050            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6051          fi
6052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6053$as_echo "$tool_specified" >&6; }
6054        fi
6055      fi
6056    fi
6057  fi
6058
6059
6060
6061  if test "x$CP" = x; then
6062    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6063  fi
6064
6065
6066
6067
6068
6069  # Publish this variable in the help.
6070
6071
6072  if [ -z "${CUT+x}" ]; then
6073    # The variable is not set by user, try to locate tool using the code snippet
6074    for ac_prog in cut
6075do
6076  # Extract the first word of "$ac_prog", so it can be a program name with args.
6077set dummy $ac_prog; ac_word=$2
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6079$as_echo_n "checking for $ac_word... " >&6; }
6080if ${ac_cv_path_CUT+:} false; then :
6081  $as_echo_n "(cached) " >&6
6082else
6083  case $CUT in
6084  [\\/]* | ?:[\\/]*)
6085  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6086  ;;
6087  *)
6088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089for as_dir in $PATH
6090do
6091  IFS=$as_save_IFS
6092  test -z "$as_dir" && as_dir=.
6093    for ac_exec_ext in '' $ac_executable_extensions; do
6094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6095    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6097    break 2
6098  fi
6099done
6100  done
6101IFS=$as_save_IFS
6102
6103  ;;
6104esac
6105fi
6106CUT=$ac_cv_path_CUT
6107if test -n "$CUT"; then
6108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6109$as_echo "$CUT" >&6; }
6110else
6111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
6113fi
6114
6115
6116  test -n "$CUT" && break
6117done
6118
6119  else
6120    # The variable is set, but is it from the command line or the environment?
6121
6122    # Try to remove the string !CUT! from our list.
6123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6125      # If it failed, the variable was not from the command line. Ignore it,
6126      # but warn the user (except for BASH, which is always set by the calling BASH).
6127      if test "xCUT" != xBASH; then
6128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6129$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6130      fi
6131      # Try to locate tool using the code snippet
6132      for ac_prog in cut
6133do
6134  # Extract the first word of "$ac_prog", so it can be a program name with args.
6135set dummy $ac_prog; ac_word=$2
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6137$as_echo_n "checking for $ac_word... " >&6; }
6138if ${ac_cv_path_CUT+:} false; then :
6139  $as_echo_n "(cached) " >&6
6140else
6141  case $CUT in
6142  [\\/]* | ?:[\\/]*)
6143  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6144  ;;
6145  *)
6146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147for as_dir in $PATH
6148do
6149  IFS=$as_save_IFS
6150  test -z "$as_dir" && as_dir=.
6151    for ac_exec_ext in '' $ac_executable_extensions; do
6152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6153    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6155    break 2
6156  fi
6157done
6158  done
6159IFS=$as_save_IFS
6160
6161  ;;
6162esac
6163fi
6164CUT=$ac_cv_path_CUT
6165if test -n "$CUT"; then
6166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6167$as_echo "$CUT" >&6; }
6168else
6169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6170$as_echo "no" >&6; }
6171fi
6172
6173
6174  test -n "$CUT" && break
6175done
6176
6177    else
6178      # If it succeeded, then it was overridden by the user. We will use it
6179      # for the tool.
6180
6181      # First remove it from the list of overridden variables, so we can test
6182      # for unknown variables in the end.
6183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6184
6185      # Check if we try to supply an empty value
6186      if test "x$CUT" = x; then
6187        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6188$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6190$as_echo_n "checking for CUT... " >&6; }
6191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6192$as_echo "disabled" >&6; }
6193      else
6194        # Check if the provided tool contains a complete path.
6195        tool_specified="$CUT"
6196        tool_basename="${tool_specified##*/}"
6197        if test "x$tool_basename" = "x$tool_specified"; then
6198          # A command without a complete path is provided, search $PATH.
6199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6200$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6201          # Extract the first word of "$tool_basename", so it can be a program name with args.
6202set dummy $tool_basename; ac_word=$2
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204$as_echo_n "checking for $ac_word... " >&6; }
6205if ${ac_cv_path_CUT+:} false; then :
6206  $as_echo_n "(cached) " >&6
6207else
6208  case $CUT in
6209  [\\/]* | ?:[\\/]*)
6210  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6211  ;;
6212  *)
6213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214for as_dir in $PATH
6215do
6216  IFS=$as_save_IFS
6217  test -z "$as_dir" && as_dir=.
6218    for ac_exec_ext in '' $ac_executable_extensions; do
6219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6220    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6222    break 2
6223  fi
6224done
6225  done
6226IFS=$as_save_IFS
6227
6228  ;;
6229esac
6230fi
6231CUT=$ac_cv_path_CUT
6232if test -n "$CUT"; then
6233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6234$as_echo "$CUT" >&6; }
6235else
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237$as_echo "no" >&6; }
6238fi
6239
6240
6241          if test "x$CUT" = x; then
6242            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6243          fi
6244        else
6245          # Otherwise we believe it is a complete path. Use it as it is.
6246          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6247$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6248          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6249$as_echo_n "checking for CUT... " >&6; }
6250          if test ! -x "$tool_specified"; then
6251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6252$as_echo "not found" >&6; }
6253            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6254          fi
6255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6256$as_echo "$tool_specified" >&6; }
6257        fi
6258      fi
6259    fi
6260  fi
6261
6262
6263
6264  if test "x$CUT" = x; then
6265    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6266  fi
6267
6268
6269
6270
6271
6272  # Publish this variable in the help.
6273
6274
6275  if [ -z "${DATE+x}" ]; then
6276    # The variable is not set by user, try to locate tool using the code snippet
6277    for ac_prog in date
6278do
6279  # Extract the first word of "$ac_prog", so it can be a program name with args.
6280set dummy $ac_prog; ac_word=$2
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282$as_echo_n "checking for $ac_word... " >&6; }
6283if ${ac_cv_path_DATE+:} false; then :
6284  $as_echo_n "(cached) " >&6
6285else
6286  case $DATE in
6287  [\\/]* | ?:[\\/]*)
6288  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6289  ;;
6290  *)
6291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292for as_dir in $PATH
6293do
6294  IFS=$as_save_IFS
6295  test -z "$as_dir" && as_dir=.
6296    for ac_exec_ext in '' $ac_executable_extensions; do
6297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6300    break 2
6301  fi
6302done
6303  done
6304IFS=$as_save_IFS
6305
6306  ;;
6307esac
6308fi
6309DATE=$ac_cv_path_DATE
6310if test -n "$DATE"; then
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6312$as_echo "$DATE" >&6; }
6313else
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
6319  test -n "$DATE" && break
6320done
6321
6322  else
6323    # The variable is set, but is it from the command line or the environment?
6324
6325    # Try to remove the string !DATE! from our list.
6326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6328      # If it failed, the variable was not from the command line. Ignore it,
6329      # but warn the user (except for BASH, which is always set by the calling BASH).
6330      if test "xDATE" != xBASH; then
6331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6332$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6333      fi
6334      # Try to locate tool using the code snippet
6335      for ac_prog in date
6336do
6337  # Extract the first word of "$ac_prog", so it can be a program name with args.
6338set dummy $ac_prog; ac_word=$2
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340$as_echo_n "checking for $ac_word... " >&6; }
6341if ${ac_cv_path_DATE+:} false; then :
6342  $as_echo_n "(cached) " >&6
6343else
6344  case $DATE in
6345  [\\/]* | ?:[\\/]*)
6346  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6347  ;;
6348  *)
6349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6350for as_dir in $PATH
6351do
6352  IFS=$as_save_IFS
6353  test -z "$as_dir" && as_dir=.
6354    for ac_exec_ext in '' $ac_executable_extensions; do
6355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6356    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6358    break 2
6359  fi
6360done
6361  done
6362IFS=$as_save_IFS
6363
6364  ;;
6365esac
6366fi
6367DATE=$ac_cv_path_DATE
6368if test -n "$DATE"; then
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6370$as_echo "$DATE" >&6; }
6371else
6372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
6374fi
6375
6376
6377  test -n "$DATE" && break
6378done
6379
6380    else
6381      # If it succeeded, then it was overridden by the user. We will use it
6382      # for the tool.
6383
6384      # First remove it from the list of overridden variables, so we can test
6385      # for unknown variables in the end.
6386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6387
6388      # Check if we try to supply an empty value
6389      if test "x$DATE" = x; then
6390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6391$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6393$as_echo_n "checking for DATE... " >&6; }
6394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6395$as_echo "disabled" >&6; }
6396      else
6397        # Check if the provided tool contains a complete path.
6398        tool_specified="$DATE"
6399        tool_basename="${tool_specified##*/}"
6400        if test "x$tool_basename" = "x$tool_specified"; then
6401          # A command without a complete path is provided, search $PATH.
6402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6403$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6404          # Extract the first word of "$tool_basename", so it can be a program name with args.
6405set dummy $tool_basename; ac_word=$2
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6407$as_echo_n "checking for $ac_word... " >&6; }
6408if ${ac_cv_path_DATE+:} false; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  case $DATE in
6412  [\\/]* | ?:[\\/]*)
6413  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6414  ;;
6415  *)
6416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6417for as_dir in $PATH
6418do
6419  IFS=$as_save_IFS
6420  test -z "$as_dir" && as_dir=.
6421    for ac_exec_ext in '' $ac_executable_extensions; do
6422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6423    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6425    break 2
6426  fi
6427done
6428  done
6429IFS=$as_save_IFS
6430
6431  ;;
6432esac
6433fi
6434DATE=$ac_cv_path_DATE
6435if test -n "$DATE"; then
6436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6437$as_echo "$DATE" >&6; }
6438else
6439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
6441fi
6442
6443
6444          if test "x$DATE" = x; then
6445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6446          fi
6447        else
6448          # Otherwise we believe it is a complete path. Use it as it is.
6449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6450$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6452$as_echo_n "checking for DATE... " >&6; }
6453          if test ! -x "$tool_specified"; then
6454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6455$as_echo "not found" >&6; }
6456            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6457          fi
6458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6459$as_echo "$tool_specified" >&6; }
6460        fi
6461      fi
6462    fi
6463  fi
6464
6465
6466
6467  if test "x$DATE" = x; then
6468    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6469  fi
6470
6471
6472
6473
6474
6475  # Publish this variable in the help.
6476
6477
6478  if [ -z "${DIFF+x}" ]; then
6479    # The variable is not set by user, try to locate tool using the code snippet
6480    for ac_prog in gdiff diff
6481do
6482  # Extract the first word of "$ac_prog", so it can be a program name with args.
6483set dummy $ac_prog; ac_word=$2
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6485$as_echo_n "checking for $ac_word... " >&6; }
6486if ${ac_cv_path_DIFF+:} false; then :
6487  $as_echo_n "(cached) " >&6
6488else
6489  case $DIFF in
6490  [\\/]* | ?:[\\/]*)
6491  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6492  ;;
6493  *)
6494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6495for as_dir in $PATH
6496do
6497  IFS=$as_save_IFS
6498  test -z "$as_dir" && as_dir=.
6499    for ac_exec_ext in '' $ac_executable_extensions; do
6500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6501    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6503    break 2
6504  fi
6505done
6506  done
6507IFS=$as_save_IFS
6508
6509  ;;
6510esac
6511fi
6512DIFF=$ac_cv_path_DIFF
6513if test -n "$DIFF"; then
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6515$as_echo "$DIFF" >&6; }
6516else
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6518$as_echo "no" >&6; }
6519fi
6520
6521
6522  test -n "$DIFF" && break
6523done
6524
6525  else
6526    # The variable is set, but is it from the command line or the environment?
6527
6528    # Try to remove the string !DIFF! from our list.
6529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6531      # If it failed, the variable was not from the command line. Ignore it,
6532      # but warn the user (except for BASH, which is always set by the calling BASH).
6533      if test "xDIFF" != xBASH; then
6534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6535$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6536      fi
6537      # Try to locate tool using the code snippet
6538      for ac_prog in gdiff diff
6539do
6540  # Extract the first word of "$ac_prog", so it can be a program name with args.
6541set dummy $ac_prog; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_DIFF+:} false; then :
6545  $as_echo_n "(cached) " >&6
6546else
6547  case $DIFF in
6548  [\\/]* | ?:[\\/]*)
6549  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6550  ;;
6551  *)
6552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in $PATH
6554do
6555  IFS=$as_save_IFS
6556  test -z "$as_dir" && as_dir=.
6557    for ac_exec_ext in '' $ac_executable_extensions; do
6558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561    break 2
6562  fi
6563done
6564  done
6565IFS=$as_save_IFS
6566
6567  ;;
6568esac
6569fi
6570DIFF=$ac_cv_path_DIFF
6571if test -n "$DIFF"; then
6572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6573$as_echo "$DIFF" >&6; }
6574else
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
6579
6580  test -n "$DIFF" && break
6581done
6582
6583    else
6584      # If it succeeded, then it was overridden by the user. We will use it
6585      # for the tool.
6586
6587      # First remove it from the list of overridden variables, so we can test
6588      # for unknown variables in the end.
6589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6590
6591      # Check if we try to supply an empty value
6592      if test "x$DIFF" = x; then
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6594$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6596$as_echo_n "checking for DIFF... " >&6; }
6597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6598$as_echo "disabled" >&6; }
6599      else
6600        # Check if the provided tool contains a complete path.
6601        tool_specified="$DIFF"
6602        tool_basename="${tool_specified##*/}"
6603        if test "x$tool_basename" = "x$tool_specified"; then
6604          # A command without a complete path is provided, search $PATH.
6605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6606$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6607          # Extract the first word of "$tool_basename", so it can be a program name with args.
6608set dummy $tool_basename; ac_word=$2
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610$as_echo_n "checking for $ac_word... " >&6; }
6611if ${ac_cv_path_DIFF+:} false; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  case $DIFF in
6615  [\\/]* | ?:[\\/]*)
6616  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6617  ;;
6618  *)
6619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620for as_dir in $PATH
6621do
6622  IFS=$as_save_IFS
6623  test -z "$as_dir" && as_dir=.
6624    for ac_exec_ext in '' $ac_executable_extensions; do
6625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628    break 2
6629  fi
6630done
6631  done
6632IFS=$as_save_IFS
6633
6634  ;;
6635esac
6636fi
6637DIFF=$ac_cv_path_DIFF
6638if test -n "$DIFF"; then
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6640$as_echo "$DIFF" >&6; }
6641else
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
6644fi
6645
6646
6647          if test "x$DIFF" = x; then
6648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6649          fi
6650        else
6651          # Otherwise we believe it is a complete path. Use it as it is.
6652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6653$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6655$as_echo_n "checking for DIFF... " >&6; }
6656          if test ! -x "$tool_specified"; then
6657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6658$as_echo "not found" >&6; }
6659            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6660          fi
6661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6662$as_echo "$tool_specified" >&6; }
6663        fi
6664      fi
6665    fi
6666  fi
6667
6668
6669
6670  if test "x$DIFF" = x; then
6671    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6672  fi
6673
6674
6675
6676
6677
6678  # Publish this variable in the help.
6679
6680
6681  if [ -z "${DIRNAME+x}" ]; then
6682    # The variable is not set by user, try to locate tool using the code snippet
6683    for ac_prog in dirname
6684do
6685  # Extract the first word of "$ac_prog", so it can be a program name with args.
6686set dummy $ac_prog; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_DIRNAME+:} false; then :
6690  $as_echo_n "(cached) " >&6
6691else
6692  case $DIRNAME in
6693  [\\/]* | ?:[\\/]*)
6694  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6695  ;;
6696  *)
6697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in $PATH
6699do
6700  IFS=$as_save_IFS
6701  test -z "$as_dir" && as_dir=.
6702    for ac_exec_ext in '' $ac_executable_extensions; do
6703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6704    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706    break 2
6707  fi
6708done
6709  done
6710IFS=$as_save_IFS
6711
6712  ;;
6713esac
6714fi
6715DIRNAME=$ac_cv_path_DIRNAME
6716if test -n "$DIRNAME"; then
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6718$as_echo "$DIRNAME" >&6; }
6719else
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
6725  test -n "$DIRNAME" && break
6726done
6727
6728  else
6729    # The variable is set, but is it from the command line or the environment?
6730
6731    # Try to remove the string !DIRNAME! from our list.
6732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6734      # If it failed, the variable was not from the command line. Ignore it,
6735      # but warn the user (except for BASH, which is always set by the calling BASH).
6736      if test "xDIRNAME" != xBASH; then
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6738$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6739      fi
6740      # Try to locate tool using the code snippet
6741      for ac_prog in dirname
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_DIRNAME+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $DIRNAME in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773DIRNAME=$ac_cv_path_DIRNAME
6774if test -n "$DIRNAME"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6776$as_echo "$DIRNAME" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$DIRNAME" && break
6784done
6785
6786    else
6787      # If it succeeded, then it was overridden by the user. We will use it
6788      # for the tool.
6789
6790      # First remove it from the list of overridden variables, so we can test
6791      # for unknown variables in the end.
6792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6793
6794      # Check if we try to supply an empty value
6795      if test "x$DIRNAME" = x; then
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6797$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6799$as_echo_n "checking for DIRNAME... " >&6; }
6800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6801$as_echo "disabled" >&6; }
6802      else
6803        # Check if the provided tool contains a complete path.
6804        tool_specified="$DIRNAME"
6805        tool_basename="${tool_specified##*/}"
6806        if test "x$tool_basename" = "x$tool_specified"; then
6807          # A command without a complete path is provided, search $PATH.
6808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6809$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6810          # Extract the first word of "$tool_basename", so it can be a program name with args.
6811set dummy $tool_basename; ac_word=$2
6812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813$as_echo_n "checking for $ac_word... " >&6; }
6814if ${ac_cv_path_DIRNAME+:} false; then :
6815  $as_echo_n "(cached) " >&6
6816else
6817  case $DIRNAME in
6818  [\\/]* | ?:[\\/]*)
6819  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6820  ;;
6821  *)
6822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823for as_dir in $PATH
6824do
6825  IFS=$as_save_IFS
6826  test -z "$as_dir" && as_dir=.
6827    for ac_exec_ext in '' $ac_executable_extensions; do
6828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6829    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6831    break 2
6832  fi
6833done
6834  done
6835IFS=$as_save_IFS
6836
6837  ;;
6838esac
6839fi
6840DIRNAME=$ac_cv_path_DIRNAME
6841if test -n "$DIRNAME"; then
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6843$as_echo "$DIRNAME" >&6; }
6844else
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }
6847fi
6848
6849
6850          if test "x$DIRNAME" = x; then
6851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6852          fi
6853        else
6854          # Otherwise we believe it is a complete path. Use it as it is.
6855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6856$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6858$as_echo_n "checking for DIRNAME... " >&6; }
6859          if test ! -x "$tool_specified"; then
6860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6861$as_echo "not found" >&6; }
6862            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6863          fi
6864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6865$as_echo "$tool_specified" >&6; }
6866        fi
6867      fi
6868    fi
6869  fi
6870
6871
6872
6873  if test "x$DIRNAME" = x; then
6874    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6875  fi
6876
6877
6878
6879
6880
6881  # Publish this variable in the help.
6882
6883
6884  if [ -z "${ECHO+x}" ]; then
6885    # The variable is not set by user, try to locate tool using the code snippet
6886    for ac_prog in echo
6887do
6888  # Extract the first word of "$ac_prog", so it can be a program name with args.
6889set dummy $ac_prog; ac_word=$2
6890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6891$as_echo_n "checking for $ac_word... " >&6; }
6892if ${ac_cv_path_ECHO+:} false; then :
6893  $as_echo_n "(cached) " >&6
6894else
6895  case $ECHO in
6896  [\\/]* | ?:[\\/]*)
6897  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6898  ;;
6899  *)
6900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6901for as_dir in $PATH
6902do
6903  IFS=$as_save_IFS
6904  test -z "$as_dir" && as_dir=.
6905    for ac_exec_ext in '' $ac_executable_extensions; do
6906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6907    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6909    break 2
6910  fi
6911done
6912  done
6913IFS=$as_save_IFS
6914
6915  ;;
6916esac
6917fi
6918ECHO=$ac_cv_path_ECHO
6919if test -n "$ECHO"; then
6920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6921$as_echo "$ECHO" >&6; }
6922else
6923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6924$as_echo "no" >&6; }
6925fi
6926
6927
6928  test -n "$ECHO" && break
6929done
6930
6931  else
6932    # The variable is set, but is it from the command line or the environment?
6933
6934    # Try to remove the string !ECHO! from our list.
6935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6937      # If it failed, the variable was not from the command line. Ignore it,
6938      # but warn the user (except for BASH, which is always set by the calling BASH).
6939      if test "xECHO" != xBASH; then
6940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6941$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6942      fi
6943      # Try to locate tool using the code snippet
6944      for ac_prog in echo
6945do
6946  # Extract the first word of "$ac_prog", so it can be a program name with args.
6947set dummy $ac_prog; ac_word=$2
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6949$as_echo_n "checking for $ac_word... " >&6; }
6950if ${ac_cv_path_ECHO+:} false; then :
6951  $as_echo_n "(cached) " >&6
6952else
6953  case $ECHO in
6954  [\\/]* | ?:[\\/]*)
6955  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6956  ;;
6957  *)
6958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6959for as_dir in $PATH
6960do
6961  IFS=$as_save_IFS
6962  test -z "$as_dir" && as_dir=.
6963    for ac_exec_ext in '' $ac_executable_extensions; do
6964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6965    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6967    break 2
6968  fi
6969done
6970  done
6971IFS=$as_save_IFS
6972
6973  ;;
6974esac
6975fi
6976ECHO=$ac_cv_path_ECHO
6977if test -n "$ECHO"; then
6978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6979$as_echo "$ECHO" >&6; }
6980else
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6982$as_echo "no" >&6; }
6983fi
6984
6985
6986  test -n "$ECHO" && break
6987done
6988
6989    else
6990      # If it succeeded, then it was overridden by the user. We will use it
6991      # for the tool.
6992
6993      # First remove it from the list of overridden variables, so we can test
6994      # for unknown variables in the end.
6995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6996
6997      # Check if we try to supply an empty value
6998      if test "x$ECHO" = x; then
6999        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7000$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7002$as_echo_n "checking for ECHO... " >&6; }
7003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7004$as_echo "disabled" >&6; }
7005      else
7006        # Check if the provided tool contains a complete path.
7007        tool_specified="$ECHO"
7008        tool_basename="${tool_specified##*/}"
7009        if test "x$tool_basename" = "x$tool_specified"; then
7010          # A command without a complete path is provided, search $PATH.
7011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7012$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7013          # Extract the first word of "$tool_basename", so it can be a program name with args.
7014set dummy $tool_basename; ac_word=$2
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7016$as_echo_n "checking for $ac_word... " >&6; }
7017if ${ac_cv_path_ECHO+:} false; then :
7018  $as_echo_n "(cached) " >&6
7019else
7020  case $ECHO in
7021  [\\/]* | ?:[\\/]*)
7022  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7023  ;;
7024  *)
7025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7026for as_dir in $PATH
7027do
7028  IFS=$as_save_IFS
7029  test -z "$as_dir" && as_dir=.
7030    for ac_exec_ext in '' $ac_executable_extensions; do
7031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7032    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7034    break 2
7035  fi
7036done
7037  done
7038IFS=$as_save_IFS
7039
7040  ;;
7041esac
7042fi
7043ECHO=$ac_cv_path_ECHO
7044if test -n "$ECHO"; then
7045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7046$as_echo "$ECHO" >&6; }
7047else
7048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7049$as_echo "no" >&6; }
7050fi
7051
7052
7053          if test "x$ECHO" = x; then
7054            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7055          fi
7056        else
7057          # Otherwise we believe it is a complete path. Use it as it is.
7058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7059$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7060          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7061$as_echo_n "checking for ECHO... " >&6; }
7062          if test ! -x "$tool_specified"; then
7063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7064$as_echo "not found" >&6; }
7065            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7066          fi
7067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7068$as_echo "$tool_specified" >&6; }
7069        fi
7070      fi
7071    fi
7072  fi
7073
7074
7075
7076  if test "x$ECHO" = x; then
7077    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7078  fi
7079
7080
7081
7082
7083
7084  # Publish this variable in the help.
7085
7086
7087  if [ -z "${EXPR+x}" ]; then
7088    # The variable is not set by user, try to locate tool using the code snippet
7089    for ac_prog in expr
7090do
7091  # Extract the first word of "$ac_prog", so it can be a program name with args.
7092set dummy $ac_prog; ac_word=$2
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7094$as_echo_n "checking for $ac_word... " >&6; }
7095if ${ac_cv_path_EXPR+:} false; then :
7096  $as_echo_n "(cached) " >&6
7097else
7098  case $EXPR in
7099  [\\/]* | ?:[\\/]*)
7100  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7101  ;;
7102  *)
7103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7104for as_dir in $PATH
7105do
7106  IFS=$as_save_IFS
7107  test -z "$as_dir" && as_dir=.
7108    for ac_exec_ext in '' $ac_executable_extensions; do
7109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7110    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7112    break 2
7113  fi
7114done
7115  done
7116IFS=$as_save_IFS
7117
7118  ;;
7119esac
7120fi
7121EXPR=$ac_cv_path_EXPR
7122if test -n "$EXPR"; then
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7124$as_echo "$EXPR" >&6; }
7125else
7126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7127$as_echo "no" >&6; }
7128fi
7129
7130
7131  test -n "$EXPR" && break
7132done
7133
7134  else
7135    # The variable is set, but is it from the command line or the environment?
7136
7137    # Try to remove the string !EXPR! from our list.
7138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7140      # If it failed, the variable was not from the command line. Ignore it,
7141      # but warn the user (except for BASH, which is always set by the calling BASH).
7142      if test "xEXPR" != xBASH; then
7143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7144$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7145      fi
7146      # Try to locate tool using the code snippet
7147      for ac_prog in expr
7148do
7149  # Extract the first word of "$ac_prog", so it can be a program name with args.
7150set dummy $ac_prog; ac_word=$2
7151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7152$as_echo_n "checking for $ac_word... " >&6; }
7153if ${ac_cv_path_EXPR+:} false; then :
7154  $as_echo_n "(cached) " >&6
7155else
7156  case $EXPR in
7157  [\\/]* | ?:[\\/]*)
7158  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7159  ;;
7160  *)
7161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162for as_dir in $PATH
7163do
7164  IFS=$as_save_IFS
7165  test -z "$as_dir" && as_dir=.
7166    for ac_exec_ext in '' $ac_executable_extensions; do
7167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7168    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7170    break 2
7171  fi
7172done
7173  done
7174IFS=$as_save_IFS
7175
7176  ;;
7177esac
7178fi
7179EXPR=$ac_cv_path_EXPR
7180if test -n "$EXPR"; then
7181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7182$as_echo "$EXPR" >&6; }
7183else
7184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185$as_echo "no" >&6; }
7186fi
7187
7188
7189  test -n "$EXPR" && break
7190done
7191
7192    else
7193      # If it succeeded, then it was overridden by the user. We will use it
7194      # for the tool.
7195
7196      # First remove it from the list of overridden variables, so we can test
7197      # for unknown variables in the end.
7198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7199
7200      # Check if we try to supply an empty value
7201      if test "x$EXPR" = x; then
7202        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7203$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7205$as_echo_n "checking for EXPR... " >&6; }
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7207$as_echo "disabled" >&6; }
7208      else
7209        # Check if the provided tool contains a complete path.
7210        tool_specified="$EXPR"
7211        tool_basename="${tool_specified##*/}"
7212        if test "x$tool_basename" = "x$tool_specified"; then
7213          # A command without a complete path is provided, search $PATH.
7214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7215$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7216          # Extract the first word of "$tool_basename", so it can be a program name with args.
7217set dummy $tool_basename; ac_word=$2
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7219$as_echo_n "checking for $ac_word... " >&6; }
7220if ${ac_cv_path_EXPR+:} false; then :
7221  $as_echo_n "(cached) " >&6
7222else
7223  case $EXPR in
7224  [\\/]* | ?:[\\/]*)
7225  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7226  ;;
7227  *)
7228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7229for as_dir in $PATH
7230do
7231  IFS=$as_save_IFS
7232  test -z "$as_dir" && as_dir=.
7233    for ac_exec_ext in '' $ac_executable_extensions; do
7234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7235    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7237    break 2
7238  fi
7239done
7240  done
7241IFS=$as_save_IFS
7242
7243  ;;
7244esac
7245fi
7246EXPR=$ac_cv_path_EXPR
7247if test -n "$EXPR"; then
7248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7249$as_echo "$EXPR" >&6; }
7250else
7251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7252$as_echo "no" >&6; }
7253fi
7254
7255
7256          if test "x$EXPR" = x; then
7257            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7258          fi
7259        else
7260          # Otherwise we believe it is a complete path. Use it as it is.
7261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7262$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7263          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7264$as_echo_n "checking for EXPR... " >&6; }
7265          if test ! -x "$tool_specified"; then
7266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7267$as_echo "not found" >&6; }
7268            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7269          fi
7270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7271$as_echo "$tool_specified" >&6; }
7272        fi
7273      fi
7274    fi
7275  fi
7276
7277
7278
7279  if test "x$EXPR" = x; then
7280    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7281  fi
7282
7283
7284
7285
7286
7287  # Publish this variable in the help.
7288
7289
7290  if [ -z "${FILE+x}" ]; then
7291    # The variable is not set by user, try to locate tool using the code snippet
7292    for ac_prog in file
7293do
7294  # Extract the first word of "$ac_prog", so it can be a program name with args.
7295set dummy $ac_prog; ac_word=$2
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297$as_echo_n "checking for $ac_word... " >&6; }
7298if ${ac_cv_path_FILE+:} false; then :
7299  $as_echo_n "(cached) " >&6
7300else
7301  case $FILE in
7302  [\\/]* | ?:[\\/]*)
7303  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7304  ;;
7305  *)
7306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7307for as_dir in $PATH
7308do
7309  IFS=$as_save_IFS
7310  test -z "$as_dir" && as_dir=.
7311    for ac_exec_ext in '' $ac_executable_extensions; do
7312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7313    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7315    break 2
7316  fi
7317done
7318  done
7319IFS=$as_save_IFS
7320
7321  ;;
7322esac
7323fi
7324FILE=$ac_cv_path_FILE
7325if test -n "$FILE"; then
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7327$as_echo "$FILE" >&6; }
7328else
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330$as_echo "no" >&6; }
7331fi
7332
7333
7334  test -n "$FILE" && break
7335done
7336
7337  else
7338    # The variable is set, but is it from the command line or the environment?
7339
7340    # Try to remove the string !FILE! from our list.
7341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7343      # If it failed, the variable was not from the command line. Ignore it,
7344      # but warn the user (except for BASH, which is always set by the calling BASH).
7345      if test "xFILE" != xBASH; then
7346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7347$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7348      fi
7349      # Try to locate tool using the code snippet
7350      for ac_prog in file
7351do
7352  # Extract the first word of "$ac_prog", so it can be a program name with args.
7353set dummy $ac_prog; ac_word=$2
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if ${ac_cv_path_FILE+:} false; then :
7357  $as_echo_n "(cached) " >&6
7358else
7359  case $FILE in
7360  [\\/]* | ?:[\\/]*)
7361  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7362  ;;
7363  *)
7364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365for as_dir in $PATH
7366do
7367  IFS=$as_save_IFS
7368  test -z "$as_dir" && as_dir=.
7369    for ac_exec_ext in '' $ac_executable_extensions; do
7370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373    break 2
7374  fi
7375done
7376  done
7377IFS=$as_save_IFS
7378
7379  ;;
7380esac
7381fi
7382FILE=$ac_cv_path_FILE
7383if test -n "$FILE"; then
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7385$as_echo "$FILE" >&6; }
7386else
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
7389fi
7390
7391
7392  test -n "$FILE" && break
7393done
7394
7395    else
7396      # If it succeeded, then it was overridden by the user. We will use it
7397      # for the tool.
7398
7399      # First remove it from the list of overridden variables, so we can test
7400      # for unknown variables in the end.
7401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7402
7403      # Check if we try to supply an empty value
7404      if test "x$FILE" = x; then
7405        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7406$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7408$as_echo_n "checking for FILE... " >&6; }
7409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7410$as_echo "disabled" >&6; }
7411      else
7412        # Check if the provided tool contains a complete path.
7413        tool_specified="$FILE"
7414        tool_basename="${tool_specified##*/}"
7415        if test "x$tool_basename" = "x$tool_specified"; then
7416          # A command without a complete path is provided, search $PATH.
7417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7418$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7419          # Extract the first word of "$tool_basename", so it can be a program name with args.
7420set dummy $tool_basename; ac_word=$2
7421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7422$as_echo_n "checking for $ac_word... " >&6; }
7423if ${ac_cv_path_FILE+:} false; then :
7424  $as_echo_n "(cached) " >&6
7425else
7426  case $FILE in
7427  [\\/]* | ?:[\\/]*)
7428  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7429  ;;
7430  *)
7431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7432for as_dir in $PATH
7433do
7434  IFS=$as_save_IFS
7435  test -z "$as_dir" && as_dir=.
7436    for ac_exec_ext in '' $ac_executable_extensions; do
7437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7438    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7440    break 2
7441  fi
7442done
7443  done
7444IFS=$as_save_IFS
7445
7446  ;;
7447esac
7448fi
7449FILE=$ac_cv_path_FILE
7450if test -n "$FILE"; then
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7452$as_echo "$FILE" >&6; }
7453else
7454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7455$as_echo "no" >&6; }
7456fi
7457
7458
7459          if test "x$FILE" = x; then
7460            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7461          fi
7462        else
7463          # Otherwise we believe it is a complete path. Use it as it is.
7464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7465$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7466          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7467$as_echo_n "checking for FILE... " >&6; }
7468          if test ! -x "$tool_specified"; then
7469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7470$as_echo "not found" >&6; }
7471            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7472          fi
7473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7474$as_echo "$tool_specified" >&6; }
7475        fi
7476      fi
7477    fi
7478  fi
7479
7480
7481
7482  if test "x$FILE" = x; then
7483    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7484  fi
7485
7486
7487
7488
7489
7490  # Publish this variable in the help.
7491
7492
7493  if [ -z "${FIND+x}" ]; then
7494    # The variable is not set by user, try to locate tool using the code snippet
7495    for ac_prog in find
7496do
7497  # Extract the first word of "$ac_prog", so it can be a program name with args.
7498set dummy $ac_prog; ac_word=$2
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7500$as_echo_n "checking for $ac_word... " >&6; }
7501if ${ac_cv_path_FIND+:} false; then :
7502  $as_echo_n "(cached) " >&6
7503else
7504  case $FIND in
7505  [\\/]* | ?:[\\/]*)
7506  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7507  ;;
7508  *)
7509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510for as_dir in $PATH
7511do
7512  IFS=$as_save_IFS
7513  test -z "$as_dir" && as_dir=.
7514    for ac_exec_ext in '' $ac_executable_extensions; do
7515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7516    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7518    break 2
7519  fi
7520done
7521  done
7522IFS=$as_save_IFS
7523
7524  ;;
7525esac
7526fi
7527FIND=$ac_cv_path_FIND
7528if test -n "$FIND"; then
7529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7530$as_echo "$FIND" >&6; }
7531else
7532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533$as_echo "no" >&6; }
7534fi
7535
7536
7537  test -n "$FIND" && break
7538done
7539
7540  else
7541    # The variable is set, but is it from the command line or the environment?
7542
7543    # Try to remove the string !FIND! from our list.
7544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7546      # If it failed, the variable was not from the command line. Ignore it,
7547      # but warn the user (except for BASH, which is always set by the calling BASH).
7548      if test "xFIND" != xBASH; then
7549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7550$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7551      fi
7552      # Try to locate tool using the code snippet
7553      for ac_prog in find
7554do
7555  # Extract the first word of "$ac_prog", so it can be a program name with args.
7556set dummy $ac_prog; ac_word=$2
7557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7558$as_echo_n "checking for $ac_word... " >&6; }
7559if ${ac_cv_path_FIND+:} false; then :
7560  $as_echo_n "(cached) " >&6
7561else
7562  case $FIND in
7563  [\\/]* | ?:[\\/]*)
7564  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7565  ;;
7566  *)
7567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7568for as_dir in $PATH
7569do
7570  IFS=$as_save_IFS
7571  test -z "$as_dir" && as_dir=.
7572    for ac_exec_ext in '' $ac_executable_extensions; do
7573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7574    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7576    break 2
7577  fi
7578done
7579  done
7580IFS=$as_save_IFS
7581
7582  ;;
7583esac
7584fi
7585FIND=$ac_cv_path_FIND
7586if test -n "$FIND"; then
7587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7588$as_echo "$FIND" >&6; }
7589else
7590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7591$as_echo "no" >&6; }
7592fi
7593
7594
7595  test -n "$FIND" && break
7596done
7597
7598    else
7599      # If it succeeded, then it was overridden by the user. We will use it
7600      # for the tool.
7601
7602      # First remove it from the list of overridden variables, so we can test
7603      # for unknown variables in the end.
7604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7605
7606      # Check if we try to supply an empty value
7607      if test "x$FIND" = x; then
7608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7609$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7611$as_echo_n "checking for FIND... " >&6; }
7612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7613$as_echo "disabled" >&6; }
7614      else
7615        # Check if the provided tool contains a complete path.
7616        tool_specified="$FIND"
7617        tool_basename="${tool_specified##*/}"
7618        if test "x$tool_basename" = "x$tool_specified"; then
7619          # A command without a complete path is provided, search $PATH.
7620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7621$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7622          # Extract the first word of "$tool_basename", so it can be a program name with args.
7623set dummy $tool_basename; ac_word=$2
7624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7625$as_echo_n "checking for $ac_word... " >&6; }
7626if ${ac_cv_path_FIND+:} false; then :
7627  $as_echo_n "(cached) " >&6
7628else
7629  case $FIND in
7630  [\\/]* | ?:[\\/]*)
7631  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7632  ;;
7633  *)
7634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635for as_dir in $PATH
7636do
7637  IFS=$as_save_IFS
7638  test -z "$as_dir" && as_dir=.
7639    for ac_exec_ext in '' $ac_executable_extensions; do
7640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7641    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7643    break 2
7644  fi
7645done
7646  done
7647IFS=$as_save_IFS
7648
7649  ;;
7650esac
7651fi
7652FIND=$ac_cv_path_FIND
7653if test -n "$FIND"; then
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7655$as_echo "$FIND" >&6; }
7656else
7657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7658$as_echo "no" >&6; }
7659fi
7660
7661
7662          if test "x$FIND" = x; then
7663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7664          fi
7665        else
7666          # Otherwise we believe it is a complete path. Use it as it is.
7667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7668$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7670$as_echo_n "checking for FIND... " >&6; }
7671          if test ! -x "$tool_specified"; then
7672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7673$as_echo "not found" >&6; }
7674            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7675          fi
7676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7677$as_echo "$tool_specified" >&6; }
7678        fi
7679      fi
7680    fi
7681  fi
7682
7683
7684
7685  if test "x$FIND" = x; then
7686    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7687  fi
7688
7689
7690
7691
7692
7693  # Publish this variable in the help.
7694
7695
7696  if [ -z "${HEAD+x}" ]; then
7697    # The variable is not set by user, try to locate tool using the code snippet
7698    for ac_prog in head
7699do
7700  # Extract the first word of "$ac_prog", so it can be a program name with args.
7701set dummy $ac_prog; ac_word=$2
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703$as_echo_n "checking for $ac_word... " >&6; }
7704if ${ac_cv_path_HEAD+:} false; then :
7705  $as_echo_n "(cached) " >&6
7706else
7707  case $HEAD in
7708  [\\/]* | ?:[\\/]*)
7709  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7710  ;;
7711  *)
7712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7713for as_dir in $PATH
7714do
7715  IFS=$as_save_IFS
7716  test -z "$as_dir" && as_dir=.
7717    for ac_exec_ext in '' $ac_executable_extensions; do
7718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7719    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7721    break 2
7722  fi
7723done
7724  done
7725IFS=$as_save_IFS
7726
7727  ;;
7728esac
7729fi
7730HEAD=$ac_cv_path_HEAD
7731if test -n "$HEAD"; then
7732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7733$as_echo "$HEAD" >&6; }
7734else
7735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7736$as_echo "no" >&6; }
7737fi
7738
7739
7740  test -n "$HEAD" && break
7741done
7742
7743  else
7744    # The variable is set, but is it from the command line or the environment?
7745
7746    # Try to remove the string !HEAD! from our list.
7747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7749      # If it failed, the variable was not from the command line. Ignore it,
7750      # but warn the user (except for BASH, which is always set by the calling BASH).
7751      if test "xHEAD" != xBASH; then
7752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7753$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7754      fi
7755      # Try to locate tool using the code snippet
7756      for ac_prog in head
7757do
7758  # Extract the first word of "$ac_prog", so it can be a program name with args.
7759set dummy $ac_prog; ac_word=$2
7760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7761$as_echo_n "checking for $ac_word... " >&6; }
7762if ${ac_cv_path_HEAD+:} false; then :
7763  $as_echo_n "(cached) " >&6
7764else
7765  case $HEAD in
7766  [\\/]* | ?:[\\/]*)
7767  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7768  ;;
7769  *)
7770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7771for as_dir in $PATH
7772do
7773  IFS=$as_save_IFS
7774  test -z "$as_dir" && as_dir=.
7775    for ac_exec_ext in '' $ac_executable_extensions; do
7776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7777    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7779    break 2
7780  fi
7781done
7782  done
7783IFS=$as_save_IFS
7784
7785  ;;
7786esac
7787fi
7788HEAD=$ac_cv_path_HEAD
7789if test -n "$HEAD"; then
7790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7791$as_echo "$HEAD" >&6; }
7792else
7793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7794$as_echo "no" >&6; }
7795fi
7796
7797
7798  test -n "$HEAD" && break
7799done
7800
7801    else
7802      # If it succeeded, then it was overridden by the user. We will use it
7803      # for the tool.
7804
7805      # First remove it from the list of overridden variables, so we can test
7806      # for unknown variables in the end.
7807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7808
7809      # Check if we try to supply an empty value
7810      if test "x$HEAD" = x; then
7811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7812$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7814$as_echo_n "checking for HEAD... " >&6; }
7815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7816$as_echo "disabled" >&6; }
7817      else
7818        # Check if the provided tool contains a complete path.
7819        tool_specified="$HEAD"
7820        tool_basename="${tool_specified##*/}"
7821        if test "x$tool_basename" = "x$tool_specified"; then
7822          # A command without a complete path is provided, search $PATH.
7823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7824$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7825          # Extract the first word of "$tool_basename", so it can be a program name with args.
7826set dummy $tool_basename; ac_word=$2
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7828$as_echo_n "checking for $ac_word... " >&6; }
7829if ${ac_cv_path_HEAD+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  case $HEAD in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  test -z "$as_dir" && as_dir=.
7842    for ac_exec_ext in '' $ac_executable_extensions; do
7843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7844    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7846    break 2
7847  fi
7848done
7849  done
7850IFS=$as_save_IFS
7851
7852  ;;
7853esac
7854fi
7855HEAD=$ac_cv_path_HEAD
7856if test -n "$HEAD"; then
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7858$as_echo "$HEAD" >&6; }
7859else
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7861$as_echo "no" >&6; }
7862fi
7863
7864
7865          if test "x$HEAD" = x; then
7866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7867          fi
7868        else
7869          # Otherwise we believe it is a complete path. Use it as it is.
7870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7871$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7873$as_echo_n "checking for HEAD... " >&6; }
7874          if test ! -x "$tool_specified"; then
7875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7876$as_echo "not found" >&6; }
7877            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7878          fi
7879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7880$as_echo "$tool_specified" >&6; }
7881        fi
7882      fi
7883    fi
7884  fi
7885
7886
7887
7888  if test "x$HEAD" = x; then
7889    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7890  fi
7891
7892
7893
7894
7895
7896  # Publish this variable in the help.
7897
7898
7899  if [ -z "${LN+x}" ]; then
7900    # The variable is not set by user, try to locate tool using the code snippet
7901    for ac_prog in ln
7902do
7903  # Extract the first word of "$ac_prog", so it can be a program name with args.
7904set dummy $ac_prog; ac_word=$2
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906$as_echo_n "checking for $ac_word... " >&6; }
7907if ${ac_cv_path_LN+:} false; then :
7908  $as_echo_n "(cached) " >&6
7909else
7910  case $LN in
7911  [\\/]* | ?:[\\/]*)
7912  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7913  ;;
7914  *)
7915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916for as_dir in $PATH
7917do
7918  IFS=$as_save_IFS
7919  test -z "$as_dir" && as_dir=.
7920    for ac_exec_ext in '' $ac_executable_extensions; do
7921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924    break 2
7925  fi
7926done
7927  done
7928IFS=$as_save_IFS
7929
7930  ;;
7931esac
7932fi
7933LN=$ac_cv_path_LN
7934if test -n "$LN"; then
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7936$as_echo "$LN" >&6; }
7937else
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939$as_echo "no" >&6; }
7940fi
7941
7942
7943  test -n "$LN" && break
7944done
7945
7946  else
7947    # The variable is set, but is it from the command line or the environment?
7948
7949    # Try to remove the string !LN! from our list.
7950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7952      # If it failed, the variable was not from the command line. Ignore it,
7953      # but warn the user (except for BASH, which is always set by the calling BASH).
7954      if test "xLN" != xBASH; then
7955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7956$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7957      fi
7958      # Try to locate tool using the code snippet
7959      for ac_prog in ln
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_LN+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $LN in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991LN=$ac_cv_path_LN
7992if test -n "$LN"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7994$as_echo "$LN" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$LN" && break
8002done
8003
8004    else
8005      # If it succeeded, then it was overridden by the user. We will use it
8006      # for the tool.
8007
8008      # First remove it from the list of overridden variables, so we can test
8009      # for unknown variables in the end.
8010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8011
8012      # Check if we try to supply an empty value
8013      if test "x$LN" = x; then
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8015$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8017$as_echo_n "checking for LN... " >&6; }
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8019$as_echo "disabled" >&6; }
8020      else
8021        # Check if the provided tool contains a complete path.
8022        tool_specified="$LN"
8023        tool_basename="${tool_specified##*/}"
8024        if test "x$tool_basename" = "x$tool_specified"; then
8025          # A command without a complete path is provided, search $PATH.
8026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8027$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8028          # Extract the first word of "$tool_basename", so it can be a program name with args.
8029set dummy $tool_basename; ac_word=$2
8030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8031$as_echo_n "checking for $ac_word... " >&6; }
8032if ${ac_cv_path_LN+:} false; then :
8033  $as_echo_n "(cached) " >&6
8034else
8035  case $LN in
8036  [\\/]* | ?:[\\/]*)
8037  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8038  ;;
8039  *)
8040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8041for as_dir in $PATH
8042do
8043  IFS=$as_save_IFS
8044  test -z "$as_dir" && as_dir=.
8045    for ac_exec_ext in '' $ac_executable_extensions; do
8046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8047    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8049    break 2
8050  fi
8051done
8052  done
8053IFS=$as_save_IFS
8054
8055  ;;
8056esac
8057fi
8058LN=$ac_cv_path_LN
8059if test -n "$LN"; then
8060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8061$as_echo "$LN" >&6; }
8062else
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
8065fi
8066
8067
8068          if test "x$LN" = x; then
8069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8070          fi
8071        else
8072          # Otherwise we believe it is a complete path. Use it as it is.
8073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8074$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8076$as_echo_n "checking for LN... " >&6; }
8077          if test ! -x "$tool_specified"; then
8078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8079$as_echo "not found" >&6; }
8080            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8081          fi
8082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8083$as_echo "$tool_specified" >&6; }
8084        fi
8085      fi
8086    fi
8087  fi
8088
8089
8090
8091  if test "x$LN" = x; then
8092    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8093  fi
8094
8095
8096
8097
8098
8099  # Publish this variable in the help.
8100
8101
8102  if [ -z "${LS+x}" ]; then
8103    # The variable is not set by user, try to locate tool using the code snippet
8104    for ac_prog in ls
8105do
8106  # Extract the first word of "$ac_prog", so it can be a program name with args.
8107set dummy $ac_prog; ac_word=$2
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8109$as_echo_n "checking for $ac_word... " >&6; }
8110if ${ac_cv_path_LS+:} false; then :
8111  $as_echo_n "(cached) " >&6
8112else
8113  case $LS in
8114  [\\/]* | ?:[\\/]*)
8115  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8116  ;;
8117  *)
8118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8119for as_dir in $PATH
8120do
8121  IFS=$as_save_IFS
8122  test -z "$as_dir" && as_dir=.
8123    for ac_exec_ext in '' $ac_executable_extensions; do
8124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8125    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8127    break 2
8128  fi
8129done
8130  done
8131IFS=$as_save_IFS
8132
8133  ;;
8134esac
8135fi
8136LS=$ac_cv_path_LS
8137if test -n "$LS"; then
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8139$as_echo "$LS" >&6; }
8140else
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142$as_echo "no" >&6; }
8143fi
8144
8145
8146  test -n "$LS" && break
8147done
8148
8149  else
8150    # The variable is set, but is it from the command line or the environment?
8151
8152    # Try to remove the string !LS! from our list.
8153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8155      # If it failed, the variable was not from the command line. Ignore it,
8156      # but warn the user (except for BASH, which is always set by the calling BASH).
8157      if test "xLS" != xBASH; then
8158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8159$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8160      fi
8161      # Try to locate tool using the code snippet
8162      for ac_prog in ls
8163do
8164  # Extract the first word of "$ac_prog", so it can be a program name with args.
8165set dummy $ac_prog; ac_word=$2
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167$as_echo_n "checking for $ac_word... " >&6; }
8168if ${ac_cv_path_LS+:} false; then :
8169  $as_echo_n "(cached) " >&6
8170else
8171  case $LS in
8172  [\\/]* | ?:[\\/]*)
8173  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8174  ;;
8175  *)
8176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179  IFS=$as_save_IFS
8180  test -z "$as_dir" && as_dir=.
8181    for ac_exec_ext in '' $ac_executable_extensions; do
8182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185    break 2
8186  fi
8187done
8188  done
8189IFS=$as_save_IFS
8190
8191  ;;
8192esac
8193fi
8194LS=$ac_cv_path_LS
8195if test -n "$LS"; then
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8197$as_echo "$LS" >&6; }
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201fi
8202
8203
8204  test -n "$LS" && break
8205done
8206
8207    else
8208      # If it succeeded, then it was overridden by the user. We will use it
8209      # for the tool.
8210
8211      # First remove it from the list of overridden variables, so we can test
8212      # for unknown variables in the end.
8213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8214
8215      # Check if we try to supply an empty value
8216      if test "x$LS" = x; then
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8218$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8220$as_echo_n "checking for LS... " >&6; }
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8222$as_echo "disabled" >&6; }
8223      else
8224        # Check if the provided tool contains a complete path.
8225        tool_specified="$LS"
8226        tool_basename="${tool_specified##*/}"
8227        if test "x$tool_basename" = "x$tool_specified"; then
8228          # A command without a complete path is provided, search $PATH.
8229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8230$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8231          # Extract the first word of "$tool_basename", so it can be a program name with args.
8232set dummy $tool_basename; ac_word=$2
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234$as_echo_n "checking for $ac_word... " >&6; }
8235if ${ac_cv_path_LS+:} false; then :
8236  $as_echo_n "(cached) " >&6
8237else
8238  case $LS in
8239  [\\/]* | ?:[\\/]*)
8240  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8241  ;;
8242  *)
8243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244for as_dir in $PATH
8245do
8246  IFS=$as_save_IFS
8247  test -z "$as_dir" && as_dir=.
8248    for ac_exec_ext in '' $ac_executable_extensions; do
8249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8250    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252    break 2
8253  fi
8254done
8255  done
8256IFS=$as_save_IFS
8257
8258  ;;
8259esac
8260fi
8261LS=$ac_cv_path_LS
8262if test -n "$LS"; then
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8264$as_echo "$LS" >&6; }
8265else
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }
8268fi
8269
8270
8271          if test "x$LS" = x; then
8272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8273          fi
8274        else
8275          # Otherwise we believe it is a complete path. Use it as it is.
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8277$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8279$as_echo_n "checking for LS... " >&6; }
8280          if test ! -x "$tool_specified"; then
8281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8282$as_echo "not found" >&6; }
8283            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8284          fi
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8286$as_echo "$tool_specified" >&6; }
8287        fi
8288      fi
8289    fi
8290  fi
8291
8292
8293
8294  if test "x$LS" = x; then
8295    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8296  fi
8297
8298
8299
8300
8301
8302  # Publish this variable in the help.
8303
8304
8305  if [ -z "${MKDIR+x}" ]; then
8306    # The variable is not set by user, try to locate tool using the code snippet
8307    for ac_prog in mkdir
8308do
8309  # Extract the first word of "$ac_prog", so it can be a program name with args.
8310set dummy $ac_prog; ac_word=$2
8311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8312$as_echo_n "checking for $ac_word... " >&6; }
8313if ${ac_cv_path_MKDIR+:} false; then :
8314  $as_echo_n "(cached) " >&6
8315else
8316  case $MKDIR in
8317  [\\/]* | ?:[\\/]*)
8318  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8319  ;;
8320  *)
8321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8322for as_dir in $PATH
8323do
8324  IFS=$as_save_IFS
8325  test -z "$as_dir" && as_dir=.
8326    for ac_exec_ext in '' $ac_executable_extensions; do
8327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8328    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8330    break 2
8331  fi
8332done
8333  done
8334IFS=$as_save_IFS
8335
8336  ;;
8337esac
8338fi
8339MKDIR=$ac_cv_path_MKDIR
8340if test -n "$MKDIR"; then
8341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8342$as_echo "$MKDIR" >&6; }
8343else
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8345$as_echo "no" >&6; }
8346fi
8347
8348
8349  test -n "$MKDIR" && break
8350done
8351
8352  else
8353    # The variable is set, but is it from the command line or the environment?
8354
8355    # Try to remove the string !MKDIR! from our list.
8356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8358      # If it failed, the variable was not from the command line. Ignore it,
8359      # but warn the user (except for BASH, which is always set by the calling BASH).
8360      if test "xMKDIR" != xBASH; then
8361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8362$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8363      fi
8364      # Try to locate tool using the code snippet
8365      for ac_prog in mkdir
8366do
8367  # Extract the first word of "$ac_prog", so it can be a program name with args.
8368set dummy $ac_prog; ac_word=$2
8369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8370$as_echo_n "checking for $ac_word... " >&6; }
8371if ${ac_cv_path_MKDIR+:} false; then :
8372  $as_echo_n "(cached) " >&6
8373else
8374  case $MKDIR in
8375  [\\/]* | ?:[\\/]*)
8376  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8377  ;;
8378  *)
8379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8380for as_dir in $PATH
8381do
8382  IFS=$as_save_IFS
8383  test -z "$as_dir" && as_dir=.
8384    for ac_exec_ext in '' $ac_executable_extensions; do
8385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8386    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8388    break 2
8389  fi
8390done
8391  done
8392IFS=$as_save_IFS
8393
8394  ;;
8395esac
8396fi
8397MKDIR=$ac_cv_path_MKDIR
8398if test -n "$MKDIR"; then
8399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8400$as_echo "$MKDIR" >&6; }
8401else
8402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403$as_echo "no" >&6; }
8404fi
8405
8406
8407  test -n "$MKDIR" && break
8408done
8409
8410    else
8411      # If it succeeded, then it was overridden by the user. We will use it
8412      # for the tool.
8413
8414      # First remove it from the list of overridden variables, so we can test
8415      # for unknown variables in the end.
8416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8417
8418      # Check if we try to supply an empty value
8419      if test "x$MKDIR" = x; then
8420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8421$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8423$as_echo_n "checking for MKDIR... " >&6; }
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8425$as_echo "disabled" >&6; }
8426      else
8427        # Check if the provided tool contains a complete path.
8428        tool_specified="$MKDIR"
8429        tool_basename="${tool_specified##*/}"
8430        if test "x$tool_basename" = "x$tool_specified"; then
8431          # A command without a complete path is provided, search $PATH.
8432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8433$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8434          # Extract the first word of "$tool_basename", so it can be a program name with args.
8435set dummy $tool_basename; ac_word=$2
8436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8437$as_echo_n "checking for $ac_word... " >&6; }
8438if ${ac_cv_path_MKDIR+:} false; then :
8439  $as_echo_n "(cached) " >&6
8440else
8441  case $MKDIR in
8442  [\\/]* | ?:[\\/]*)
8443  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8444  ;;
8445  *)
8446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8447for as_dir in $PATH
8448do
8449  IFS=$as_save_IFS
8450  test -z "$as_dir" && as_dir=.
8451    for ac_exec_ext in '' $ac_executable_extensions; do
8452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8453    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8455    break 2
8456  fi
8457done
8458  done
8459IFS=$as_save_IFS
8460
8461  ;;
8462esac
8463fi
8464MKDIR=$ac_cv_path_MKDIR
8465if test -n "$MKDIR"; then
8466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8467$as_echo "$MKDIR" >&6; }
8468else
8469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8470$as_echo "no" >&6; }
8471fi
8472
8473
8474          if test "x$MKDIR" = x; then
8475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8476          fi
8477        else
8478          # Otherwise we believe it is a complete path. Use it as it is.
8479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8480$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8482$as_echo_n "checking for MKDIR... " >&6; }
8483          if test ! -x "$tool_specified"; then
8484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8485$as_echo "not found" >&6; }
8486            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8487          fi
8488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8489$as_echo "$tool_specified" >&6; }
8490        fi
8491      fi
8492    fi
8493  fi
8494
8495
8496
8497  if test "x$MKDIR" = x; then
8498    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8499  fi
8500
8501
8502
8503
8504
8505  # Publish this variable in the help.
8506
8507
8508  if [ -z "${MKTEMP+x}" ]; then
8509    # The variable is not set by user, try to locate tool using the code snippet
8510    for ac_prog in mktemp
8511do
8512  # Extract the first word of "$ac_prog", so it can be a program name with args.
8513set dummy $ac_prog; ac_word=$2
8514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8515$as_echo_n "checking for $ac_word... " >&6; }
8516if ${ac_cv_path_MKTEMP+:} false; then :
8517  $as_echo_n "(cached) " >&6
8518else
8519  case $MKTEMP in
8520  [\\/]* | ?:[\\/]*)
8521  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8522  ;;
8523  *)
8524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8525for as_dir in $PATH
8526do
8527  IFS=$as_save_IFS
8528  test -z "$as_dir" && as_dir=.
8529    for ac_exec_ext in '' $ac_executable_extensions; do
8530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8531    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8533    break 2
8534  fi
8535done
8536  done
8537IFS=$as_save_IFS
8538
8539  ;;
8540esac
8541fi
8542MKTEMP=$ac_cv_path_MKTEMP
8543if test -n "$MKTEMP"; then
8544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8545$as_echo "$MKTEMP" >&6; }
8546else
8547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8548$as_echo "no" >&6; }
8549fi
8550
8551
8552  test -n "$MKTEMP" && break
8553done
8554
8555  else
8556    # The variable is set, but is it from the command line or the environment?
8557
8558    # Try to remove the string !MKTEMP! from our list.
8559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8561      # If it failed, the variable was not from the command line. Ignore it,
8562      # but warn the user (except for BASH, which is always set by the calling BASH).
8563      if test "xMKTEMP" != xBASH; then
8564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8565$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8566      fi
8567      # Try to locate tool using the code snippet
8568      for ac_prog in mktemp
8569do
8570  # Extract the first word of "$ac_prog", so it can be a program name with args.
8571set dummy $ac_prog; ac_word=$2
8572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8573$as_echo_n "checking for $ac_word... " >&6; }
8574if ${ac_cv_path_MKTEMP+:} false; then :
8575  $as_echo_n "(cached) " >&6
8576else
8577  case $MKTEMP in
8578  [\\/]* | ?:[\\/]*)
8579  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8580  ;;
8581  *)
8582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8583for as_dir in $PATH
8584do
8585  IFS=$as_save_IFS
8586  test -z "$as_dir" && as_dir=.
8587    for ac_exec_ext in '' $ac_executable_extensions; do
8588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8589    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8591    break 2
8592  fi
8593done
8594  done
8595IFS=$as_save_IFS
8596
8597  ;;
8598esac
8599fi
8600MKTEMP=$ac_cv_path_MKTEMP
8601if test -n "$MKTEMP"; then
8602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8603$as_echo "$MKTEMP" >&6; }
8604else
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8606$as_echo "no" >&6; }
8607fi
8608
8609
8610  test -n "$MKTEMP" && break
8611done
8612
8613    else
8614      # If it succeeded, then it was overridden by the user. We will use it
8615      # for the tool.
8616
8617      # First remove it from the list of overridden variables, so we can test
8618      # for unknown variables in the end.
8619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8620
8621      # Check if we try to supply an empty value
8622      if test "x$MKTEMP" = x; then
8623        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8624$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8626$as_echo_n "checking for MKTEMP... " >&6; }
8627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8628$as_echo "disabled" >&6; }
8629      else
8630        # Check if the provided tool contains a complete path.
8631        tool_specified="$MKTEMP"
8632        tool_basename="${tool_specified##*/}"
8633        if test "x$tool_basename" = "x$tool_specified"; then
8634          # A command without a complete path is provided, search $PATH.
8635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8636$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8637          # Extract the first word of "$tool_basename", so it can be a program name with args.
8638set dummy $tool_basename; ac_word=$2
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640$as_echo_n "checking for $ac_word... " >&6; }
8641if ${ac_cv_path_MKTEMP+:} false; then :
8642  $as_echo_n "(cached) " >&6
8643else
8644  case $MKTEMP in
8645  [\\/]* | ?:[\\/]*)
8646  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8647  ;;
8648  *)
8649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650for as_dir in $PATH
8651do
8652  IFS=$as_save_IFS
8653  test -z "$as_dir" && as_dir=.
8654    for ac_exec_ext in '' $ac_executable_extensions; do
8655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8656    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8658    break 2
8659  fi
8660done
8661  done
8662IFS=$as_save_IFS
8663
8664  ;;
8665esac
8666fi
8667MKTEMP=$ac_cv_path_MKTEMP
8668if test -n "$MKTEMP"; then
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8670$as_echo "$MKTEMP" >&6; }
8671else
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8673$as_echo "no" >&6; }
8674fi
8675
8676
8677          if test "x$MKTEMP" = x; then
8678            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8679          fi
8680        else
8681          # Otherwise we believe it is a complete path. Use it as it is.
8682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8683$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8685$as_echo_n "checking for MKTEMP... " >&6; }
8686          if test ! -x "$tool_specified"; then
8687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8688$as_echo "not found" >&6; }
8689            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8690          fi
8691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8692$as_echo "$tool_specified" >&6; }
8693        fi
8694      fi
8695    fi
8696  fi
8697
8698
8699
8700  if test "x$MKTEMP" = x; then
8701    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8702  fi
8703
8704
8705
8706
8707
8708  # Publish this variable in the help.
8709
8710
8711  if [ -z "${MV+x}" ]; then
8712    # The variable is not set by user, try to locate tool using the code snippet
8713    for ac_prog in mv
8714do
8715  # Extract the first word of "$ac_prog", so it can be a program name with args.
8716set dummy $ac_prog; ac_word=$2
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8718$as_echo_n "checking for $ac_word... " >&6; }
8719if ${ac_cv_path_MV+:} false; then :
8720  $as_echo_n "(cached) " >&6
8721else
8722  case $MV in
8723  [\\/]* | ?:[\\/]*)
8724  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8725  ;;
8726  *)
8727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728for as_dir in $PATH
8729do
8730  IFS=$as_save_IFS
8731  test -z "$as_dir" && as_dir=.
8732    for ac_exec_ext in '' $ac_executable_extensions; do
8733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736    break 2
8737  fi
8738done
8739  done
8740IFS=$as_save_IFS
8741
8742  ;;
8743esac
8744fi
8745MV=$ac_cv_path_MV
8746if test -n "$MV"; then
8747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8748$as_echo "$MV" >&6; }
8749else
8750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751$as_echo "no" >&6; }
8752fi
8753
8754
8755  test -n "$MV" && break
8756done
8757
8758  else
8759    # The variable is set, but is it from the command line or the environment?
8760
8761    # Try to remove the string !MV! from our list.
8762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8764      # If it failed, the variable was not from the command line. Ignore it,
8765      # but warn the user (except for BASH, which is always set by the calling BASH).
8766      if test "xMV" != xBASH; then
8767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8768$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8769      fi
8770      # Try to locate tool using the code snippet
8771      for ac_prog in mv
8772do
8773  # Extract the first word of "$ac_prog", so it can be a program name with args.
8774set dummy $ac_prog; ac_word=$2
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8776$as_echo_n "checking for $ac_word... " >&6; }
8777if ${ac_cv_path_MV+:} false; then :
8778  $as_echo_n "(cached) " >&6
8779else
8780  case $MV in
8781  [\\/]* | ?:[\\/]*)
8782  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8783  ;;
8784  *)
8785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8786for as_dir in $PATH
8787do
8788  IFS=$as_save_IFS
8789  test -z "$as_dir" && as_dir=.
8790    for ac_exec_ext in '' $ac_executable_extensions; do
8791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8792    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8794    break 2
8795  fi
8796done
8797  done
8798IFS=$as_save_IFS
8799
8800  ;;
8801esac
8802fi
8803MV=$ac_cv_path_MV
8804if test -n "$MV"; then
8805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8806$as_echo "$MV" >&6; }
8807else
8808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8809$as_echo "no" >&6; }
8810fi
8811
8812
8813  test -n "$MV" && break
8814done
8815
8816    else
8817      # If it succeeded, then it was overridden by the user. We will use it
8818      # for the tool.
8819
8820      # First remove it from the list of overridden variables, so we can test
8821      # for unknown variables in the end.
8822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8823
8824      # Check if we try to supply an empty value
8825      if test "x$MV" = x; then
8826        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8827$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8829$as_echo_n "checking for MV... " >&6; }
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8831$as_echo "disabled" >&6; }
8832      else
8833        # Check if the provided tool contains a complete path.
8834        tool_specified="$MV"
8835        tool_basename="${tool_specified##*/}"
8836        if test "x$tool_basename" = "x$tool_specified"; then
8837          # A command without a complete path is provided, search $PATH.
8838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8839$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8840          # Extract the first word of "$tool_basename", so it can be a program name with args.
8841set dummy $tool_basename; ac_word=$2
8842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8843$as_echo_n "checking for $ac_word... " >&6; }
8844if ${ac_cv_path_MV+:} false; then :
8845  $as_echo_n "(cached) " >&6
8846else
8847  case $MV in
8848  [\\/]* | ?:[\\/]*)
8849  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8850  ;;
8851  *)
8852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8853for as_dir in $PATH
8854do
8855  IFS=$as_save_IFS
8856  test -z "$as_dir" && as_dir=.
8857    for ac_exec_ext in '' $ac_executable_extensions; do
8858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8859    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8861    break 2
8862  fi
8863done
8864  done
8865IFS=$as_save_IFS
8866
8867  ;;
8868esac
8869fi
8870MV=$ac_cv_path_MV
8871if test -n "$MV"; then
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8873$as_echo "$MV" >&6; }
8874else
8875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876$as_echo "no" >&6; }
8877fi
8878
8879
8880          if test "x$MV" = x; then
8881            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8882          fi
8883        else
8884          # Otherwise we believe it is a complete path. Use it as it is.
8885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8886$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8887          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8888$as_echo_n "checking for MV... " >&6; }
8889          if test ! -x "$tool_specified"; then
8890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8891$as_echo "not found" >&6; }
8892            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8893          fi
8894          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8895$as_echo "$tool_specified" >&6; }
8896        fi
8897      fi
8898    fi
8899  fi
8900
8901
8902
8903  if test "x$MV" = x; then
8904    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8905  fi
8906
8907
8908
8909
8910
8911  # Publish this variable in the help.
8912
8913
8914  if [ -z "${NAWK+x}" ]; then
8915    # The variable is not set by user, try to locate tool using the code snippet
8916    for ac_prog in nawk gawk awk
8917do
8918  # Extract the first word of "$ac_prog", so it can be a program name with args.
8919set dummy $ac_prog; ac_word=$2
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8921$as_echo_n "checking for $ac_word... " >&6; }
8922if ${ac_cv_path_NAWK+:} false; then :
8923  $as_echo_n "(cached) " >&6
8924else
8925  case $NAWK in
8926  [\\/]* | ?:[\\/]*)
8927  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8928  ;;
8929  *)
8930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8931for as_dir in $PATH
8932do
8933  IFS=$as_save_IFS
8934  test -z "$as_dir" && as_dir=.
8935    for ac_exec_ext in '' $ac_executable_extensions; do
8936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8937    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8939    break 2
8940  fi
8941done
8942  done
8943IFS=$as_save_IFS
8944
8945  ;;
8946esac
8947fi
8948NAWK=$ac_cv_path_NAWK
8949if test -n "$NAWK"; then
8950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8951$as_echo "$NAWK" >&6; }
8952else
8953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8954$as_echo "no" >&6; }
8955fi
8956
8957
8958  test -n "$NAWK" && break
8959done
8960
8961  else
8962    # The variable is set, but is it from the command line or the environment?
8963
8964    # Try to remove the string !NAWK! from our list.
8965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8967      # If it failed, the variable was not from the command line. Ignore it,
8968      # but warn the user (except for BASH, which is always set by the calling BASH).
8969      if test "xNAWK" != xBASH; then
8970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8971$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8972      fi
8973      # Try to locate tool using the code snippet
8974      for ac_prog in nawk gawk awk
8975do
8976  # Extract the first word of "$ac_prog", so it can be a program name with args.
8977set dummy $ac_prog; ac_word=$2
8978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8979$as_echo_n "checking for $ac_word... " >&6; }
8980if ${ac_cv_path_NAWK+:} false; then :
8981  $as_echo_n "(cached) " >&6
8982else
8983  case $NAWK in
8984  [\\/]* | ?:[\\/]*)
8985  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8986  ;;
8987  *)
8988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8989for as_dir in $PATH
8990do
8991  IFS=$as_save_IFS
8992  test -z "$as_dir" && as_dir=.
8993    for ac_exec_ext in '' $ac_executable_extensions; do
8994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8995    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8997    break 2
8998  fi
8999done
9000  done
9001IFS=$as_save_IFS
9002
9003  ;;
9004esac
9005fi
9006NAWK=$ac_cv_path_NAWK
9007if test -n "$NAWK"; then
9008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9009$as_echo "$NAWK" >&6; }
9010else
9011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012$as_echo "no" >&6; }
9013fi
9014
9015
9016  test -n "$NAWK" && break
9017done
9018
9019    else
9020      # If it succeeded, then it was overridden by the user. We will use it
9021      # for the tool.
9022
9023      # First remove it from the list of overridden variables, so we can test
9024      # for unknown variables in the end.
9025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9026
9027      # Check if we try to supply an empty value
9028      if test "x$NAWK" = x; then
9029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9030$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9032$as_echo_n "checking for NAWK... " >&6; }
9033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9034$as_echo "disabled" >&6; }
9035      else
9036        # Check if the provided tool contains a complete path.
9037        tool_specified="$NAWK"
9038        tool_basename="${tool_specified##*/}"
9039        if test "x$tool_basename" = "x$tool_specified"; then
9040          # A command without a complete path is provided, search $PATH.
9041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9042$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9043          # Extract the first word of "$tool_basename", so it can be a program name with args.
9044set dummy $tool_basename; ac_word=$2
9045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9046$as_echo_n "checking for $ac_word... " >&6; }
9047if ${ac_cv_path_NAWK+:} false; then :
9048  $as_echo_n "(cached) " >&6
9049else
9050  case $NAWK in
9051  [\\/]* | ?:[\\/]*)
9052  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9053  ;;
9054  *)
9055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9056for as_dir in $PATH
9057do
9058  IFS=$as_save_IFS
9059  test -z "$as_dir" && as_dir=.
9060    for ac_exec_ext in '' $ac_executable_extensions; do
9061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9062    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9064    break 2
9065  fi
9066done
9067  done
9068IFS=$as_save_IFS
9069
9070  ;;
9071esac
9072fi
9073NAWK=$ac_cv_path_NAWK
9074if test -n "$NAWK"; then
9075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9076$as_echo "$NAWK" >&6; }
9077else
9078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9079$as_echo "no" >&6; }
9080fi
9081
9082
9083          if test "x$NAWK" = x; then
9084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9085          fi
9086        else
9087          # Otherwise we believe it is a complete path. Use it as it is.
9088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9089$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9091$as_echo_n "checking for NAWK... " >&6; }
9092          if test ! -x "$tool_specified"; then
9093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9094$as_echo "not found" >&6; }
9095            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9096          fi
9097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9098$as_echo "$tool_specified" >&6; }
9099        fi
9100      fi
9101    fi
9102  fi
9103
9104
9105
9106  if test "x$NAWK" = x; then
9107    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9108  fi
9109
9110
9111
9112
9113
9114  # Publish this variable in the help.
9115
9116
9117  if [ -z "${PRINTF+x}" ]; then
9118    # The variable is not set by user, try to locate tool using the code snippet
9119    for ac_prog in printf
9120do
9121  # Extract the first word of "$ac_prog", so it can be a program name with args.
9122set dummy $ac_prog; ac_word=$2
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9124$as_echo_n "checking for $ac_word... " >&6; }
9125if ${ac_cv_path_PRINTF+:} false; then :
9126  $as_echo_n "(cached) " >&6
9127else
9128  case $PRINTF in
9129  [\\/]* | ?:[\\/]*)
9130  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9131  ;;
9132  *)
9133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9134for as_dir in $PATH
9135do
9136  IFS=$as_save_IFS
9137  test -z "$as_dir" && as_dir=.
9138    for ac_exec_ext in '' $ac_executable_extensions; do
9139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9140    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9142    break 2
9143  fi
9144done
9145  done
9146IFS=$as_save_IFS
9147
9148  ;;
9149esac
9150fi
9151PRINTF=$ac_cv_path_PRINTF
9152if test -n "$PRINTF"; then
9153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9154$as_echo "$PRINTF" >&6; }
9155else
9156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
9158fi
9159
9160
9161  test -n "$PRINTF" && break
9162done
9163
9164  else
9165    # The variable is set, but is it from the command line or the environment?
9166
9167    # Try to remove the string !PRINTF! from our list.
9168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9170      # If it failed, the variable was not from the command line. Ignore it,
9171      # but warn the user (except for BASH, which is always set by the calling BASH).
9172      if test "xPRINTF" != xBASH; then
9173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9174$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9175      fi
9176      # Try to locate tool using the code snippet
9177      for ac_prog in printf
9178do
9179  # Extract the first word of "$ac_prog", so it can be a program name with args.
9180set dummy $ac_prog; ac_word=$2
9181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9182$as_echo_n "checking for $ac_word... " >&6; }
9183if ${ac_cv_path_PRINTF+:} false; then :
9184  $as_echo_n "(cached) " >&6
9185else
9186  case $PRINTF in
9187  [\\/]* | ?:[\\/]*)
9188  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9189  ;;
9190  *)
9191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9192for as_dir in $PATH
9193do
9194  IFS=$as_save_IFS
9195  test -z "$as_dir" && as_dir=.
9196    for ac_exec_ext in '' $ac_executable_extensions; do
9197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9198    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9200    break 2
9201  fi
9202done
9203  done
9204IFS=$as_save_IFS
9205
9206  ;;
9207esac
9208fi
9209PRINTF=$ac_cv_path_PRINTF
9210if test -n "$PRINTF"; then
9211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9212$as_echo "$PRINTF" >&6; }
9213else
9214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9215$as_echo "no" >&6; }
9216fi
9217
9218
9219  test -n "$PRINTF" && break
9220done
9221
9222    else
9223      # If it succeeded, then it was overridden by the user. We will use it
9224      # for the tool.
9225
9226      # First remove it from the list of overridden variables, so we can test
9227      # for unknown variables in the end.
9228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9229
9230      # Check if we try to supply an empty value
9231      if test "x$PRINTF" = x; then
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9233$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9235$as_echo_n "checking for PRINTF... " >&6; }
9236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9237$as_echo "disabled" >&6; }
9238      else
9239        # Check if the provided tool contains a complete path.
9240        tool_specified="$PRINTF"
9241        tool_basename="${tool_specified##*/}"
9242        if test "x$tool_basename" = "x$tool_specified"; then
9243          # A command without a complete path is provided, search $PATH.
9244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9245$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9246          # Extract the first word of "$tool_basename", so it can be a program name with args.
9247set dummy $tool_basename; ac_word=$2
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249$as_echo_n "checking for $ac_word... " >&6; }
9250if ${ac_cv_path_PRINTF+:} false; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  case $PRINTF in
9254  [\\/]* | ?:[\\/]*)
9255  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9256  ;;
9257  *)
9258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261  IFS=$as_save_IFS
9262  test -z "$as_dir" && as_dir=.
9263    for ac_exec_ext in '' $ac_executable_extensions; do
9264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9265    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267    break 2
9268  fi
9269done
9270  done
9271IFS=$as_save_IFS
9272
9273  ;;
9274esac
9275fi
9276PRINTF=$ac_cv_path_PRINTF
9277if test -n "$PRINTF"; then
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9279$as_echo "$PRINTF" >&6; }
9280else
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
9283fi
9284
9285
9286          if test "x$PRINTF" = x; then
9287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9288          fi
9289        else
9290          # Otherwise we believe it is a complete path. Use it as it is.
9291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9292$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9294$as_echo_n "checking for PRINTF... " >&6; }
9295          if test ! -x "$tool_specified"; then
9296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9297$as_echo "not found" >&6; }
9298            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9299          fi
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9301$as_echo "$tool_specified" >&6; }
9302        fi
9303      fi
9304    fi
9305  fi
9306
9307
9308
9309  if test "x$PRINTF" = x; then
9310    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9311  fi
9312
9313
9314
9315
9316
9317  # Publish this variable in the help.
9318
9319
9320  if [ -z "${RM+x}" ]; then
9321    # The variable is not set by user, try to locate tool using the code snippet
9322    for ac_prog in rm
9323do
9324  # Extract the first word of "$ac_prog", so it can be a program name with args.
9325set dummy $ac_prog; ac_word=$2
9326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9327$as_echo_n "checking for $ac_word... " >&6; }
9328if ${ac_cv_path_RM+:} false; then :
9329  $as_echo_n "(cached) " >&6
9330else
9331  case $RM in
9332  [\\/]* | ?:[\\/]*)
9333  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9334  ;;
9335  *)
9336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9337for as_dir in $PATH
9338do
9339  IFS=$as_save_IFS
9340  test -z "$as_dir" && as_dir=.
9341    for ac_exec_ext in '' $ac_executable_extensions; do
9342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9343    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9345    break 2
9346  fi
9347done
9348  done
9349IFS=$as_save_IFS
9350
9351  ;;
9352esac
9353fi
9354RM=$ac_cv_path_RM
9355if test -n "$RM"; then
9356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9357$as_echo "$RM" >&6; }
9358else
9359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9360$as_echo "no" >&6; }
9361fi
9362
9363
9364  test -n "$RM" && break
9365done
9366
9367  else
9368    # The variable is set, but is it from the command line or the environment?
9369
9370    # Try to remove the string !RM! from our list.
9371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9373      # If it failed, the variable was not from the command line. Ignore it,
9374      # but warn the user (except for BASH, which is always set by the calling BASH).
9375      if test "xRM" != xBASH; then
9376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9377$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9378      fi
9379      # Try to locate tool using the code snippet
9380      for ac_prog in rm
9381do
9382  # Extract the first word of "$ac_prog", so it can be a program name with args.
9383set dummy $ac_prog; ac_word=$2
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9385$as_echo_n "checking for $ac_word... " >&6; }
9386if ${ac_cv_path_RM+:} false; then :
9387  $as_echo_n "(cached) " >&6
9388else
9389  case $RM in
9390  [\\/]* | ?:[\\/]*)
9391  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9392  ;;
9393  *)
9394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9395for as_dir in $PATH
9396do
9397  IFS=$as_save_IFS
9398  test -z "$as_dir" && as_dir=.
9399    for ac_exec_ext in '' $ac_executable_extensions; do
9400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9401    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9403    break 2
9404  fi
9405done
9406  done
9407IFS=$as_save_IFS
9408
9409  ;;
9410esac
9411fi
9412RM=$ac_cv_path_RM
9413if test -n "$RM"; then
9414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9415$as_echo "$RM" >&6; }
9416else
9417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9418$as_echo "no" >&6; }
9419fi
9420
9421
9422  test -n "$RM" && break
9423done
9424
9425    else
9426      # If it succeeded, then it was overridden by the user. We will use it
9427      # for the tool.
9428
9429      # First remove it from the list of overridden variables, so we can test
9430      # for unknown variables in the end.
9431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9432
9433      # Check if we try to supply an empty value
9434      if test "x$RM" = x; then
9435        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9436$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9438$as_echo_n "checking for RM... " >&6; }
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9440$as_echo "disabled" >&6; }
9441      else
9442        # Check if the provided tool contains a complete path.
9443        tool_specified="$RM"
9444        tool_basename="${tool_specified##*/}"
9445        if test "x$tool_basename" = "x$tool_specified"; then
9446          # A command without a complete path is provided, search $PATH.
9447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9448$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9449          # Extract the first word of "$tool_basename", so it can be a program name with args.
9450set dummy $tool_basename; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_path_RM+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  case $RM in
9457  [\\/]* | ?:[\\/]*)
9458  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9459  ;;
9460  *)
9461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462for as_dir in $PATH
9463do
9464  IFS=$as_save_IFS
9465  test -z "$as_dir" && as_dir=.
9466    for ac_exec_ext in '' $ac_executable_extensions; do
9467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9468    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9470    break 2
9471  fi
9472done
9473  done
9474IFS=$as_save_IFS
9475
9476  ;;
9477esac
9478fi
9479RM=$ac_cv_path_RM
9480if test -n "$RM"; then
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9482$as_echo "$RM" >&6; }
9483else
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489          if test "x$RM" = x; then
9490            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9491          fi
9492        else
9493          # Otherwise we believe it is a complete path. Use it as it is.
9494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9495$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9496          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9497$as_echo_n "checking for RM... " >&6; }
9498          if test ! -x "$tool_specified"; then
9499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9500$as_echo "not found" >&6; }
9501            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9502          fi
9503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9504$as_echo "$tool_specified" >&6; }
9505        fi
9506      fi
9507    fi
9508  fi
9509
9510
9511
9512  if test "x$RM" = x; then
9513    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9514  fi
9515
9516
9517
9518
9519
9520  # Publish this variable in the help.
9521
9522
9523  if [ -z "${RMDIR+x}" ]; then
9524    # The variable is not set by user, try to locate tool using the code snippet
9525    for ac_prog in rmdir
9526do
9527  # Extract the first word of "$ac_prog", so it can be a program name with args.
9528set dummy $ac_prog; ac_word=$2
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9530$as_echo_n "checking for $ac_word... " >&6; }
9531if ${ac_cv_path_RMDIR+:} false; then :
9532  $as_echo_n "(cached) " >&6
9533else
9534  case $RMDIR in
9535  [\\/]* | ?:[\\/]*)
9536  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9537  ;;
9538  *)
9539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9540for as_dir in $PATH
9541do
9542  IFS=$as_save_IFS
9543  test -z "$as_dir" && as_dir=.
9544    for ac_exec_ext in '' $ac_executable_extensions; do
9545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9546    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9548    break 2
9549  fi
9550done
9551  done
9552IFS=$as_save_IFS
9553
9554  ;;
9555esac
9556fi
9557RMDIR=$ac_cv_path_RMDIR
9558if test -n "$RMDIR"; then
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9560$as_echo "$RMDIR" >&6; }
9561else
9562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
9564fi
9565
9566
9567  test -n "$RMDIR" && break
9568done
9569
9570  else
9571    # The variable is set, but is it from the command line or the environment?
9572
9573    # Try to remove the string !RMDIR! from our list.
9574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9576      # If it failed, the variable was not from the command line. Ignore it,
9577      # but warn the user (except for BASH, which is always set by the calling BASH).
9578      if test "xRMDIR" != xBASH; then
9579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9580$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9581      fi
9582      # Try to locate tool using the code snippet
9583      for ac_prog in rmdir
9584do
9585  # Extract the first word of "$ac_prog", so it can be a program name with args.
9586set dummy $ac_prog; ac_word=$2
9587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9588$as_echo_n "checking for $ac_word... " >&6; }
9589if ${ac_cv_path_RMDIR+:} false; then :
9590  $as_echo_n "(cached) " >&6
9591else
9592  case $RMDIR in
9593  [\\/]* | ?:[\\/]*)
9594  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9595  ;;
9596  *)
9597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9598for as_dir in $PATH
9599do
9600  IFS=$as_save_IFS
9601  test -z "$as_dir" && as_dir=.
9602    for ac_exec_ext in '' $ac_executable_extensions; do
9603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9604    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9606    break 2
9607  fi
9608done
9609  done
9610IFS=$as_save_IFS
9611
9612  ;;
9613esac
9614fi
9615RMDIR=$ac_cv_path_RMDIR
9616if test -n "$RMDIR"; then
9617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9618$as_echo "$RMDIR" >&6; }
9619else
9620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621$as_echo "no" >&6; }
9622fi
9623
9624
9625  test -n "$RMDIR" && break
9626done
9627
9628    else
9629      # If it succeeded, then it was overridden by the user. We will use it
9630      # for the tool.
9631
9632      # First remove it from the list of overridden variables, so we can test
9633      # for unknown variables in the end.
9634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9635
9636      # Check if we try to supply an empty value
9637      if test "x$RMDIR" = x; then
9638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9639$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9641$as_echo_n "checking for RMDIR... " >&6; }
9642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9643$as_echo "disabled" >&6; }
9644      else
9645        # Check if the provided tool contains a complete path.
9646        tool_specified="$RMDIR"
9647        tool_basename="${tool_specified##*/}"
9648        if test "x$tool_basename" = "x$tool_specified"; then
9649          # A command without a complete path is provided, search $PATH.
9650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9651$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9652          # Extract the first word of "$tool_basename", so it can be a program name with args.
9653set dummy $tool_basename; ac_word=$2
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9655$as_echo_n "checking for $ac_word... " >&6; }
9656if ${ac_cv_path_RMDIR+:} false; then :
9657  $as_echo_n "(cached) " >&6
9658else
9659  case $RMDIR in
9660  [\\/]* | ?:[\\/]*)
9661  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9662  ;;
9663  *)
9664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665for as_dir in $PATH
9666do
9667  IFS=$as_save_IFS
9668  test -z "$as_dir" && as_dir=.
9669    for ac_exec_ext in '' $ac_executable_extensions; do
9670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673    break 2
9674  fi
9675done
9676  done
9677IFS=$as_save_IFS
9678
9679  ;;
9680esac
9681fi
9682RMDIR=$ac_cv_path_RMDIR
9683if test -n "$RMDIR"; then
9684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9685$as_echo "$RMDIR" >&6; }
9686else
9687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
9689fi
9690
9691
9692          if test "x$RMDIR" = x; then
9693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9694          fi
9695        else
9696          # Otherwise we believe it is a complete path. Use it as it is.
9697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9698$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9700$as_echo_n "checking for RMDIR... " >&6; }
9701          if test ! -x "$tool_specified"; then
9702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9703$as_echo "not found" >&6; }
9704            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9705          fi
9706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9707$as_echo "$tool_specified" >&6; }
9708        fi
9709      fi
9710    fi
9711  fi
9712
9713
9714
9715  if test "x$RMDIR" = x; then
9716    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9717  fi
9718
9719
9720
9721
9722
9723  # Publish this variable in the help.
9724
9725
9726  if [ -z "${SH+x}" ]; then
9727    # The variable is not set by user, try to locate tool using the code snippet
9728    for ac_prog in sh
9729do
9730  # Extract the first word of "$ac_prog", so it can be a program name with args.
9731set dummy $ac_prog; ac_word=$2
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9733$as_echo_n "checking for $ac_word... " >&6; }
9734if ${ac_cv_path_SH+:} false; then :
9735  $as_echo_n "(cached) " >&6
9736else
9737  case $SH in
9738  [\\/]* | ?:[\\/]*)
9739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9740  ;;
9741  *)
9742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9743for as_dir in $PATH
9744do
9745  IFS=$as_save_IFS
9746  test -z "$as_dir" && as_dir=.
9747    for ac_exec_ext in '' $ac_executable_extensions; do
9748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9751    break 2
9752  fi
9753done
9754  done
9755IFS=$as_save_IFS
9756
9757  ;;
9758esac
9759fi
9760SH=$ac_cv_path_SH
9761if test -n "$SH"; then
9762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9763$as_echo "$SH" >&6; }
9764else
9765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9766$as_echo "no" >&6; }
9767fi
9768
9769
9770  test -n "$SH" && break
9771done
9772
9773  else
9774    # The variable is set, but is it from the command line or the environment?
9775
9776    # Try to remove the string !SH! from our list.
9777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9779      # If it failed, the variable was not from the command line. Ignore it,
9780      # but warn the user (except for BASH, which is always set by the calling BASH).
9781      if test "xSH" != xBASH; then
9782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9783$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9784      fi
9785      # Try to locate tool using the code snippet
9786      for ac_prog in sh
9787do
9788  # Extract the first word of "$ac_prog", so it can be a program name with args.
9789set dummy $ac_prog; ac_word=$2
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9791$as_echo_n "checking for $ac_word... " >&6; }
9792if ${ac_cv_path_SH+:} false; then :
9793  $as_echo_n "(cached) " >&6
9794else
9795  case $SH in
9796  [\\/]* | ?:[\\/]*)
9797  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9798  ;;
9799  *)
9800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9801for as_dir in $PATH
9802do
9803  IFS=$as_save_IFS
9804  test -z "$as_dir" && as_dir=.
9805    for ac_exec_ext in '' $ac_executable_extensions; do
9806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9807    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9809    break 2
9810  fi
9811done
9812  done
9813IFS=$as_save_IFS
9814
9815  ;;
9816esac
9817fi
9818SH=$ac_cv_path_SH
9819if test -n "$SH"; then
9820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9821$as_echo "$SH" >&6; }
9822else
9823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
9825fi
9826
9827
9828  test -n "$SH" && break
9829done
9830
9831    else
9832      # If it succeeded, then it was overridden by the user. We will use it
9833      # for the tool.
9834
9835      # First remove it from the list of overridden variables, so we can test
9836      # for unknown variables in the end.
9837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9838
9839      # Check if we try to supply an empty value
9840      if test "x$SH" = x; then
9841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9842$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9844$as_echo_n "checking for SH... " >&6; }
9845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9846$as_echo "disabled" >&6; }
9847      else
9848        # Check if the provided tool contains a complete path.
9849        tool_specified="$SH"
9850        tool_basename="${tool_specified##*/}"
9851        if test "x$tool_basename" = "x$tool_specified"; then
9852          # A command without a complete path is provided, search $PATH.
9853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9854$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9855          # Extract the first word of "$tool_basename", so it can be a program name with args.
9856set dummy $tool_basename; ac_word=$2
9857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9858$as_echo_n "checking for $ac_word... " >&6; }
9859if ${ac_cv_path_SH+:} false; then :
9860  $as_echo_n "(cached) " >&6
9861else
9862  case $SH in
9863  [\\/]* | ?:[\\/]*)
9864  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9865  ;;
9866  *)
9867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9868for as_dir in $PATH
9869do
9870  IFS=$as_save_IFS
9871  test -z "$as_dir" && as_dir=.
9872    for ac_exec_ext in '' $ac_executable_extensions; do
9873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9874    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9876    break 2
9877  fi
9878done
9879  done
9880IFS=$as_save_IFS
9881
9882  ;;
9883esac
9884fi
9885SH=$ac_cv_path_SH
9886if test -n "$SH"; then
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9888$as_echo "$SH" >&6; }
9889else
9890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892fi
9893
9894
9895          if test "x$SH" = x; then
9896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9897          fi
9898        else
9899          # Otherwise we believe it is a complete path. Use it as it is.
9900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9901$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9903$as_echo_n "checking for SH... " >&6; }
9904          if test ! -x "$tool_specified"; then
9905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9906$as_echo "not found" >&6; }
9907            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9908          fi
9909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9910$as_echo "$tool_specified" >&6; }
9911        fi
9912      fi
9913    fi
9914  fi
9915
9916
9917
9918  if test "x$SH" = x; then
9919    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9920  fi
9921
9922
9923
9924
9925
9926  # Publish this variable in the help.
9927
9928
9929  if [ -z "${SORT+x}" ]; then
9930    # The variable is not set by user, try to locate tool using the code snippet
9931    for ac_prog in sort
9932do
9933  # Extract the first word of "$ac_prog", so it can be a program name with args.
9934set dummy $ac_prog; ac_word=$2
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936$as_echo_n "checking for $ac_word... " >&6; }
9937if ${ac_cv_path_SORT+:} false; then :
9938  $as_echo_n "(cached) " >&6
9939else
9940  case $SORT in
9941  [\\/]* | ?:[\\/]*)
9942  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9943  ;;
9944  *)
9945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946for as_dir in $PATH
9947do
9948  IFS=$as_save_IFS
9949  test -z "$as_dir" && as_dir=.
9950    for ac_exec_ext in '' $ac_executable_extensions; do
9951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9952    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954    break 2
9955  fi
9956done
9957  done
9958IFS=$as_save_IFS
9959
9960  ;;
9961esac
9962fi
9963SORT=$ac_cv_path_SORT
9964if test -n "$SORT"; then
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9966$as_echo "$SORT" >&6; }
9967else
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972
9973  test -n "$SORT" && break
9974done
9975
9976  else
9977    # The variable is set, but is it from the command line or the environment?
9978
9979    # Try to remove the string !SORT! from our list.
9980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9982      # If it failed, the variable was not from the command line. Ignore it,
9983      # but warn the user (except for BASH, which is always set by the calling BASH).
9984      if test "xSORT" != xBASH; then
9985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9986$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9987      fi
9988      # Try to locate tool using the code snippet
9989      for ac_prog in sort
9990do
9991  # Extract the first word of "$ac_prog", so it can be a program name with args.
9992set dummy $ac_prog; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_SORT+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $SORT in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021SORT=$ac_cv_path_SORT
10022if test -n "$SORT"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10024$as_echo "$SORT" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031  test -n "$SORT" && break
10032done
10033
10034    else
10035      # If it succeeded, then it was overridden by the user. We will use it
10036      # for the tool.
10037
10038      # First remove it from the list of overridden variables, so we can test
10039      # for unknown variables in the end.
10040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10041
10042      # Check if we try to supply an empty value
10043      if test "x$SORT" = x; then
10044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10045$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10047$as_echo_n "checking for SORT... " >&6; }
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10049$as_echo "disabled" >&6; }
10050      else
10051        # Check if the provided tool contains a complete path.
10052        tool_specified="$SORT"
10053        tool_basename="${tool_specified##*/}"
10054        if test "x$tool_basename" = "x$tool_specified"; then
10055          # A command without a complete path is provided, search $PATH.
10056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10057$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10058          # Extract the first word of "$tool_basename", so it can be a program name with args.
10059set dummy $tool_basename; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if ${ac_cv_path_SORT+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $SORT in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088SORT=$ac_cv_path_SORT
10089if test -n "$SORT"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10091$as_echo "$SORT" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098          if test "x$SORT" = x; then
10099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10100          fi
10101        else
10102          # Otherwise we believe it is a complete path. Use it as it is.
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10104$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10106$as_echo_n "checking for SORT... " >&6; }
10107          if test ! -x "$tool_specified"; then
10108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10109$as_echo "not found" >&6; }
10110            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10111          fi
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10113$as_echo "$tool_specified" >&6; }
10114        fi
10115      fi
10116    fi
10117  fi
10118
10119
10120
10121  if test "x$SORT" = x; then
10122    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10123  fi
10124
10125
10126
10127
10128
10129  # Publish this variable in the help.
10130
10131
10132  if [ -z "${TAIL+x}" ]; then
10133    # The variable is not set by user, try to locate tool using the code snippet
10134    for ac_prog in tail
10135do
10136  # Extract the first word of "$ac_prog", so it can be a program name with args.
10137set dummy $ac_prog; ac_word=$2
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10139$as_echo_n "checking for $ac_word... " >&6; }
10140if ${ac_cv_path_TAIL+:} false; then :
10141  $as_echo_n "(cached) " >&6
10142else
10143  case $TAIL in
10144  [\\/]* | ?:[\\/]*)
10145  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10146  ;;
10147  *)
10148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10149for as_dir in $PATH
10150do
10151  IFS=$as_save_IFS
10152  test -z "$as_dir" && as_dir=.
10153    for ac_exec_ext in '' $ac_executable_extensions; do
10154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10155    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10157    break 2
10158  fi
10159done
10160  done
10161IFS=$as_save_IFS
10162
10163  ;;
10164esac
10165fi
10166TAIL=$ac_cv_path_TAIL
10167if test -n "$TAIL"; then
10168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10169$as_echo "$TAIL" >&6; }
10170else
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
10173fi
10174
10175
10176  test -n "$TAIL" && break
10177done
10178
10179  else
10180    # The variable is set, but is it from the command line or the environment?
10181
10182    # Try to remove the string !TAIL! from our list.
10183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10185      # If it failed, the variable was not from the command line. Ignore it,
10186      # but warn the user (except for BASH, which is always set by the calling BASH).
10187      if test "xTAIL" != xBASH; then
10188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10189$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10190      fi
10191      # Try to locate tool using the code snippet
10192      for ac_prog in tail
10193do
10194  # Extract the first word of "$ac_prog", so it can be a program name with args.
10195set dummy $ac_prog; ac_word=$2
10196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197$as_echo_n "checking for $ac_word... " >&6; }
10198if ${ac_cv_path_TAIL+:} false; then :
10199  $as_echo_n "(cached) " >&6
10200else
10201  case $TAIL in
10202  [\\/]* | ?:[\\/]*)
10203  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10204  ;;
10205  *)
10206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10207for as_dir in $PATH
10208do
10209  IFS=$as_save_IFS
10210  test -z "$as_dir" && as_dir=.
10211    for ac_exec_ext in '' $ac_executable_extensions; do
10212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10213    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10215    break 2
10216  fi
10217done
10218  done
10219IFS=$as_save_IFS
10220
10221  ;;
10222esac
10223fi
10224TAIL=$ac_cv_path_TAIL
10225if test -n "$TAIL"; then
10226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10227$as_echo "$TAIL" >&6; }
10228else
10229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230$as_echo "no" >&6; }
10231fi
10232
10233
10234  test -n "$TAIL" && break
10235done
10236
10237    else
10238      # If it succeeded, then it was overridden by the user. We will use it
10239      # for the tool.
10240
10241      # First remove it from the list of overridden variables, so we can test
10242      # for unknown variables in the end.
10243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10244
10245      # Check if we try to supply an empty value
10246      if test "x$TAIL" = x; then
10247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10248$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10250$as_echo_n "checking for TAIL... " >&6; }
10251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10252$as_echo "disabled" >&6; }
10253      else
10254        # Check if the provided tool contains a complete path.
10255        tool_specified="$TAIL"
10256        tool_basename="${tool_specified##*/}"
10257        if test "x$tool_basename" = "x$tool_specified"; then
10258          # A command without a complete path is provided, search $PATH.
10259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10260$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10261          # Extract the first word of "$tool_basename", so it can be a program name with args.
10262set dummy $tool_basename; ac_word=$2
10263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10264$as_echo_n "checking for $ac_word... " >&6; }
10265if ${ac_cv_path_TAIL+:} false; then :
10266  $as_echo_n "(cached) " >&6
10267else
10268  case $TAIL in
10269  [\\/]* | ?:[\\/]*)
10270  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10271  ;;
10272  *)
10273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10274for as_dir in $PATH
10275do
10276  IFS=$as_save_IFS
10277  test -z "$as_dir" && as_dir=.
10278    for ac_exec_ext in '' $ac_executable_extensions; do
10279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10280    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10282    break 2
10283  fi
10284done
10285  done
10286IFS=$as_save_IFS
10287
10288  ;;
10289esac
10290fi
10291TAIL=$ac_cv_path_TAIL
10292if test -n "$TAIL"; then
10293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10294$as_echo "$TAIL" >&6; }
10295else
10296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10297$as_echo "no" >&6; }
10298fi
10299
10300
10301          if test "x$TAIL" = x; then
10302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10303          fi
10304        else
10305          # Otherwise we believe it is a complete path. Use it as it is.
10306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10307$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10309$as_echo_n "checking for TAIL... " >&6; }
10310          if test ! -x "$tool_specified"; then
10311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10312$as_echo "not found" >&6; }
10313            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10314          fi
10315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10316$as_echo "$tool_specified" >&6; }
10317        fi
10318      fi
10319    fi
10320  fi
10321
10322
10323
10324  if test "x$TAIL" = x; then
10325    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10326  fi
10327
10328
10329
10330
10331
10332  # Publish this variable in the help.
10333
10334
10335  if [ -z "${TAR+x}" ]; then
10336    # The variable is not set by user, try to locate tool using the code snippet
10337    for ac_prog in tar
10338do
10339  # Extract the first word of "$ac_prog", so it can be a program name with args.
10340set dummy $ac_prog; ac_word=$2
10341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10342$as_echo_n "checking for $ac_word... " >&6; }
10343if ${ac_cv_path_TAR+:} false; then :
10344  $as_echo_n "(cached) " >&6
10345else
10346  case $TAR in
10347  [\\/]* | ?:[\\/]*)
10348  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10349  ;;
10350  *)
10351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10352for as_dir in $PATH
10353do
10354  IFS=$as_save_IFS
10355  test -z "$as_dir" && as_dir=.
10356    for ac_exec_ext in '' $ac_executable_extensions; do
10357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10358    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10360    break 2
10361  fi
10362done
10363  done
10364IFS=$as_save_IFS
10365
10366  ;;
10367esac
10368fi
10369TAR=$ac_cv_path_TAR
10370if test -n "$TAR"; then
10371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10372$as_echo "$TAR" >&6; }
10373else
10374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10375$as_echo "no" >&6; }
10376fi
10377
10378
10379  test -n "$TAR" && break
10380done
10381
10382  else
10383    # The variable is set, but is it from the command line or the environment?
10384
10385    # Try to remove the string !TAR! from our list.
10386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10388      # If it failed, the variable was not from the command line. Ignore it,
10389      # but warn the user (except for BASH, which is always set by the calling BASH).
10390      if test "xTAR" != xBASH; then
10391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10392$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10393      fi
10394      # Try to locate tool using the code snippet
10395      for ac_prog in tar
10396do
10397  # Extract the first word of "$ac_prog", so it can be a program name with args.
10398set dummy $ac_prog; ac_word=$2
10399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10400$as_echo_n "checking for $ac_word... " >&6; }
10401if ${ac_cv_path_TAR+:} false; then :
10402  $as_echo_n "(cached) " >&6
10403else
10404  case $TAR in
10405  [\\/]* | ?:[\\/]*)
10406  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10407  ;;
10408  *)
10409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10410for as_dir in $PATH
10411do
10412  IFS=$as_save_IFS
10413  test -z "$as_dir" && as_dir=.
10414    for ac_exec_ext in '' $ac_executable_extensions; do
10415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10416    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10418    break 2
10419  fi
10420done
10421  done
10422IFS=$as_save_IFS
10423
10424  ;;
10425esac
10426fi
10427TAR=$ac_cv_path_TAR
10428if test -n "$TAR"; then
10429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10430$as_echo "$TAR" >&6; }
10431else
10432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10433$as_echo "no" >&6; }
10434fi
10435
10436
10437  test -n "$TAR" && break
10438done
10439
10440    else
10441      # If it succeeded, then it was overridden by the user. We will use it
10442      # for the tool.
10443
10444      # First remove it from the list of overridden variables, so we can test
10445      # for unknown variables in the end.
10446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10447
10448      # Check if we try to supply an empty value
10449      if test "x$TAR" = x; then
10450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10451$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10453$as_echo_n "checking for TAR... " >&6; }
10454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10455$as_echo "disabled" >&6; }
10456      else
10457        # Check if the provided tool contains a complete path.
10458        tool_specified="$TAR"
10459        tool_basename="${tool_specified##*/}"
10460        if test "x$tool_basename" = "x$tool_specified"; then
10461          # A command without a complete path is provided, search $PATH.
10462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10463$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10464          # Extract the first word of "$tool_basename", so it can be a program name with args.
10465set dummy $tool_basename; ac_word=$2
10466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467$as_echo_n "checking for $ac_word... " >&6; }
10468if ${ac_cv_path_TAR+:} false; then :
10469  $as_echo_n "(cached) " >&6
10470else
10471  case $TAR in
10472  [\\/]* | ?:[\\/]*)
10473  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10474  ;;
10475  *)
10476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477for as_dir in $PATH
10478do
10479  IFS=$as_save_IFS
10480  test -z "$as_dir" && as_dir=.
10481    for ac_exec_ext in '' $ac_executable_extensions; do
10482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485    break 2
10486  fi
10487done
10488  done
10489IFS=$as_save_IFS
10490
10491  ;;
10492esac
10493fi
10494TAR=$ac_cv_path_TAR
10495if test -n "$TAR"; then
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10497$as_echo "$TAR" >&6; }
10498else
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501fi
10502
10503
10504          if test "x$TAR" = x; then
10505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10506          fi
10507        else
10508          # Otherwise we believe it is a complete path. Use it as it is.
10509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10510$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10512$as_echo_n "checking for TAR... " >&6; }
10513          if test ! -x "$tool_specified"; then
10514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10515$as_echo "not found" >&6; }
10516            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10517          fi
10518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10519$as_echo "$tool_specified" >&6; }
10520        fi
10521      fi
10522    fi
10523  fi
10524
10525
10526
10527  if test "x$TAR" = x; then
10528    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10529  fi
10530
10531
10532
10533
10534
10535  # Publish this variable in the help.
10536
10537
10538  if [ -z "${TEE+x}" ]; then
10539    # The variable is not set by user, try to locate tool using the code snippet
10540    for ac_prog in tee
10541do
10542  # Extract the first word of "$ac_prog", so it can be a program name with args.
10543set dummy $ac_prog; ac_word=$2
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545$as_echo_n "checking for $ac_word... " >&6; }
10546if ${ac_cv_path_TEE+:} false; then :
10547  $as_echo_n "(cached) " >&6
10548else
10549  case $TEE in
10550  [\\/]* | ?:[\\/]*)
10551  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10552  ;;
10553  *)
10554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555for as_dir in $PATH
10556do
10557  IFS=$as_save_IFS
10558  test -z "$as_dir" && as_dir=.
10559    for ac_exec_ext in '' $ac_executable_extensions; do
10560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10561    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563    break 2
10564  fi
10565done
10566  done
10567IFS=$as_save_IFS
10568
10569  ;;
10570esac
10571fi
10572TEE=$ac_cv_path_TEE
10573if test -n "$TEE"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10575$as_echo "$TEE" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582  test -n "$TEE" && break
10583done
10584
10585  else
10586    # The variable is set, but is it from the command line or the environment?
10587
10588    # Try to remove the string !TEE! from our list.
10589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10591      # If it failed, the variable was not from the command line. Ignore it,
10592      # but warn the user (except for BASH, which is always set by the calling BASH).
10593      if test "xTEE" != xBASH; then
10594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10595$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10596      fi
10597      # Try to locate tool using the code snippet
10598      for ac_prog in tee
10599do
10600  # Extract the first word of "$ac_prog", so it can be a program name with args.
10601set dummy $ac_prog; ac_word=$2
10602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10603$as_echo_n "checking for $ac_word... " >&6; }
10604if ${ac_cv_path_TEE+:} false; then :
10605  $as_echo_n "(cached) " >&6
10606else
10607  case $TEE in
10608  [\\/]* | ?:[\\/]*)
10609  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10610  ;;
10611  *)
10612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10613for as_dir in $PATH
10614do
10615  IFS=$as_save_IFS
10616  test -z "$as_dir" && as_dir=.
10617    for ac_exec_ext in '' $ac_executable_extensions; do
10618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10619    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10621    break 2
10622  fi
10623done
10624  done
10625IFS=$as_save_IFS
10626
10627  ;;
10628esac
10629fi
10630TEE=$ac_cv_path_TEE
10631if test -n "$TEE"; then
10632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10633$as_echo "$TEE" >&6; }
10634else
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
10637fi
10638
10639
10640  test -n "$TEE" && break
10641done
10642
10643    else
10644      # If it succeeded, then it was overridden by the user. We will use it
10645      # for the tool.
10646
10647      # First remove it from the list of overridden variables, so we can test
10648      # for unknown variables in the end.
10649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10650
10651      # Check if we try to supply an empty value
10652      if test "x$TEE" = x; then
10653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10654$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10656$as_echo_n "checking for TEE... " >&6; }
10657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10658$as_echo "disabled" >&6; }
10659      else
10660        # Check if the provided tool contains a complete path.
10661        tool_specified="$TEE"
10662        tool_basename="${tool_specified##*/}"
10663        if test "x$tool_basename" = "x$tool_specified"; then
10664          # A command without a complete path is provided, search $PATH.
10665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10666$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10667          # Extract the first word of "$tool_basename", so it can be a program name with args.
10668set dummy $tool_basename; ac_word=$2
10669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10670$as_echo_n "checking for $ac_word... " >&6; }
10671if ${ac_cv_path_TEE+:} false; then :
10672  $as_echo_n "(cached) " >&6
10673else
10674  case $TEE in
10675  [\\/]* | ?:[\\/]*)
10676  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10677  ;;
10678  *)
10679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10680for as_dir in $PATH
10681do
10682  IFS=$as_save_IFS
10683  test -z "$as_dir" && as_dir=.
10684    for ac_exec_ext in '' $ac_executable_extensions; do
10685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10686    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10688    break 2
10689  fi
10690done
10691  done
10692IFS=$as_save_IFS
10693
10694  ;;
10695esac
10696fi
10697TEE=$ac_cv_path_TEE
10698if test -n "$TEE"; then
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10700$as_echo "$TEE" >&6; }
10701else
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
10705
10706
10707          if test "x$TEE" = x; then
10708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10709          fi
10710        else
10711          # Otherwise we believe it is a complete path. Use it as it is.
10712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10713$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10715$as_echo_n "checking for TEE... " >&6; }
10716          if test ! -x "$tool_specified"; then
10717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10718$as_echo "not found" >&6; }
10719            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10720          fi
10721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10722$as_echo "$tool_specified" >&6; }
10723        fi
10724      fi
10725    fi
10726  fi
10727
10728
10729
10730  if test "x$TEE" = x; then
10731    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10732  fi
10733
10734
10735
10736
10737
10738  # Publish this variable in the help.
10739
10740
10741  if [ -z "${TOUCH+x}" ]; then
10742    # The variable is not set by user, try to locate tool using the code snippet
10743    for ac_prog in touch
10744do
10745  # Extract the first word of "$ac_prog", so it can be a program name with args.
10746set dummy $ac_prog; ac_word=$2
10747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10748$as_echo_n "checking for $ac_word... " >&6; }
10749if ${ac_cv_path_TOUCH+:} false; then :
10750  $as_echo_n "(cached) " >&6
10751else
10752  case $TOUCH in
10753  [\\/]* | ?:[\\/]*)
10754  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10755  ;;
10756  *)
10757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10758for as_dir in $PATH
10759do
10760  IFS=$as_save_IFS
10761  test -z "$as_dir" && as_dir=.
10762    for ac_exec_ext in '' $ac_executable_extensions; do
10763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10764    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10766    break 2
10767  fi
10768done
10769  done
10770IFS=$as_save_IFS
10771
10772  ;;
10773esac
10774fi
10775TOUCH=$ac_cv_path_TOUCH
10776if test -n "$TOUCH"; then
10777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10778$as_echo "$TOUCH" >&6; }
10779else
10780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10781$as_echo "no" >&6; }
10782fi
10783
10784
10785  test -n "$TOUCH" && break
10786done
10787
10788  else
10789    # The variable is set, but is it from the command line or the environment?
10790
10791    # Try to remove the string !TOUCH! from our list.
10792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10794      # If it failed, the variable was not from the command line. Ignore it,
10795      # but warn the user (except for BASH, which is always set by the calling BASH).
10796      if test "xTOUCH" != xBASH; then
10797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10798$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10799      fi
10800      # Try to locate tool using the code snippet
10801      for ac_prog in touch
10802do
10803  # Extract the first word of "$ac_prog", so it can be a program name with args.
10804set dummy $ac_prog; ac_word=$2
10805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10806$as_echo_n "checking for $ac_word... " >&6; }
10807if ${ac_cv_path_TOUCH+:} false; then :
10808  $as_echo_n "(cached) " >&6
10809else
10810  case $TOUCH in
10811  [\\/]* | ?:[\\/]*)
10812  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10813  ;;
10814  *)
10815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10816for as_dir in $PATH
10817do
10818  IFS=$as_save_IFS
10819  test -z "$as_dir" && as_dir=.
10820    for ac_exec_ext in '' $ac_executable_extensions; do
10821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10822    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10824    break 2
10825  fi
10826done
10827  done
10828IFS=$as_save_IFS
10829
10830  ;;
10831esac
10832fi
10833TOUCH=$ac_cv_path_TOUCH
10834if test -n "$TOUCH"; then
10835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10836$as_echo "$TOUCH" >&6; }
10837else
10838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10839$as_echo "no" >&6; }
10840fi
10841
10842
10843  test -n "$TOUCH" && break
10844done
10845
10846    else
10847      # If it succeeded, then it was overridden by the user. We will use it
10848      # for the tool.
10849
10850      # First remove it from the list of overridden variables, so we can test
10851      # for unknown variables in the end.
10852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10853
10854      # Check if we try to supply an empty value
10855      if test "x$TOUCH" = x; then
10856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10857$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10859$as_echo_n "checking for TOUCH... " >&6; }
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10861$as_echo "disabled" >&6; }
10862      else
10863        # Check if the provided tool contains a complete path.
10864        tool_specified="$TOUCH"
10865        tool_basename="${tool_specified##*/}"
10866        if test "x$tool_basename" = "x$tool_specified"; then
10867          # A command without a complete path is provided, search $PATH.
10868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10869$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10870          # Extract the first word of "$tool_basename", so it can be a program name with args.
10871set dummy $tool_basename; ac_word=$2
10872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10873$as_echo_n "checking for $ac_word... " >&6; }
10874if ${ac_cv_path_TOUCH+:} false; then :
10875  $as_echo_n "(cached) " >&6
10876else
10877  case $TOUCH in
10878  [\\/]* | ?:[\\/]*)
10879  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10880  ;;
10881  *)
10882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10883for as_dir in $PATH
10884do
10885  IFS=$as_save_IFS
10886  test -z "$as_dir" && as_dir=.
10887    for ac_exec_ext in '' $ac_executable_extensions; do
10888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10889    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10891    break 2
10892  fi
10893done
10894  done
10895IFS=$as_save_IFS
10896
10897  ;;
10898esac
10899fi
10900TOUCH=$ac_cv_path_TOUCH
10901if test -n "$TOUCH"; then
10902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10903$as_echo "$TOUCH" >&6; }
10904else
10905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906$as_echo "no" >&6; }
10907fi
10908
10909
10910          if test "x$TOUCH" = x; then
10911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10912          fi
10913        else
10914          # Otherwise we believe it is a complete path. Use it as it is.
10915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10916$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10918$as_echo_n "checking for TOUCH... " >&6; }
10919          if test ! -x "$tool_specified"; then
10920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10921$as_echo "not found" >&6; }
10922            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10923          fi
10924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10925$as_echo "$tool_specified" >&6; }
10926        fi
10927      fi
10928    fi
10929  fi
10930
10931
10932
10933  if test "x$TOUCH" = x; then
10934    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10935  fi
10936
10937
10938
10939
10940
10941  # Publish this variable in the help.
10942
10943
10944  if [ -z "${TR+x}" ]; then
10945    # The variable is not set by user, try to locate tool using the code snippet
10946    for ac_prog in tr
10947do
10948  # Extract the first word of "$ac_prog", so it can be a program name with args.
10949set dummy $ac_prog; ac_word=$2
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10951$as_echo_n "checking for $ac_word... " >&6; }
10952if ${ac_cv_path_TR+:} false; then :
10953  $as_echo_n "(cached) " >&6
10954else
10955  case $TR in
10956  [\\/]* | ?:[\\/]*)
10957  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10958  ;;
10959  *)
10960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10961for as_dir in $PATH
10962do
10963  IFS=$as_save_IFS
10964  test -z "$as_dir" && as_dir=.
10965    for ac_exec_ext in '' $ac_executable_extensions; do
10966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10967    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10969    break 2
10970  fi
10971done
10972  done
10973IFS=$as_save_IFS
10974
10975  ;;
10976esac
10977fi
10978TR=$ac_cv_path_TR
10979if test -n "$TR"; then
10980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10981$as_echo "$TR" >&6; }
10982else
10983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
10985fi
10986
10987
10988  test -n "$TR" && break
10989done
10990
10991  else
10992    # The variable is set, but is it from the command line or the environment?
10993
10994    # Try to remove the string !TR! from our list.
10995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10997      # If it failed, the variable was not from the command line. Ignore it,
10998      # but warn the user (except for BASH, which is always set by the calling BASH).
10999      if test "xTR" != xBASH; then
11000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11001$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11002      fi
11003      # Try to locate tool using the code snippet
11004      for ac_prog in tr
11005do
11006  # Extract the first word of "$ac_prog", so it can be a program name with args.
11007set dummy $ac_prog; ac_word=$2
11008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11009$as_echo_n "checking for $ac_word... " >&6; }
11010if ${ac_cv_path_TR+:} false; then :
11011  $as_echo_n "(cached) " >&6
11012else
11013  case $TR in
11014  [\\/]* | ?:[\\/]*)
11015  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11016  ;;
11017  *)
11018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11019for as_dir in $PATH
11020do
11021  IFS=$as_save_IFS
11022  test -z "$as_dir" && as_dir=.
11023    for ac_exec_ext in '' $ac_executable_extensions; do
11024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11025    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11027    break 2
11028  fi
11029done
11030  done
11031IFS=$as_save_IFS
11032
11033  ;;
11034esac
11035fi
11036TR=$ac_cv_path_TR
11037if test -n "$TR"; then
11038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11039$as_echo "$TR" >&6; }
11040else
11041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
11043fi
11044
11045
11046  test -n "$TR" && break
11047done
11048
11049    else
11050      # If it succeeded, then it was overridden by the user. We will use it
11051      # for the tool.
11052
11053      # First remove it from the list of overridden variables, so we can test
11054      # for unknown variables in the end.
11055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11056
11057      # Check if we try to supply an empty value
11058      if test "x$TR" = x; then
11059        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11060$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11061        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11062$as_echo_n "checking for TR... " >&6; }
11063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11064$as_echo "disabled" >&6; }
11065      else
11066        # Check if the provided tool contains a complete path.
11067        tool_specified="$TR"
11068        tool_basename="${tool_specified##*/}"
11069        if test "x$tool_basename" = "x$tool_specified"; then
11070          # A command without a complete path is provided, search $PATH.
11071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11072$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11073          # Extract the first word of "$tool_basename", so it can be a program name with args.
11074set dummy $tool_basename; ac_word=$2
11075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11076$as_echo_n "checking for $ac_word... " >&6; }
11077if ${ac_cv_path_TR+:} false; then :
11078  $as_echo_n "(cached) " >&6
11079else
11080  case $TR in
11081  [\\/]* | ?:[\\/]*)
11082  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11083  ;;
11084  *)
11085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11086for as_dir in $PATH
11087do
11088  IFS=$as_save_IFS
11089  test -z "$as_dir" && as_dir=.
11090    for ac_exec_ext in '' $ac_executable_extensions; do
11091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11092    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11094    break 2
11095  fi
11096done
11097  done
11098IFS=$as_save_IFS
11099
11100  ;;
11101esac
11102fi
11103TR=$ac_cv_path_TR
11104if test -n "$TR"; then
11105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11106$as_echo "$TR" >&6; }
11107else
11108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11109$as_echo "no" >&6; }
11110fi
11111
11112
11113          if test "x$TR" = x; then
11114            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11115          fi
11116        else
11117          # Otherwise we believe it is a complete path. Use it as it is.
11118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11119$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11120          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11121$as_echo_n "checking for TR... " >&6; }
11122          if test ! -x "$tool_specified"; then
11123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11124$as_echo "not found" >&6; }
11125            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11126          fi
11127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11128$as_echo "$tool_specified" >&6; }
11129        fi
11130      fi
11131    fi
11132  fi
11133
11134
11135
11136  if test "x$TR" = x; then
11137    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11138  fi
11139
11140
11141
11142
11143
11144  # Publish this variable in the help.
11145
11146
11147  if [ -z "${UNAME+x}" ]; then
11148    # The variable is not set by user, try to locate tool using the code snippet
11149    for ac_prog in uname
11150do
11151  # Extract the first word of "$ac_prog", so it can be a program name with args.
11152set dummy $ac_prog; ac_word=$2
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11154$as_echo_n "checking for $ac_word... " >&6; }
11155if ${ac_cv_path_UNAME+:} false; then :
11156  $as_echo_n "(cached) " >&6
11157else
11158  case $UNAME in
11159  [\\/]* | ?:[\\/]*)
11160  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11161  ;;
11162  *)
11163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11164for as_dir in $PATH
11165do
11166  IFS=$as_save_IFS
11167  test -z "$as_dir" && as_dir=.
11168    for ac_exec_ext in '' $ac_executable_extensions; do
11169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11170    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11172    break 2
11173  fi
11174done
11175  done
11176IFS=$as_save_IFS
11177
11178  ;;
11179esac
11180fi
11181UNAME=$ac_cv_path_UNAME
11182if test -n "$UNAME"; then
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11184$as_echo "$UNAME" >&6; }
11185else
11186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11187$as_echo "no" >&6; }
11188fi
11189
11190
11191  test -n "$UNAME" && break
11192done
11193
11194  else
11195    # The variable is set, but is it from the command line or the environment?
11196
11197    # Try to remove the string !UNAME! from our list.
11198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11200      # If it failed, the variable was not from the command line. Ignore it,
11201      # but warn the user (except for BASH, which is always set by the calling BASH).
11202      if test "xUNAME" != xBASH; then
11203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11204$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11205      fi
11206      # Try to locate tool using the code snippet
11207      for ac_prog in uname
11208do
11209  # Extract the first word of "$ac_prog", so it can be a program name with args.
11210set dummy $ac_prog; ac_word=$2
11211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11212$as_echo_n "checking for $ac_word... " >&6; }
11213if ${ac_cv_path_UNAME+:} false; then :
11214  $as_echo_n "(cached) " >&6
11215else
11216  case $UNAME in
11217  [\\/]* | ?:[\\/]*)
11218  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11219  ;;
11220  *)
11221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11222for as_dir in $PATH
11223do
11224  IFS=$as_save_IFS
11225  test -z "$as_dir" && as_dir=.
11226    for ac_exec_ext in '' $ac_executable_extensions; do
11227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11228    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11230    break 2
11231  fi
11232done
11233  done
11234IFS=$as_save_IFS
11235
11236  ;;
11237esac
11238fi
11239UNAME=$ac_cv_path_UNAME
11240if test -n "$UNAME"; then
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11242$as_echo "$UNAME" >&6; }
11243else
11244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11245$as_echo "no" >&6; }
11246fi
11247
11248
11249  test -n "$UNAME" && break
11250done
11251
11252    else
11253      # If it succeeded, then it was overridden by the user. We will use it
11254      # for the tool.
11255
11256      # First remove it from the list of overridden variables, so we can test
11257      # for unknown variables in the end.
11258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11259
11260      # Check if we try to supply an empty value
11261      if test "x$UNAME" = x; then
11262        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11263$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11264        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11265$as_echo_n "checking for UNAME... " >&6; }
11266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11267$as_echo "disabled" >&6; }
11268      else
11269        # Check if the provided tool contains a complete path.
11270        tool_specified="$UNAME"
11271        tool_basename="${tool_specified##*/}"
11272        if test "x$tool_basename" = "x$tool_specified"; then
11273          # A command without a complete path is provided, search $PATH.
11274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11275$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11276          # Extract the first word of "$tool_basename", so it can be a program name with args.
11277set dummy $tool_basename; ac_word=$2
11278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11279$as_echo_n "checking for $ac_word... " >&6; }
11280if ${ac_cv_path_UNAME+:} false; then :
11281  $as_echo_n "(cached) " >&6
11282else
11283  case $UNAME in
11284  [\\/]* | ?:[\\/]*)
11285  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11286  ;;
11287  *)
11288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11289for as_dir in $PATH
11290do
11291  IFS=$as_save_IFS
11292  test -z "$as_dir" && as_dir=.
11293    for ac_exec_ext in '' $ac_executable_extensions; do
11294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11295    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11297    break 2
11298  fi
11299done
11300  done
11301IFS=$as_save_IFS
11302
11303  ;;
11304esac
11305fi
11306UNAME=$ac_cv_path_UNAME
11307if test -n "$UNAME"; then
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11309$as_echo "$UNAME" >&6; }
11310else
11311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11312$as_echo "no" >&6; }
11313fi
11314
11315
11316          if test "x$UNAME" = x; then
11317            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11318          fi
11319        else
11320          # Otherwise we believe it is a complete path. Use it as it is.
11321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11322$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11323          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11324$as_echo_n "checking for UNAME... " >&6; }
11325          if test ! -x "$tool_specified"; then
11326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11327$as_echo "not found" >&6; }
11328            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11329          fi
11330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11331$as_echo "$tool_specified" >&6; }
11332        fi
11333      fi
11334    fi
11335  fi
11336
11337
11338
11339  if test "x$UNAME" = x; then
11340    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11341  fi
11342
11343
11344
11345
11346
11347  # Publish this variable in the help.
11348
11349
11350  if [ -z "${UNIQ+x}" ]; then
11351    # The variable is not set by user, try to locate tool using the code snippet
11352    for ac_prog in uniq
11353do
11354  # Extract the first word of "$ac_prog", so it can be a program name with args.
11355set dummy $ac_prog; ac_word=$2
11356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11357$as_echo_n "checking for $ac_word... " >&6; }
11358if ${ac_cv_path_UNIQ+:} false; then :
11359  $as_echo_n "(cached) " >&6
11360else
11361  case $UNIQ in
11362  [\\/]* | ?:[\\/]*)
11363  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11364  ;;
11365  *)
11366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11367for as_dir in $PATH
11368do
11369  IFS=$as_save_IFS
11370  test -z "$as_dir" && as_dir=.
11371    for ac_exec_ext in '' $ac_executable_extensions; do
11372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11373    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11375    break 2
11376  fi
11377done
11378  done
11379IFS=$as_save_IFS
11380
11381  ;;
11382esac
11383fi
11384UNIQ=$ac_cv_path_UNIQ
11385if test -n "$UNIQ"; then
11386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11387$as_echo "$UNIQ" >&6; }
11388else
11389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
11391fi
11392
11393
11394  test -n "$UNIQ" && break
11395done
11396
11397  else
11398    # The variable is set, but is it from the command line or the environment?
11399
11400    # Try to remove the string !UNIQ! from our list.
11401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11403      # If it failed, the variable was not from the command line. Ignore it,
11404      # but warn the user (except for BASH, which is always set by the calling BASH).
11405      if test "xUNIQ" != xBASH; then
11406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11407$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11408      fi
11409      # Try to locate tool using the code snippet
11410      for ac_prog in uniq
11411do
11412  # Extract the first word of "$ac_prog", so it can be a program name with args.
11413set dummy $ac_prog; ac_word=$2
11414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11415$as_echo_n "checking for $ac_word... " >&6; }
11416if ${ac_cv_path_UNIQ+:} false; then :
11417  $as_echo_n "(cached) " >&6
11418else
11419  case $UNIQ in
11420  [\\/]* | ?:[\\/]*)
11421  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11422  ;;
11423  *)
11424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11425for as_dir in $PATH
11426do
11427  IFS=$as_save_IFS
11428  test -z "$as_dir" && as_dir=.
11429    for ac_exec_ext in '' $ac_executable_extensions; do
11430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11431    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11433    break 2
11434  fi
11435done
11436  done
11437IFS=$as_save_IFS
11438
11439  ;;
11440esac
11441fi
11442UNIQ=$ac_cv_path_UNIQ
11443if test -n "$UNIQ"; then
11444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11445$as_echo "$UNIQ" >&6; }
11446else
11447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11448$as_echo "no" >&6; }
11449fi
11450
11451
11452  test -n "$UNIQ" && break
11453done
11454
11455    else
11456      # If it succeeded, then it was overridden by the user. We will use it
11457      # for the tool.
11458
11459      # First remove it from the list of overridden variables, so we can test
11460      # for unknown variables in the end.
11461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11462
11463      # Check if we try to supply an empty value
11464      if test "x$UNIQ" = x; then
11465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11466$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11468$as_echo_n "checking for UNIQ... " >&6; }
11469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11470$as_echo "disabled" >&6; }
11471      else
11472        # Check if the provided tool contains a complete path.
11473        tool_specified="$UNIQ"
11474        tool_basename="${tool_specified##*/}"
11475        if test "x$tool_basename" = "x$tool_specified"; then
11476          # A command without a complete path is provided, search $PATH.
11477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11478$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11479          # Extract the first word of "$tool_basename", so it can be a program name with args.
11480set dummy $tool_basename; ac_word=$2
11481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11482$as_echo_n "checking for $ac_word... " >&6; }
11483if ${ac_cv_path_UNIQ+:} false; then :
11484  $as_echo_n "(cached) " >&6
11485else
11486  case $UNIQ in
11487  [\\/]* | ?:[\\/]*)
11488  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11489  ;;
11490  *)
11491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11492for as_dir in $PATH
11493do
11494  IFS=$as_save_IFS
11495  test -z "$as_dir" && as_dir=.
11496    for ac_exec_ext in '' $ac_executable_extensions; do
11497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11498    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11500    break 2
11501  fi
11502done
11503  done
11504IFS=$as_save_IFS
11505
11506  ;;
11507esac
11508fi
11509UNIQ=$ac_cv_path_UNIQ
11510if test -n "$UNIQ"; then
11511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11512$as_echo "$UNIQ" >&6; }
11513else
11514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
11516fi
11517
11518
11519          if test "x$UNIQ" = x; then
11520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11521          fi
11522        else
11523          # Otherwise we believe it is a complete path. Use it as it is.
11524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11525$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11527$as_echo_n "checking for UNIQ... " >&6; }
11528          if test ! -x "$tool_specified"; then
11529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11530$as_echo "not found" >&6; }
11531            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11532          fi
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11534$as_echo "$tool_specified" >&6; }
11535        fi
11536      fi
11537    fi
11538  fi
11539
11540
11541
11542  if test "x$UNIQ" = x; then
11543    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11544  fi
11545
11546
11547
11548
11549
11550  # Publish this variable in the help.
11551
11552
11553  if [ -z "${WC+x}" ]; then
11554    # The variable is not set by user, try to locate tool using the code snippet
11555    for ac_prog in wc
11556do
11557  # Extract the first word of "$ac_prog", so it can be a program name with args.
11558set dummy $ac_prog; ac_word=$2
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11560$as_echo_n "checking for $ac_word... " >&6; }
11561if ${ac_cv_path_WC+:} false; then :
11562  $as_echo_n "(cached) " >&6
11563else
11564  case $WC in
11565  [\\/]* | ?:[\\/]*)
11566  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11567  ;;
11568  *)
11569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11570for as_dir in $PATH
11571do
11572  IFS=$as_save_IFS
11573  test -z "$as_dir" && as_dir=.
11574    for ac_exec_ext in '' $ac_executable_extensions; do
11575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11576    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11578    break 2
11579  fi
11580done
11581  done
11582IFS=$as_save_IFS
11583
11584  ;;
11585esac
11586fi
11587WC=$ac_cv_path_WC
11588if test -n "$WC"; then
11589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11590$as_echo "$WC" >&6; }
11591else
11592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11593$as_echo "no" >&6; }
11594fi
11595
11596
11597  test -n "$WC" && break
11598done
11599
11600  else
11601    # The variable is set, but is it from the command line or the environment?
11602
11603    # Try to remove the string !WC! from our list.
11604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11606      # If it failed, the variable was not from the command line. Ignore it,
11607      # but warn the user (except for BASH, which is always set by the calling BASH).
11608      if test "xWC" != xBASH; then
11609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11610$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11611      fi
11612      # Try to locate tool using the code snippet
11613      for ac_prog in wc
11614do
11615  # Extract the first word of "$ac_prog", so it can be a program name with args.
11616set dummy $ac_prog; ac_word=$2
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11618$as_echo_n "checking for $ac_word... " >&6; }
11619if ${ac_cv_path_WC+:} false; then :
11620  $as_echo_n "(cached) " >&6
11621else
11622  case $WC in
11623  [\\/]* | ?:[\\/]*)
11624  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11625  ;;
11626  *)
11627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628for as_dir in $PATH
11629do
11630  IFS=$as_save_IFS
11631  test -z "$as_dir" && as_dir=.
11632    for ac_exec_ext in '' $ac_executable_extensions; do
11633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11636    break 2
11637  fi
11638done
11639  done
11640IFS=$as_save_IFS
11641
11642  ;;
11643esac
11644fi
11645WC=$ac_cv_path_WC
11646if test -n "$WC"; then
11647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11648$as_echo "$WC" >&6; }
11649else
11650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
11652fi
11653
11654
11655  test -n "$WC" && break
11656done
11657
11658    else
11659      # If it succeeded, then it was overridden by the user. We will use it
11660      # for the tool.
11661
11662      # First remove it from the list of overridden variables, so we can test
11663      # for unknown variables in the end.
11664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11665
11666      # Check if we try to supply an empty value
11667      if test "x$WC" = x; then
11668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11669$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11671$as_echo_n "checking for WC... " >&6; }
11672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11673$as_echo "disabled" >&6; }
11674      else
11675        # Check if the provided tool contains a complete path.
11676        tool_specified="$WC"
11677        tool_basename="${tool_specified##*/}"
11678        if test "x$tool_basename" = "x$tool_specified"; then
11679          # A command without a complete path is provided, search $PATH.
11680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11681$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11682          # Extract the first word of "$tool_basename", so it can be a program name with args.
11683set dummy $tool_basename; ac_word=$2
11684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11685$as_echo_n "checking for $ac_word... " >&6; }
11686if ${ac_cv_path_WC+:} false; then :
11687  $as_echo_n "(cached) " >&6
11688else
11689  case $WC in
11690  [\\/]* | ?:[\\/]*)
11691  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11692  ;;
11693  *)
11694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11695for as_dir in $PATH
11696do
11697  IFS=$as_save_IFS
11698  test -z "$as_dir" && as_dir=.
11699    for ac_exec_ext in '' $ac_executable_extensions; do
11700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11701    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11703    break 2
11704  fi
11705done
11706  done
11707IFS=$as_save_IFS
11708
11709  ;;
11710esac
11711fi
11712WC=$ac_cv_path_WC
11713if test -n "$WC"; then
11714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11715$as_echo "$WC" >&6; }
11716else
11717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11718$as_echo "no" >&6; }
11719fi
11720
11721
11722          if test "x$WC" = x; then
11723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11724          fi
11725        else
11726          # Otherwise we believe it is a complete path. Use it as it is.
11727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11728$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11730$as_echo_n "checking for WC... " >&6; }
11731          if test ! -x "$tool_specified"; then
11732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11733$as_echo "not found" >&6; }
11734            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11735          fi
11736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11737$as_echo "$tool_specified" >&6; }
11738        fi
11739      fi
11740    fi
11741  fi
11742
11743
11744
11745  if test "x$WC" = x; then
11746    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11747  fi
11748
11749
11750
11751
11752
11753  # Publish this variable in the help.
11754
11755
11756  if [ -z "${WHICH+x}" ]; then
11757    # The variable is not set by user, try to locate tool using the code snippet
11758    for ac_prog in which
11759do
11760  # Extract the first word of "$ac_prog", so it can be a program name with args.
11761set dummy $ac_prog; ac_word=$2
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11763$as_echo_n "checking for $ac_word... " >&6; }
11764if ${ac_cv_path_WHICH+:} false; then :
11765  $as_echo_n "(cached) " >&6
11766else
11767  case $WHICH in
11768  [\\/]* | ?:[\\/]*)
11769  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11770  ;;
11771  *)
11772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11773for as_dir in $PATH
11774do
11775  IFS=$as_save_IFS
11776  test -z "$as_dir" && as_dir=.
11777    for ac_exec_ext in '' $ac_executable_extensions; do
11778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11779    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11781    break 2
11782  fi
11783done
11784  done
11785IFS=$as_save_IFS
11786
11787  ;;
11788esac
11789fi
11790WHICH=$ac_cv_path_WHICH
11791if test -n "$WHICH"; then
11792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11793$as_echo "$WHICH" >&6; }
11794else
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796$as_echo "no" >&6; }
11797fi
11798
11799
11800  test -n "$WHICH" && break
11801done
11802
11803  else
11804    # The variable is set, but is it from the command line or the environment?
11805
11806    # Try to remove the string !WHICH! from our list.
11807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11809      # If it failed, the variable was not from the command line. Ignore it,
11810      # but warn the user (except for BASH, which is always set by the calling BASH).
11811      if test "xWHICH" != xBASH; then
11812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11813$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11814      fi
11815      # Try to locate tool using the code snippet
11816      for ac_prog in which
11817do
11818  # Extract the first word of "$ac_prog", so it can be a program name with args.
11819set dummy $ac_prog; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_WHICH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $WHICH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848WHICH=$ac_cv_path_WHICH
11849if test -n "$WHICH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11851$as_echo "$WHICH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858  test -n "$WHICH" && break
11859done
11860
11861    else
11862      # If it succeeded, then it was overridden by the user. We will use it
11863      # for the tool.
11864
11865      # First remove it from the list of overridden variables, so we can test
11866      # for unknown variables in the end.
11867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11868
11869      # Check if we try to supply an empty value
11870      if test "x$WHICH" = x; then
11871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11872$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11874$as_echo_n "checking for WHICH... " >&6; }
11875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11876$as_echo "disabled" >&6; }
11877      else
11878        # Check if the provided tool contains a complete path.
11879        tool_specified="$WHICH"
11880        tool_basename="${tool_specified##*/}"
11881        if test "x$tool_basename" = "x$tool_specified"; then
11882          # A command without a complete path is provided, search $PATH.
11883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11884$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11885          # Extract the first word of "$tool_basename", so it can be a program name with args.
11886set dummy $tool_basename; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_WHICH+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $WHICH in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915WHICH=$ac_cv_path_WHICH
11916if test -n "$WHICH"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11918$as_echo "$WHICH" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925          if test "x$WHICH" = x; then
11926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11927          fi
11928        else
11929          # Otherwise we believe it is a complete path. Use it as it is.
11930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11931$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11933$as_echo_n "checking for WHICH... " >&6; }
11934          if test ! -x "$tool_specified"; then
11935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11936$as_echo "not found" >&6; }
11937            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11938          fi
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11940$as_echo "$tool_specified" >&6; }
11941        fi
11942      fi
11943    fi
11944  fi
11945
11946
11947
11948  if test "x$WHICH" = x; then
11949    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11950  fi
11951
11952
11953
11954
11955
11956  # Publish this variable in the help.
11957
11958
11959  if [ -z "${XARGS+x}" ]; then
11960    # The variable is not set by user, try to locate tool using the code snippet
11961    for ac_prog in xargs
11962do
11963  # Extract the first word of "$ac_prog", so it can be a program name with args.
11964set dummy $ac_prog; ac_word=$2
11965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11966$as_echo_n "checking for $ac_word... " >&6; }
11967if ${ac_cv_path_XARGS+:} false; then :
11968  $as_echo_n "(cached) " >&6
11969else
11970  case $XARGS in
11971  [\\/]* | ?:[\\/]*)
11972  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11973  ;;
11974  *)
11975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11976for as_dir in $PATH
11977do
11978  IFS=$as_save_IFS
11979  test -z "$as_dir" && as_dir=.
11980    for ac_exec_ext in '' $ac_executable_extensions; do
11981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11982    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11984    break 2
11985  fi
11986done
11987  done
11988IFS=$as_save_IFS
11989
11990  ;;
11991esac
11992fi
11993XARGS=$ac_cv_path_XARGS
11994if test -n "$XARGS"; then
11995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11996$as_echo "$XARGS" >&6; }
11997else
11998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11999$as_echo "no" >&6; }
12000fi
12001
12002
12003  test -n "$XARGS" && break
12004done
12005
12006  else
12007    # The variable is set, but is it from the command line or the environment?
12008
12009    # Try to remove the string !XARGS! from our list.
12010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12012      # If it failed, the variable was not from the command line. Ignore it,
12013      # but warn the user (except for BASH, which is always set by the calling BASH).
12014      if test "xXARGS" != xBASH; then
12015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12016$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12017      fi
12018      # Try to locate tool using the code snippet
12019      for ac_prog in xargs
12020do
12021  # Extract the first word of "$ac_prog", so it can be a program name with args.
12022set dummy $ac_prog; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_XARGS+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $XARGS in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051XARGS=$ac_cv_path_XARGS
12052if test -n "$XARGS"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12054$as_echo "$XARGS" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061  test -n "$XARGS" && break
12062done
12063
12064    else
12065      # If it succeeded, then it was overridden by the user. We will use it
12066      # for the tool.
12067
12068      # First remove it from the list of overridden variables, so we can test
12069      # for unknown variables in the end.
12070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12071
12072      # Check if we try to supply an empty value
12073      if test "x$XARGS" = x; then
12074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12075$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12077$as_echo_n "checking for XARGS... " >&6; }
12078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12079$as_echo "disabled" >&6; }
12080      else
12081        # Check if the provided tool contains a complete path.
12082        tool_specified="$XARGS"
12083        tool_basename="${tool_specified##*/}"
12084        if test "x$tool_basename" = "x$tool_specified"; then
12085          # A command without a complete path is provided, search $PATH.
12086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12087$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12088          # Extract the first word of "$tool_basename", so it can be a program name with args.
12089set dummy $tool_basename; ac_word=$2
12090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12091$as_echo_n "checking for $ac_word... " >&6; }
12092if ${ac_cv_path_XARGS+:} false; then :
12093  $as_echo_n "(cached) " >&6
12094else
12095  case $XARGS in
12096  [\\/]* | ?:[\\/]*)
12097  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12098  ;;
12099  *)
12100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12101for as_dir in $PATH
12102do
12103  IFS=$as_save_IFS
12104  test -z "$as_dir" && as_dir=.
12105    for ac_exec_ext in '' $ac_executable_extensions; do
12106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12107    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12109    break 2
12110  fi
12111done
12112  done
12113IFS=$as_save_IFS
12114
12115  ;;
12116esac
12117fi
12118XARGS=$ac_cv_path_XARGS
12119if test -n "$XARGS"; then
12120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12121$as_echo "$XARGS" >&6; }
12122else
12123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12124$as_echo "no" >&6; }
12125fi
12126
12127
12128          if test "x$XARGS" = x; then
12129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12130          fi
12131        else
12132          # Otherwise we believe it is a complete path. Use it as it is.
12133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12134$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12136$as_echo_n "checking for XARGS... " >&6; }
12137          if test ! -x "$tool_specified"; then
12138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12139$as_echo "not found" >&6; }
12140            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12141          fi
12142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12143$as_echo "$tool_specified" >&6; }
12144        fi
12145      fi
12146    fi
12147  fi
12148
12149
12150
12151  if test "x$XARGS" = x; then
12152    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12153  fi
12154
12155
12156
12157  # Then required tools that require some special treatment.
12158
12159
12160  # Publish this variable in the help.
12161
12162
12163  if [ -z "${AWK+x}" ]; then
12164    # The variable is not set by user, try to locate tool using the code snippet
12165    for ac_prog in gawk mawk nawk awk
12166do
12167  # Extract the first word of "$ac_prog", so it can be a program name with args.
12168set dummy $ac_prog; ac_word=$2
12169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12170$as_echo_n "checking for $ac_word... " >&6; }
12171if ${ac_cv_prog_AWK+:} false; then :
12172  $as_echo_n "(cached) " >&6
12173else
12174  if test -n "$AWK"; then
12175  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12176else
12177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12178for as_dir in $PATH
12179do
12180  IFS=$as_save_IFS
12181  test -z "$as_dir" && as_dir=.
12182    for ac_exec_ext in '' $ac_executable_extensions; do
12183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12184    ac_cv_prog_AWK="$ac_prog"
12185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12186    break 2
12187  fi
12188done
12189  done
12190IFS=$as_save_IFS
12191
12192fi
12193fi
12194AWK=$ac_cv_prog_AWK
12195if test -n "$AWK"; then
12196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12197$as_echo "$AWK" >&6; }
12198else
12199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12200$as_echo "no" >&6; }
12201fi
12202
12203
12204  test -n "$AWK" && break
12205done
12206
12207  else
12208    # The variable is set, but is it from the command line or the environment?
12209
12210    # Try to remove the string !AWK! from our list.
12211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12213      # If it failed, the variable was not from the command line. Ignore it,
12214      # but warn the user (except for BASH, which is always set by the calling BASH).
12215      if test "xAWK" != xBASH; then
12216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12217$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12218      fi
12219      # Try to locate tool using the code snippet
12220      for ac_prog in gawk mawk nawk awk
12221do
12222  # Extract the first word of "$ac_prog", so it can be a program name with args.
12223set dummy $ac_prog; ac_word=$2
12224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12225$as_echo_n "checking for $ac_word... " >&6; }
12226if ${ac_cv_prog_AWK+:} false; then :
12227  $as_echo_n "(cached) " >&6
12228else
12229  if test -n "$AWK"; then
12230  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12231else
12232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12233for as_dir in $PATH
12234do
12235  IFS=$as_save_IFS
12236  test -z "$as_dir" && as_dir=.
12237    for ac_exec_ext in '' $ac_executable_extensions; do
12238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12239    ac_cv_prog_AWK="$ac_prog"
12240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12241    break 2
12242  fi
12243done
12244  done
12245IFS=$as_save_IFS
12246
12247fi
12248fi
12249AWK=$ac_cv_prog_AWK
12250if test -n "$AWK"; then
12251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12252$as_echo "$AWK" >&6; }
12253else
12254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12255$as_echo "no" >&6; }
12256fi
12257
12258
12259  test -n "$AWK" && break
12260done
12261
12262    else
12263      # If it succeeded, then it was overridden by the user. We will use it
12264      # for the tool.
12265
12266      # First remove it from the list of overridden variables, so we can test
12267      # for unknown variables in the end.
12268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12269
12270      # Check if we try to supply an empty value
12271      if test "x$AWK" = x; then
12272        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12273$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12275$as_echo_n "checking for AWK... " >&6; }
12276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12277$as_echo "disabled" >&6; }
12278      else
12279        # Check if the provided tool contains a complete path.
12280        tool_specified="$AWK"
12281        tool_basename="${tool_specified##*/}"
12282        if test "x$tool_basename" = "x$tool_specified"; then
12283          # A command without a complete path is provided, search $PATH.
12284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12285$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12286          # Extract the first word of "$tool_basename", so it can be a program name with args.
12287set dummy $tool_basename; ac_word=$2
12288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12289$as_echo_n "checking for $ac_word... " >&6; }
12290if ${ac_cv_path_AWK+:} false; then :
12291  $as_echo_n "(cached) " >&6
12292else
12293  case $AWK in
12294  [\\/]* | ?:[\\/]*)
12295  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12296  ;;
12297  *)
12298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12299for as_dir in $PATH
12300do
12301  IFS=$as_save_IFS
12302  test -z "$as_dir" && as_dir=.
12303    for ac_exec_ext in '' $ac_executable_extensions; do
12304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12305    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12307    break 2
12308  fi
12309done
12310  done
12311IFS=$as_save_IFS
12312
12313  ;;
12314esac
12315fi
12316AWK=$ac_cv_path_AWK
12317if test -n "$AWK"; then
12318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12319$as_echo "$AWK" >&6; }
12320else
12321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12322$as_echo "no" >&6; }
12323fi
12324
12325
12326          if test "x$AWK" = x; then
12327            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12328          fi
12329        else
12330          # Otherwise we believe it is a complete path. Use it as it is.
12331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12332$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12333          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12334$as_echo_n "checking for AWK... " >&6; }
12335          if test ! -x "$tool_specified"; then
12336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12337$as_echo "not found" >&6; }
12338            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12339          fi
12340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12341$as_echo "$tool_specified" >&6; }
12342        fi
12343      fi
12344    fi
12345  fi
12346
12347
12348  if test "x$AWK" = x; then
12349    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12350  fi
12351
12352
12353
12354
12355  # Publish this variable in the help.
12356
12357
12358  if [ -z "${GREP+x}" ]; then
12359    # The variable is not set by user, try to locate tool using the code snippet
12360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12361$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12362if ${ac_cv_path_GREP+:} false; then :
12363  $as_echo_n "(cached) " >&6
12364else
12365  if test -z "$GREP"; then
12366  ac_path_GREP_found=false
12367  # Loop through the user's path and test for each of PROGNAME-LIST
12368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12370do
12371  IFS=$as_save_IFS
12372  test -z "$as_dir" && as_dir=.
12373    for ac_prog in grep ggrep; do
12374    for ac_exec_ext in '' $ac_executable_extensions; do
12375      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12376      as_fn_executable_p "$ac_path_GREP" || continue
12377# Check for GNU ac_path_GREP and select it if it is found.
12378  # Check for GNU $ac_path_GREP
12379case `"$ac_path_GREP" --version 2>&1` in
12380*GNU*)
12381  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12382*)
12383  ac_count=0
12384  $as_echo_n 0123456789 >"conftest.in"
12385  while :
12386  do
12387    cat "conftest.in" "conftest.in" >"conftest.tmp"
12388    mv "conftest.tmp" "conftest.in"
12389    cp "conftest.in" "conftest.nl"
12390    $as_echo 'GREP' >> "conftest.nl"
12391    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12392    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12393    as_fn_arith $ac_count + 1 && ac_count=$as_val
12394    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12395      # Best one so far, save it but keep looking for a better one
12396      ac_cv_path_GREP="$ac_path_GREP"
12397      ac_path_GREP_max=$ac_count
12398    fi
12399    # 10*(2^10) chars as input seems more than enough
12400    test $ac_count -gt 10 && break
12401  done
12402  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12403esac
12404
12405      $ac_path_GREP_found && break 3
12406    done
12407  done
12408  done
12409IFS=$as_save_IFS
12410  if test -z "$ac_cv_path_GREP"; then
12411    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12412  fi
12413else
12414  ac_cv_path_GREP=$GREP
12415fi
12416
12417fi
12418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12419$as_echo "$ac_cv_path_GREP" >&6; }
12420 GREP="$ac_cv_path_GREP"
12421
12422
12423  else
12424    # The variable is set, but is it from the command line or the environment?
12425
12426    # Try to remove the string !GREP! from our list.
12427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12429      # If it failed, the variable was not from the command line. Ignore it,
12430      # but warn the user (except for BASH, which is always set by the calling BASH).
12431      if test "xGREP" != xBASH; then
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12433$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12434      fi
12435      # Try to locate tool using the code snippet
12436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12437$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12438if ${ac_cv_path_GREP+:} false; then :
12439  $as_echo_n "(cached) " >&6
12440else
12441  if test -z "$GREP"; then
12442  ac_path_GREP_found=false
12443  # Loop through the user's path and test for each of PROGNAME-LIST
12444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12445for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12446do
12447  IFS=$as_save_IFS
12448  test -z "$as_dir" && as_dir=.
12449    for ac_prog in grep ggrep; do
12450    for ac_exec_ext in '' $ac_executable_extensions; do
12451      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12452      as_fn_executable_p "$ac_path_GREP" || continue
12453# Check for GNU ac_path_GREP and select it if it is found.
12454  # Check for GNU $ac_path_GREP
12455case `"$ac_path_GREP" --version 2>&1` in
12456*GNU*)
12457  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12458*)
12459  ac_count=0
12460  $as_echo_n 0123456789 >"conftest.in"
12461  while :
12462  do
12463    cat "conftest.in" "conftest.in" >"conftest.tmp"
12464    mv "conftest.tmp" "conftest.in"
12465    cp "conftest.in" "conftest.nl"
12466    $as_echo 'GREP' >> "conftest.nl"
12467    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12468    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12469    as_fn_arith $ac_count + 1 && ac_count=$as_val
12470    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12471      # Best one so far, save it but keep looking for a better one
12472      ac_cv_path_GREP="$ac_path_GREP"
12473      ac_path_GREP_max=$ac_count
12474    fi
12475    # 10*(2^10) chars as input seems more than enough
12476    test $ac_count -gt 10 && break
12477  done
12478  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12479esac
12480
12481      $ac_path_GREP_found && break 3
12482    done
12483  done
12484  done
12485IFS=$as_save_IFS
12486  if test -z "$ac_cv_path_GREP"; then
12487    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12488  fi
12489else
12490  ac_cv_path_GREP=$GREP
12491fi
12492
12493fi
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12495$as_echo "$ac_cv_path_GREP" >&6; }
12496 GREP="$ac_cv_path_GREP"
12497
12498
12499    else
12500      # If it succeeded, then it was overridden by the user. We will use it
12501      # for the tool.
12502
12503      # First remove it from the list of overridden variables, so we can test
12504      # for unknown variables in the end.
12505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12506
12507      # Check if we try to supply an empty value
12508      if test "x$GREP" = x; then
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12510$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12512$as_echo_n "checking for GREP... " >&6; }
12513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12514$as_echo "disabled" >&6; }
12515      else
12516        # Check if the provided tool contains a complete path.
12517        tool_specified="$GREP"
12518        tool_basename="${tool_specified##*/}"
12519        if test "x$tool_basename" = "x$tool_specified"; then
12520          # A command without a complete path is provided, search $PATH.
12521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12522$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12523          # Extract the first word of "$tool_basename", so it can be a program name with args.
12524set dummy $tool_basename; ac_word=$2
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12526$as_echo_n "checking for $ac_word... " >&6; }
12527if ${ac_cv_path_GREP+:} false; then :
12528  $as_echo_n "(cached) " >&6
12529else
12530  case $GREP in
12531  [\\/]* | ?:[\\/]*)
12532  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12533  ;;
12534  *)
12535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12536for as_dir in $PATH
12537do
12538  IFS=$as_save_IFS
12539  test -z "$as_dir" && as_dir=.
12540    for ac_exec_ext in '' $ac_executable_extensions; do
12541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12542    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12544    break 2
12545  fi
12546done
12547  done
12548IFS=$as_save_IFS
12549
12550  ;;
12551esac
12552fi
12553GREP=$ac_cv_path_GREP
12554if test -n "$GREP"; then
12555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12556$as_echo "$GREP" >&6; }
12557else
12558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12559$as_echo "no" >&6; }
12560fi
12561
12562
12563          if test "x$GREP" = x; then
12564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12565          fi
12566        else
12567          # Otherwise we believe it is a complete path. Use it as it is.
12568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12569$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12571$as_echo_n "checking for GREP... " >&6; }
12572          if test ! -x "$tool_specified"; then
12573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12574$as_echo "not found" >&6; }
12575            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12576          fi
12577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12578$as_echo "$tool_specified" >&6; }
12579        fi
12580      fi
12581    fi
12582  fi
12583
12584
12585  if test "x$GREP" = x; then
12586    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12587  fi
12588
12589
12590
12591
12592  # Publish this variable in the help.
12593
12594
12595  if [ -z "${EGREP+x}" ]; then
12596    # The variable is not set by user, try to locate tool using the code snippet
12597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12598$as_echo_n "checking for egrep... " >&6; }
12599if ${ac_cv_path_EGREP+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12603   then ac_cv_path_EGREP="$GREP -E"
12604   else
12605     if test -z "$EGREP"; then
12606  ac_path_EGREP_found=false
12607  # Loop through the user's path and test for each of PROGNAME-LIST
12608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12610do
12611  IFS=$as_save_IFS
12612  test -z "$as_dir" && as_dir=.
12613    for ac_prog in egrep; do
12614    for ac_exec_ext in '' $ac_executable_extensions; do
12615      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12616      as_fn_executable_p "$ac_path_EGREP" || continue
12617# Check for GNU ac_path_EGREP and select it if it is found.
12618  # Check for GNU $ac_path_EGREP
12619case `"$ac_path_EGREP" --version 2>&1` in
12620*GNU*)
12621  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12622*)
12623  ac_count=0
12624  $as_echo_n 0123456789 >"conftest.in"
12625  while :
12626  do
12627    cat "conftest.in" "conftest.in" >"conftest.tmp"
12628    mv "conftest.tmp" "conftest.in"
12629    cp "conftest.in" "conftest.nl"
12630    $as_echo 'EGREP' >> "conftest.nl"
12631    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12632    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12633    as_fn_arith $ac_count + 1 && ac_count=$as_val
12634    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12635      # Best one so far, save it but keep looking for a better one
12636      ac_cv_path_EGREP="$ac_path_EGREP"
12637      ac_path_EGREP_max=$ac_count
12638    fi
12639    # 10*(2^10) chars as input seems more than enough
12640    test $ac_count -gt 10 && break
12641  done
12642  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12643esac
12644
12645      $ac_path_EGREP_found && break 3
12646    done
12647  done
12648  done
12649IFS=$as_save_IFS
12650  if test -z "$ac_cv_path_EGREP"; then
12651    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12652  fi
12653else
12654  ac_cv_path_EGREP=$EGREP
12655fi
12656
12657   fi
12658fi
12659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12660$as_echo "$ac_cv_path_EGREP" >&6; }
12661 EGREP="$ac_cv_path_EGREP"
12662
12663
12664  else
12665    # The variable is set, but is it from the command line or the environment?
12666
12667    # Try to remove the string !EGREP! from our list.
12668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12670      # If it failed, the variable was not from the command line. Ignore it,
12671      # but warn the user (except for BASH, which is always set by the calling BASH).
12672      if test "xEGREP" != xBASH; then
12673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12674$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12675      fi
12676      # Try to locate tool using the code snippet
12677      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12678$as_echo_n "checking for egrep... " >&6; }
12679if ${ac_cv_path_EGREP+:} false; then :
12680  $as_echo_n "(cached) " >&6
12681else
12682  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12683   then ac_cv_path_EGREP="$GREP -E"
12684   else
12685     if test -z "$EGREP"; then
12686  ac_path_EGREP_found=false
12687  # Loop through the user's path and test for each of PROGNAME-LIST
12688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12689for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12690do
12691  IFS=$as_save_IFS
12692  test -z "$as_dir" && as_dir=.
12693    for ac_prog in egrep; do
12694    for ac_exec_ext in '' $ac_executable_extensions; do
12695      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12696      as_fn_executable_p "$ac_path_EGREP" || continue
12697# Check for GNU ac_path_EGREP and select it if it is found.
12698  # Check for GNU $ac_path_EGREP
12699case `"$ac_path_EGREP" --version 2>&1` in
12700*GNU*)
12701  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12702*)
12703  ac_count=0
12704  $as_echo_n 0123456789 >"conftest.in"
12705  while :
12706  do
12707    cat "conftest.in" "conftest.in" >"conftest.tmp"
12708    mv "conftest.tmp" "conftest.in"
12709    cp "conftest.in" "conftest.nl"
12710    $as_echo 'EGREP' >> "conftest.nl"
12711    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12712    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12713    as_fn_arith $ac_count + 1 && ac_count=$as_val
12714    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12715      # Best one so far, save it but keep looking for a better one
12716      ac_cv_path_EGREP="$ac_path_EGREP"
12717      ac_path_EGREP_max=$ac_count
12718    fi
12719    # 10*(2^10) chars as input seems more than enough
12720    test $ac_count -gt 10 && break
12721  done
12722  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12723esac
12724
12725      $ac_path_EGREP_found && break 3
12726    done
12727  done
12728  done
12729IFS=$as_save_IFS
12730  if test -z "$ac_cv_path_EGREP"; then
12731    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12732  fi
12733else
12734  ac_cv_path_EGREP=$EGREP
12735fi
12736
12737   fi
12738fi
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12740$as_echo "$ac_cv_path_EGREP" >&6; }
12741 EGREP="$ac_cv_path_EGREP"
12742
12743
12744    else
12745      # If it succeeded, then it was overridden by the user. We will use it
12746      # for the tool.
12747
12748      # First remove it from the list of overridden variables, so we can test
12749      # for unknown variables in the end.
12750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12751
12752      # Check if we try to supply an empty value
12753      if test "x$EGREP" = x; then
12754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12755$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12757$as_echo_n "checking for EGREP... " >&6; }
12758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12759$as_echo "disabled" >&6; }
12760      else
12761        # Check if the provided tool contains a complete path.
12762        tool_specified="$EGREP"
12763        tool_basename="${tool_specified##*/}"
12764        if test "x$tool_basename" = "x$tool_specified"; then
12765          # A command without a complete path is provided, search $PATH.
12766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12767$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12768          # Extract the first word of "$tool_basename", so it can be a program name with args.
12769set dummy $tool_basename; ac_word=$2
12770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12771$as_echo_n "checking for $ac_word... " >&6; }
12772if ${ac_cv_path_EGREP+:} false; then :
12773  $as_echo_n "(cached) " >&6
12774else
12775  case $EGREP in
12776  [\\/]* | ?:[\\/]*)
12777  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12778  ;;
12779  *)
12780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12781for as_dir in $PATH
12782do
12783  IFS=$as_save_IFS
12784  test -z "$as_dir" && as_dir=.
12785    for ac_exec_ext in '' $ac_executable_extensions; do
12786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12787    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12789    break 2
12790  fi
12791done
12792  done
12793IFS=$as_save_IFS
12794
12795  ;;
12796esac
12797fi
12798EGREP=$ac_cv_path_EGREP
12799if test -n "$EGREP"; then
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12801$as_echo "$EGREP" >&6; }
12802else
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12804$as_echo "no" >&6; }
12805fi
12806
12807
12808          if test "x$EGREP" = x; then
12809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12810          fi
12811        else
12812          # Otherwise we believe it is a complete path. Use it as it is.
12813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12814$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12816$as_echo_n "checking for EGREP... " >&6; }
12817          if test ! -x "$tool_specified"; then
12818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12819$as_echo "not found" >&6; }
12820            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12821          fi
12822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12823$as_echo "$tool_specified" >&6; }
12824        fi
12825      fi
12826    fi
12827  fi
12828
12829
12830  if test "x$EGREP" = x; then
12831    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12832  fi
12833
12834
12835
12836
12837  # Publish this variable in the help.
12838
12839
12840  if [ -z "${FGREP+x}" ]; then
12841    # The variable is not set by user, try to locate tool using the code snippet
12842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12843$as_echo_n "checking for fgrep... " >&6; }
12844if ${ac_cv_path_FGREP+:} false; then :
12845  $as_echo_n "(cached) " >&6
12846else
12847  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12848   then ac_cv_path_FGREP="$GREP -F"
12849   else
12850     if test -z "$FGREP"; then
12851  ac_path_FGREP_found=false
12852  # Loop through the user's path and test for each of PROGNAME-LIST
12853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12855do
12856  IFS=$as_save_IFS
12857  test -z "$as_dir" && as_dir=.
12858    for ac_prog in fgrep; do
12859    for ac_exec_ext in '' $ac_executable_extensions; do
12860      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12861      as_fn_executable_p "$ac_path_FGREP" || continue
12862# Check for GNU ac_path_FGREP and select it if it is found.
12863  # Check for GNU $ac_path_FGREP
12864case `"$ac_path_FGREP" --version 2>&1` in
12865*GNU*)
12866  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12867*)
12868  ac_count=0
12869  $as_echo_n 0123456789 >"conftest.in"
12870  while :
12871  do
12872    cat "conftest.in" "conftest.in" >"conftest.tmp"
12873    mv "conftest.tmp" "conftest.in"
12874    cp "conftest.in" "conftest.nl"
12875    $as_echo 'FGREP' >> "conftest.nl"
12876    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12877    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12878    as_fn_arith $ac_count + 1 && ac_count=$as_val
12879    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12880      # Best one so far, save it but keep looking for a better one
12881      ac_cv_path_FGREP="$ac_path_FGREP"
12882      ac_path_FGREP_max=$ac_count
12883    fi
12884    # 10*(2^10) chars as input seems more than enough
12885    test $ac_count -gt 10 && break
12886  done
12887  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12888esac
12889
12890      $ac_path_FGREP_found && break 3
12891    done
12892  done
12893  done
12894IFS=$as_save_IFS
12895  if test -z "$ac_cv_path_FGREP"; then
12896    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12897  fi
12898else
12899  ac_cv_path_FGREP=$FGREP
12900fi
12901
12902   fi
12903fi
12904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12905$as_echo "$ac_cv_path_FGREP" >&6; }
12906 FGREP="$ac_cv_path_FGREP"
12907
12908
12909  else
12910    # The variable is set, but is it from the command line or the environment?
12911
12912    # Try to remove the string !FGREP! from our list.
12913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12915      # If it failed, the variable was not from the command line. Ignore it,
12916      # but warn the user (except for BASH, which is always set by the calling BASH).
12917      if test "xFGREP" != xBASH; then
12918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12919$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12920      fi
12921      # Try to locate tool using the code snippet
12922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12923$as_echo_n "checking for fgrep... " >&6; }
12924if ${ac_cv_path_FGREP+:} false; then :
12925  $as_echo_n "(cached) " >&6
12926else
12927  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12928   then ac_cv_path_FGREP="$GREP -F"
12929   else
12930     if test -z "$FGREP"; then
12931  ac_path_FGREP_found=false
12932  # Loop through the user's path and test for each of PROGNAME-LIST
12933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12934for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12935do
12936  IFS=$as_save_IFS
12937  test -z "$as_dir" && as_dir=.
12938    for ac_prog in fgrep; do
12939    for ac_exec_ext in '' $ac_executable_extensions; do
12940      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12941      as_fn_executable_p "$ac_path_FGREP" || continue
12942# Check for GNU ac_path_FGREP and select it if it is found.
12943  # Check for GNU $ac_path_FGREP
12944case `"$ac_path_FGREP" --version 2>&1` in
12945*GNU*)
12946  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12947*)
12948  ac_count=0
12949  $as_echo_n 0123456789 >"conftest.in"
12950  while :
12951  do
12952    cat "conftest.in" "conftest.in" >"conftest.tmp"
12953    mv "conftest.tmp" "conftest.in"
12954    cp "conftest.in" "conftest.nl"
12955    $as_echo 'FGREP' >> "conftest.nl"
12956    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12957    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12958    as_fn_arith $ac_count + 1 && ac_count=$as_val
12959    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12960      # Best one so far, save it but keep looking for a better one
12961      ac_cv_path_FGREP="$ac_path_FGREP"
12962      ac_path_FGREP_max=$ac_count
12963    fi
12964    # 10*(2^10) chars as input seems more than enough
12965    test $ac_count -gt 10 && break
12966  done
12967  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12968esac
12969
12970      $ac_path_FGREP_found && break 3
12971    done
12972  done
12973  done
12974IFS=$as_save_IFS
12975  if test -z "$ac_cv_path_FGREP"; then
12976    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12977  fi
12978else
12979  ac_cv_path_FGREP=$FGREP
12980fi
12981
12982   fi
12983fi
12984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12985$as_echo "$ac_cv_path_FGREP" >&6; }
12986 FGREP="$ac_cv_path_FGREP"
12987
12988
12989    else
12990      # If it succeeded, then it was overridden by the user. We will use it
12991      # for the tool.
12992
12993      # First remove it from the list of overridden variables, so we can test
12994      # for unknown variables in the end.
12995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12996
12997      # Check if we try to supply an empty value
12998      if test "x$FGREP" = x; then
12999        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13000$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13002$as_echo_n "checking for FGREP... " >&6; }
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13004$as_echo "disabled" >&6; }
13005      else
13006        # Check if the provided tool contains a complete path.
13007        tool_specified="$FGREP"
13008        tool_basename="${tool_specified##*/}"
13009        if test "x$tool_basename" = "x$tool_specified"; then
13010          # A command without a complete path is provided, search $PATH.
13011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13012$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13013          # Extract the first word of "$tool_basename", so it can be a program name with args.
13014set dummy $tool_basename; ac_word=$2
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13016$as_echo_n "checking for $ac_word... " >&6; }
13017if ${ac_cv_path_FGREP+:} false; then :
13018  $as_echo_n "(cached) " >&6
13019else
13020  case $FGREP in
13021  [\\/]* | ?:[\\/]*)
13022  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13023  ;;
13024  *)
13025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13026for as_dir in $PATH
13027do
13028  IFS=$as_save_IFS
13029  test -z "$as_dir" && as_dir=.
13030    for ac_exec_ext in '' $ac_executable_extensions; do
13031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13032    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13034    break 2
13035  fi
13036done
13037  done
13038IFS=$as_save_IFS
13039
13040  ;;
13041esac
13042fi
13043FGREP=$ac_cv_path_FGREP
13044if test -n "$FGREP"; then
13045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13046$as_echo "$FGREP" >&6; }
13047else
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13049$as_echo "no" >&6; }
13050fi
13051
13052
13053          if test "x$FGREP" = x; then
13054            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13055          fi
13056        else
13057          # Otherwise we believe it is a complete path. Use it as it is.
13058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13059$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13060          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13061$as_echo_n "checking for FGREP... " >&6; }
13062          if test ! -x "$tool_specified"; then
13063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13064$as_echo "not found" >&6; }
13065            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13066          fi
13067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13068$as_echo "$tool_specified" >&6; }
13069        fi
13070      fi
13071    fi
13072  fi
13073
13074
13075  if test "x$FGREP" = x; then
13076    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13077  fi
13078
13079
13080
13081
13082  # Publish this variable in the help.
13083
13084
13085  if [ -z "${SED+x}" ]; then
13086    # The variable is not set by user, try to locate tool using the code snippet
13087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13088$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13089if ${ac_cv_path_SED+:} false; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13093     for ac_i in 1 2 3 4 5 6 7; do
13094       ac_script="$ac_script$as_nl$ac_script"
13095     done
13096     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13097     { ac_script=; unset ac_script;}
13098     if test -z "$SED"; then
13099  ac_path_SED_found=false
13100  # Loop through the user's path and test for each of PROGNAME-LIST
13101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13102for as_dir in $PATH
13103do
13104  IFS=$as_save_IFS
13105  test -z "$as_dir" && as_dir=.
13106    for ac_prog in sed gsed; do
13107    for ac_exec_ext in '' $ac_executable_extensions; do
13108      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13109      as_fn_executable_p "$ac_path_SED" || continue
13110# Check for GNU ac_path_SED and select it if it is found.
13111  # Check for GNU $ac_path_SED
13112case `"$ac_path_SED" --version 2>&1` in
13113*GNU*)
13114  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13115*)
13116  ac_count=0
13117  $as_echo_n 0123456789 >"conftest.in"
13118  while :
13119  do
13120    cat "conftest.in" "conftest.in" >"conftest.tmp"
13121    mv "conftest.tmp" "conftest.in"
13122    cp "conftest.in" "conftest.nl"
13123    $as_echo '' >> "conftest.nl"
13124    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13125    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13126    as_fn_arith $ac_count + 1 && ac_count=$as_val
13127    if test $ac_count -gt ${ac_path_SED_max-0}; then
13128      # Best one so far, save it but keep looking for a better one
13129      ac_cv_path_SED="$ac_path_SED"
13130      ac_path_SED_max=$ac_count
13131    fi
13132    # 10*(2^10) chars as input seems more than enough
13133    test $ac_count -gt 10 && break
13134  done
13135  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13136esac
13137
13138      $ac_path_SED_found && break 3
13139    done
13140  done
13141  done
13142IFS=$as_save_IFS
13143  if test -z "$ac_cv_path_SED"; then
13144    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13145  fi
13146else
13147  ac_cv_path_SED=$SED
13148fi
13149
13150fi
13151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13152$as_echo "$ac_cv_path_SED" >&6; }
13153 SED="$ac_cv_path_SED"
13154  rm -f conftest.sed
13155
13156  else
13157    # The variable is set, but is it from the command line or the environment?
13158
13159    # Try to remove the string !SED! from our list.
13160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13162      # If it failed, the variable was not from the command line. Ignore it,
13163      # but warn the user (except for BASH, which is always set by the calling BASH).
13164      if test "xSED" != xBASH; then
13165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13166$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13167      fi
13168      # Try to locate tool using the code snippet
13169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13170$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13171if ${ac_cv_path_SED+:} false; then :
13172  $as_echo_n "(cached) " >&6
13173else
13174            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13175     for ac_i in 1 2 3 4 5 6 7; do
13176       ac_script="$ac_script$as_nl$ac_script"
13177     done
13178     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13179     { ac_script=; unset ac_script;}
13180     if test -z "$SED"; then
13181  ac_path_SED_found=false
13182  # Loop through the user's path and test for each of PROGNAME-LIST
13183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13184for as_dir in $PATH
13185do
13186  IFS=$as_save_IFS
13187  test -z "$as_dir" && as_dir=.
13188    for ac_prog in sed gsed; do
13189    for ac_exec_ext in '' $ac_executable_extensions; do
13190      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13191      as_fn_executable_p "$ac_path_SED" || continue
13192# Check for GNU ac_path_SED and select it if it is found.
13193  # Check for GNU $ac_path_SED
13194case `"$ac_path_SED" --version 2>&1` in
13195*GNU*)
13196  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13197*)
13198  ac_count=0
13199  $as_echo_n 0123456789 >"conftest.in"
13200  while :
13201  do
13202    cat "conftest.in" "conftest.in" >"conftest.tmp"
13203    mv "conftest.tmp" "conftest.in"
13204    cp "conftest.in" "conftest.nl"
13205    $as_echo '' >> "conftest.nl"
13206    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13207    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13208    as_fn_arith $ac_count + 1 && ac_count=$as_val
13209    if test $ac_count -gt ${ac_path_SED_max-0}; then
13210      # Best one so far, save it but keep looking for a better one
13211      ac_cv_path_SED="$ac_path_SED"
13212      ac_path_SED_max=$ac_count
13213    fi
13214    # 10*(2^10) chars as input seems more than enough
13215    test $ac_count -gt 10 && break
13216  done
13217  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13218esac
13219
13220      $ac_path_SED_found && break 3
13221    done
13222  done
13223  done
13224IFS=$as_save_IFS
13225  if test -z "$ac_cv_path_SED"; then
13226    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13227  fi
13228else
13229  ac_cv_path_SED=$SED
13230fi
13231
13232fi
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13234$as_echo "$ac_cv_path_SED" >&6; }
13235 SED="$ac_cv_path_SED"
13236  rm -f conftest.sed
13237
13238    else
13239      # If it succeeded, then it was overridden by the user. We will use it
13240      # for the tool.
13241
13242      # First remove it from the list of overridden variables, so we can test
13243      # for unknown variables in the end.
13244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13245
13246      # Check if we try to supply an empty value
13247      if test "x$SED" = x; then
13248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13249$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13251$as_echo_n "checking for SED... " >&6; }
13252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13253$as_echo "disabled" >&6; }
13254      else
13255        # Check if the provided tool contains a complete path.
13256        tool_specified="$SED"
13257        tool_basename="${tool_specified##*/}"
13258        if test "x$tool_basename" = "x$tool_specified"; then
13259          # A command without a complete path is provided, search $PATH.
13260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13261$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13262          # Extract the first word of "$tool_basename", so it can be a program name with args.
13263set dummy $tool_basename; ac_word=$2
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13265$as_echo_n "checking for $ac_word... " >&6; }
13266if ${ac_cv_path_SED+:} false; then :
13267  $as_echo_n "(cached) " >&6
13268else
13269  case $SED in
13270  [\\/]* | ?:[\\/]*)
13271  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13272  ;;
13273  *)
13274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13275for as_dir in $PATH
13276do
13277  IFS=$as_save_IFS
13278  test -z "$as_dir" && as_dir=.
13279    for ac_exec_ext in '' $ac_executable_extensions; do
13280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13281    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13283    break 2
13284  fi
13285done
13286  done
13287IFS=$as_save_IFS
13288
13289  ;;
13290esac
13291fi
13292SED=$ac_cv_path_SED
13293if test -n "$SED"; then
13294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13295$as_echo "$SED" >&6; }
13296else
13297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13298$as_echo "no" >&6; }
13299fi
13300
13301
13302          if test "x$SED" = x; then
13303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13304          fi
13305        else
13306          # Otherwise we believe it is a complete path. Use it as it is.
13307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13308$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13310$as_echo_n "checking for SED... " >&6; }
13311          if test ! -x "$tool_specified"; then
13312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13313$as_echo "not found" >&6; }
13314            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13315          fi
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13317$as_echo "$tool_specified" >&6; }
13318        fi
13319      fi
13320    fi
13321  fi
13322
13323
13324  if test "x$SED" = x; then
13325    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13326  fi
13327
13328
13329
13330  # Always force rm.
13331  RM="$RM -f"
13332
13333  # pwd behaves differently on various platforms and some don't support the -L flag.
13334  # Always use the bash builtin pwd to get uniform behavior.
13335  THEPWDCMD=pwd
13336
13337  # These are not required on all platforms
13338
13339
13340  # Publish this variable in the help.
13341
13342
13343  if [ -z "${CYGPATH+x}" ]; then
13344    # The variable is not set by user, try to locate tool using the code snippet
13345    for ac_prog in cygpath
13346do
13347  # Extract the first word of "$ac_prog", so it can be a program name with args.
13348set dummy $ac_prog; ac_word=$2
13349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13350$as_echo_n "checking for $ac_word... " >&6; }
13351if ${ac_cv_path_CYGPATH+:} false; then :
13352  $as_echo_n "(cached) " >&6
13353else
13354  case $CYGPATH in
13355  [\\/]* | ?:[\\/]*)
13356  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13357  ;;
13358  *)
13359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13360for as_dir in $PATH
13361do
13362  IFS=$as_save_IFS
13363  test -z "$as_dir" && as_dir=.
13364    for ac_exec_ext in '' $ac_executable_extensions; do
13365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13366    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13368    break 2
13369  fi
13370done
13371  done
13372IFS=$as_save_IFS
13373
13374  ;;
13375esac
13376fi
13377CYGPATH=$ac_cv_path_CYGPATH
13378if test -n "$CYGPATH"; then
13379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13380$as_echo "$CYGPATH" >&6; }
13381else
13382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13383$as_echo "no" >&6; }
13384fi
13385
13386
13387  test -n "$CYGPATH" && break
13388done
13389
13390  else
13391    # The variable is set, but is it from the command line or the environment?
13392
13393    # Try to remove the string !CYGPATH! from our list.
13394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13396      # If it failed, the variable was not from the command line. Ignore it,
13397      # but warn the user (except for BASH, which is always set by the calling BASH).
13398      if test "xCYGPATH" != xBASH; then
13399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13400$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13401      fi
13402      # Try to locate tool using the code snippet
13403      for ac_prog in cygpath
13404do
13405  # Extract the first word of "$ac_prog", so it can be a program name with args.
13406set dummy $ac_prog; ac_word=$2
13407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13408$as_echo_n "checking for $ac_word... " >&6; }
13409if ${ac_cv_path_CYGPATH+:} false; then :
13410  $as_echo_n "(cached) " >&6
13411else
13412  case $CYGPATH in
13413  [\\/]* | ?:[\\/]*)
13414  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13415  ;;
13416  *)
13417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13418for as_dir in $PATH
13419do
13420  IFS=$as_save_IFS
13421  test -z "$as_dir" && as_dir=.
13422    for ac_exec_ext in '' $ac_executable_extensions; do
13423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13424    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13426    break 2
13427  fi
13428done
13429  done
13430IFS=$as_save_IFS
13431
13432  ;;
13433esac
13434fi
13435CYGPATH=$ac_cv_path_CYGPATH
13436if test -n "$CYGPATH"; then
13437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13438$as_echo "$CYGPATH" >&6; }
13439else
13440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13441$as_echo "no" >&6; }
13442fi
13443
13444
13445  test -n "$CYGPATH" && break
13446done
13447
13448    else
13449      # If it succeeded, then it was overridden by the user. We will use it
13450      # for the tool.
13451
13452      # First remove it from the list of overridden variables, so we can test
13453      # for unknown variables in the end.
13454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13455
13456      # Check if we try to supply an empty value
13457      if test "x$CYGPATH" = x; then
13458        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13459$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13460        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13461$as_echo_n "checking for CYGPATH... " >&6; }
13462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13463$as_echo "disabled" >&6; }
13464      else
13465        # Check if the provided tool contains a complete path.
13466        tool_specified="$CYGPATH"
13467        tool_basename="${tool_specified##*/}"
13468        if test "x$tool_basename" = "x$tool_specified"; then
13469          # A command without a complete path is provided, search $PATH.
13470          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13471$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13472          # Extract the first word of "$tool_basename", so it can be a program name with args.
13473set dummy $tool_basename; ac_word=$2
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13475$as_echo_n "checking for $ac_word... " >&6; }
13476if ${ac_cv_path_CYGPATH+:} false; then :
13477  $as_echo_n "(cached) " >&6
13478else
13479  case $CYGPATH in
13480  [\\/]* | ?:[\\/]*)
13481  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13482  ;;
13483  *)
13484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13485for as_dir in $PATH
13486do
13487  IFS=$as_save_IFS
13488  test -z "$as_dir" && as_dir=.
13489    for ac_exec_ext in '' $ac_executable_extensions; do
13490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13491    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13493    break 2
13494  fi
13495done
13496  done
13497IFS=$as_save_IFS
13498
13499  ;;
13500esac
13501fi
13502CYGPATH=$ac_cv_path_CYGPATH
13503if test -n "$CYGPATH"; then
13504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13505$as_echo "$CYGPATH" >&6; }
13506else
13507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508$as_echo "no" >&6; }
13509fi
13510
13511
13512          if test "x$CYGPATH" = x; then
13513            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13514          fi
13515        else
13516          # Otherwise we believe it is a complete path. Use it as it is.
13517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13518$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13519          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13520$as_echo_n "checking for CYGPATH... " >&6; }
13521          if test ! -x "$tool_specified"; then
13522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13523$as_echo "not found" >&6; }
13524            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13525          fi
13526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13527$as_echo "$tool_specified" >&6; }
13528        fi
13529      fi
13530    fi
13531  fi
13532
13533
13534
13535
13536  # Publish this variable in the help.
13537
13538
13539  if [ -z "${READLINK+x}" ]; then
13540    # The variable is not set by user, try to locate tool using the code snippet
13541    for ac_prog in greadlink readlink
13542do
13543  # Extract the first word of "$ac_prog", so it can be a program name with args.
13544set dummy $ac_prog; ac_word=$2
13545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13546$as_echo_n "checking for $ac_word... " >&6; }
13547if ${ac_cv_path_READLINK+:} false; then :
13548  $as_echo_n "(cached) " >&6
13549else
13550  case $READLINK in
13551  [\\/]* | ?:[\\/]*)
13552  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13553  ;;
13554  *)
13555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13556for as_dir in $PATH
13557do
13558  IFS=$as_save_IFS
13559  test -z "$as_dir" && as_dir=.
13560    for ac_exec_ext in '' $ac_executable_extensions; do
13561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13562    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13564    break 2
13565  fi
13566done
13567  done
13568IFS=$as_save_IFS
13569
13570  ;;
13571esac
13572fi
13573READLINK=$ac_cv_path_READLINK
13574if test -n "$READLINK"; then
13575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13576$as_echo "$READLINK" >&6; }
13577else
13578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13579$as_echo "no" >&6; }
13580fi
13581
13582
13583  test -n "$READLINK" && break
13584done
13585
13586  else
13587    # The variable is set, but is it from the command line or the environment?
13588
13589    # Try to remove the string !READLINK! from our list.
13590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13592      # If it failed, the variable was not from the command line. Ignore it,
13593      # but warn the user (except for BASH, which is always set by the calling BASH).
13594      if test "xREADLINK" != xBASH; then
13595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13596$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13597      fi
13598      # Try to locate tool using the code snippet
13599      for ac_prog in greadlink readlink
13600do
13601  # Extract the first word of "$ac_prog", so it can be a program name with args.
13602set dummy $ac_prog; ac_word=$2
13603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13604$as_echo_n "checking for $ac_word... " >&6; }
13605if ${ac_cv_path_READLINK+:} false; then :
13606  $as_echo_n "(cached) " >&6
13607else
13608  case $READLINK in
13609  [\\/]* | ?:[\\/]*)
13610  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13611  ;;
13612  *)
13613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13614for as_dir in $PATH
13615do
13616  IFS=$as_save_IFS
13617  test -z "$as_dir" && as_dir=.
13618    for ac_exec_ext in '' $ac_executable_extensions; do
13619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13620    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13622    break 2
13623  fi
13624done
13625  done
13626IFS=$as_save_IFS
13627
13628  ;;
13629esac
13630fi
13631READLINK=$ac_cv_path_READLINK
13632if test -n "$READLINK"; then
13633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13634$as_echo "$READLINK" >&6; }
13635else
13636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13637$as_echo "no" >&6; }
13638fi
13639
13640
13641  test -n "$READLINK" && break
13642done
13643
13644    else
13645      # If it succeeded, then it was overridden by the user. We will use it
13646      # for the tool.
13647
13648      # First remove it from the list of overridden variables, so we can test
13649      # for unknown variables in the end.
13650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13651
13652      # Check if we try to supply an empty value
13653      if test "x$READLINK" = x; then
13654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13655$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13657$as_echo_n "checking for READLINK... " >&6; }
13658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13659$as_echo "disabled" >&6; }
13660      else
13661        # Check if the provided tool contains a complete path.
13662        tool_specified="$READLINK"
13663        tool_basename="${tool_specified##*/}"
13664        if test "x$tool_basename" = "x$tool_specified"; then
13665          # A command without a complete path is provided, search $PATH.
13666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13667$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13668          # Extract the first word of "$tool_basename", so it can be a program name with args.
13669set dummy $tool_basename; ac_word=$2
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13671$as_echo_n "checking for $ac_word... " >&6; }
13672if ${ac_cv_path_READLINK+:} false; then :
13673  $as_echo_n "(cached) " >&6
13674else
13675  case $READLINK in
13676  [\\/]* | ?:[\\/]*)
13677  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13678  ;;
13679  *)
13680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13681for as_dir in $PATH
13682do
13683  IFS=$as_save_IFS
13684  test -z "$as_dir" && as_dir=.
13685    for ac_exec_ext in '' $ac_executable_extensions; do
13686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13687    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13689    break 2
13690  fi
13691done
13692  done
13693IFS=$as_save_IFS
13694
13695  ;;
13696esac
13697fi
13698READLINK=$ac_cv_path_READLINK
13699if test -n "$READLINK"; then
13700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13701$as_echo "$READLINK" >&6; }
13702else
13703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13704$as_echo "no" >&6; }
13705fi
13706
13707
13708          if test "x$READLINK" = x; then
13709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13710          fi
13711        else
13712          # Otherwise we believe it is a complete path. Use it as it is.
13713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13714$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13716$as_echo_n "checking for READLINK... " >&6; }
13717          if test ! -x "$tool_specified"; then
13718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13719$as_echo "not found" >&6; }
13720            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13721          fi
13722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13723$as_echo "$tool_specified" >&6; }
13724        fi
13725      fi
13726    fi
13727  fi
13728
13729
13730
13731
13732  # Publish this variable in the help.
13733
13734
13735  if [ -z "${DF+x}" ]; then
13736    # The variable is not set by user, try to locate tool using the code snippet
13737    for ac_prog in df
13738do
13739  # Extract the first word of "$ac_prog", so it can be a program name with args.
13740set dummy $ac_prog; ac_word=$2
13741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13742$as_echo_n "checking for $ac_word... " >&6; }
13743if ${ac_cv_path_DF+:} false; then :
13744  $as_echo_n "(cached) " >&6
13745else
13746  case $DF in
13747  [\\/]* | ?:[\\/]*)
13748  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13749  ;;
13750  *)
13751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13752for as_dir in $PATH
13753do
13754  IFS=$as_save_IFS
13755  test -z "$as_dir" && as_dir=.
13756    for ac_exec_ext in '' $ac_executable_extensions; do
13757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13758    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13760    break 2
13761  fi
13762done
13763  done
13764IFS=$as_save_IFS
13765
13766  ;;
13767esac
13768fi
13769DF=$ac_cv_path_DF
13770if test -n "$DF"; then
13771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13772$as_echo "$DF" >&6; }
13773else
13774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13775$as_echo "no" >&6; }
13776fi
13777
13778
13779  test -n "$DF" && break
13780done
13781
13782  else
13783    # The variable is set, but is it from the command line or the environment?
13784
13785    # Try to remove the string !DF! from our list.
13786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13788      # If it failed, the variable was not from the command line. Ignore it,
13789      # but warn the user (except for BASH, which is always set by the calling BASH).
13790      if test "xDF" != xBASH; then
13791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13792$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13793      fi
13794      # Try to locate tool using the code snippet
13795      for ac_prog in df
13796do
13797  # Extract the first word of "$ac_prog", so it can be a program name with args.
13798set dummy $ac_prog; ac_word=$2
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13800$as_echo_n "checking for $ac_word... " >&6; }
13801if ${ac_cv_path_DF+:} false; then :
13802  $as_echo_n "(cached) " >&6
13803else
13804  case $DF in
13805  [\\/]* | ?:[\\/]*)
13806  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13807  ;;
13808  *)
13809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13810for as_dir in $PATH
13811do
13812  IFS=$as_save_IFS
13813  test -z "$as_dir" && as_dir=.
13814    for ac_exec_ext in '' $ac_executable_extensions; do
13815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13816    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13818    break 2
13819  fi
13820done
13821  done
13822IFS=$as_save_IFS
13823
13824  ;;
13825esac
13826fi
13827DF=$ac_cv_path_DF
13828if test -n "$DF"; then
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13830$as_echo "$DF" >&6; }
13831else
13832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13833$as_echo "no" >&6; }
13834fi
13835
13836
13837  test -n "$DF" && break
13838done
13839
13840    else
13841      # If it succeeded, then it was overridden by the user. We will use it
13842      # for the tool.
13843
13844      # First remove it from the list of overridden variables, so we can test
13845      # for unknown variables in the end.
13846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13847
13848      # Check if we try to supply an empty value
13849      if test "x$DF" = x; then
13850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13851$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13853$as_echo_n "checking for DF... " >&6; }
13854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13855$as_echo "disabled" >&6; }
13856      else
13857        # Check if the provided tool contains a complete path.
13858        tool_specified="$DF"
13859        tool_basename="${tool_specified##*/}"
13860        if test "x$tool_basename" = "x$tool_specified"; then
13861          # A command without a complete path is provided, search $PATH.
13862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13863$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13864          # Extract the first word of "$tool_basename", so it can be a program name with args.
13865set dummy $tool_basename; ac_word=$2
13866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13867$as_echo_n "checking for $ac_word... " >&6; }
13868if ${ac_cv_path_DF+:} false; then :
13869  $as_echo_n "(cached) " >&6
13870else
13871  case $DF in
13872  [\\/]* | ?:[\\/]*)
13873  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13874  ;;
13875  *)
13876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13877for as_dir in $PATH
13878do
13879  IFS=$as_save_IFS
13880  test -z "$as_dir" && as_dir=.
13881    for ac_exec_ext in '' $ac_executable_extensions; do
13882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13883    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13885    break 2
13886  fi
13887done
13888  done
13889IFS=$as_save_IFS
13890
13891  ;;
13892esac
13893fi
13894DF=$ac_cv_path_DF
13895if test -n "$DF"; then
13896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13897$as_echo "$DF" >&6; }
13898else
13899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13900$as_echo "no" >&6; }
13901fi
13902
13903
13904          if test "x$DF" = x; then
13905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13906          fi
13907        else
13908          # Otherwise we believe it is a complete path. Use it as it is.
13909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13910$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13912$as_echo_n "checking for DF... " >&6; }
13913          if test ! -x "$tool_specified"; then
13914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13915$as_echo "not found" >&6; }
13916            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13917          fi
13918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13919$as_echo "$tool_specified" >&6; }
13920        fi
13921      fi
13922    fi
13923  fi
13924
13925
13926
13927
13928  # Publish this variable in the help.
13929
13930
13931  if [ -z "${CPIO+x}" ]; then
13932    # The variable is not set by user, try to locate tool using the code snippet
13933    for ac_prog in cpio bsdcpio
13934do
13935  # Extract the first word of "$ac_prog", so it can be a program name with args.
13936set dummy $ac_prog; ac_word=$2
13937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13938$as_echo_n "checking for $ac_word... " >&6; }
13939if ${ac_cv_path_CPIO+:} false; then :
13940  $as_echo_n "(cached) " >&6
13941else
13942  case $CPIO in
13943  [\\/]* | ?:[\\/]*)
13944  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13945  ;;
13946  *)
13947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13948for as_dir in $PATH
13949do
13950  IFS=$as_save_IFS
13951  test -z "$as_dir" && as_dir=.
13952    for ac_exec_ext in '' $ac_executable_extensions; do
13953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13954    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13956    break 2
13957  fi
13958done
13959  done
13960IFS=$as_save_IFS
13961
13962  ;;
13963esac
13964fi
13965CPIO=$ac_cv_path_CPIO
13966if test -n "$CPIO"; then
13967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13968$as_echo "$CPIO" >&6; }
13969else
13970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13971$as_echo "no" >&6; }
13972fi
13973
13974
13975  test -n "$CPIO" && break
13976done
13977
13978  else
13979    # The variable is set, but is it from the command line or the environment?
13980
13981    # Try to remove the string !CPIO! from our list.
13982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13984      # If it failed, the variable was not from the command line. Ignore it,
13985      # but warn the user (except for BASH, which is always set by the calling BASH).
13986      if test "xCPIO" != xBASH; then
13987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13988$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13989      fi
13990      # Try to locate tool using the code snippet
13991      for ac_prog in cpio bsdcpio
13992do
13993  # Extract the first word of "$ac_prog", so it can be a program name with args.
13994set dummy $ac_prog; ac_word=$2
13995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13996$as_echo_n "checking for $ac_word... " >&6; }
13997if ${ac_cv_path_CPIO+:} false; then :
13998  $as_echo_n "(cached) " >&6
13999else
14000  case $CPIO in
14001  [\\/]* | ?:[\\/]*)
14002  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14003  ;;
14004  *)
14005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14006for as_dir in $PATH
14007do
14008  IFS=$as_save_IFS
14009  test -z "$as_dir" && as_dir=.
14010    for ac_exec_ext in '' $ac_executable_extensions; do
14011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14012    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14014    break 2
14015  fi
14016done
14017  done
14018IFS=$as_save_IFS
14019
14020  ;;
14021esac
14022fi
14023CPIO=$ac_cv_path_CPIO
14024if test -n "$CPIO"; then
14025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14026$as_echo "$CPIO" >&6; }
14027else
14028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14029$as_echo "no" >&6; }
14030fi
14031
14032
14033  test -n "$CPIO" && break
14034done
14035
14036    else
14037      # If it succeeded, then it was overridden by the user. We will use it
14038      # for the tool.
14039
14040      # First remove it from the list of overridden variables, so we can test
14041      # for unknown variables in the end.
14042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14043
14044      # Check if we try to supply an empty value
14045      if test "x$CPIO" = x; then
14046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14047$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14049$as_echo_n "checking for CPIO... " >&6; }
14050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14051$as_echo "disabled" >&6; }
14052      else
14053        # Check if the provided tool contains a complete path.
14054        tool_specified="$CPIO"
14055        tool_basename="${tool_specified##*/}"
14056        if test "x$tool_basename" = "x$tool_specified"; then
14057          # A command without a complete path is provided, search $PATH.
14058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14059$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14060          # Extract the first word of "$tool_basename", so it can be a program name with args.
14061set dummy $tool_basename; ac_word=$2
14062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14063$as_echo_n "checking for $ac_word... " >&6; }
14064if ${ac_cv_path_CPIO+:} false; then :
14065  $as_echo_n "(cached) " >&6
14066else
14067  case $CPIO in
14068  [\\/]* | ?:[\\/]*)
14069  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14070  ;;
14071  *)
14072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14073for as_dir in $PATH
14074do
14075  IFS=$as_save_IFS
14076  test -z "$as_dir" && as_dir=.
14077    for ac_exec_ext in '' $ac_executable_extensions; do
14078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14079    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14081    break 2
14082  fi
14083done
14084  done
14085IFS=$as_save_IFS
14086
14087  ;;
14088esac
14089fi
14090CPIO=$ac_cv_path_CPIO
14091if test -n "$CPIO"; then
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14093$as_echo "$CPIO" >&6; }
14094else
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14096$as_echo "no" >&6; }
14097fi
14098
14099
14100          if test "x$CPIO" = x; then
14101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14102          fi
14103        else
14104          # Otherwise we believe it is a complete path. Use it as it is.
14105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14106$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14108$as_echo_n "checking for CPIO... " >&6; }
14109          if test ! -x "$tool_specified"; then
14110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14111$as_echo "not found" >&6; }
14112            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14113          fi
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14115$as_echo "$tool_specified" >&6; }
14116        fi
14117      fi
14118    fi
14119  fi
14120
14121
14122
14123
14124  # Publish this variable in the help.
14125
14126
14127  if [ -z "${NICE+x}" ]; then
14128    # The variable is not set by user, try to locate tool using the code snippet
14129    for ac_prog in nice
14130do
14131  # Extract the first word of "$ac_prog", so it can be a program name with args.
14132set dummy $ac_prog; ac_word=$2
14133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14134$as_echo_n "checking for $ac_word... " >&6; }
14135if ${ac_cv_path_NICE+:} false; then :
14136  $as_echo_n "(cached) " >&6
14137else
14138  case $NICE in
14139  [\\/]* | ?:[\\/]*)
14140  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14141  ;;
14142  *)
14143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144for as_dir in $PATH
14145do
14146  IFS=$as_save_IFS
14147  test -z "$as_dir" && as_dir=.
14148    for ac_exec_ext in '' $ac_executable_extensions; do
14149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14150    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14152    break 2
14153  fi
14154done
14155  done
14156IFS=$as_save_IFS
14157
14158  ;;
14159esac
14160fi
14161NICE=$ac_cv_path_NICE
14162if test -n "$NICE"; then
14163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14164$as_echo "$NICE" >&6; }
14165else
14166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14167$as_echo "no" >&6; }
14168fi
14169
14170
14171  test -n "$NICE" && break
14172done
14173
14174  else
14175    # The variable is set, but is it from the command line or the environment?
14176
14177    # Try to remove the string !NICE! from our list.
14178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14180      # If it failed, the variable was not from the command line. Ignore it,
14181      # but warn the user (except for BASH, which is always set by the calling BASH).
14182      if test "xNICE" != xBASH; then
14183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14184$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14185      fi
14186      # Try to locate tool using the code snippet
14187      for ac_prog in nice
14188do
14189  # Extract the first word of "$ac_prog", so it can be a program name with args.
14190set dummy $ac_prog; ac_word=$2
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14192$as_echo_n "checking for $ac_word... " >&6; }
14193if ${ac_cv_path_NICE+:} false; then :
14194  $as_echo_n "(cached) " >&6
14195else
14196  case $NICE in
14197  [\\/]* | ?:[\\/]*)
14198  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14199  ;;
14200  *)
14201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14202for as_dir in $PATH
14203do
14204  IFS=$as_save_IFS
14205  test -z "$as_dir" && as_dir=.
14206    for ac_exec_ext in '' $ac_executable_extensions; do
14207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14208    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14210    break 2
14211  fi
14212done
14213  done
14214IFS=$as_save_IFS
14215
14216  ;;
14217esac
14218fi
14219NICE=$ac_cv_path_NICE
14220if test -n "$NICE"; then
14221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14222$as_echo "$NICE" >&6; }
14223else
14224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14225$as_echo "no" >&6; }
14226fi
14227
14228
14229  test -n "$NICE" && break
14230done
14231
14232    else
14233      # If it succeeded, then it was overridden by the user. We will use it
14234      # for the tool.
14235
14236      # First remove it from the list of overridden variables, so we can test
14237      # for unknown variables in the end.
14238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14239
14240      # Check if we try to supply an empty value
14241      if test "x$NICE" = x; then
14242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14243$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14245$as_echo_n "checking for NICE... " >&6; }
14246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14247$as_echo "disabled" >&6; }
14248      else
14249        # Check if the provided tool contains a complete path.
14250        tool_specified="$NICE"
14251        tool_basename="${tool_specified##*/}"
14252        if test "x$tool_basename" = "x$tool_specified"; then
14253          # A command without a complete path is provided, search $PATH.
14254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14255$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14256          # Extract the first word of "$tool_basename", so it can be a program name with args.
14257set dummy $tool_basename; ac_word=$2
14258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14259$as_echo_n "checking for $ac_word... " >&6; }
14260if ${ac_cv_path_NICE+:} false; then :
14261  $as_echo_n "(cached) " >&6
14262else
14263  case $NICE in
14264  [\\/]* | ?:[\\/]*)
14265  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14266  ;;
14267  *)
14268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14269for as_dir in $PATH
14270do
14271  IFS=$as_save_IFS
14272  test -z "$as_dir" && as_dir=.
14273    for ac_exec_ext in '' $ac_executable_extensions; do
14274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14275    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14277    break 2
14278  fi
14279done
14280  done
14281IFS=$as_save_IFS
14282
14283  ;;
14284esac
14285fi
14286NICE=$ac_cv_path_NICE
14287if test -n "$NICE"; then
14288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14289$as_echo "$NICE" >&6; }
14290else
14291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14292$as_echo "no" >&6; }
14293fi
14294
14295
14296          if test "x$NICE" = x; then
14297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14298          fi
14299        else
14300          # Otherwise we believe it is a complete path. Use it as it is.
14301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14302$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14304$as_echo_n "checking for NICE... " >&6; }
14305          if test ! -x "$tool_specified"; then
14306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14307$as_echo "not found" >&6; }
14308            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14309          fi
14310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14311$as_echo "$tool_specified" >&6; }
14312        fi
14313      fi
14314    fi
14315  fi
14316
14317
14318
14319
14320# Now we can determine OpenJDK build and target platforms. This is required to
14321# have early on.
14322# Make sure we can run config.sub.
14323$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14324  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14325
14326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14327$as_echo_n "checking build system type... " >&6; }
14328if ${ac_cv_build+:} false; then :
14329  $as_echo_n "(cached) " >&6
14330else
14331  ac_build_alias=$build_alias
14332test "x$ac_build_alias" = x &&
14333  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14334test "x$ac_build_alias" = x &&
14335  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14336ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14337  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14338
14339fi
14340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14341$as_echo "$ac_cv_build" >&6; }
14342case $ac_cv_build in
14343*-*-*) ;;
14344*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14345esac
14346build=$ac_cv_build
14347ac_save_IFS=$IFS; IFS='-'
14348set x $ac_cv_build
14349shift
14350build_cpu=$1
14351build_vendor=$2
14352shift; shift
14353# Remember, the first character of IFS is used to create $*,
14354# except with old shells:
14355build_os=$*
14356IFS=$ac_save_IFS
14357case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14358
14359
14360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14361$as_echo_n "checking host system type... " >&6; }
14362if ${ac_cv_host+:} false; then :
14363  $as_echo_n "(cached) " >&6
14364else
14365  if test "x$host_alias" = x; then
14366  ac_cv_host=$ac_cv_build
14367else
14368  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14369    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14370fi
14371
14372fi
14373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14374$as_echo "$ac_cv_host" >&6; }
14375case $ac_cv_host in
14376*-*-*) ;;
14377*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14378esac
14379host=$ac_cv_host
14380ac_save_IFS=$IFS; IFS='-'
14381set x $ac_cv_host
14382shift
14383host_cpu=$1
14384host_vendor=$2
14385shift; shift
14386# Remember, the first character of IFS is used to create $*,
14387# except with old shells:
14388host_os=$*
14389IFS=$ac_save_IFS
14390case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14391
14392
14393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14394$as_echo_n "checking target system type... " >&6; }
14395if ${ac_cv_target+:} false; then :
14396  $as_echo_n "(cached) " >&6
14397else
14398  if test "x$target_alias" = x; then
14399  ac_cv_target=$ac_cv_host
14400else
14401  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14402    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14403fi
14404
14405fi
14406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14407$as_echo "$ac_cv_target" >&6; }
14408case $ac_cv_target in
14409*-*-*) ;;
14410*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14411esac
14412target=$ac_cv_target
14413ac_save_IFS=$IFS; IFS='-'
14414set x $ac_cv_target
14415shift
14416target_cpu=$1
14417target_vendor=$2
14418shift; shift
14419# Remember, the first character of IFS is used to create $*,
14420# except with old shells:
14421target_os=$*
14422IFS=$ac_save_IFS
14423case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14424
14425
14426# The aliases save the names the user supplied, while $host etc.
14427# will get canonicalized.
14428test -n "$target_alias" &&
14429  test "$program_prefix$program_suffix$program_transform_name" = \
14430    NONENONEs,x,x, &&
14431  program_prefix=${target_alias}-
14432
14433  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14434  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14435  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14436  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14437  # to use the configure naming style.
14438
14439
14440
14441
14442
14443  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14444  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14445  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14446  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14447  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14448  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14449
14450
14451
14452  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14453
14454  case "$build_os" in
14455    *linux*)
14456      VAR_OS=linux
14457      VAR_OS_TYPE=unix
14458      ;;
14459    *solaris*)
14460      VAR_OS=solaris
14461      VAR_OS_TYPE=unix
14462      ;;
14463    *darwin*)
14464      VAR_OS=macosx
14465      VAR_OS_TYPE=unix
14466      ;;
14467    *bsd*)
14468      VAR_OS=bsd
14469      VAR_OS_TYPE=unix
14470      ;;
14471    *cygwin*)
14472      VAR_OS=windows
14473      VAR_OS_ENV=windows.cygwin
14474      ;;
14475    *mingw*)
14476      VAR_OS=windows
14477      VAR_OS_ENV=windows.msys
14478      ;;
14479    *aix*)
14480      VAR_OS=aix
14481      VAR_OS_TYPE=unix
14482      ;;
14483    *)
14484      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14485      ;;
14486  esac
14487
14488
14489  # First argument is the cpu name from the trip/quad
14490  case "$build_cpu" in
14491    x86_64)
14492      VAR_CPU=x86_64
14493      VAR_CPU_ARCH=x86
14494      VAR_CPU_BITS=64
14495      VAR_CPU_ENDIAN=little
14496      ;;
14497    i?86)
14498      VAR_CPU=x86
14499      VAR_CPU_ARCH=x86
14500      VAR_CPU_BITS=32
14501      VAR_CPU_ENDIAN=little
14502      ;;
14503    arm*)
14504      VAR_CPU=arm
14505      VAR_CPU_ARCH=arm
14506      VAR_CPU_BITS=32
14507      VAR_CPU_ENDIAN=little
14508      ;;
14509    aarch64)
14510      VAR_CPU=aarch64
14511      VAR_CPU_ARCH=aarch64
14512      VAR_CPU_BITS=64
14513      VAR_CPU_ENDIAN=little
14514      ;;
14515    powerpc)
14516      VAR_CPU=ppc
14517      VAR_CPU_ARCH=ppc
14518      VAR_CPU_BITS=32
14519      VAR_CPU_ENDIAN=big
14520      ;;
14521    powerpc64)
14522      VAR_CPU=ppc64
14523      VAR_CPU_ARCH=ppc
14524      VAR_CPU_BITS=64
14525      VAR_CPU_ENDIAN=big
14526      ;;
14527    powerpc64le)
14528      VAR_CPU=ppc64
14529      VAR_CPU_ARCH=ppc
14530      VAR_CPU_BITS=64
14531      VAR_CPU_ENDIAN=little
14532      ;;
14533    s390)
14534      VAR_CPU=s390
14535      VAR_CPU_ARCH=s390
14536      VAR_CPU_BITS=32
14537      VAR_CPU_ENDIAN=big
14538      ;;
14539    s390x)
14540      VAR_CPU=s390x
14541      VAR_CPU_ARCH=s390
14542      VAR_CPU_BITS=64
14543      VAR_CPU_ENDIAN=big
14544      ;;
14545    sparc)
14546      VAR_CPU=sparc
14547      VAR_CPU_ARCH=sparc
14548      VAR_CPU_BITS=32
14549      VAR_CPU_ENDIAN=big
14550      ;;
14551    sparcv9|sparc64)
14552      VAR_CPU=sparcv9
14553      VAR_CPU_ARCH=sparc
14554      VAR_CPU_BITS=64
14555      VAR_CPU_ENDIAN=big
14556      ;;
14557    *)
14558      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14559      ;;
14560  esac
14561
14562  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14563  OPENJDK_BUILD_OS="$VAR_OS"
14564  if test "x$VAR_OS_TYPE" != x; then
14565    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14566  else
14567    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14568  fi
14569  if test "x$VAR_OS_ENV" != x; then
14570    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14571  else
14572    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14573  fi
14574  OPENJDK_BUILD_CPU="$VAR_CPU"
14575  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14576  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14577  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14578
14579
14580
14581
14582
14583
14584
14585
14586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14587$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14589$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14590
14591  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14592
14593  case "$host_os" in
14594    *linux*)
14595      VAR_OS=linux
14596      VAR_OS_TYPE=unix
14597      ;;
14598    *solaris*)
14599      VAR_OS=solaris
14600      VAR_OS_TYPE=unix
14601      ;;
14602    *darwin*)
14603      VAR_OS=macosx
14604      VAR_OS_TYPE=unix
14605      ;;
14606    *bsd*)
14607      VAR_OS=bsd
14608      VAR_OS_TYPE=unix
14609      ;;
14610    *cygwin*)
14611      VAR_OS=windows
14612      VAR_OS_ENV=windows.cygwin
14613      ;;
14614    *mingw*)
14615      VAR_OS=windows
14616      VAR_OS_ENV=windows.msys
14617      ;;
14618    *aix*)
14619      VAR_OS=aix
14620      VAR_OS_TYPE=unix
14621      ;;
14622    *)
14623      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14624      ;;
14625  esac
14626
14627
14628  # First argument is the cpu name from the trip/quad
14629  case "$host_cpu" in
14630    x86_64)
14631      VAR_CPU=x86_64
14632      VAR_CPU_ARCH=x86
14633      VAR_CPU_BITS=64
14634      VAR_CPU_ENDIAN=little
14635      ;;
14636    i?86)
14637      VAR_CPU=x86
14638      VAR_CPU_ARCH=x86
14639      VAR_CPU_BITS=32
14640      VAR_CPU_ENDIAN=little
14641      ;;
14642    arm*)
14643      VAR_CPU=arm
14644      VAR_CPU_ARCH=arm
14645      VAR_CPU_BITS=32
14646      VAR_CPU_ENDIAN=little
14647      ;;
14648    aarch64)
14649      VAR_CPU=aarch64
14650      VAR_CPU_ARCH=aarch64
14651      VAR_CPU_BITS=64
14652      VAR_CPU_ENDIAN=little
14653      ;;
14654    powerpc)
14655      VAR_CPU=ppc
14656      VAR_CPU_ARCH=ppc
14657      VAR_CPU_BITS=32
14658      VAR_CPU_ENDIAN=big
14659      ;;
14660    powerpc64)
14661      VAR_CPU=ppc64
14662      VAR_CPU_ARCH=ppc
14663      VAR_CPU_BITS=64
14664      VAR_CPU_ENDIAN=big
14665      ;;
14666    powerpc64le)
14667      VAR_CPU=ppc64
14668      VAR_CPU_ARCH=ppc
14669      VAR_CPU_BITS=64
14670      VAR_CPU_ENDIAN=little
14671      ;;
14672    s390)
14673      VAR_CPU=s390
14674      VAR_CPU_ARCH=s390
14675      VAR_CPU_BITS=32
14676      VAR_CPU_ENDIAN=big
14677      ;;
14678    s390x)
14679      VAR_CPU=s390x
14680      VAR_CPU_ARCH=s390
14681      VAR_CPU_BITS=64
14682      VAR_CPU_ENDIAN=big
14683      ;;
14684    sparc)
14685      VAR_CPU=sparc
14686      VAR_CPU_ARCH=sparc
14687      VAR_CPU_BITS=32
14688      VAR_CPU_ENDIAN=big
14689      ;;
14690    sparcv9|sparc64)
14691      VAR_CPU=sparcv9
14692      VAR_CPU_ARCH=sparc
14693      VAR_CPU_BITS=64
14694      VAR_CPU_ENDIAN=big
14695      ;;
14696    *)
14697      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14698      ;;
14699  esac
14700
14701  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14702  OPENJDK_TARGET_OS="$VAR_OS"
14703  if test "x$VAR_OS_TYPE" != x; then
14704    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14705  else
14706    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14707  fi
14708  if test "x$VAR_OS_ENV" != x; then
14709    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14710  else
14711    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14712  fi
14713  OPENJDK_TARGET_CPU="$VAR_CPU"
14714  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14715  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14716  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14717
14718
14719
14720
14721
14722
14723
14724
14725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14726$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14728$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14729
14730
14731
14732# Check whether --with-target-bits was given.
14733if test "${with_target_bits+set}" = set; then :
14734  withval=$with_target_bits;
14735fi
14736
14737
14738  # We have three types of compiles:
14739  # native  == normal compilation, target system == build system
14740  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14741  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14742  #
14743  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14744    # We're doing a proper cross-compilation
14745    COMPILE_TYPE="cross"
14746  else
14747    COMPILE_TYPE="native"
14748  fi
14749
14750  if test "x$with_target_bits" != x; then
14751    if test "x$COMPILE_TYPE" = "xcross"; then
14752      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14753    fi
14754
14755    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14756      # A reduced build is requested
14757      COMPILE_TYPE="reduced"
14758      OPENJDK_TARGET_CPU_BITS=32
14759      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14760        OPENJDK_TARGET_CPU=x86
14761      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14762        OPENJDK_TARGET_CPU=sparc
14763      else
14764        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14765      fi
14766    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14767      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
14768    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14769      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14770$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14771    else
14772      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14773    fi
14774  fi
14775
14776
14777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14778$as_echo_n "checking compilation type... " >&6; }
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14780$as_echo "$COMPILE_TYPE" >&6; }
14781
14782
14783  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14784    REQUIRED_OS_NAME=SunOS
14785    REQUIRED_OS_VERSION=5.10
14786  fi
14787  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14788    REQUIRED_OS_NAME=Linux
14789    REQUIRED_OS_VERSION=2.6
14790  fi
14791  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14792    REQUIRED_OS_NAME=Windows
14793    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14794      REQUIRED_OS_VERSION=5.2
14795    else
14796      REQUIRED_OS_VERSION=5.1
14797    fi
14798  fi
14799  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14800    REQUIRED_OS_NAME=Darwin
14801    REQUIRED_OS_VERSION=11.2
14802  fi
14803
14804
14805
14806
14807
14808  # Also store the legacy naming of the cpu.
14809  # Ie i586 and amd64 instead of x86 and x86_64
14810  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14811  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14812    OPENJDK_TARGET_CPU_LEGACY="i586"
14813  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14814    # On all platforms except MacOSX replace x86_64 with amd64.
14815    OPENJDK_TARGET_CPU_LEGACY="amd64"
14816  fi
14817
14818
14819  # And the second legacy naming of the cpu.
14820  # Ie i386 and amd64 instead of x86 and x86_64.
14821  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14822  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14823    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14824  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14825    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14826  fi
14827
14828
14829  # This is the name of the cpu (but using i386 and amd64 instead of
14830  # x86 and x86_64, respectively), preceeded by a /, to be used when
14831  # locating libraries. On macosx, it's empty, though.
14832  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14833  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14834    OPENJDK_TARGET_CPU_LIBDIR=""
14835  fi
14836
14837
14838  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14839  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14840  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14841  OPENJDK_TARGET_CPU_ISADIR=""
14842  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14843    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14844      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14845    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14846      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14847    fi
14848  fi
14849
14850
14851  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14852  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14853  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14854    # On linux only, we replace x86 with i386.
14855    OPENJDK_TARGET_CPU_OSARCH="i386"
14856  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14857    # On all platforms except macosx, we replace x86_64 with amd64.
14858    OPENJDK_TARGET_CPU_OSARCH="amd64"
14859  fi
14860
14861
14862  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14863  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14864    OPENJDK_TARGET_CPU_JLI="i386"
14865  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14866    # On all platforms except macosx, we replace x86_64 with amd64.
14867    OPENJDK_TARGET_CPU_JLI="amd64"
14868  fi
14869  # Now setup the -D flags for building libjli.
14870  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14871  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14872    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14873      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14874    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14875      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14876    fi
14877  fi
14878
14879
14880  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14881      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14882  else
14883      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14884  fi
14885
14886
14887  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14888    A_LP64="LP64:="
14889    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14890    # unpack200.exe
14891    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14892      ADD_LP64="-D_LP64=1"
14893    fi
14894  fi
14895  LP64=$A_LP64
14896
14897
14898  if test "x$COMPILE_TYPE" = "xcross"; then
14899    # FIXME: ... or should this include reduced builds..?
14900    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14901  else
14902    DEFINE_CROSS_COMPILE_ARCH=""
14903  fi
14904
14905
14906  # ZERO_ARCHDEF is used to enable architecture-specific code
14907  case "${OPENJDK_TARGET_CPU}" in
14908    ppc)     ZERO_ARCHDEF=PPC32 ;;
14909    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14910    s390*)   ZERO_ARCHDEF=S390  ;;
14911    sparc*)  ZERO_ARCHDEF=SPARC ;;
14912    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14913    x86)     ZERO_ARCHDEF=IA32  ;;
14914    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14915  esac
14916
14917
14918
14919
14920# Continue setting up basic stuff. Most remaining code require fundamental tools.
14921
14922  # Save the current directory this script was started from
14923  CURDIR="$PWD"
14924
14925  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14926  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14927  # was not available at that time.
14928  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14929  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14930    ORIGINAL_PATH="$REWRITTEN_PATH"
14931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14932$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14933  fi
14934
14935  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14936    PATH_SEP=";"
14937
14938  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14939  if test $SRC_ROOT_LENGTH -gt 100; then
14940    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14941  fi
14942
14943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14945$as_echo_n "checking cygwin release... " >&6; }
14946    CYGWIN_VERSION=`$UNAME -r`
14947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14948$as_echo "$CYGWIN_VERSION" >&6; }
14949    WINDOWS_ENV_VENDOR='cygwin'
14950    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14951
14952    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14953    if test "x$CYGWIN_VERSION_OLD" != x; then
14954      { $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
14955$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;}
14956      as_fn_error $? "Cannot continue" "$LINENO" 5
14957    fi
14958    if test "x$CYGPATH" = x; then
14959      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14960    fi
14961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14962$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14963    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14964    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14965    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14966    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14968$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14969    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14970    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14971    if test "x$test_cygdrive_prefix" = x; then
14972      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14973    fi
14974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14976$as_echo_n "checking msys release... " >&6; }
14977    MSYS_VERSION=`$UNAME -r`
14978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14979$as_echo "$MSYS_VERSION" >&6; }
14980
14981    WINDOWS_ENV_VENDOR='msys'
14982    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14983
14984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14985$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14986    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14987    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14988
14989  windows_path="$MSYS_ROOT_PATH"
14990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14991    unix_path=`$CYGPATH -u "$windows_path"`
14992    MSYS_ROOT_PATH="$unix_path"
14993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14995    MSYS_ROOT_PATH="$unix_path"
14996  fi
14997
14998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14999$as_echo "$MSYS_ROOT_PATH" >&6; }
15000    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15001  else
15002    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15003  fi
15004
15005  # Test if windows or unix (cygwin/msys) find is first in path.
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15007$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15008  FIND_BINARY_OUTPUT=`find --version 2>&1`
15009  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15011$as_echo "unix style" >&6; }
15012  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15014$as_echo "Windows" >&6; }
15015    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15016$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15017    { $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
15018$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15019    as_fn_error $? "Cannot continue" "$LINENO" 5
15020  else
15021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15022$as_echo "unknown" >&6; }
15023    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15024$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15025  fi
15026
15027  else
15028    PATH_SEP=":"
15029  fi
15030
15031
15032  # We get the top-level directory from the supporting wrappers.
15033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15034$as_echo_n "checking for top-level directory... " >&6; }
15035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15036$as_echo "$TOPDIR" >&6; }
15037
15038
15039  # Save the original version of TOPDIR for string comparisons
15040  ORIGINAL_TOPDIR="$TOPDIR"
15041
15042
15043  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15044
15045  # Only process if variable expands to non-empty
15046
15047  if test "x$CURDIR" != x; then
15048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15049
15050  # Input might be given as Windows format, start by converting to
15051  # unix format.
15052  path="$CURDIR"
15053  new_path=`$CYGPATH -u "$path"`
15054
15055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15058  # "foo.exe" is OK but "foo" is an error.
15059  #
15060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15061  # It is also a way to make sure we got the proper file name for the real test later on.
15062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15063  if test "x$test_shortpath" = x; then
15064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15065$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15066    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15067  fi
15068
15069  # Call helper function which possibly converts this using DOS-style short mode.
15070  # If so, the updated path is stored in $new_path.
15071
15072  input_path="$new_path"
15073  # Check if we need to convert this using DOS-style short mode. If the path
15074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15075  # take no chances and rewrite it.
15076  # Note: m4 eats our [], so we need to use [ and ] instead.
15077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15078  if test "x$has_forbidden_chars" != x; then
15079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15083      # Going to short mode and back again did indeed matter. Since short mode is
15084      # case insensitive, let's make it lowercase to improve readability.
15085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15086      # Now convert it back to Unix-style (cygpath)
15087      input_path=`$CYGPATH -u "$shortmode_path"`
15088      new_path="$input_path"
15089    fi
15090  fi
15091
15092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15093  if test "x$test_cygdrive_prefix" = x; then
15094    # As a simple fix, exclude /usr/bin since it's not a real path.
15095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15097      # a path prefixed by /cygdrive for fixpath to work.
15098      new_path="$CYGWIN_ROOT_PATH$input_path"
15099    fi
15100  fi
15101
15102
15103  if test "x$path" != "x$new_path"; then
15104    CURDIR="$new_path"
15105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15106$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15107  fi
15108
15109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15110
15111  path="$CURDIR"
15112  has_colon=`$ECHO $path | $GREP ^.:`
15113  new_path="$path"
15114  if test "x$has_colon" = x; then
15115    # Not in mixed or Windows style, start by that.
15116    new_path=`cmd //c echo $path`
15117  fi
15118
15119
15120  input_path="$new_path"
15121  # Check if we need to convert this using DOS-style short mode. If the path
15122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15123  # take no chances and rewrite it.
15124  # Note: m4 eats our [], so we need to use [ and ] instead.
15125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15126  if test "x$has_forbidden_chars" != x; then
15127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15129  fi
15130
15131
15132  windows_path="$new_path"
15133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15134    unix_path=`$CYGPATH -u "$windows_path"`
15135    new_path="$unix_path"
15136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15138    new_path="$unix_path"
15139  fi
15140
15141  if test "x$path" != "x$new_path"; then
15142    CURDIR="$new_path"
15143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15144$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15145  fi
15146
15147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15149
15150    else
15151      # We're on a unix platform. Hooray! :)
15152      path="$CURDIR"
15153      has_space=`$ECHO "$path" | $GREP " "`
15154      if test "x$has_space" != x; then
15155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15156$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15158      fi
15159
15160      # Use eval to expand a potential ~
15161      eval path="$path"
15162      if test ! -f "$path" && test ! -d "$path"; then
15163        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15164      fi
15165
15166      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15167    fi
15168  fi
15169
15170
15171  # Only process if variable expands to non-empty
15172
15173  if test "x$TOPDIR" != x; then
15174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15175
15176  # Input might be given as Windows format, start by converting to
15177  # unix format.
15178  path="$TOPDIR"
15179  new_path=`$CYGPATH -u "$path"`
15180
15181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15184  # "foo.exe" is OK but "foo" is an error.
15185  #
15186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15187  # It is also a way to make sure we got the proper file name for the real test later on.
15188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15189  if test "x$test_shortpath" = x; then
15190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15191$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15192    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15193  fi
15194
15195  # Call helper function which possibly converts this using DOS-style short mode.
15196  # If so, the updated path is stored in $new_path.
15197
15198  input_path="$new_path"
15199  # Check if we need to convert this using DOS-style short mode. If the path
15200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15201  # take no chances and rewrite it.
15202  # Note: m4 eats our [], so we need to use [ and ] instead.
15203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15204  if test "x$has_forbidden_chars" != x; then
15205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15209      # Going to short mode and back again did indeed matter. Since short mode is
15210      # case insensitive, let's make it lowercase to improve readability.
15211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15212      # Now convert it back to Unix-style (cygpath)
15213      input_path=`$CYGPATH -u "$shortmode_path"`
15214      new_path="$input_path"
15215    fi
15216  fi
15217
15218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15219  if test "x$test_cygdrive_prefix" = x; then
15220    # As a simple fix, exclude /usr/bin since it's not a real path.
15221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15223      # a path prefixed by /cygdrive for fixpath to work.
15224      new_path="$CYGWIN_ROOT_PATH$input_path"
15225    fi
15226  fi
15227
15228
15229  if test "x$path" != "x$new_path"; then
15230    TOPDIR="$new_path"
15231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15232$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15233  fi
15234
15235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15236
15237  path="$TOPDIR"
15238  has_colon=`$ECHO $path | $GREP ^.:`
15239  new_path="$path"
15240  if test "x$has_colon" = x; then
15241    # Not in mixed or Windows style, start by that.
15242    new_path=`cmd //c echo $path`
15243  fi
15244
15245
15246  input_path="$new_path"
15247  # Check if we need to convert this using DOS-style short mode. If the path
15248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15249  # take no chances and rewrite it.
15250  # Note: m4 eats our [], so we need to use [ and ] instead.
15251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15252  if test "x$has_forbidden_chars" != x; then
15253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15255  fi
15256
15257
15258  windows_path="$new_path"
15259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15260    unix_path=`$CYGPATH -u "$windows_path"`
15261    new_path="$unix_path"
15262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15264    new_path="$unix_path"
15265  fi
15266
15267  if test "x$path" != "x$new_path"; then
15268    TOPDIR="$new_path"
15269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15270$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15271  fi
15272
15273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15275
15276    else
15277      # We're on a unix platform. Hooray! :)
15278      path="$TOPDIR"
15279      has_space=`$ECHO "$path" | $GREP " "`
15280      if test "x$has_space" != x; then
15281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15282$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15284      fi
15285
15286      # Use eval to expand a potential ~
15287      eval path="$path"
15288      if test ! -f "$path" && test ! -d "$path"; then
15289        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15290      fi
15291
15292      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15293    fi
15294  fi
15295
15296  # SRC_ROOT is a traditional alias for TOPDIR.
15297  SRC_ROOT=$TOPDIR
15298
15299  # Calculate a canonical version of TOPDIR for string comparisons
15300  CANONICAL_TOPDIR=$TOPDIR
15301
15302  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15303    # Follow a chain of symbolic links. Use readlink
15304    # where it exists, else fall back to horribly
15305    # complicated shell code.
15306    if test "x$READLINK_TESTED" != yes; then
15307      # On MacOSX there is a readlink tool with a different
15308      # purpose than the GNU readlink tool. Check the found readlink.
15309      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15310      if test "x$ISGNU" = x; then
15311        # A readlink that we do not know how to use.
15312        # Are there other non-GNU readlinks out there?
15313        READLINK_TESTED=yes
15314        READLINK=
15315      fi
15316    fi
15317
15318    if test "x$READLINK" != x; then
15319      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15320    else
15321      # Save the current directory for restoring afterwards
15322      STARTDIR=$PWD
15323      COUNTER=0
15324      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15325      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15326      cd $sym_link_dir
15327      # Use -P flag to resolve symlinks in directories.
15328      cd `$THEPWDCMD -P`
15329      sym_link_dir=`$THEPWDCMD -P`
15330      # Resolve file symlinks
15331      while test $COUNTER -lt 20; do
15332        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15333        if test "x$ISLINK" == x; then
15334          # This is not a symbolic link! We are done!
15335          break
15336        fi
15337        # Again resolve directory symlinks since the target of the just found
15338        # link could be in a different directory
15339        cd `$DIRNAME $ISLINK`
15340        sym_link_dir=`$THEPWDCMD -P`
15341        sym_link_file=`$BASENAME $ISLINK`
15342        let COUNTER=COUNTER+1
15343      done
15344      cd $STARTDIR
15345      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15346    fi
15347  fi
15348
15349
15350
15351  # Locate the directory of this script.
15352  AUTOCONF_DIR=$TOPDIR/common/autoconf
15353
15354
15355# Check if it's a pure open build or if custom sources are to be used.
15356
15357  # Check whether --enable-openjdk-only was given.
15358if test "${enable_openjdk_only+set}" = set; then :
15359  enableval=$enable_openjdk_only;
15360else
15361  enable_openjdk_only="no"
15362fi
15363
15364
15365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15366$as_echo_n "checking for presence of closed sources... " >&6; }
15367  if test -d "$SRC_ROOT/jdk/src/closed"; then
15368    CLOSED_SOURCE_PRESENT=yes
15369  else
15370    CLOSED_SOURCE_PRESENT=no
15371  fi
15372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15373$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15374
15375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15376$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15377  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15379$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15380
15381  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15382    OPENJDK=true
15383    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15384      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15385$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15386    fi
15387  else
15388    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15389      OPENJDK=true
15390    else
15391      OPENJDK=false
15392    fi
15393  fi
15394
15395  if test "x$OPENJDK" = "xtrue"; then
15396    SET_OPENJDK="OPENJDK=true"
15397  fi
15398
15399
15400
15401  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15402  # the IncludeCustomExtension macro.
15403
15404
15405# Check whether --with-custom-make-dir was given.
15406if test "${with_custom_make_dir+set}" = set; then :
15407  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
15408$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15409fi
15410
15411
15412
15413
15414# These are needed to be able to create a configuration name (and thus the output directory)
15415
15416  ###############################################################################
15417  #
15418  # Check which variant of the JDK that we want to build.
15419  # Currently we have:
15420  #    normal:   standard edition
15421  # but the custom make system may add other variants
15422  #
15423  # Effectively the JDK variant gives a name to a specific set of
15424  # modules to compile into the JDK. In the future, these modules
15425  # might even be Jigsaw modules.
15426  #
15427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15428$as_echo_n "checking which variant of the JDK to build... " >&6; }
15429
15430# Check whether --with-jdk-variant was given.
15431if test "${with_jdk_variant+set}" = set; then :
15432  withval=$with_jdk_variant;
15433fi
15434
15435
15436  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15437    JDK_VARIANT="normal"
15438  else
15439    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15440  fi
15441
15442
15443
15444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15445$as_echo "$JDK_VARIANT" >&6; }
15446
15447
15448###############################################################################
15449#
15450# Check which interpreter of the JVM we want to build.
15451# Currently we have:
15452#    template: Template interpreter (the default)
15453#    cpp     : C++ interpreter
15454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15455$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15456
15457# Check whether --with-jvm-interpreter was given.
15458if test "${with_jvm_interpreter+set}" = set; then :
15459  withval=$with_jvm_interpreter;
15460fi
15461
15462
15463if test "x$with_jvm_interpreter" = x; then
15464     with_jvm_interpreter="template"
15465fi
15466
15467JVM_INTERPRETER="$with_jvm_interpreter"
15468
15469if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15470   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15471fi
15472
15473
15474
15475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15476$as_echo "$with_jvm_interpreter" >&6; }
15477
15478
15479
15480  ###############################################################################
15481  #
15482  # Check which variants of the JVM that we want to build.
15483  # Currently we have:
15484  #    server: normal interpreter and a tiered C1/C2 compiler
15485  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15486  #    minimal1: reduced form of client with optional VM services and features stripped out
15487  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15488  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15489  #    zero: no machine code interpreter, no compiler
15490  #    zeroshark: zero interpreter and shark/llvm compiler backend
15491#    core: interpreter only, no compiler (only works on some platforms)
15492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15493$as_echo_n "checking which variants of the JVM to build... " >&6; }
15494
15495# Check whether --with-jvm-variants was given.
15496if test "${with_jvm_variants+set}" = set; then :
15497  withval=$with_jvm_variants;
15498fi
15499
15500
15501  if test "x$with_jvm_variants" = x; then
15502    with_jvm_variants="server"
15503  fi
15504
15505  JVM_VARIANTS=",$with_jvm_variants,"
15506  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,//'`
15507
15508  if test "x$TEST_VARIANTS" != "x,"; then
15509     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15510  fi
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15512$as_echo "$with_jvm_variants" >&6; }
15513
15514  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15515  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15516  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15517  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15518  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15519  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15520  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15521
15522  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15523    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15524      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15525    fi
15526  fi
15527  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15528    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15529      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15530    fi
15531  fi
15532  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15533    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15534      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15535    fi
15536  fi
15537
15538  # Replace the commas with AND for use in the build directory name.
15539  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15540  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/'`
15541  if test "x$COUNT_VARIANTS" != "x,1"; then
15542    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15543  else
15544    BUILDING_MULTIPLE_JVM_VARIANTS=no
15545  fi
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556  INCLUDE_SA=true
15557  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15558    INCLUDE_SA=false
15559  fi
15560  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15561    INCLUDE_SA=false
15562  fi
15563  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15564    INCLUDE_SA=false
15565  fi
15566  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15567    INCLUDE_SA=false
15568  fi
15569
15570
15571  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15572    MACOSX_UNIVERSAL="true"
15573  fi
15574
15575
15576
15577
15578  ###############################################################################
15579  #
15580  # Set the debug level
15581  #    release: no debug information, all optimizations, no asserts.
15582  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15583  #    fastdebug: debug information (-g), all optimizations, all asserts
15584  #    slowdebug: debug information (-g), no optimizations, all asserts
15585  #
15586  DEBUG_LEVEL="release"
15587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15588$as_echo_n "checking which debug level to use... " >&6; }
15589  # Check whether --enable-debug was given.
15590if test "${enable_debug+set}" = set; then :
15591  enableval=$enable_debug;
15592        ENABLE_DEBUG="${enableval}"
15593        DEBUG_LEVEL="fastdebug"
15594
15595else
15596  ENABLE_DEBUG="no"
15597fi
15598
15599
15600
15601# Check whether --with-debug-level was given.
15602if test "${with_debug_level+set}" = set; then :
15603  withval=$with_debug_level;
15604        DEBUG_LEVEL="${withval}"
15605        if test "x$ENABLE_DEBUG" = xyes; then
15606          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15607        fi
15608
15609fi
15610
15611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15612$as_echo "$DEBUG_LEVEL" >&6; }
15613
15614  if test "x$DEBUG_LEVEL" != xrelease && \
15615      test "x$DEBUG_LEVEL" != xoptimized && \
15616      test "x$DEBUG_LEVEL" != xfastdebug && \
15617      test "x$DEBUG_LEVEL" != xslowdebug; then
15618    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15619  fi
15620
15621
15622  ###############################################################################
15623  #
15624  # Setup legacy vars/targets and new vars to deal with different debug levels.
15625  #
15626
15627  case $DEBUG_LEVEL in
15628    release )
15629      VARIANT="OPT"
15630      FASTDEBUG="false"
15631      DEBUG_CLASSFILES="false"
15632      BUILD_VARIANT_RELEASE=""
15633      HOTSPOT_DEBUG_LEVEL="product"
15634      HOTSPOT_EXPORT="product"
15635      ;;
15636    fastdebug )
15637      VARIANT="DBG"
15638      FASTDEBUG="true"
15639      DEBUG_CLASSFILES="true"
15640      BUILD_VARIANT_RELEASE="-fastdebug"
15641      HOTSPOT_DEBUG_LEVEL="fastdebug"
15642      HOTSPOT_EXPORT="fastdebug"
15643      ;;
15644    slowdebug )
15645      VARIANT="DBG"
15646      FASTDEBUG="false"
15647      DEBUG_CLASSFILES="true"
15648      BUILD_VARIANT_RELEASE="-debug"
15649      HOTSPOT_DEBUG_LEVEL="debug"
15650      HOTSPOT_EXPORT="debug"
15651      ;;
15652    optimized )
15653      VARIANT="OPT"
15654      FASTDEBUG="false"
15655      DEBUG_CLASSFILES="false"
15656      BUILD_VARIANT_RELEASE="-optimized"
15657      HOTSPOT_DEBUG_LEVEL="optimized"
15658      HOTSPOT_EXPORT="optimized"
15659      ;;
15660  esac
15661
15662  # The debug level 'optimized' is a little special because it is currently only
15663  # applicable to the HotSpot build where it means to build a completely
15664  # optimized version of the VM without any debugging code (like for the
15665  # 'release' debug level which is called 'product' in the HotSpot build) but
15666  # with the exception that it can contain additional code which is otherwise
15667  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15668  # test new and/or experimental features which are not intended for customer
15669  # shipment. Because these new features need to be tested and benchmarked in
15670  # real world scenarios, we want to build the containing JDK at the 'release'
15671  # debug level.
15672  if test "x$DEBUG_LEVEL" = xoptimized; then
15673    DEBUG_LEVEL="release"
15674  fi
15675
15676  #####
15677  # Generate the legacy makefile targets for hotspot.
15678  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15679  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15680  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15681  # But until then ...
15682  HOTSPOT_TARGET=""
15683
15684  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15685    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15686  fi
15687
15688  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15689    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15690  fi
15691
15692  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15694  fi
15695
15696  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15698  fi
15699
15700  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15701    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15702  fi
15703
15704  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15705    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15706  fi
15707
15708  if test "x$JVM_VARIANT_CORE" = xtrue; then
15709    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15710  fi
15711
15712  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15713
15714  # On Macosx universal binaries are produced, but they only contain
15715  # 64 bit intel. This invalidates control of which jvms are built
15716  # from configure, but only server is valid anyway. Fix this
15717  # when hotspot makefiles are rewritten.
15718  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15719    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15720  fi
15721
15722  #####
15723
15724
15725
15726
15727
15728
15729
15730
15731# With basic setup done, call the custom early hook.
15732
15733
15734# Check if we have devkits, extra paths or sysroot set.
15735
15736
15737# Check whether --with-devkit was given.
15738if test "${with_devkit+set}" = set; then :
15739  withval=$with_devkit;
15740
15741  # Only process if variable expands to non-empty
15742
15743  if test "x$with_devkit" != x; then
15744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15745
15746  # Input might be given as Windows format, start by converting to
15747  # unix format.
15748  path="$with_devkit"
15749  new_path=`$CYGPATH -u "$path"`
15750
15751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15754  # "foo.exe" is OK but "foo" is an error.
15755  #
15756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15757  # It is also a way to make sure we got the proper file name for the real test later on.
15758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15759  if test "x$test_shortpath" = x; then
15760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15761$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15762    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15763  fi
15764
15765  # Call helper function which possibly converts this using DOS-style short mode.
15766  # If so, the updated path is stored in $new_path.
15767
15768  input_path="$new_path"
15769  # Check if we need to convert this using DOS-style short mode. If the path
15770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15771  # take no chances and rewrite it.
15772  # Note: m4 eats our [], so we need to use [ and ] instead.
15773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15774  if test "x$has_forbidden_chars" != x; then
15775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15779      # Going to short mode and back again did indeed matter. Since short mode is
15780      # case insensitive, let's make it lowercase to improve readability.
15781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15782      # Now convert it back to Unix-style (cygpath)
15783      input_path=`$CYGPATH -u "$shortmode_path"`
15784      new_path="$input_path"
15785    fi
15786  fi
15787
15788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15789  if test "x$test_cygdrive_prefix" = x; then
15790    # As a simple fix, exclude /usr/bin since it's not a real path.
15791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15793      # a path prefixed by /cygdrive for fixpath to work.
15794      new_path="$CYGWIN_ROOT_PATH$input_path"
15795    fi
15796  fi
15797
15798
15799  if test "x$path" != "x$new_path"; then
15800    with_devkit="$new_path"
15801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15802$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15803  fi
15804
15805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15806
15807  path="$with_devkit"
15808  has_colon=`$ECHO $path | $GREP ^.:`
15809  new_path="$path"
15810  if test "x$has_colon" = x; then
15811    # Not in mixed or Windows style, start by that.
15812    new_path=`cmd //c echo $path`
15813  fi
15814
15815
15816  input_path="$new_path"
15817  # Check if we need to convert this using DOS-style short mode. If the path
15818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15819  # take no chances and rewrite it.
15820  # Note: m4 eats our [], so we need to use [ and ] instead.
15821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15822  if test "x$has_forbidden_chars" != x; then
15823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15825  fi
15826
15827
15828  windows_path="$new_path"
15829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15830    unix_path=`$CYGPATH -u "$windows_path"`
15831    new_path="$unix_path"
15832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15834    new_path="$unix_path"
15835  fi
15836
15837  if test "x$path" != "x$new_path"; then
15838    with_devkit="$new_path"
15839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15840$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15841  fi
15842
15843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15845
15846    else
15847      # We're on a unix platform. Hooray! :)
15848      path="$with_devkit"
15849      has_space=`$ECHO "$path" | $GREP " "`
15850      if test "x$has_space" != x; then
15851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15852$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15854      fi
15855
15856      # Use eval to expand a potential ~
15857      eval path="$path"
15858      if test ! -f "$path" && test ! -d "$path"; then
15859        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15860      fi
15861
15862      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15863    fi
15864  fi
15865
15866        DEVKIT_ROOT="$with_devkit"
15867        # Check for a meta data info file in the root of the devkit
15868        if test -f "$DEVKIT_ROOT/devkit.info"; then
15869          . $DEVKIT_ROOT/devkit.info
15870          # This potentially sets the following:
15871          # A descriptive name of the devkit
15872
15873  if test "x$DEVKIT_NAME" = x; then
15874    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15875  fi
15876
15877          # Corresponds to --with-extra-path
15878
15879  if test "x$DEVKIT_EXTRA_PATH" = x; then
15880    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15881  fi
15882
15883          # Corresponds to --with-toolchain-path
15884
15885  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15886    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15887  fi
15888
15889          # Corresponds to --with-sysroot
15890
15891  if test "x$DEVKIT_SYSROOT" = x; then
15892    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15893  fi
15894
15895
15896          # Identifies the Visual Studio version in the devkit
15897
15898  if test "x$DEVKIT_VS_VERSION" = x; then
15899    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15900  fi
15901
15902          # The Visual Studio include environment variable
15903
15904  if test "x$DEVKIT_VS_INCLUDE" = x; then
15905    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15906  fi
15907
15908          # The Visual Studio lib environment variable
15909
15910  if test "x$DEVKIT_VS_LIB" = x; then
15911    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15912  fi
15913
15914          # Corresponds to --with-msvcr-dll
15915
15916  if test "x$DEVKIT_MSVCR_DLL" = x; then
15917    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15918  fi
15919
15920          # Corresponds to --with-msvcp-dll
15921
15922  if test "x$DEVKIT_MSVCP_DLL" = x; then
15923    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15924  fi
15925
15926        fi
15927
15928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15929$as_echo_n "checking for devkit... " >&6; }
15930        if test "x$DEVKIT_NAME" != x; then
15931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15932$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15933        else
15934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15935$as_echo "$DEVKIT_ROOT" >&6; }
15936        fi
15937
15938
15939  if test "x$DEVKIT_EXTRA_PATH" != x; then
15940    if test "x$EXTRA_PATH" = x; then
15941      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15942    else
15943      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15944    fi
15945  fi
15946
15947
15948        # Fallback default of just /bin if DEVKIT_PATH is not defined
15949        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15950          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15951        fi
15952
15953  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15954    if test "x$TOOLCHAIN_PATH" = x; then
15955      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15956    else
15957      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15958    fi
15959  fi
15960
15961
15962        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15963        # places for backwards compatiblity.
15964        if test "x$DEVKIT_SYSROOT" != x; then
15965          SYSROOT="$DEVKIT_SYSROOT"
15966        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15967          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15968        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15969          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15970        fi
15971
15972
15973fi
15974
15975
15976  # You can force the sysroot if the sysroot encoded into the compiler tools
15977  # is not correct.
15978
15979# Check whether --with-sys-root was given.
15980if test "${with_sys_root+set}" = set; then :
15981  withval=$with_sys_root; SYSROOT=$with_sys_root
15982
15983fi
15984
15985
15986
15987# Check whether --with-sysroot was given.
15988if test "${with_sysroot+set}" = set; then :
15989  withval=$with_sysroot; SYSROOT=$with_sysroot
15990
15991fi
15992
15993
15994
15995# Check whether --with-tools-dir was given.
15996if test "${with_tools_dir+set}" = set; then :
15997  withval=$with_tools_dir;
15998  if test "x$with_tools_dir" != x; then
15999    if test "x$TOOLCHAIN_PATH" = x; then
16000      TOOLCHAIN_PATH="$with_tools_dir"
16001    else
16002      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16003    fi
16004  fi
16005
16006
16007fi
16008
16009
16010
16011# Check whether --with-toolchain-path was given.
16012if test "${with_toolchain_path+set}" = set; then :
16013  withval=$with_toolchain_path;
16014  if test "x$with_toolchain_path" != x; then
16015    if test "x$TOOLCHAIN_PATH" = x; then
16016      TOOLCHAIN_PATH="$with_toolchain_path"
16017    else
16018      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16019    fi
16020  fi
16021
16022
16023fi
16024
16025
16026
16027# Check whether --with-extra-path was given.
16028if test "${with_extra_path+set}" = set; then :
16029  withval=$with_extra_path;
16030  if test "x$with_extra_path" != x; then
16031    if test "x$EXTRA_PATH" = x; then
16032      EXTRA_PATH="$with_extra_path"
16033    else
16034      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16035    fi
16036  fi
16037
16038
16039fi
16040
16041
16042  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16043    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16044    # If not, detect if Xcode is installed by running xcodebuild -version
16045    # if no Xcode installed, xcodebuild exits with 1
16046    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16047    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16048      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16049      # fall back on the stub binary in /usr/bin/xcodebuild
16050      # Extract the first word of "xcodebuild", so it can be a program name with args.
16051set dummy xcodebuild; ac_word=$2
16052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16053$as_echo_n "checking for $ac_word... " >&6; }
16054if ${ac_cv_path_XCODEBUILD+:} false; then :
16055  $as_echo_n "(cached) " >&6
16056else
16057  case $XCODEBUILD in
16058  [\\/]* | ?:[\\/]*)
16059  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16060  ;;
16061  *)
16062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16063for as_dir in $TOOLCHAIN_PATH
16064do
16065  IFS=$as_save_IFS
16066  test -z "$as_dir" && as_dir=.
16067    for ac_exec_ext in '' $ac_executable_extensions; do
16068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16069    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16071    break 2
16072  fi
16073done
16074  done
16075IFS=$as_save_IFS
16076
16077  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16078  ;;
16079esac
16080fi
16081XCODEBUILD=$ac_cv_path_XCODEBUILD
16082if test -n "$XCODEBUILD"; then
16083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16084$as_echo "$XCODEBUILD" >&6; }
16085else
16086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16087$as_echo "no" >&6; }
16088fi
16089
16090
16091    else
16092      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16093      # when only the command line tools are installed there are no SDKs, so headers
16094      # are copied into the system frameworks
16095      XCODEBUILD=
16096
16097    fi
16098
16099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16100$as_echo_n "checking for sdk name... " >&6; }
16101
16102# Check whether --with-sdk-name was given.
16103if test "${with_sdk_name+set}" = set; then :
16104  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16105
16106fi
16107
16108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16109$as_echo "$SDKNAME" >&6; }
16110
16111    # if toolchain path is specified then don't rely on system headers, they may not compile
16112    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16113    test -z "$TOOLCHAIN_PATH" && \
16114      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16115
16116    if test -z "$SYSROOT"; then
16117      if test -n "$XCODEBUILD"; then
16118        # if we don't have system headers, use default SDK name (last resort)
16119        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16120          SDKNAME=${SDKNAME:-macosx}
16121        fi
16122
16123        if test -n "$SDKNAME"; then
16124          # Call xcodebuild to determine SYSROOT
16125          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16126        fi
16127      else
16128        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16129          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
16130        fi
16131      fi
16132    else
16133      # warn user if --with-sdk-name was also set
16134      if test -n "$with_sdk_name"; then
16135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16136$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16137      fi
16138    fi
16139
16140    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16141      # If no system framework headers, then SYSROOT must be set, or we won't build
16142      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
16143    fi
16144
16145    # Perform a basic sanity test
16146    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16147      if test -z "$SYSROOT"; then
16148        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
16149      else
16150        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16151      fi
16152    fi
16153
16154    # set SDKROOT too, Xcode tools will pick it up
16155    SDKROOT=$SYSROOT
16156
16157  fi
16158
16159  # Prepend the extra path to the global path
16160
16161  if test "x$EXTRA_PATH" != x; then
16162    if test "x$PATH" = x; then
16163      PATH="$EXTRA_PATH"
16164    else
16165      PATH="$EXTRA_PATH:$PATH"
16166    fi
16167  fi
16168
16169
16170  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16171    # Add extra search paths on solaris for utilities like ar and as etc...
16172    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16173  fi
16174
16175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16176$as_echo_n "checking for sysroot... " >&6; }
16177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16178$as_echo "$SYSROOT" >&6; }
16179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16180$as_echo_n "checking for toolchain path... " >&6; }
16181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16182$as_echo "$TOOLCHAIN_PATH" >&6; }
16183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16184$as_echo_n "checking for extra path... " >&6; }
16185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16186$as_echo "$EXTRA_PATH" >&6; }
16187
16188
16189# To properly create a configuration name, we need to have the OpenJDK target
16190# and options (variants and debug level) parsed.
16191
16192
16193
16194# Check whether --with-conf-name was given.
16195if test "${with_conf_name+set}" = set; then :
16196  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16197fi
16198
16199
16200  # Test from where we are running configure, in or outside of src root.
16201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16202$as_echo_n "checking where to store configuration... " >&6; }
16203  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16204      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16205      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16206    # We are running configure from the src root.
16207    # Create a default ./build/target-variant-debuglevel output root.
16208    if test "x${CONF_NAME}" = x; then
16209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16210$as_echo "in default location" >&6; }
16211      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16212    else
16213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16214$as_echo "in build directory with custom name" >&6; }
16215    fi
16216    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16217    $MKDIR -p "$OUTPUT_ROOT"
16218    if test ! -d "$OUTPUT_ROOT"; then
16219      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16220    fi
16221  else
16222    # We are running configure from outside of the src dir.
16223    # Then use the current directory as output dir!
16224    # If configuration is situated in normal build directory, just use the build
16225    # directory name as configuration name, otherwise use the complete path.
16226    if test "x${CONF_NAME}" = x; then
16227      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16228    fi
16229    OUTPUT_ROOT="$CURDIR"
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16231$as_echo "in current directory" >&6; }
16232
16233    # WARNING: This might be a bad thing to do. You need to be sure you want to
16234    # have a configuration in this directory. Do some sanity checks!
16235
16236    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16237      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16238      # other files
16239      files_present=`$LS $OUTPUT_ROOT`
16240      # Configure has already touched config.log and confdefs.h in the current dir when this check
16241      # is performed.
16242      filtered_files=`$ECHO "$files_present" \
16243          | $SED -e 's/config.log//g' \
16244              -e 's/configure.log//g' \
16245              -e 's/confdefs.h//g' \
16246              -e 's/ //g' \
16247          | $TR -d '\n'`
16248      if test "x$filtered_files" != x; then
16249        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16250$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16251        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16252$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16253        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16254$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16256$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16257        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16258$as_echo "$as_me: seriously mess up just about everything." >&6;}
16259        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16260$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16261        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16262$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16263        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16264      fi
16265    fi
16266  fi
16267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16268$as_echo_n "checking what configuration name to use... " >&6; }
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16270$as_echo "$CONF_NAME" >&6; }
16271
16272
16273  # Only process if variable expands to non-empty
16274
16275  if test "x$OUTPUT_ROOT" != x; then
16276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16277
16278  # Input might be given as Windows format, start by converting to
16279  # unix format.
16280  path="$OUTPUT_ROOT"
16281  new_path=`$CYGPATH -u "$path"`
16282
16283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16286  # "foo.exe" is OK but "foo" is an error.
16287  #
16288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16289  # It is also a way to make sure we got the proper file name for the real test later on.
16290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16291  if test "x$test_shortpath" = x; then
16292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16293$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16294    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16295  fi
16296
16297  # Call helper function which possibly converts this using DOS-style short mode.
16298  # If so, the updated path is stored in $new_path.
16299
16300  input_path="$new_path"
16301  # Check if we need to convert this using DOS-style short mode. If the path
16302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16303  # take no chances and rewrite it.
16304  # Note: m4 eats our [], so we need to use [ and ] instead.
16305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16306  if test "x$has_forbidden_chars" != x; then
16307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16311      # Going to short mode and back again did indeed matter. Since short mode is
16312      # case insensitive, let's make it lowercase to improve readability.
16313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16314      # Now convert it back to Unix-style (cygpath)
16315      input_path=`$CYGPATH -u "$shortmode_path"`
16316      new_path="$input_path"
16317    fi
16318  fi
16319
16320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16321  if test "x$test_cygdrive_prefix" = x; then
16322    # As a simple fix, exclude /usr/bin since it's not a real path.
16323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16325      # a path prefixed by /cygdrive for fixpath to work.
16326      new_path="$CYGWIN_ROOT_PATH$input_path"
16327    fi
16328  fi
16329
16330
16331  if test "x$path" != "x$new_path"; then
16332    OUTPUT_ROOT="$new_path"
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16334$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16335  fi
16336
16337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338
16339  path="$OUTPUT_ROOT"
16340  has_colon=`$ECHO $path | $GREP ^.:`
16341  new_path="$path"
16342  if test "x$has_colon" = x; then
16343    # Not in mixed or Windows style, start by that.
16344    new_path=`cmd //c echo $path`
16345  fi
16346
16347
16348  input_path="$new_path"
16349  # Check if we need to convert this using DOS-style short mode. If the path
16350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16351  # take no chances and rewrite it.
16352  # Note: m4 eats our [], so we need to use [ and ] instead.
16353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16354  if test "x$has_forbidden_chars" != x; then
16355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16357  fi
16358
16359
16360  windows_path="$new_path"
16361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362    unix_path=`$CYGPATH -u "$windows_path"`
16363    new_path="$unix_path"
16364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16366    new_path="$unix_path"
16367  fi
16368
16369  if test "x$path" != "x$new_path"; then
16370    OUTPUT_ROOT="$new_path"
16371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16372$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16373  fi
16374
16375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16377
16378    else
16379      # We're on a unix platform. Hooray! :)
16380      path="$OUTPUT_ROOT"
16381      has_space=`$ECHO "$path" | $GREP " "`
16382      if test "x$has_space" != x; then
16383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16384$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16386      fi
16387
16388      # Use eval to expand a potential ~
16389      eval path="$path"
16390      if test ! -f "$path" && test ! -d "$path"; then
16391        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16392      fi
16393
16394      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16395    fi
16396  fi
16397
16398
16399  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16400  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16401
16402  SPEC=$OUTPUT_ROOT/spec.gmk
16403
16404  CONF_NAME=$CONF_NAME
16405
16406  OUTPUT_ROOT=$OUTPUT_ROOT
16407
16408
16409
16410  # The spec.gmk file contains all variables for the make system.
16411  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16412
16413  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16414  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16415
16416  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16417  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16418
16419  # The compare.sh is used to compare the build output to other builds.
16420  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16421
16422  # The generated Makefile knows where the spec.gmk is and where the source is.
16423  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16424  # which will look for generated configurations
16425  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16426
16427
16428
16429# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16430
16431  for ac_prog in apt-get yum port pkgutil pkgadd
16432do
16433  # Extract the first word of "$ac_prog", so it can be a program name with args.
16434set dummy $ac_prog; ac_word=$2
16435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16436$as_echo_n "checking for $ac_word... " >&6; }
16437if ${ac_cv_prog_PKGHANDLER+:} false; then :
16438  $as_echo_n "(cached) " >&6
16439else
16440  if test -n "$PKGHANDLER"; then
16441  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16442else
16443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16444for as_dir in $PATH
16445do
16446  IFS=$as_save_IFS
16447  test -z "$as_dir" && as_dir=.
16448    for ac_exec_ext in '' $ac_executable_extensions; do
16449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16450    ac_cv_prog_PKGHANDLER="$ac_prog"
16451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16452    break 2
16453  fi
16454done
16455  done
16456IFS=$as_save_IFS
16457
16458fi
16459fi
16460PKGHANDLER=$ac_cv_prog_PKGHANDLER
16461if test -n "$PKGHANDLER"; then
16462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16463$as_echo "$PKGHANDLER" >&6; }
16464else
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16466$as_echo "no" >&6; }
16467fi
16468
16469
16470  test -n "$PKGHANDLER" && break
16471done
16472
16473
16474
16475# Setup tools that requires more complex handling, or that is not needed by the configure script.
16476
16477
16478  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
16479  if test "x$MAKE" != x; then
16480    # User has supplied a make, test it.
16481    if test ! -f "$MAKE"; then
16482      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
16483    fi
16484
16485  MAKE_CANDIDATE=""$MAKE""
16486  DESCRIPTION="user supplied MAKE=$MAKE"
16487
16488  # On Cygwin, we require a newer version of make than on other platforms
16489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16490    MAKE_VERSION_EXPR="-e 4\."
16491    MAKE_REQUIRED_VERSION="4.0"
16492   else
16493    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16494    MAKE_REQUIRED_VERSION="3.81"
16495  fi
16496
16497  if test "x$MAKE_CANDIDATE" != x; then
16498    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16499$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16500    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16501    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16502    if test "x$IS_GNU_MAKE" = x; then
16503      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16504$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16505    else
16506      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16507      if test "x$IS_MODERN_MAKE" = x; then
16508        { $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
16509$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;}
16510      else
16511        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16512          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16513            MAKE_EXPECTED_ENV='cygwin'
16514          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16515            MAKE_EXPECTED_ENV='msys'
16516          else
16517            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16518          fi
16519          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16520          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16521        else
16522          # Not relevant for non-Windows
16523          IS_MAKE_CORRECT_ENV=true
16524        fi
16525        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16526          { $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
16527$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;}
16528        else
16529          FOUND_MAKE=$MAKE_CANDIDATE
16530
16531  # Only process if variable expands to non-empty
16532
16533  if test "x$FOUND_MAKE" != x; then
16534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16535
16536  # First separate the path from the arguments. This will split at the first
16537  # space.
16538  complete="$FOUND_MAKE"
16539  path="${complete%% *}"
16540  tmp="$complete EOL"
16541  arguments="${tmp#* }"
16542
16543  # Input might be given as Windows format, start by converting to
16544  # unix format.
16545  new_path=`$CYGPATH -u "$path"`
16546
16547  # Now try to locate executable using which
16548  new_path=`$WHICH "$new_path" 2> /dev/null`
16549  # bat and cmd files are not always considered executable in cygwin causing which
16550  # to not find them
16551  if test "x$new_path" = x \
16552      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16553      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16554    new_path=`$CYGPATH -u "$path"`
16555  fi
16556  if test "x$new_path" = x; then
16557    # Oops. Which didn't find the executable.
16558    # The splitting of arguments from the executable at a space might have been incorrect,
16559    # since paths with space are more likely in Windows. Give it another try with the whole
16560    # argument.
16561    path="$complete"
16562    arguments="EOL"
16563    new_path=`$CYGPATH -u "$path"`
16564    new_path=`$WHICH "$new_path" 2> /dev/null`
16565    # bat and cmd files are not always considered executable in cygwin causing which
16566    # to not find them
16567    if test "x$new_path" = x \
16568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16570      new_path=`$CYGPATH -u "$path"`
16571    fi
16572    if test "x$new_path" = x; then
16573      # It's still not found. Now this is an unrecoverable error.
16574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16575$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16576      has_space=`$ECHO "$complete" | $GREP " "`
16577      if test "x$has_space" != x; then
16578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16580      fi
16581      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16582    fi
16583  fi
16584
16585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16588  # "foo.exe" is OK but "foo" is an error.
16589  #
16590  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16591  # It is also a way to make sure we got the proper file name for the real test later on.
16592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16593  if test "x$test_shortpath" = x; then
16594    # Short path failed, file does not exist as specified.
16595    # Try adding .exe or .cmd
16596    if test -f "${new_path}.exe"; then
16597      input_to_shortpath="${new_path}.exe"
16598    elif test -f "${new_path}.cmd"; then
16599      input_to_shortpath="${new_path}.cmd"
16600    else
16601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16605      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16606    fi
16607  else
16608    input_to_shortpath="$new_path"
16609  fi
16610
16611  # Call helper function which possibly converts this using DOS-style short mode.
16612  # If so, the updated path is stored in $new_path.
16613  new_path="$input_to_shortpath"
16614
16615  input_path="$input_to_shortpath"
16616  # Check if we need to convert this using DOS-style short mode. If the path
16617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16618  # take no chances and rewrite it.
16619  # Note: m4 eats our [], so we need to use [ and ] instead.
16620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16621  if test "x$has_forbidden_chars" != x; then
16622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16626      # Going to short mode and back again did indeed matter. Since short mode is
16627      # case insensitive, let's make it lowercase to improve readability.
16628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16629      # Now convert it back to Unix-style (cygpath)
16630      input_path=`$CYGPATH -u "$shortmode_path"`
16631      new_path="$input_path"
16632    fi
16633  fi
16634
16635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16636  if test "x$test_cygdrive_prefix" = x; then
16637    # As a simple fix, exclude /usr/bin since it's not a real path.
16638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16640      # a path prefixed by /cygdrive for fixpath to work.
16641      new_path="$CYGWIN_ROOT_PATH$input_path"
16642    fi
16643  fi
16644
16645  # remove trailing .exe if any
16646  new_path="${new_path/%.exe/}"
16647
16648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16649
16650  # First separate the path from the arguments. This will split at the first
16651  # space.
16652  complete="$FOUND_MAKE"
16653  path="${complete%% *}"
16654  tmp="$complete EOL"
16655  arguments="${tmp#* }"
16656
16657  # Input might be given as Windows format, start by converting to
16658  # unix format.
16659  new_path="$path"
16660
16661  windows_path="$new_path"
16662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16663    unix_path=`$CYGPATH -u "$windows_path"`
16664    new_path="$unix_path"
16665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16667    new_path="$unix_path"
16668  fi
16669
16670
16671  # Now try to locate executable using which
16672  new_path=`$WHICH "$new_path" 2> /dev/null`
16673
16674  if test "x$new_path" = x; then
16675    # Oops. Which didn't find the executable.
16676    # The splitting of arguments from the executable at a space might have been incorrect,
16677    # since paths with space are more likely in Windows. Give it another try with the whole
16678    # argument.
16679    path="$complete"
16680    arguments="EOL"
16681    new_path="$path"
16682
16683  windows_path="$new_path"
16684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16685    unix_path=`$CYGPATH -u "$windows_path"`
16686    new_path="$unix_path"
16687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16689    new_path="$unix_path"
16690  fi
16691
16692
16693    new_path=`$WHICH "$new_path" 2> /dev/null`
16694    # bat and cmd files are not always considered executable in MSYS causing which
16695    # to not find them
16696    if test "x$new_path" = x \
16697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16699      new_path="$path"
16700
16701  windows_path="$new_path"
16702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16703    unix_path=`$CYGPATH -u "$windows_path"`
16704    new_path="$unix_path"
16705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16707    new_path="$unix_path"
16708  fi
16709
16710    fi
16711
16712    if test "x$new_path" = x; then
16713      # It's still not found. Now this is an unrecoverable error.
16714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16716      has_space=`$ECHO "$complete" | $GREP " "`
16717      if test "x$has_space" != x; then
16718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16720      fi
16721      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16722    fi
16723  fi
16724
16725  # Now new_path has a complete unix path to the binary
16726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16727    # Keep paths in /bin as-is, but remove trailing .exe if any
16728    new_path="${new_path/%.exe/}"
16729    # Do not save /bin paths to all_fixpath_prefixes!
16730  else
16731    # Not in mixed or Windows style, start by that.
16732    new_path=`cmd //c echo $new_path`
16733
16734  input_path="$new_path"
16735  # Check if we need to convert this using DOS-style short mode. If the path
16736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16737  # take no chances and rewrite it.
16738  # Note: m4 eats our [], so we need to use [ and ] instead.
16739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16740  if test "x$has_forbidden_chars" != x; then
16741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16743  fi
16744
16745    # Output is in $new_path
16746
16747  windows_path="$new_path"
16748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16749    unix_path=`$CYGPATH -u "$windows_path"`
16750    new_path="$unix_path"
16751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16753    new_path="$unix_path"
16754  fi
16755
16756    # remove trailing .exe if any
16757    new_path="${new_path/%.exe/}"
16758
16759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16761  fi
16762
16763    else
16764      # We're on a unix platform. Hooray! :)
16765      # First separate the path from the arguments. This will split at the first
16766      # space.
16767      complete="$FOUND_MAKE"
16768      path="${complete%% *}"
16769      tmp="$complete EOL"
16770      arguments="${tmp#* }"
16771
16772      # Cannot rely on the command "which" here since it doesn't always work.
16773      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16774      if test -z "$is_absolute_path"; then
16775        # Path to executable is not absolute. Find it.
16776        IFS_save="$IFS"
16777        IFS=:
16778        for p in $PATH; do
16779          if test -f "$p/$path" && test -x "$p/$path"; then
16780            new_path="$p/$path"
16781            break
16782          fi
16783        done
16784        IFS="$IFS_save"
16785      else
16786        # This is an absolute path, we can use it without further modifications.
16787        new_path="$path"
16788      fi
16789
16790      if test "x$new_path" = x; then
16791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16793        has_space=`$ECHO "$complete" | $GREP " "`
16794        if test "x$has_space" != x; then
16795          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16796$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16797        fi
16798        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16799      fi
16800    fi
16801
16802    # Now join together the path and the arguments once again
16803    if test "x$arguments" != xEOL; then
16804      new_complete="$new_path ${arguments% *}"
16805    else
16806      new_complete="$new_path"
16807    fi
16808
16809    if test "x$complete" != "x$new_complete"; then
16810      FOUND_MAKE="$new_complete"
16811      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16812$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16813    fi
16814  fi
16815
16816        fi
16817      fi
16818    fi
16819  fi
16820
16821    if test "x$FOUND_MAKE" = x; then
16822      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
16823    fi
16824  else
16825    # Try our hardest to locate a correct version of GNU make
16826    for ac_prog in gmake
16827do
16828  # Extract the first word of "$ac_prog", so it can be a program name with args.
16829set dummy $ac_prog; ac_word=$2
16830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16831$as_echo_n "checking for $ac_word... " >&6; }
16832if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16833  $as_echo_n "(cached) " >&6
16834else
16835  case $CHECK_GMAKE in
16836  [\\/]* | ?:[\\/]*)
16837  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16838  ;;
16839  *)
16840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16841for as_dir in $PATH
16842do
16843  IFS=$as_save_IFS
16844  test -z "$as_dir" && as_dir=.
16845    for ac_exec_ext in '' $ac_executable_extensions; do
16846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16847    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16849    break 2
16850  fi
16851done
16852  done
16853IFS=$as_save_IFS
16854
16855  ;;
16856esac
16857fi
16858CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16859if test -n "$CHECK_GMAKE"; then
16860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16861$as_echo "$CHECK_GMAKE" >&6; }
16862else
16863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16864$as_echo "no" >&6; }
16865fi
16866
16867
16868  test -n "$CHECK_GMAKE" && break
16869done
16870
16871
16872  MAKE_CANDIDATE=""$CHECK_GMAKE""
16873  DESCRIPTION="gmake in PATH"
16874
16875  # On Cygwin, we require a newer version of make than on other platforms
16876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16877    MAKE_VERSION_EXPR="-e 4\."
16878    MAKE_REQUIRED_VERSION="4.0"
16879   else
16880    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16881    MAKE_REQUIRED_VERSION="3.81"
16882  fi
16883
16884  if test "x$MAKE_CANDIDATE" != x; then
16885    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16886$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16887    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16888    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16889    if test "x$IS_GNU_MAKE" = x; then
16890      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16891$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16892    else
16893      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16894      if test "x$IS_MODERN_MAKE" = x; then
16895        { $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
16896$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;}
16897      else
16898        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16899          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16900            MAKE_EXPECTED_ENV='cygwin'
16901          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16902            MAKE_EXPECTED_ENV='msys'
16903          else
16904            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16905          fi
16906          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16907          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16908        else
16909          # Not relevant for non-Windows
16910          IS_MAKE_CORRECT_ENV=true
16911        fi
16912        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16913          { $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
16914$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;}
16915        else
16916          FOUND_MAKE=$MAKE_CANDIDATE
16917
16918  # Only process if variable expands to non-empty
16919
16920  if test "x$FOUND_MAKE" != x; then
16921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16922
16923  # First separate the path from the arguments. This will split at the first
16924  # space.
16925  complete="$FOUND_MAKE"
16926  path="${complete%% *}"
16927  tmp="$complete EOL"
16928  arguments="${tmp#* }"
16929
16930  # Input might be given as Windows format, start by converting to
16931  # unix format.
16932  new_path=`$CYGPATH -u "$path"`
16933
16934  # Now try to locate executable using which
16935  new_path=`$WHICH "$new_path" 2> /dev/null`
16936  # bat and cmd files are not always considered executable in cygwin causing which
16937  # to not find them
16938  if test "x$new_path" = x \
16939      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16940      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16941    new_path=`$CYGPATH -u "$path"`
16942  fi
16943  if test "x$new_path" = x; then
16944    # Oops. Which didn't find the executable.
16945    # The splitting of arguments from the executable at a space might have been incorrect,
16946    # since paths with space are more likely in Windows. Give it another try with the whole
16947    # argument.
16948    path="$complete"
16949    arguments="EOL"
16950    new_path=`$CYGPATH -u "$path"`
16951    new_path=`$WHICH "$new_path" 2> /dev/null`
16952    # bat and cmd files are not always considered executable in cygwin causing which
16953    # to not find them
16954    if test "x$new_path" = x \
16955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16957      new_path=`$CYGPATH -u "$path"`
16958    fi
16959    if test "x$new_path" = x; then
16960      # It's still not found. Now this is an unrecoverable error.
16961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16962$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16963      has_space=`$ECHO "$complete" | $GREP " "`
16964      if test "x$has_space" != x; then
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16967      fi
16968      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16969    fi
16970  fi
16971
16972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16975  # "foo.exe" is OK but "foo" is an error.
16976  #
16977  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16978  # It is also a way to make sure we got the proper file name for the real test later on.
16979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16980  if test "x$test_shortpath" = x; then
16981    # Short path failed, file does not exist as specified.
16982    # Try adding .exe or .cmd
16983    if test -f "${new_path}.exe"; then
16984      input_to_shortpath="${new_path}.exe"
16985    elif test -f "${new_path}.cmd"; then
16986      input_to_shortpath="${new_path}.cmd"
16987    else
16988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16990      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16991$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16992      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16993    fi
16994  else
16995    input_to_shortpath="$new_path"
16996  fi
16997
16998  # Call helper function which possibly converts this using DOS-style short mode.
16999  # If so, the updated path is stored in $new_path.
17000  new_path="$input_to_shortpath"
17001
17002  input_path="$input_to_shortpath"
17003  # Check if we need to convert this using DOS-style short mode. If the path
17004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17005  # take no chances and rewrite it.
17006  # Note: m4 eats our [], so we need to use [ and ] instead.
17007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17008  if test "x$has_forbidden_chars" != x; then
17009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17013      # Going to short mode and back again did indeed matter. Since short mode is
17014      # case insensitive, let's make it lowercase to improve readability.
17015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17016      # Now convert it back to Unix-style (cygpath)
17017      input_path=`$CYGPATH -u "$shortmode_path"`
17018      new_path="$input_path"
17019    fi
17020  fi
17021
17022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17023  if test "x$test_cygdrive_prefix" = x; then
17024    # As a simple fix, exclude /usr/bin since it's not a real path.
17025    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17027      # a path prefixed by /cygdrive for fixpath to work.
17028      new_path="$CYGWIN_ROOT_PATH$input_path"
17029    fi
17030  fi
17031
17032  # remove trailing .exe if any
17033  new_path="${new_path/%.exe/}"
17034
17035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17036
17037  # First separate the path from the arguments. This will split at the first
17038  # space.
17039  complete="$FOUND_MAKE"
17040  path="${complete%% *}"
17041  tmp="$complete EOL"
17042  arguments="${tmp#* }"
17043
17044  # Input might be given as Windows format, start by converting to
17045  # unix format.
17046  new_path="$path"
17047
17048  windows_path="$new_path"
17049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17050    unix_path=`$CYGPATH -u "$windows_path"`
17051    new_path="$unix_path"
17052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17054    new_path="$unix_path"
17055  fi
17056
17057
17058  # Now try to locate executable using which
17059  new_path=`$WHICH "$new_path" 2> /dev/null`
17060
17061  if test "x$new_path" = x; then
17062    # Oops. Which didn't find the executable.
17063    # The splitting of arguments from the executable at a space might have been incorrect,
17064    # since paths with space are more likely in Windows. Give it another try with the whole
17065    # argument.
17066    path="$complete"
17067    arguments="EOL"
17068    new_path="$path"
17069
17070  windows_path="$new_path"
17071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17072    unix_path=`$CYGPATH -u "$windows_path"`
17073    new_path="$unix_path"
17074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17076    new_path="$unix_path"
17077  fi
17078
17079
17080    new_path=`$WHICH "$new_path" 2> /dev/null`
17081    # bat and cmd files are not always considered executable in MSYS causing which
17082    # to not find them
17083    if test "x$new_path" = x \
17084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17086      new_path="$path"
17087
17088  windows_path="$new_path"
17089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17090    unix_path=`$CYGPATH -u "$windows_path"`
17091    new_path="$unix_path"
17092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17094    new_path="$unix_path"
17095  fi
17096
17097    fi
17098
17099    if test "x$new_path" = x; then
17100      # It's still not found. Now this is an unrecoverable error.
17101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17103      has_space=`$ECHO "$complete" | $GREP " "`
17104      if test "x$has_space" != x; then
17105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17107      fi
17108      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17109    fi
17110  fi
17111
17112  # Now new_path has a complete unix path to the binary
17113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17114    # Keep paths in /bin as-is, but remove trailing .exe if any
17115    new_path="${new_path/%.exe/}"
17116    # Do not save /bin paths to all_fixpath_prefixes!
17117  else
17118    # Not in mixed or Windows style, start by that.
17119    new_path=`cmd //c echo $new_path`
17120
17121  input_path="$new_path"
17122  # Check if we need to convert this using DOS-style short mode. If the path
17123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17124  # take no chances and rewrite it.
17125  # Note: m4 eats our [], so we need to use [ and ] instead.
17126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17127  if test "x$has_forbidden_chars" != x; then
17128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17130  fi
17131
17132    # Output is in $new_path
17133
17134  windows_path="$new_path"
17135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17136    unix_path=`$CYGPATH -u "$windows_path"`
17137    new_path="$unix_path"
17138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17140    new_path="$unix_path"
17141  fi
17142
17143    # remove trailing .exe if any
17144    new_path="${new_path/%.exe/}"
17145
17146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17148  fi
17149
17150    else
17151      # We're on a unix platform. Hooray! :)
17152      # First separate the path from the arguments. This will split at the first
17153      # space.
17154      complete="$FOUND_MAKE"
17155      path="${complete%% *}"
17156      tmp="$complete EOL"
17157      arguments="${tmp#* }"
17158
17159      # Cannot rely on the command "which" here since it doesn't always work.
17160      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17161      if test -z "$is_absolute_path"; then
17162        # Path to executable is not absolute. Find it.
17163        IFS_save="$IFS"
17164        IFS=:
17165        for p in $PATH; do
17166          if test -f "$p/$path" && test -x "$p/$path"; then
17167            new_path="$p/$path"
17168            break
17169          fi
17170        done
17171        IFS="$IFS_save"
17172      else
17173        # This is an absolute path, we can use it without further modifications.
17174        new_path="$path"
17175      fi
17176
17177      if test "x$new_path" = x; then
17178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17179$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17180        has_space=`$ECHO "$complete" | $GREP " "`
17181        if test "x$has_space" != x; then
17182          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17183$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17184        fi
17185        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17186      fi
17187    fi
17188
17189    # Now join together the path and the arguments once again
17190    if test "x$arguments" != xEOL; then
17191      new_complete="$new_path ${arguments% *}"
17192    else
17193      new_complete="$new_path"
17194    fi
17195
17196    if test "x$complete" != "x$new_complete"; then
17197      FOUND_MAKE="$new_complete"
17198      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17199$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17200    fi
17201  fi
17202
17203        fi
17204      fi
17205    fi
17206  fi
17207
17208
17209    if test "x$FOUND_MAKE" = x; then
17210      for ac_prog in make
17211do
17212  # Extract the first word of "$ac_prog", so it can be a program name with args.
17213set dummy $ac_prog; ac_word=$2
17214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17215$as_echo_n "checking for $ac_word... " >&6; }
17216if ${ac_cv_path_CHECK_MAKE+:} false; then :
17217  $as_echo_n "(cached) " >&6
17218else
17219  case $CHECK_MAKE in
17220  [\\/]* | ?:[\\/]*)
17221  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17222  ;;
17223  *)
17224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17225for as_dir in $PATH
17226do
17227  IFS=$as_save_IFS
17228  test -z "$as_dir" && as_dir=.
17229    for ac_exec_ext in '' $ac_executable_extensions; do
17230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17231    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17233    break 2
17234  fi
17235done
17236  done
17237IFS=$as_save_IFS
17238
17239  ;;
17240esac
17241fi
17242CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17243if test -n "$CHECK_MAKE"; then
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17245$as_echo "$CHECK_MAKE" >&6; }
17246else
17247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17248$as_echo "no" >&6; }
17249fi
17250
17251
17252  test -n "$CHECK_MAKE" && break
17253done
17254
17255
17256  MAKE_CANDIDATE=""$CHECK_MAKE""
17257  DESCRIPTION="make in PATH"
17258
17259  # On Cygwin, we require a newer version of make than on other platforms
17260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17261    MAKE_VERSION_EXPR="-e 4\."
17262    MAKE_REQUIRED_VERSION="4.0"
17263   else
17264    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17265    MAKE_REQUIRED_VERSION="3.81"
17266  fi
17267
17268  if test "x$MAKE_CANDIDATE" != x; then
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17270$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17271    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17272    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17273    if test "x$IS_GNU_MAKE" = x; then
17274      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17275$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17276    else
17277      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17278      if test "x$IS_MODERN_MAKE" = x; then
17279        { $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
17280$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;}
17281      else
17282        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17283          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17284            MAKE_EXPECTED_ENV='cygwin'
17285          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17286            MAKE_EXPECTED_ENV='msys'
17287          else
17288            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17289          fi
17290          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17291          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17292        else
17293          # Not relevant for non-Windows
17294          IS_MAKE_CORRECT_ENV=true
17295        fi
17296        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17297          { $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
17298$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;}
17299        else
17300          FOUND_MAKE=$MAKE_CANDIDATE
17301
17302  # Only process if variable expands to non-empty
17303
17304  if test "x$FOUND_MAKE" != x; then
17305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17306
17307  # First separate the path from the arguments. This will split at the first
17308  # space.
17309  complete="$FOUND_MAKE"
17310  path="${complete%% *}"
17311  tmp="$complete EOL"
17312  arguments="${tmp#* }"
17313
17314  # Input might be given as Windows format, start by converting to
17315  # unix format.
17316  new_path=`$CYGPATH -u "$path"`
17317
17318  # Now try to locate executable using which
17319  new_path=`$WHICH "$new_path" 2> /dev/null`
17320  # bat and cmd files are not always considered executable in cygwin causing which
17321  # to not find them
17322  if test "x$new_path" = x \
17323      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17324      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17325    new_path=`$CYGPATH -u "$path"`
17326  fi
17327  if test "x$new_path" = x; then
17328    # Oops. Which didn't find the executable.
17329    # The splitting of arguments from the executable at a space might have been incorrect,
17330    # since paths with space are more likely in Windows. Give it another try with the whole
17331    # argument.
17332    path="$complete"
17333    arguments="EOL"
17334    new_path=`$CYGPATH -u "$path"`
17335    new_path=`$WHICH "$new_path" 2> /dev/null`
17336    # bat and cmd files are not always considered executable in cygwin causing which
17337    # to not find them
17338    if test "x$new_path" = x \
17339        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17340        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17341      new_path=`$CYGPATH -u "$path"`
17342    fi
17343    if test "x$new_path" = x; then
17344      # It's still not found. Now this is an unrecoverable error.
17345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17346$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17347      has_space=`$ECHO "$complete" | $GREP " "`
17348      if test "x$has_space" != x; then
17349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17351      fi
17352      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17353    fi
17354  fi
17355
17356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17359  # "foo.exe" is OK but "foo" is an error.
17360  #
17361  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17362  # It is also a way to make sure we got the proper file name for the real test later on.
17363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17364  if test "x$test_shortpath" = x; then
17365    # Short path failed, file does not exist as specified.
17366    # Try adding .exe or .cmd
17367    if test -f "${new_path}.exe"; then
17368      input_to_shortpath="${new_path}.exe"
17369    elif test -f "${new_path}.cmd"; then
17370      input_to_shortpath="${new_path}.cmd"
17371    else
17372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17373$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17374      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17375$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17376      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17377    fi
17378  else
17379    input_to_shortpath="$new_path"
17380  fi
17381
17382  # Call helper function which possibly converts this using DOS-style short mode.
17383  # If so, the updated path is stored in $new_path.
17384  new_path="$input_to_shortpath"
17385
17386  input_path="$input_to_shortpath"
17387  # Check if we need to convert this using DOS-style short mode. If the path
17388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17389  # take no chances and rewrite it.
17390  # Note: m4 eats our [], so we need to use [ and ] instead.
17391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17392  if test "x$has_forbidden_chars" != x; then
17393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17397      # Going to short mode and back again did indeed matter. Since short mode is
17398      # case insensitive, let's make it lowercase to improve readability.
17399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17400      # Now convert it back to Unix-style (cygpath)
17401      input_path=`$CYGPATH -u "$shortmode_path"`
17402      new_path="$input_path"
17403    fi
17404  fi
17405
17406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17407  if test "x$test_cygdrive_prefix" = x; then
17408    # As a simple fix, exclude /usr/bin since it's not a real path.
17409    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17411      # a path prefixed by /cygdrive for fixpath to work.
17412      new_path="$CYGWIN_ROOT_PATH$input_path"
17413    fi
17414  fi
17415
17416  # remove trailing .exe if any
17417  new_path="${new_path/%.exe/}"
17418
17419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17420
17421  # First separate the path from the arguments. This will split at the first
17422  # space.
17423  complete="$FOUND_MAKE"
17424  path="${complete%% *}"
17425  tmp="$complete EOL"
17426  arguments="${tmp#* }"
17427
17428  # Input might be given as Windows format, start by converting to
17429  # unix format.
17430  new_path="$path"
17431
17432  windows_path="$new_path"
17433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17434    unix_path=`$CYGPATH -u "$windows_path"`
17435    new_path="$unix_path"
17436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17438    new_path="$unix_path"
17439  fi
17440
17441
17442  # Now try to locate executable using which
17443  new_path=`$WHICH "$new_path" 2> /dev/null`
17444
17445  if test "x$new_path" = x; then
17446    # Oops. Which didn't find the executable.
17447    # The splitting of arguments from the executable at a space might have been incorrect,
17448    # since paths with space are more likely in Windows. Give it another try with the whole
17449    # argument.
17450    path="$complete"
17451    arguments="EOL"
17452    new_path="$path"
17453
17454  windows_path="$new_path"
17455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17456    unix_path=`$CYGPATH -u "$windows_path"`
17457    new_path="$unix_path"
17458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17460    new_path="$unix_path"
17461  fi
17462
17463
17464    new_path=`$WHICH "$new_path" 2> /dev/null`
17465    # bat and cmd files are not always considered executable in MSYS causing which
17466    # to not find them
17467    if test "x$new_path" = x \
17468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17470      new_path="$path"
17471
17472  windows_path="$new_path"
17473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17474    unix_path=`$CYGPATH -u "$windows_path"`
17475    new_path="$unix_path"
17476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17478    new_path="$unix_path"
17479  fi
17480
17481    fi
17482
17483    if test "x$new_path" = x; then
17484      # It's still not found. Now this is an unrecoverable error.
17485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17486$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17487      has_space=`$ECHO "$complete" | $GREP " "`
17488      if test "x$has_space" != x; then
17489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17491      fi
17492      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17493    fi
17494  fi
17495
17496  # Now new_path has a complete unix path to the binary
17497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17498    # Keep paths in /bin as-is, but remove trailing .exe if any
17499    new_path="${new_path/%.exe/}"
17500    # Do not save /bin paths to all_fixpath_prefixes!
17501  else
17502    # Not in mixed or Windows style, start by that.
17503    new_path=`cmd //c echo $new_path`
17504
17505  input_path="$new_path"
17506  # Check if we need to convert this using DOS-style short mode. If the path
17507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17508  # take no chances and rewrite it.
17509  # Note: m4 eats our [], so we need to use [ and ] instead.
17510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17511  if test "x$has_forbidden_chars" != x; then
17512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17514  fi
17515
17516    # Output is in $new_path
17517
17518  windows_path="$new_path"
17519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17520    unix_path=`$CYGPATH -u "$windows_path"`
17521    new_path="$unix_path"
17522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17524    new_path="$unix_path"
17525  fi
17526
17527    # remove trailing .exe if any
17528    new_path="${new_path/%.exe/}"
17529
17530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17532  fi
17533
17534    else
17535      # We're on a unix platform. Hooray! :)
17536      # First separate the path from the arguments. This will split at the first
17537      # space.
17538      complete="$FOUND_MAKE"
17539      path="${complete%% *}"
17540      tmp="$complete EOL"
17541      arguments="${tmp#* }"
17542
17543      # Cannot rely on the command "which" here since it doesn't always work.
17544      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17545      if test -z "$is_absolute_path"; then
17546        # Path to executable is not absolute. Find it.
17547        IFS_save="$IFS"
17548        IFS=:
17549        for p in $PATH; do
17550          if test -f "$p/$path" && test -x "$p/$path"; then
17551            new_path="$p/$path"
17552            break
17553          fi
17554        done
17555        IFS="$IFS_save"
17556      else
17557        # This is an absolute path, we can use it without further modifications.
17558        new_path="$path"
17559      fi
17560
17561      if test "x$new_path" = x; then
17562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17563$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17564        has_space=`$ECHO "$complete" | $GREP " "`
17565        if test "x$has_space" != x; then
17566          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17567$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17568        fi
17569        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17570      fi
17571    fi
17572
17573    # Now join together the path and the arguments once again
17574    if test "x$arguments" != xEOL; then
17575      new_complete="$new_path ${arguments% *}"
17576    else
17577      new_complete="$new_path"
17578    fi
17579
17580    if test "x$complete" != "x$new_complete"; then
17581      FOUND_MAKE="$new_complete"
17582      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17583$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17584    fi
17585  fi
17586
17587        fi
17588      fi
17589    fi
17590  fi
17591
17592    fi
17593
17594    if test "x$FOUND_MAKE" = x; then
17595      if test "x$TOOLCHAIN_PATH" != x; then
17596        # We have a toolchain path, check that as well before giving up.
17597        OLD_PATH=$PATH
17598        PATH=$TOOLCHAIN_PATH:$PATH
17599        for ac_prog in gmake
17600do
17601  # Extract the first word of "$ac_prog", so it can be a program name with args.
17602set dummy $ac_prog; ac_word=$2
17603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17604$as_echo_n "checking for $ac_word... " >&6; }
17605if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17606  $as_echo_n "(cached) " >&6
17607else
17608  case $CHECK_TOOLSDIR_GMAKE in
17609  [\\/]* | ?:[\\/]*)
17610  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17611  ;;
17612  *)
17613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17614for as_dir in $PATH
17615do
17616  IFS=$as_save_IFS
17617  test -z "$as_dir" && as_dir=.
17618    for ac_exec_ext in '' $ac_executable_extensions; do
17619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17620    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17622    break 2
17623  fi
17624done
17625  done
17626IFS=$as_save_IFS
17627
17628  ;;
17629esac
17630fi
17631CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17632if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17634$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17635else
17636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17637$as_echo "no" >&6; }
17638fi
17639
17640
17641  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17642done
17643
17644
17645  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17646  DESCRIPTION="gmake in tools-dir"
17647
17648  # On Cygwin, we require a newer version of make than on other platforms
17649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17650    MAKE_VERSION_EXPR="-e 4\."
17651    MAKE_REQUIRED_VERSION="4.0"
17652   else
17653    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17654    MAKE_REQUIRED_VERSION="3.81"
17655  fi
17656
17657  if test "x$MAKE_CANDIDATE" != x; then
17658    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17659$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17660    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17661    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17662    if test "x$IS_GNU_MAKE" = x; then
17663      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17664$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17665    else
17666      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17667      if test "x$IS_MODERN_MAKE" = x; then
17668        { $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
17669$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;}
17670      else
17671        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17672          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17673            MAKE_EXPECTED_ENV='cygwin'
17674          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17675            MAKE_EXPECTED_ENV='msys'
17676          else
17677            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17678          fi
17679          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17680          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17681        else
17682          # Not relevant for non-Windows
17683          IS_MAKE_CORRECT_ENV=true
17684        fi
17685        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17686          { $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
17687$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;}
17688        else
17689          FOUND_MAKE=$MAKE_CANDIDATE
17690
17691  # Only process if variable expands to non-empty
17692
17693  if test "x$FOUND_MAKE" != x; then
17694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17695
17696  # First separate the path from the arguments. This will split at the first
17697  # space.
17698  complete="$FOUND_MAKE"
17699  path="${complete%% *}"
17700  tmp="$complete EOL"
17701  arguments="${tmp#* }"
17702
17703  # Input might be given as Windows format, start by converting to
17704  # unix format.
17705  new_path=`$CYGPATH -u "$path"`
17706
17707  # Now try to locate executable using which
17708  new_path=`$WHICH "$new_path" 2> /dev/null`
17709  # bat and cmd files are not always considered executable in cygwin causing which
17710  # to not find them
17711  if test "x$new_path" = x \
17712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17714    new_path=`$CYGPATH -u "$path"`
17715  fi
17716  if test "x$new_path" = x; then
17717    # Oops. Which didn't find the executable.
17718    # The splitting of arguments from the executable at a space might have been incorrect,
17719    # since paths with space are more likely in Windows. Give it another try with the whole
17720    # argument.
17721    path="$complete"
17722    arguments="EOL"
17723    new_path=`$CYGPATH -u "$path"`
17724    new_path=`$WHICH "$new_path" 2> /dev/null`
17725    # bat and cmd files are not always considered executable in cygwin causing which
17726    # to not find them
17727    if test "x$new_path" = x \
17728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17730      new_path=`$CYGPATH -u "$path"`
17731    fi
17732    if test "x$new_path" = x; then
17733      # It's still not found. Now this is an unrecoverable error.
17734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17735$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17736      has_space=`$ECHO "$complete" | $GREP " "`
17737      if test "x$has_space" != x; then
17738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17740      fi
17741      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17742    fi
17743  fi
17744
17745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17748  # "foo.exe" is OK but "foo" is an error.
17749  #
17750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17751  # It is also a way to make sure we got the proper file name for the real test later on.
17752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17753  if test "x$test_shortpath" = x; then
17754    # Short path failed, file does not exist as specified.
17755    # Try adding .exe or .cmd
17756    if test -f "${new_path}.exe"; then
17757      input_to_shortpath="${new_path}.exe"
17758    elif test -f "${new_path}.cmd"; then
17759      input_to_shortpath="${new_path}.cmd"
17760    else
17761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17765      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17766    fi
17767  else
17768    input_to_shortpath="$new_path"
17769  fi
17770
17771  # Call helper function which possibly converts this using DOS-style short mode.
17772  # If so, the updated path is stored in $new_path.
17773  new_path="$input_to_shortpath"
17774
17775  input_path="$input_to_shortpath"
17776  # Check if we need to convert this using DOS-style short mode. If the path
17777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17778  # take no chances and rewrite it.
17779  # Note: m4 eats our [], so we need to use [ and ] instead.
17780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17781  if test "x$has_forbidden_chars" != x; then
17782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17786      # Going to short mode and back again did indeed matter. Since short mode is
17787      # case insensitive, let's make it lowercase to improve readability.
17788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17789      # Now convert it back to Unix-style (cygpath)
17790      input_path=`$CYGPATH -u "$shortmode_path"`
17791      new_path="$input_path"
17792    fi
17793  fi
17794
17795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17796  if test "x$test_cygdrive_prefix" = x; then
17797    # As a simple fix, exclude /usr/bin since it's not a real path.
17798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17800      # a path prefixed by /cygdrive for fixpath to work.
17801      new_path="$CYGWIN_ROOT_PATH$input_path"
17802    fi
17803  fi
17804
17805  # remove trailing .exe if any
17806  new_path="${new_path/%.exe/}"
17807
17808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17809
17810  # First separate the path from the arguments. This will split at the first
17811  # space.
17812  complete="$FOUND_MAKE"
17813  path="${complete%% *}"
17814  tmp="$complete EOL"
17815  arguments="${tmp#* }"
17816
17817  # Input might be given as Windows format, start by converting to
17818  # unix format.
17819  new_path="$path"
17820
17821  windows_path="$new_path"
17822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823    unix_path=`$CYGPATH -u "$windows_path"`
17824    new_path="$unix_path"
17825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17827    new_path="$unix_path"
17828  fi
17829
17830
17831  # Now try to locate executable using which
17832  new_path=`$WHICH "$new_path" 2> /dev/null`
17833
17834  if test "x$new_path" = x; then
17835    # Oops. Which didn't find the executable.
17836    # The splitting of arguments from the executable at a space might have been incorrect,
17837    # since paths with space are more likely in Windows. Give it another try with the whole
17838    # argument.
17839    path="$complete"
17840    arguments="EOL"
17841    new_path="$path"
17842
17843  windows_path="$new_path"
17844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17845    unix_path=`$CYGPATH -u "$windows_path"`
17846    new_path="$unix_path"
17847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17849    new_path="$unix_path"
17850  fi
17851
17852
17853    new_path=`$WHICH "$new_path" 2> /dev/null`
17854    # bat and cmd files are not always considered executable in MSYS causing which
17855    # to not find them
17856    if test "x$new_path" = x \
17857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17859      new_path="$path"
17860
17861  windows_path="$new_path"
17862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17863    unix_path=`$CYGPATH -u "$windows_path"`
17864    new_path="$unix_path"
17865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17867    new_path="$unix_path"
17868  fi
17869
17870    fi
17871
17872    if test "x$new_path" = x; then
17873      # It's still not found. Now this is an unrecoverable error.
17874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17875$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17876      has_space=`$ECHO "$complete" | $GREP " "`
17877      if test "x$has_space" != x; then
17878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17880      fi
17881      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17882    fi
17883  fi
17884
17885  # Now new_path has a complete unix path to the binary
17886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17887    # Keep paths in /bin as-is, but remove trailing .exe if any
17888    new_path="${new_path/%.exe/}"
17889    # Do not save /bin paths to all_fixpath_prefixes!
17890  else
17891    # Not in mixed or Windows style, start by that.
17892    new_path=`cmd //c echo $new_path`
17893
17894  input_path="$new_path"
17895  # Check if we need to convert this using DOS-style short mode. If the path
17896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17897  # take no chances and rewrite it.
17898  # Note: m4 eats our [], so we need to use [ and ] instead.
17899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17900  if test "x$has_forbidden_chars" != x; then
17901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17903  fi
17904
17905    # Output is in $new_path
17906
17907  windows_path="$new_path"
17908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17909    unix_path=`$CYGPATH -u "$windows_path"`
17910    new_path="$unix_path"
17911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17913    new_path="$unix_path"
17914  fi
17915
17916    # remove trailing .exe if any
17917    new_path="${new_path/%.exe/}"
17918
17919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17921  fi
17922
17923    else
17924      # We're on a unix platform. Hooray! :)
17925      # First separate the path from the arguments. This will split at the first
17926      # space.
17927      complete="$FOUND_MAKE"
17928      path="${complete%% *}"
17929      tmp="$complete EOL"
17930      arguments="${tmp#* }"
17931
17932      # Cannot rely on the command "which" here since it doesn't always work.
17933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17934      if test -z "$is_absolute_path"; then
17935        # Path to executable is not absolute. Find it.
17936        IFS_save="$IFS"
17937        IFS=:
17938        for p in $PATH; do
17939          if test -f "$p/$path" && test -x "$p/$path"; then
17940            new_path="$p/$path"
17941            break
17942          fi
17943        done
17944        IFS="$IFS_save"
17945      else
17946        # This is an absolute path, we can use it without further modifications.
17947        new_path="$path"
17948      fi
17949
17950      if test "x$new_path" = x; then
17951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17953        has_space=`$ECHO "$complete" | $GREP " "`
17954        if test "x$has_space" != x; then
17955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17957        fi
17958        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17959      fi
17960    fi
17961
17962    # Now join together the path and the arguments once again
17963    if test "x$arguments" != xEOL; then
17964      new_complete="$new_path ${arguments% *}"
17965    else
17966      new_complete="$new_path"
17967    fi
17968
17969    if test "x$complete" != "x$new_complete"; then
17970      FOUND_MAKE="$new_complete"
17971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17972$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17973    fi
17974  fi
17975
17976        fi
17977      fi
17978    fi
17979  fi
17980
17981        if test "x$FOUND_MAKE" = x; then
17982          for ac_prog in make
17983do
17984  # Extract the first word of "$ac_prog", so it can be a program name with args.
17985set dummy $ac_prog; ac_word=$2
17986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17987$as_echo_n "checking for $ac_word... " >&6; }
17988if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17989  $as_echo_n "(cached) " >&6
17990else
17991  case $CHECK_TOOLSDIR_MAKE in
17992  [\\/]* | ?:[\\/]*)
17993  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17994  ;;
17995  *)
17996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17997for as_dir in $PATH
17998do
17999  IFS=$as_save_IFS
18000  test -z "$as_dir" && as_dir=.
18001    for ac_exec_ext in '' $ac_executable_extensions; do
18002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18003    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18005    break 2
18006  fi
18007done
18008  done
18009IFS=$as_save_IFS
18010
18011  ;;
18012esac
18013fi
18014CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18015if test -n "$CHECK_TOOLSDIR_MAKE"; then
18016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18017$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18018else
18019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18020$as_echo "no" >&6; }
18021fi
18022
18023
18024  test -n "$CHECK_TOOLSDIR_MAKE" && break
18025done
18026
18027
18028  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18029  DESCRIPTION="make in tools-dir"
18030
18031  # On Cygwin, we require a newer version of make than on other platforms
18032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18033    MAKE_VERSION_EXPR="-e 4\."
18034    MAKE_REQUIRED_VERSION="4.0"
18035   else
18036    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18037    MAKE_REQUIRED_VERSION="3.81"
18038  fi
18039
18040  if test "x$MAKE_CANDIDATE" != x; then
18041    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18042$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18043    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18044    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18045    if test "x$IS_GNU_MAKE" = x; then
18046      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18047$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18048    else
18049      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18050      if test "x$IS_MODERN_MAKE" = x; then
18051        { $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
18052$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;}
18053      else
18054        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18055          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18056            MAKE_EXPECTED_ENV='cygwin'
18057          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18058            MAKE_EXPECTED_ENV='msys'
18059          else
18060            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18061          fi
18062          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18063          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18064        else
18065          # Not relevant for non-Windows
18066          IS_MAKE_CORRECT_ENV=true
18067        fi
18068        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18069          { $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
18070$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;}
18071        else
18072          FOUND_MAKE=$MAKE_CANDIDATE
18073
18074  # Only process if variable expands to non-empty
18075
18076  if test "x$FOUND_MAKE" != x; then
18077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18078
18079  # First separate the path from the arguments. This will split at the first
18080  # space.
18081  complete="$FOUND_MAKE"
18082  path="${complete%% *}"
18083  tmp="$complete EOL"
18084  arguments="${tmp#* }"
18085
18086  # Input might be given as Windows format, start by converting to
18087  # unix format.
18088  new_path=`$CYGPATH -u "$path"`
18089
18090  # Now try to locate executable using which
18091  new_path=`$WHICH "$new_path" 2> /dev/null`
18092  # bat and cmd files are not always considered executable in cygwin causing which
18093  # to not find them
18094  if test "x$new_path" = x \
18095      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18096      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18097    new_path=`$CYGPATH -u "$path"`
18098  fi
18099  if test "x$new_path" = x; then
18100    # Oops. Which didn't find the executable.
18101    # The splitting of arguments from the executable at a space might have been incorrect,
18102    # since paths with space are more likely in Windows. Give it another try with the whole
18103    # argument.
18104    path="$complete"
18105    arguments="EOL"
18106    new_path=`$CYGPATH -u "$path"`
18107    new_path=`$WHICH "$new_path" 2> /dev/null`
18108    # bat and cmd files are not always considered executable in cygwin causing which
18109    # to not find them
18110    if test "x$new_path" = x \
18111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18113      new_path=`$CYGPATH -u "$path"`
18114    fi
18115    if test "x$new_path" = x; then
18116      # It's still not found. Now this is an unrecoverable error.
18117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18118$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18119      has_space=`$ECHO "$complete" | $GREP " "`
18120      if test "x$has_space" != x; then
18121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18123      fi
18124      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18125    fi
18126  fi
18127
18128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18131  # "foo.exe" is OK but "foo" is an error.
18132  #
18133  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18134  # It is also a way to make sure we got the proper file name for the real test later on.
18135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18136  if test "x$test_shortpath" = x; then
18137    # Short path failed, file does not exist as specified.
18138    # Try adding .exe or .cmd
18139    if test -f "${new_path}.exe"; then
18140      input_to_shortpath="${new_path}.exe"
18141    elif test -f "${new_path}.cmd"; then
18142      input_to_shortpath="${new_path}.cmd"
18143    else
18144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18145$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18146      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18147$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18148      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18149    fi
18150  else
18151    input_to_shortpath="$new_path"
18152  fi
18153
18154  # Call helper function which possibly converts this using DOS-style short mode.
18155  # If so, the updated path is stored in $new_path.
18156  new_path="$input_to_shortpath"
18157
18158  input_path="$input_to_shortpath"
18159  # Check if we need to convert this using DOS-style short mode. If the path
18160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18161  # take no chances and rewrite it.
18162  # Note: m4 eats our [], so we need to use [ and ] instead.
18163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18164  if test "x$has_forbidden_chars" != x; then
18165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18169      # Going to short mode and back again did indeed matter. Since short mode is
18170      # case insensitive, let's make it lowercase to improve readability.
18171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18172      # Now convert it back to Unix-style (cygpath)
18173      input_path=`$CYGPATH -u "$shortmode_path"`
18174      new_path="$input_path"
18175    fi
18176  fi
18177
18178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18179  if test "x$test_cygdrive_prefix" = x; then
18180    # As a simple fix, exclude /usr/bin since it's not a real path.
18181    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18183      # a path prefixed by /cygdrive for fixpath to work.
18184      new_path="$CYGWIN_ROOT_PATH$input_path"
18185    fi
18186  fi
18187
18188  # remove trailing .exe if any
18189  new_path="${new_path/%.exe/}"
18190
18191    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18192
18193  # First separate the path from the arguments. This will split at the first
18194  # space.
18195  complete="$FOUND_MAKE"
18196  path="${complete%% *}"
18197  tmp="$complete EOL"
18198  arguments="${tmp#* }"
18199
18200  # Input might be given as Windows format, start by converting to
18201  # unix format.
18202  new_path="$path"
18203
18204  windows_path="$new_path"
18205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18206    unix_path=`$CYGPATH -u "$windows_path"`
18207    new_path="$unix_path"
18208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18210    new_path="$unix_path"
18211  fi
18212
18213
18214  # Now try to locate executable using which
18215  new_path=`$WHICH "$new_path" 2> /dev/null`
18216
18217  if test "x$new_path" = x; then
18218    # Oops. Which didn't find the executable.
18219    # The splitting of arguments from the executable at a space might have been incorrect,
18220    # since paths with space are more likely in Windows. Give it another try with the whole
18221    # argument.
18222    path="$complete"
18223    arguments="EOL"
18224    new_path="$path"
18225
18226  windows_path="$new_path"
18227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18228    unix_path=`$CYGPATH -u "$windows_path"`
18229    new_path="$unix_path"
18230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18232    new_path="$unix_path"
18233  fi
18234
18235
18236    new_path=`$WHICH "$new_path" 2> /dev/null`
18237    # bat and cmd files are not always considered executable in MSYS causing which
18238    # to not find them
18239    if test "x$new_path" = x \
18240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18242      new_path="$path"
18243
18244  windows_path="$new_path"
18245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18246    unix_path=`$CYGPATH -u "$windows_path"`
18247    new_path="$unix_path"
18248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18250    new_path="$unix_path"
18251  fi
18252
18253    fi
18254
18255    if test "x$new_path" = x; then
18256      # It's still not found. Now this is an unrecoverable error.
18257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18259      has_space=`$ECHO "$complete" | $GREP " "`
18260      if test "x$has_space" != x; then
18261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18263      fi
18264      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18265    fi
18266  fi
18267
18268  # Now new_path has a complete unix path to the binary
18269  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18270    # Keep paths in /bin as-is, but remove trailing .exe if any
18271    new_path="${new_path/%.exe/}"
18272    # Do not save /bin paths to all_fixpath_prefixes!
18273  else
18274    # Not in mixed or Windows style, start by that.
18275    new_path=`cmd //c echo $new_path`
18276
18277  input_path="$new_path"
18278  # Check if we need to convert this using DOS-style short mode. If the path
18279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18280  # take no chances and rewrite it.
18281  # Note: m4 eats our [], so we need to use [ and ] instead.
18282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18283  if test "x$has_forbidden_chars" != x; then
18284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18286  fi
18287
18288    # Output is in $new_path
18289
18290  windows_path="$new_path"
18291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18292    unix_path=`$CYGPATH -u "$windows_path"`
18293    new_path="$unix_path"
18294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18296    new_path="$unix_path"
18297  fi
18298
18299    # remove trailing .exe if any
18300    new_path="${new_path/%.exe/}"
18301
18302    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18303    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18304  fi
18305
18306    else
18307      # We're on a unix platform. Hooray! :)
18308      # First separate the path from the arguments. This will split at the first
18309      # space.
18310      complete="$FOUND_MAKE"
18311      path="${complete%% *}"
18312      tmp="$complete EOL"
18313      arguments="${tmp#* }"
18314
18315      # Cannot rely on the command "which" here since it doesn't always work.
18316      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18317      if test -z "$is_absolute_path"; then
18318        # Path to executable is not absolute. Find it.
18319        IFS_save="$IFS"
18320        IFS=:
18321        for p in $PATH; do
18322          if test -f "$p/$path" && test -x "$p/$path"; then
18323            new_path="$p/$path"
18324            break
18325          fi
18326        done
18327        IFS="$IFS_save"
18328      else
18329        # This is an absolute path, we can use it without further modifications.
18330        new_path="$path"
18331      fi
18332
18333      if test "x$new_path" = x; then
18334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18335$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18336        has_space=`$ECHO "$complete" | $GREP " "`
18337        if test "x$has_space" != x; then
18338          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18339$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18340        fi
18341        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18342      fi
18343    fi
18344
18345    # Now join together the path and the arguments once again
18346    if test "x$arguments" != xEOL; then
18347      new_complete="$new_path ${arguments% *}"
18348    else
18349      new_complete="$new_path"
18350    fi
18351
18352    if test "x$complete" != "x$new_complete"; then
18353      FOUND_MAKE="$new_complete"
18354      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18355$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18356    fi
18357  fi
18358
18359        fi
18360      fi
18361    fi
18362  fi
18363
18364        fi
18365        PATH=$OLD_PATH
18366      fi
18367    fi
18368
18369    if test "x$FOUND_MAKE" = x; then
18370      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
18371    fi
18372  fi
18373
18374  MAKE=$FOUND_MAKE
18375
18376  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
18377$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
18378
18379
18380  # Check if make supports the output sync option and if so, setup using it.
18381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
18382$as_echo_n "checking if make --output-sync is supported... " >&6; }
18383  if $MAKE --version -O > /dev/null 2>&1; then
18384    OUTPUT_SYNC_SUPPORTED=true
18385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18386$as_echo "yes" >&6; }
18387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
18388$as_echo_n "checking for output-sync value... " >&6; }
18389
18390# Check whether --with-output-sync was given.
18391if test "${with_output_sync+set}" = set; then :
18392  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
18393fi
18394
18395    if test "x$OUTPUT_SYNC" = "x"; then
18396      OUTPUT_SYNC=none
18397    fi
18398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
18399$as_echo "$OUTPUT_SYNC" >&6; }
18400    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
18401      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
18402    fi
18403  else
18404    OUTPUT_SYNC_SUPPORTED=false
18405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18406$as_echo "no" >&6; }
18407  fi
18408
18409
18410
18411
18412
18413
18414  # Test if find supports -delete
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
18416$as_echo_n "checking if find supports -delete... " >&6; }
18417  FIND_DELETE="-delete"
18418
18419  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
18420
18421  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
18422
18423  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
18424  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
18425    # No, it does not.
18426    rm $DELETEDIR/TestIfFindSupportsDelete
18427    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
18428      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
18429      FIND_DELETE="-print | xargs rm"
18430    else
18431      FIND_DELETE="-exec rm \{\} \+"
18432    fi
18433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18434$as_echo "no" >&6; }
18435  else
18436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18437$as_echo "yes" >&6; }
18438  fi
18439  rmdir $DELETEDIR
18440
18441
18442
18443  # These tools might not be installed by default,
18444  # need hint on how to install them.
18445
18446
18447
18448  # Publish this variable in the help.
18449
18450
18451  if [ -z "${UNZIP+x}" ]; then
18452    # The variable is not set by user, try to locate tool using the code snippet
18453    for ac_prog in unzip
18454do
18455  # Extract the first word of "$ac_prog", so it can be a program name with args.
18456set dummy $ac_prog; ac_word=$2
18457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18458$as_echo_n "checking for $ac_word... " >&6; }
18459if ${ac_cv_path_UNZIP+:} false; then :
18460  $as_echo_n "(cached) " >&6
18461else
18462  case $UNZIP in
18463  [\\/]* | ?:[\\/]*)
18464  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18465  ;;
18466  *)
18467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18468for as_dir in $PATH
18469do
18470  IFS=$as_save_IFS
18471  test -z "$as_dir" && as_dir=.
18472    for ac_exec_ext in '' $ac_executable_extensions; do
18473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18474    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18476    break 2
18477  fi
18478done
18479  done
18480IFS=$as_save_IFS
18481
18482  ;;
18483esac
18484fi
18485UNZIP=$ac_cv_path_UNZIP
18486if test -n "$UNZIP"; then
18487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18488$as_echo "$UNZIP" >&6; }
18489else
18490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18491$as_echo "no" >&6; }
18492fi
18493
18494
18495  test -n "$UNZIP" && break
18496done
18497
18498  else
18499    # The variable is set, but is it from the command line or the environment?
18500
18501    # Try to remove the string !UNZIP! from our list.
18502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
18503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18504      # If it failed, the variable was not from the command line. Ignore it,
18505      # but warn the user (except for BASH, which is always set by the calling BASH).
18506      if test "xUNZIP" != xBASH; then
18507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
18508$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
18509      fi
18510      # Try to locate tool using the code snippet
18511      for ac_prog in unzip
18512do
18513  # Extract the first word of "$ac_prog", so it can be a program name with args.
18514set dummy $ac_prog; ac_word=$2
18515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516$as_echo_n "checking for $ac_word... " >&6; }
18517if ${ac_cv_path_UNZIP+:} false; then :
18518  $as_echo_n "(cached) " >&6
18519else
18520  case $UNZIP in
18521  [\\/]* | ?:[\\/]*)
18522  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18523  ;;
18524  *)
18525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526for as_dir in $PATH
18527do
18528  IFS=$as_save_IFS
18529  test -z "$as_dir" && as_dir=.
18530    for ac_exec_ext in '' $ac_executable_extensions; do
18531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534    break 2
18535  fi
18536done
18537  done
18538IFS=$as_save_IFS
18539
18540  ;;
18541esac
18542fi
18543UNZIP=$ac_cv_path_UNZIP
18544if test -n "$UNZIP"; then
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18546$as_echo "$UNZIP" >&6; }
18547else
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549$as_echo "no" >&6; }
18550fi
18551
18552
18553  test -n "$UNZIP" && break
18554done
18555
18556    else
18557      # If it succeeded, then it was overridden by the user. We will use it
18558      # for the tool.
18559
18560      # First remove it from the list of overridden variables, so we can test
18561      # for unknown variables in the end.
18562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18563
18564      # Check if we try to supply an empty value
18565      if test "x$UNZIP" = x; then
18566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
18567$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
18568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18569$as_echo_n "checking for UNZIP... " >&6; }
18570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18571$as_echo "disabled" >&6; }
18572      else
18573        # Check if the provided tool contains a complete path.
18574        tool_specified="$UNZIP"
18575        tool_basename="${tool_specified##*/}"
18576        if test "x$tool_basename" = "x$tool_specified"; then
18577          # A command without a complete path is provided, search $PATH.
18578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
18579$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
18580          # Extract the first word of "$tool_basename", so it can be a program name with args.
18581set dummy $tool_basename; ac_word=$2
18582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18583$as_echo_n "checking for $ac_word... " >&6; }
18584if ${ac_cv_path_UNZIP+:} false; then :
18585  $as_echo_n "(cached) " >&6
18586else
18587  case $UNZIP in
18588  [\\/]* | ?:[\\/]*)
18589  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
18590  ;;
18591  *)
18592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18593for as_dir in $PATH
18594do
18595  IFS=$as_save_IFS
18596  test -z "$as_dir" && as_dir=.
18597    for ac_exec_ext in '' $ac_executable_extensions; do
18598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18599    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
18600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18601    break 2
18602  fi
18603done
18604  done
18605IFS=$as_save_IFS
18606
18607  ;;
18608esac
18609fi
18610UNZIP=$ac_cv_path_UNZIP
18611if test -n "$UNZIP"; then
18612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
18613$as_echo "$UNZIP" >&6; }
18614else
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18616$as_echo "no" >&6; }
18617fi
18618
18619
18620          if test "x$UNZIP" = x; then
18621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18622          fi
18623        else
18624          # Otherwise we believe it is a complete path. Use it as it is.
18625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
18626$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
18627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
18628$as_echo_n "checking for UNZIP... " >&6; }
18629          if test ! -x "$tool_specified"; then
18630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18631$as_echo "not found" >&6; }
18632            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18633          fi
18634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18635$as_echo "$tool_specified" >&6; }
18636        fi
18637      fi
18638    fi
18639  fi
18640
18641
18642
18643  if test "x$UNZIP" = x; then
18644    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
18645  fi
18646
18647
18648
18649
18650
18651  # Publish this variable in the help.
18652
18653
18654  if [ -z "${ZIP+x}" ]; then
18655    # The variable is not set by user, try to locate tool using the code snippet
18656    for ac_prog in zip
18657do
18658  # Extract the first word of "$ac_prog", so it can be a program name with args.
18659set dummy $ac_prog; ac_word=$2
18660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18661$as_echo_n "checking for $ac_word... " >&6; }
18662if ${ac_cv_path_ZIP+:} false; then :
18663  $as_echo_n "(cached) " >&6
18664else
18665  case $ZIP in
18666  [\\/]* | ?:[\\/]*)
18667  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18668  ;;
18669  *)
18670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18671for as_dir in $PATH
18672do
18673  IFS=$as_save_IFS
18674  test -z "$as_dir" && as_dir=.
18675    for ac_exec_ext in '' $ac_executable_extensions; do
18676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18677    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18679    break 2
18680  fi
18681done
18682  done
18683IFS=$as_save_IFS
18684
18685  ;;
18686esac
18687fi
18688ZIP=$ac_cv_path_ZIP
18689if test -n "$ZIP"; then
18690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18691$as_echo "$ZIP" >&6; }
18692else
18693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18694$as_echo "no" >&6; }
18695fi
18696
18697
18698  test -n "$ZIP" && break
18699done
18700
18701  else
18702    # The variable is set, but is it from the command line or the environment?
18703
18704    # Try to remove the string !ZIP! from our list.
18705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
18706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18707      # If it failed, the variable was not from the command line. Ignore it,
18708      # but warn the user (except for BASH, which is always set by the calling BASH).
18709      if test "xZIP" != xBASH; then
18710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
18711$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
18712      fi
18713      # Try to locate tool using the code snippet
18714      for ac_prog in zip
18715do
18716  # Extract the first word of "$ac_prog", so it can be a program name with args.
18717set dummy $ac_prog; ac_word=$2
18718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18719$as_echo_n "checking for $ac_word... " >&6; }
18720if ${ac_cv_path_ZIP+:} false; then :
18721  $as_echo_n "(cached) " >&6
18722else
18723  case $ZIP in
18724  [\\/]* | ?:[\\/]*)
18725  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18726  ;;
18727  *)
18728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18729for as_dir in $PATH
18730do
18731  IFS=$as_save_IFS
18732  test -z "$as_dir" && as_dir=.
18733    for ac_exec_ext in '' $ac_executable_extensions; do
18734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18735    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18737    break 2
18738  fi
18739done
18740  done
18741IFS=$as_save_IFS
18742
18743  ;;
18744esac
18745fi
18746ZIP=$ac_cv_path_ZIP
18747if test -n "$ZIP"; then
18748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18749$as_echo "$ZIP" >&6; }
18750else
18751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18752$as_echo "no" >&6; }
18753fi
18754
18755
18756  test -n "$ZIP" && break
18757done
18758
18759    else
18760      # If it succeeded, then it was overridden by the user. We will use it
18761      # for the tool.
18762
18763      # First remove it from the list of overridden variables, so we can test
18764      # for unknown variables in the end.
18765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18766
18767      # Check if we try to supply an empty value
18768      if test "x$ZIP" = x; then
18769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
18770$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
18771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18772$as_echo_n "checking for ZIP... " >&6; }
18773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18774$as_echo "disabled" >&6; }
18775      else
18776        # Check if the provided tool contains a complete path.
18777        tool_specified="$ZIP"
18778        tool_basename="${tool_specified##*/}"
18779        if test "x$tool_basename" = "x$tool_specified"; then
18780          # A command without a complete path is provided, search $PATH.
18781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
18782$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
18783          # Extract the first word of "$tool_basename", so it can be a program name with args.
18784set dummy $tool_basename; ac_word=$2
18785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18786$as_echo_n "checking for $ac_word... " >&6; }
18787if ${ac_cv_path_ZIP+:} false; then :
18788  $as_echo_n "(cached) " >&6
18789else
18790  case $ZIP in
18791  [\\/]* | ?:[\\/]*)
18792  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
18793  ;;
18794  *)
18795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18796for as_dir in $PATH
18797do
18798  IFS=$as_save_IFS
18799  test -z "$as_dir" && as_dir=.
18800    for ac_exec_ext in '' $ac_executable_extensions; do
18801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18802    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
18803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18804    break 2
18805  fi
18806done
18807  done
18808IFS=$as_save_IFS
18809
18810  ;;
18811esac
18812fi
18813ZIP=$ac_cv_path_ZIP
18814if test -n "$ZIP"; then
18815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
18816$as_echo "$ZIP" >&6; }
18817else
18818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18819$as_echo "no" >&6; }
18820fi
18821
18822
18823          if test "x$ZIP" = x; then
18824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18825          fi
18826        else
18827          # Otherwise we believe it is a complete path. Use it as it is.
18828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
18829$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
18830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
18831$as_echo_n "checking for ZIP... " >&6; }
18832          if test ! -x "$tool_specified"; then
18833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18834$as_echo "not found" >&6; }
18835            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
18836          fi
18837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18838$as_echo "$tool_specified" >&6; }
18839        fi
18840      fi
18841    fi
18842  fi
18843
18844
18845
18846  if test "x$ZIP" = x; then
18847    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18848  fi
18849
18850
18851
18852  # Non-required basic tools
18853
18854
18855
18856  # Publish this variable in the help.
18857
18858
18859  if [ -z "${LDD+x}" ]; then
18860    # The variable is not set by user, try to locate tool using the code snippet
18861    for ac_prog in ldd
18862do
18863  # Extract the first word of "$ac_prog", so it can be a program name with args.
18864set dummy $ac_prog; ac_word=$2
18865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18866$as_echo_n "checking for $ac_word... " >&6; }
18867if ${ac_cv_path_LDD+:} false; then :
18868  $as_echo_n "(cached) " >&6
18869else
18870  case $LDD in
18871  [\\/]* | ?:[\\/]*)
18872  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18873  ;;
18874  *)
18875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18876for as_dir in $PATH
18877do
18878  IFS=$as_save_IFS
18879  test -z "$as_dir" && as_dir=.
18880    for ac_exec_ext in '' $ac_executable_extensions; do
18881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18882    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18884    break 2
18885  fi
18886done
18887  done
18888IFS=$as_save_IFS
18889
18890  ;;
18891esac
18892fi
18893LDD=$ac_cv_path_LDD
18894if test -n "$LDD"; then
18895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18896$as_echo "$LDD" >&6; }
18897else
18898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18899$as_echo "no" >&6; }
18900fi
18901
18902
18903  test -n "$LDD" && break
18904done
18905
18906  else
18907    # The variable is set, but is it from the command line or the environment?
18908
18909    # Try to remove the string !LDD! from our list.
18910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18912      # If it failed, the variable was not from the command line. Ignore it,
18913      # but warn the user (except for BASH, which is always set by the calling BASH).
18914      if test "xLDD" != xBASH; then
18915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18916$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18917      fi
18918      # Try to locate tool using the code snippet
18919      for ac_prog in ldd
18920do
18921  # Extract the first word of "$ac_prog", so it can be a program name with args.
18922set dummy $ac_prog; ac_word=$2
18923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18924$as_echo_n "checking for $ac_word... " >&6; }
18925if ${ac_cv_path_LDD+:} false; then :
18926  $as_echo_n "(cached) " >&6
18927else
18928  case $LDD in
18929  [\\/]* | ?:[\\/]*)
18930  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18931  ;;
18932  *)
18933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18934for as_dir in $PATH
18935do
18936  IFS=$as_save_IFS
18937  test -z "$as_dir" && as_dir=.
18938    for ac_exec_ext in '' $ac_executable_extensions; do
18939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18940    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18942    break 2
18943  fi
18944done
18945  done
18946IFS=$as_save_IFS
18947
18948  ;;
18949esac
18950fi
18951LDD=$ac_cv_path_LDD
18952if test -n "$LDD"; then
18953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18954$as_echo "$LDD" >&6; }
18955else
18956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18957$as_echo "no" >&6; }
18958fi
18959
18960
18961  test -n "$LDD" && break
18962done
18963
18964    else
18965      # If it succeeded, then it was overridden by the user. We will use it
18966      # for the tool.
18967
18968      # First remove it from the list of overridden variables, so we can test
18969      # for unknown variables in the end.
18970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18971
18972      # Check if we try to supply an empty value
18973      if test "x$LDD" = x; then
18974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
18975$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
18976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18977$as_echo_n "checking for LDD... " >&6; }
18978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
18979$as_echo "disabled" >&6; }
18980      else
18981        # Check if the provided tool contains a complete path.
18982        tool_specified="$LDD"
18983        tool_basename="${tool_specified##*/}"
18984        if test "x$tool_basename" = "x$tool_specified"; then
18985          # A command without a complete path is provided, search $PATH.
18986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18987$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18988          # Extract the first word of "$tool_basename", so it can be a program name with args.
18989set dummy $tool_basename; ac_word=$2
18990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18991$as_echo_n "checking for $ac_word... " >&6; }
18992if ${ac_cv_path_LDD+:} false; then :
18993  $as_echo_n "(cached) " >&6
18994else
18995  case $LDD in
18996  [\\/]* | ?:[\\/]*)
18997  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18998  ;;
18999  *)
19000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19001for as_dir in $PATH
19002do
19003  IFS=$as_save_IFS
19004  test -z "$as_dir" && as_dir=.
19005    for ac_exec_ext in '' $ac_executable_extensions; do
19006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19007    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
19008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19009    break 2
19010  fi
19011done
19012  done
19013IFS=$as_save_IFS
19014
19015  ;;
19016esac
19017fi
19018LDD=$ac_cv_path_LDD
19019if test -n "$LDD"; then
19020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
19021$as_echo "$LDD" >&6; }
19022else
19023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19024$as_echo "no" >&6; }
19025fi
19026
19027
19028          if test "x$LDD" = x; then
19029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19030          fi
19031        else
19032          # Otherwise we believe it is a complete path. Use it as it is.
19033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
19034$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
19035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
19036$as_echo_n "checking for LDD... " >&6; }
19037          if test ! -x "$tool_specified"; then
19038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19039$as_echo "not found" >&6; }
19040            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
19041          fi
19042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19043$as_echo "$tool_specified" >&6; }
19044        fi
19045      fi
19046    fi
19047  fi
19048
19049
19050  if test "x$LDD" = "x"; then
19051    # List shared lib dependencies is used for
19052    # debug output and checking for forbidden dependencies.
19053    # We can build without it.
19054    LDD="true"
19055  fi
19056
19057
19058  # Publish this variable in the help.
19059
19060
19061  if [ -z "${OTOOL+x}" ]; then
19062    # The variable is not set by user, try to locate tool using the code snippet
19063    for ac_prog in otool
19064do
19065  # Extract the first word of "$ac_prog", so it can be a program name with args.
19066set dummy $ac_prog; ac_word=$2
19067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19068$as_echo_n "checking for $ac_word... " >&6; }
19069if ${ac_cv_path_OTOOL+:} false; then :
19070  $as_echo_n "(cached) " >&6
19071else
19072  case $OTOOL in
19073  [\\/]* | ?:[\\/]*)
19074  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19075  ;;
19076  *)
19077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19078for as_dir in $PATH
19079do
19080  IFS=$as_save_IFS
19081  test -z "$as_dir" && as_dir=.
19082    for ac_exec_ext in '' $ac_executable_extensions; do
19083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19084    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19086    break 2
19087  fi
19088done
19089  done
19090IFS=$as_save_IFS
19091
19092  ;;
19093esac
19094fi
19095OTOOL=$ac_cv_path_OTOOL
19096if test -n "$OTOOL"; then
19097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19098$as_echo "$OTOOL" >&6; }
19099else
19100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19101$as_echo "no" >&6; }
19102fi
19103
19104
19105  test -n "$OTOOL" && break
19106done
19107
19108  else
19109    # The variable is set, but is it from the command line or the environment?
19110
19111    # Try to remove the string !OTOOL! from our list.
19112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
19113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19114      # If it failed, the variable was not from the command line. Ignore it,
19115      # but warn the user (except for BASH, which is always set by the calling BASH).
19116      if test "xOTOOL" != xBASH; then
19117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
19118$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
19119      fi
19120      # Try to locate tool using the code snippet
19121      for ac_prog in otool
19122do
19123  # Extract the first word of "$ac_prog", so it can be a program name with args.
19124set dummy $ac_prog; ac_word=$2
19125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19126$as_echo_n "checking for $ac_word... " >&6; }
19127if ${ac_cv_path_OTOOL+:} false; then :
19128  $as_echo_n "(cached) " >&6
19129else
19130  case $OTOOL in
19131  [\\/]* | ?:[\\/]*)
19132  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19133  ;;
19134  *)
19135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19136for as_dir in $PATH
19137do
19138  IFS=$as_save_IFS
19139  test -z "$as_dir" && as_dir=.
19140    for ac_exec_ext in '' $ac_executable_extensions; do
19141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19142    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19144    break 2
19145  fi
19146done
19147  done
19148IFS=$as_save_IFS
19149
19150  ;;
19151esac
19152fi
19153OTOOL=$ac_cv_path_OTOOL
19154if test -n "$OTOOL"; then
19155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19156$as_echo "$OTOOL" >&6; }
19157else
19158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19159$as_echo "no" >&6; }
19160fi
19161
19162
19163  test -n "$OTOOL" && break
19164done
19165
19166    else
19167      # If it succeeded, then it was overridden by the user. We will use it
19168      # for the tool.
19169
19170      # First remove it from the list of overridden variables, so we can test
19171      # for unknown variables in the end.
19172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19173
19174      # Check if we try to supply an empty value
19175      if test "x$OTOOL" = x; then
19176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
19177$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
19178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
19179$as_echo_n "checking for OTOOL... " >&6; }
19180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19181$as_echo "disabled" >&6; }
19182      else
19183        # Check if the provided tool contains a complete path.
19184        tool_specified="$OTOOL"
19185        tool_basename="${tool_specified##*/}"
19186        if test "x$tool_basename" = "x$tool_specified"; then
19187          # A command without a complete path is provided, search $PATH.
19188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
19189$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
19190          # Extract the first word of "$tool_basename", so it can be a program name with args.
19191set dummy $tool_basename; ac_word=$2
19192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19193$as_echo_n "checking for $ac_word... " >&6; }
19194if ${ac_cv_path_OTOOL+:} false; then :
19195  $as_echo_n "(cached) " >&6
19196else
19197  case $OTOOL in
19198  [\\/]* | ?:[\\/]*)
19199  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
19200  ;;
19201  *)
19202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19203for as_dir in $PATH
19204do
19205  IFS=$as_save_IFS
19206  test -z "$as_dir" && as_dir=.
19207    for ac_exec_ext in '' $ac_executable_extensions; do
19208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19209    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
19210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19211    break 2
19212  fi
19213done
19214  done
19215IFS=$as_save_IFS
19216
19217  ;;
19218esac
19219fi
19220OTOOL=$ac_cv_path_OTOOL
19221if test -n "$OTOOL"; then
19222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
19223$as_echo "$OTOOL" >&6; }
19224else
19225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19226$as_echo "no" >&6; }
19227fi
19228
19229
19230          if test "x$OTOOL" = x; then
19231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19232          fi
19233        else
19234          # Otherwise we believe it is a complete path. Use it as it is.
19235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
19236$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
19237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
19238$as_echo_n "checking for OTOOL... " >&6; }
19239          if test ! -x "$tool_specified"; then
19240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19241$as_echo "not found" >&6; }
19242            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
19243          fi
19244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19245$as_echo "$tool_specified" >&6; }
19246        fi
19247      fi
19248    fi
19249  fi
19250
19251
19252  if test "x$OTOOL" = "x"; then
19253    OTOOL="true"
19254  fi
19255
19256
19257  # Publish this variable in the help.
19258
19259
19260  if [ -z "${READELF+x}" ]; then
19261    # The variable is not set by user, try to locate tool using the code snippet
19262    for ac_prog in greadelf readelf
19263do
19264  # Extract the first word of "$ac_prog", so it can be a program name with args.
19265set dummy $ac_prog; ac_word=$2
19266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19267$as_echo_n "checking for $ac_word... " >&6; }
19268if ${ac_cv_path_READELF+:} false; then :
19269  $as_echo_n "(cached) " >&6
19270else
19271  case $READELF in
19272  [\\/]* | ?:[\\/]*)
19273  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19274  ;;
19275  *)
19276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19277for as_dir in $PATH
19278do
19279  IFS=$as_save_IFS
19280  test -z "$as_dir" && as_dir=.
19281    for ac_exec_ext in '' $ac_executable_extensions; do
19282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19283    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19285    break 2
19286  fi
19287done
19288  done
19289IFS=$as_save_IFS
19290
19291  ;;
19292esac
19293fi
19294READELF=$ac_cv_path_READELF
19295if test -n "$READELF"; then
19296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19297$as_echo "$READELF" >&6; }
19298else
19299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19300$as_echo "no" >&6; }
19301fi
19302
19303
19304  test -n "$READELF" && break
19305done
19306
19307  else
19308    # The variable is set, but is it from the command line or the environment?
19309
19310    # Try to remove the string !READELF! from our list.
19311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
19312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19313      # If it failed, the variable was not from the command line. Ignore it,
19314      # but warn the user (except for BASH, which is always set by the calling BASH).
19315      if test "xREADELF" != xBASH; then
19316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
19317$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
19318      fi
19319      # Try to locate tool using the code snippet
19320      for ac_prog in greadelf readelf
19321do
19322  # Extract the first word of "$ac_prog", so it can be a program name with args.
19323set dummy $ac_prog; ac_word=$2
19324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19325$as_echo_n "checking for $ac_word... " >&6; }
19326if ${ac_cv_path_READELF+:} false; then :
19327  $as_echo_n "(cached) " >&6
19328else
19329  case $READELF in
19330  [\\/]* | ?:[\\/]*)
19331  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19332  ;;
19333  *)
19334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19335for as_dir in $PATH
19336do
19337  IFS=$as_save_IFS
19338  test -z "$as_dir" && as_dir=.
19339    for ac_exec_ext in '' $ac_executable_extensions; do
19340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19341    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19343    break 2
19344  fi
19345done
19346  done
19347IFS=$as_save_IFS
19348
19349  ;;
19350esac
19351fi
19352READELF=$ac_cv_path_READELF
19353if test -n "$READELF"; then
19354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19355$as_echo "$READELF" >&6; }
19356else
19357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19358$as_echo "no" >&6; }
19359fi
19360
19361
19362  test -n "$READELF" && break
19363done
19364
19365    else
19366      # If it succeeded, then it was overridden by the user. We will use it
19367      # for the tool.
19368
19369      # First remove it from the list of overridden variables, so we can test
19370      # for unknown variables in the end.
19371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19372
19373      # Check if we try to supply an empty value
19374      if test "x$READELF" = x; then
19375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
19376$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
19377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19378$as_echo_n "checking for READELF... " >&6; }
19379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19380$as_echo "disabled" >&6; }
19381      else
19382        # Check if the provided tool contains a complete path.
19383        tool_specified="$READELF"
19384        tool_basename="${tool_specified##*/}"
19385        if test "x$tool_basename" = "x$tool_specified"; then
19386          # A command without a complete path is provided, search $PATH.
19387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
19388$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
19389          # Extract the first word of "$tool_basename", so it can be a program name with args.
19390set dummy $tool_basename; ac_word=$2
19391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19392$as_echo_n "checking for $ac_word... " >&6; }
19393if ${ac_cv_path_READELF+:} false; then :
19394  $as_echo_n "(cached) " >&6
19395else
19396  case $READELF in
19397  [\\/]* | ?:[\\/]*)
19398  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
19399  ;;
19400  *)
19401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19402for as_dir in $PATH
19403do
19404  IFS=$as_save_IFS
19405  test -z "$as_dir" && as_dir=.
19406    for ac_exec_ext in '' $ac_executable_extensions; do
19407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19408    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
19409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19410    break 2
19411  fi
19412done
19413  done
19414IFS=$as_save_IFS
19415
19416  ;;
19417esac
19418fi
19419READELF=$ac_cv_path_READELF
19420if test -n "$READELF"; then
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
19422$as_echo "$READELF" >&6; }
19423else
19424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19425$as_echo "no" >&6; }
19426fi
19427
19428
19429          if test "x$READELF" = x; then
19430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19431          fi
19432        else
19433          # Otherwise we believe it is a complete path. Use it as it is.
19434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
19435$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
19436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
19437$as_echo_n "checking for READELF... " >&6; }
19438          if test ! -x "$tool_specified"; then
19439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19440$as_echo "not found" >&6; }
19441            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
19442          fi
19443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19444$as_echo "$tool_specified" >&6; }
19445        fi
19446      fi
19447    fi
19448  fi
19449
19450
19451
19452
19453  # Publish this variable in the help.
19454
19455
19456  if [ -z "${HG+x}" ]; then
19457    # The variable is not set by user, try to locate tool using the code snippet
19458    for ac_prog in hg
19459do
19460  # Extract the first word of "$ac_prog", so it can be a program name with args.
19461set dummy $ac_prog; ac_word=$2
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19463$as_echo_n "checking for $ac_word... " >&6; }
19464if ${ac_cv_path_HG+:} false; then :
19465  $as_echo_n "(cached) " >&6
19466else
19467  case $HG in
19468  [\\/]* | ?:[\\/]*)
19469  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19470  ;;
19471  *)
19472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19473for as_dir in $PATH
19474do
19475  IFS=$as_save_IFS
19476  test -z "$as_dir" && as_dir=.
19477    for ac_exec_ext in '' $ac_executable_extensions; do
19478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19479    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19481    break 2
19482  fi
19483done
19484  done
19485IFS=$as_save_IFS
19486
19487  ;;
19488esac
19489fi
19490HG=$ac_cv_path_HG
19491if test -n "$HG"; then
19492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19493$as_echo "$HG" >&6; }
19494else
19495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19496$as_echo "no" >&6; }
19497fi
19498
19499
19500  test -n "$HG" && break
19501done
19502
19503  else
19504    # The variable is set, but is it from the command line or the environment?
19505
19506    # Try to remove the string !HG! from our list.
19507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
19508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19509      # If it failed, the variable was not from the command line. Ignore it,
19510      # but warn the user (except for BASH, which is always set by the calling BASH).
19511      if test "xHG" != xBASH; then
19512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
19513$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
19514      fi
19515      # Try to locate tool using the code snippet
19516      for ac_prog in hg
19517do
19518  # Extract the first word of "$ac_prog", so it can be a program name with args.
19519set dummy $ac_prog; ac_word=$2
19520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19521$as_echo_n "checking for $ac_word... " >&6; }
19522if ${ac_cv_path_HG+:} false; then :
19523  $as_echo_n "(cached) " >&6
19524else
19525  case $HG in
19526  [\\/]* | ?:[\\/]*)
19527  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19528  ;;
19529  *)
19530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19531for as_dir in $PATH
19532do
19533  IFS=$as_save_IFS
19534  test -z "$as_dir" && as_dir=.
19535    for ac_exec_ext in '' $ac_executable_extensions; do
19536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19537    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19539    break 2
19540  fi
19541done
19542  done
19543IFS=$as_save_IFS
19544
19545  ;;
19546esac
19547fi
19548HG=$ac_cv_path_HG
19549if test -n "$HG"; then
19550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19551$as_echo "$HG" >&6; }
19552else
19553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19554$as_echo "no" >&6; }
19555fi
19556
19557
19558  test -n "$HG" && break
19559done
19560
19561    else
19562      # If it succeeded, then it was overridden by the user. We will use it
19563      # for the tool.
19564
19565      # First remove it from the list of overridden variables, so we can test
19566      # for unknown variables in the end.
19567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19568
19569      # Check if we try to supply an empty value
19570      if test "x$HG" = x; then
19571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
19572$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
19573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19574$as_echo_n "checking for HG... " >&6; }
19575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19576$as_echo "disabled" >&6; }
19577      else
19578        # Check if the provided tool contains a complete path.
19579        tool_specified="$HG"
19580        tool_basename="${tool_specified##*/}"
19581        if test "x$tool_basename" = "x$tool_specified"; then
19582          # A command without a complete path is provided, search $PATH.
19583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
19584$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
19585          # Extract the first word of "$tool_basename", so it can be a program name with args.
19586set dummy $tool_basename; ac_word=$2
19587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19588$as_echo_n "checking for $ac_word... " >&6; }
19589if ${ac_cv_path_HG+:} false; then :
19590  $as_echo_n "(cached) " >&6
19591else
19592  case $HG in
19593  [\\/]* | ?:[\\/]*)
19594  ac_cv_path_HG="$HG" # Let the user override the test with a path.
19595  ;;
19596  *)
19597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19598for as_dir in $PATH
19599do
19600  IFS=$as_save_IFS
19601  test -z "$as_dir" && as_dir=.
19602    for ac_exec_ext in '' $ac_executable_extensions; do
19603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19604    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
19605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19606    break 2
19607  fi
19608done
19609  done
19610IFS=$as_save_IFS
19611
19612  ;;
19613esac
19614fi
19615HG=$ac_cv_path_HG
19616if test -n "$HG"; then
19617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
19618$as_echo "$HG" >&6; }
19619else
19620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19621$as_echo "no" >&6; }
19622fi
19623
19624
19625          if test "x$HG" = x; then
19626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19627          fi
19628        else
19629          # Otherwise we believe it is a complete path. Use it as it is.
19630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
19631$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
19632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
19633$as_echo_n "checking for HG... " >&6; }
19634          if test ! -x "$tool_specified"; then
19635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19636$as_echo "not found" >&6; }
19637            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
19638          fi
19639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19640$as_echo "$tool_specified" >&6; }
19641        fi
19642      fi
19643    fi
19644  fi
19645
19646
19647
19648
19649  # Publish this variable in the help.
19650
19651
19652  if [ -z "${STAT+x}" ]; then
19653    # The variable is not set by user, try to locate tool using the code snippet
19654    for ac_prog in stat
19655do
19656  # Extract the first word of "$ac_prog", so it can be a program name with args.
19657set dummy $ac_prog; ac_word=$2
19658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19659$as_echo_n "checking for $ac_word... " >&6; }
19660if ${ac_cv_path_STAT+:} false; then :
19661  $as_echo_n "(cached) " >&6
19662else
19663  case $STAT in
19664  [\\/]* | ?:[\\/]*)
19665  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19666  ;;
19667  *)
19668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19669for as_dir in $PATH
19670do
19671  IFS=$as_save_IFS
19672  test -z "$as_dir" && as_dir=.
19673    for ac_exec_ext in '' $ac_executable_extensions; do
19674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19675    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19677    break 2
19678  fi
19679done
19680  done
19681IFS=$as_save_IFS
19682
19683  ;;
19684esac
19685fi
19686STAT=$ac_cv_path_STAT
19687if test -n "$STAT"; then
19688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19689$as_echo "$STAT" >&6; }
19690else
19691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19692$as_echo "no" >&6; }
19693fi
19694
19695
19696  test -n "$STAT" && break
19697done
19698
19699  else
19700    # The variable is set, but is it from the command line or the environment?
19701
19702    # Try to remove the string !STAT! from our list.
19703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
19704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19705      # If it failed, the variable was not from the command line. Ignore it,
19706      # but warn the user (except for BASH, which is always set by the calling BASH).
19707      if test "xSTAT" != xBASH; then
19708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
19709$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
19710      fi
19711      # Try to locate tool using the code snippet
19712      for ac_prog in stat
19713do
19714  # Extract the first word of "$ac_prog", so it can be a program name with args.
19715set dummy $ac_prog; ac_word=$2
19716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19717$as_echo_n "checking for $ac_word... " >&6; }
19718if ${ac_cv_path_STAT+:} false; then :
19719  $as_echo_n "(cached) " >&6
19720else
19721  case $STAT in
19722  [\\/]* | ?:[\\/]*)
19723  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19724  ;;
19725  *)
19726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19727for as_dir in $PATH
19728do
19729  IFS=$as_save_IFS
19730  test -z "$as_dir" && as_dir=.
19731    for ac_exec_ext in '' $ac_executable_extensions; do
19732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19733    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19735    break 2
19736  fi
19737done
19738  done
19739IFS=$as_save_IFS
19740
19741  ;;
19742esac
19743fi
19744STAT=$ac_cv_path_STAT
19745if test -n "$STAT"; then
19746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19747$as_echo "$STAT" >&6; }
19748else
19749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19750$as_echo "no" >&6; }
19751fi
19752
19753
19754  test -n "$STAT" && break
19755done
19756
19757    else
19758      # If it succeeded, then it was overridden by the user. We will use it
19759      # for the tool.
19760
19761      # First remove it from the list of overridden variables, so we can test
19762      # for unknown variables in the end.
19763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19764
19765      # Check if we try to supply an empty value
19766      if test "x$STAT" = x; then
19767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
19768$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
19769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19770$as_echo_n "checking for STAT... " >&6; }
19771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19772$as_echo "disabled" >&6; }
19773      else
19774        # Check if the provided tool contains a complete path.
19775        tool_specified="$STAT"
19776        tool_basename="${tool_specified##*/}"
19777        if test "x$tool_basename" = "x$tool_specified"; then
19778          # A command without a complete path is provided, search $PATH.
19779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
19780$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
19781          # Extract the first word of "$tool_basename", so it can be a program name with args.
19782set dummy $tool_basename; ac_word=$2
19783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19784$as_echo_n "checking for $ac_word... " >&6; }
19785if ${ac_cv_path_STAT+:} false; then :
19786  $as_echo_n "(cached) " >&6
19787else
19788  case $STAT in
19789  [\\/]* | ?:[\\/]*)
19790  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
19791  ;;
19792  *)
19793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19794for as_dir in $PATH
19795do
19796  IFS=$as_save_IFS
19797  test -z "$as_dir" && as_dir=.
19798    for ac_exec_ext in '' $ac_executable_extensions; do
19799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19800    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
19801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19802    break 2
19803  fi
19804done
19805  done
19806IFS=$as_save_IFS
19807
19808  ;;
19809esac
19810fi
19811STAT=$ac_cv_path_STAT
19812if test -n "$STAT"; then
19813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
19814$as_echo "$STAT" >&6; }
19815else
19816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19817$as_echo "no" >&6; }
19818fi
19819
19820
19821          if test "x$STAT" = x; then
19822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19823          fi
19824        else
19825          # Otherwise we believe it is a complete path. Use it as it is.
19826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
19827$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
19828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
19829$as_echo_n "checking for STAT... " >&6; }
19830          if test ! -x "$tool_specified"; then
19831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19832$as_echo "not found" >&6; }
19833            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
19834          fi
19835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19836$as_echo "$tool_specified" >&6; }
19837        fi
19838      fi
19839    fi
19840  fi
19841
19842
19843
19844
19845  # Publish this variable in the help.
19846
19847
19848  if [ -z "${TIME+x}" ]; then
19849    # The variable is not set by user, try to locate tool using the code snippet
19850    for ac_prog in time
19851do
19852  # Extract the first word of "$ac_prog", so it can be a program name with args.
19853set dummy $ac_prog; ac_word=$2
19854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19855$as_echo_n "checking for $ac_word... " >&6; }
19856if ${ac_cv_path_TIME+:} false; then :
19857  $as_echo_n "(cached) " >&6
19858else
19859  case $TIME in
19860  [\\/]* | ?:[\\/]*)
19861  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19862  ;;
19863  *)
19864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19865for as_dir in $PATH
19866do
19867  IFS=$as_save_IFS
19868  test -z "$as_dir" && as_dir=.
19869    for ac_exec_ext in '' $ac_executable_extensions; do
19870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19871    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19873    break 2
19874  fi
19875done
19876  done
19877IFS=$as_save_IFS
19878
19879  ;;
19880esac
19881fi
19882TIME=$ac_cv_path_TIME
19883if test -n "$TIME"; then
19884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19885$as_echo "$TIME" >&6; }
19886else
19887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19888$as_echo "no" >&6; }
19889fi
19890
19891
19892  test -n "$TIME" && break
19893done
19894
19895  else
19896    # The variable is set, but is it from the command line or the environment?
19897
19898    # Try to remove the string !TIME! from our list.
19899    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19900    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19901      # If it failed, the variable was not from the command line. Ignore it,
19902      # but warn the user (except for BASH, which is always set by the calling BASH).
19903      if test "xTIME" != xBASH; then
19904        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19905$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19906      fi
19907      # Try to locate tool using the code snippet
19908      for ac_prog in time
19909do
19910  # Extract the first word of "$ac_prog", so it can be a program name with args.
19911set dummy $ac_prog; ac_word=$2
19912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19913$as_echo_n "checking for $ac_word... " >&6; }
19914if ${ac_cv_path_TIME+:} false; then :
19915  $as_echo_n "(cached) " >&6
19916else
19917  case $TIME in
19918  [\\/]* | ?:[\\/]*)
19919  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19920  ;;
19921  *)
19922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19923for as_dir in $PATH
19924do
19925  IFS=$as_save_IFS
19926  test -z "$as_dir" && as_dir=.
19927    for ac_exec_ext in '' $ac_executable_extensions; do
19928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19929    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19931    break 2
19932  fi
19933done
19934  done
19935IFS=$as_save_IFS
19936
19937  ;;
19938esac
19939fi
19940TIME=$ac_cv_path_TIME
19941if test -n "$TIME"; then
19942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19943$as_echo "$TIME" >&6; }
19944else
19945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19946$as_echo "no" >&6; }
19947fi
19948
19949
19950  test -n "$TIME" && break
19951done
19952
19953    else
19954      # If it succeeded, then it was overridden by the user. We will use it
19955      # for the tool.
19956
19957      # First remove it from the list of overridden variables, so we can test
19958      # for unknown variables in the end.
19959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19960
19961      # Check if we try to supply an empty value
19962      if test "x$TIME" = x; then
19963        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
19964$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
19965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19966$as_echo_n "checking for TIME... " >&6; }
19967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19968$as_echo "disabled" >&6; }
19969      else
19970        # Check if the provided tool contains a complete path.
19971        tool_specified="$TIME"
19972        tool_basename="${tool_specified##*/}"
19973        if test "x$tool_basename" = "x$tool_specified"; then
19974          # A command without a complete path is provided, search $PATH.
19975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19976$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19977          # Extract the first word of "$tool_basename", so it can be a program name with args.
19978set dummy $tool_basename; ac_word=$2
19979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19980$as_echo_n "checking for $ac_word... " >&6; }
19981if ${ac_cv_path_TIME+:} false; then :
19982  $as_echo_n "(cached) " >&6
19983else
19984  case $TIME in
19985  [\\/]* | ?:[\\/]*)
19986  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19987  ;;
19988  *)
19989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19990for as_dir in $PATH
19991do
19992  IFS=$as_save_IFS
19993  test -z "$as_dir" && as_dir=.
19994    for ac_exec_ext in '' $ac_executable_extensions; do
19995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19996    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19998    break 2
19999  fi
20000done
20001  done
20002IFS=$as_save_IFS
20003
20004  ;;
20005esac
20006fi
20007TIME=$ac_cv_path_TIME
20008if test -n "$TIME"; then
20009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
20010$as_echo "$TIME" >&6; }
20011else
20012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20013$as_echo "no" >&6; }
20014fi
20015
20016
20017          if test "x$TIME" = x; then
20018            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20019          fi
20020        else
20021          # Otherwise we believe it is a complete path. Use it as it is.
20022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
20023$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
20024          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
20025$as_echo_n "checking for TIME... " >&6; }
20026          if test ! -x "$tool_specified"; then
20027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20028$as_echo "not found" >&6; }
20029            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
20030          fi
20031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20032$as_echo "$tool_specified" >&6; }
20033        fi
20034      fi
20035    fi
20036  fi
20037
20038
20039
20040
20041  # Publish this variable in the help.
20042
20043
20044  if [ -z "${PATCH+x}" ]; then
20045    # The variable is not set by user, try to locate tool using the code snippet
20046    for ac_prog in gpatch patch
20047do
20048  # Extract the first word of "$ac_prog", so it can be a program name with args.
20049set dummy $ac_prog; ac_word=$2
20050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20051$as_echo_n "checking for $ac_word... " >&6; }
20052if ${ac_cv_path_PATCH+:} false; then :
20053  $as_echo_n "(cached) " >&6
20054else
20055  case $PATCH in
20056  [\\/]* | ?:[\\/]*)
20057  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
20058  ;;
20059  *)
20060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20061for as_dir in $PATH
20062do
20063  IFS=$as_save_IFS
20064  test -z "$as_dir" && as_dir=.
20065    for ac_exec_ext in '' $ac_executable_extensions; do
20066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20067    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
20068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20069    break 2
20070  fi
20071done
20072  done
20073IFS=$as_save_IFS
20074
20075  ;;
20076esac
20077fi
20078PATCH=$ac_cv_path_PATCH
20079if test -n "$PATCH"; then
20080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20081$as_echo "$PATCH" >&6; }
20082else
20083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20084$as_echo "no" >&6; }
20085fi
20086
20087
20088  test -n "$PATCH" && break
20089done
20090
20091  else
20092    # The variable is set, but is it from the command line or the environment?
20093
20094    # Try to remove the string !PATCH! from our list.
20095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
20096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20097      # If it failed, the variable was not from the command line. Ignore it,
20098      # but warn the user (except for BASH, which is always set by the calling BASH).
20099      if test "xPATCH" != xBASH; then
20100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
20101$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
20102      fi
20103      # Try to locate tool using the code snippet
20104      for ac_prog in gpatch patch
20105do
20106  # Extract the first word of "$ac_prog", so it can be a program name with args.
20107set dummy $ac_prog; ac_word=$2
20108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20109$as_echo_n "checking for $ac_word... " >&6; }
20110if ${ac_cv_path_PATCH+:} false; then :
20111  $as_echo_n "(cached) " >&6
20112else
20113  case $PATCH in
20114  [\\/]* | ?:[\\/]*)
20115  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
20116  ;;
20117  *)
20118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20119for as_dir in $PATH
20120do
20121  IFS=$as_save_IFS
20122  test -z "$as_dir" && as_dir=.
20123    for ac_exec_ext in '' $ac_executable_extensions; do
20124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20125    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
20126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20127    break 2
20128  fi
20129done
20130  done
20131IFS=$as_save_IFS
20132
20133  ;;
20134esac
20135fi
20136PATCH=$ac_cv_path_PATCH
20137if test -n "$PATCH"; then
20138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20139$as_echo "$PATCH" >&6; }
20140else
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20142$as_echo "no" >&6; }
20143fi
20144
20145
20146  test -n "$PATCH" && break
20147done
20148
20149    else
20150      # If it succeeded, then it was overridden by the user. We will use it
20151      # for the tool.
20152
20153      # First remove it from the list of overridden variables, so we can test
20154      # for unknown variables in the end.
20155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20156
20157      # Check if we try to supply an empty value
20158      if test "x$PATCH" = x; then
20159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
20160$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
20161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
20162$as_echo_n "checking for PATCH... " >&6; }
20163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20164$as_echo "disabled" >&6; }
20165      else
20166        # Check if the provided tool contains a complete path.
20167        tool_specified="$PATCH"
20168        tool_basename="${tool_specified##*/}"
20169        if test "x$tool_basename" = "x$tool_specified"; then
20170          # A command without a complete path is provided, search $PATH.
20171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
20172$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
20173          # Extract the first word of "$tool_basename", so it can be a program name with args.
20174set dummy $tool_basename; ac_word=$2
20175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20176$as_echo_n "checking for $ac_word... " >&6; }
20177if ${ac_cv_path_PATCH+:} false; then :
20178  $as_echo_n "(cached) " >&6
20179else
20180  case $PATCH in
20181  [\\/]* | ?:[\\/]*)
20182  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
20183  ;;
20184  *)
20185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20186for as_dir in $PATH
20187do
20188  IFS=$as_save_IFS
20189  test -z "$as_dir" && as_dir=.
20190    for ac_exec_ext in '' $ac_executable_extensions; do
20191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20192    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
20193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20194    break 2
20195  fi
20196done
20197  done
20198IFS=$as_save_IFS
20199
20200  ;;
20201esac
20202fi
20203PATCH=$ac_cv_path_PATCH
20204if test -n "$PATCH"; then
20205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
20206$as_echo "$PATCH" >&6; }
20207else
20208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20209$as_echo "no" >&6; }
20210fi
20211
20212
20213          if test "x$PATCH" = x; then
20214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20215          fi
20216        else
20217          # Otherwise we believe it is a complete path. Use it as it is.
20218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
20219$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
20220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
20221$as_echo_n "checking for PATCH... " >&6; }
20222          if test ! -x "$tool_specified"; then
20223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20224$as_echo "not found" >&6; }
20225            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
20226          fi
20227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20228$as_echo "$tool_specified" >&6; }
20229        fi
20230      fi
20231    fi
20232  fi
20233
20234
20235  # Check if it's GNU time
20236  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
20237  if test "x$IS_GNU_TIME" != x; then
20238    IS_GNU_TIME=yes
20239  else
20240    IS_GNU_TIME=no
20241  fi
20242
20243
20244  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
20245
20246
20247
20248  # Publish this variable in the help.
20249
20250
20251  if [ -z "${DSYMUTIL+x}" ]; then
20252    # The variable is not set by user, try to locate tool using the code snippet
20253    for ac_prog in dsymutil
20254do
20255  # Extract the first word of "$ac_prog", so it can be a program name with args.
20256set dummy $ac_prog; ac_word=$2
20257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20258$as_echo_n "checking for $ac_word... " >&6; }
20259if ${ac_cv_path_DSYMUTIL+:} false; then :
20260  $as_echo_n "(cached) " >&6
20261else
20262  case $DSYMUTIL in
20263  [\\/]* | ?:[\\/]*)
20264  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20265  ;;
20266  *)
20267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20268for as_dir in $PATH
20269do
20270  IFS=$as_save_IFS
20271  test -z "$as_dir" && as_dir=.
20272    for ac_exec_ext in '' $ac_executable_extensions; do
20273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20274    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20276    break 2
20277  fi
20278done
20279  done
20280IFS=$as_save_IFS
20281
20282  ;;
20283esac
20284fi
20285DSYMUTIL=$ac_cv_path_DSYMUTIL
20286if test -n "$DSYMUTIL"; then
20287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20288$as_echo "$DSYMUTIL" >&6; }
20289else
20290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20291$as_echo "no" >&6; }
20292fi
20293
20294
20295  test -n "$DSYMUTIL" && break
20296done
20297
20298  else
20299    # The variable is set, but is it from the command line or the environment?
20300
20301    # Try to remove the string !DSYMUTIL! from our list.
20302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
20303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20304      # If it failed, the variable was not from the command line. Ignore it,
20305      # but warn the user (except for BASH, which is always set by the calling BASH).
20306      if test "xDSYMUTIL" != xBASH; then
20307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
20308$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
20309      fi
20310      # Try to locate tool using the code snippet
20311      for ac_prog in dsymutil
20312do
20313  # Extract the first word of "$ac_prog", so it can be a program name with args.
20314set dummy $ac_prog; ac_word=$2
20315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20316$as_echo_n "checking for $ac_word... " >&6; }
20317if ${ac_cv_path_DSYMUTIL+:} false; then :
20318  $as_echo_n "(cached) " >&6
20319else
20320  case $DSYMUTIL in
20321  [\\/]* | ?:[\\/]*)
20322  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20323  ;;
20324  *)
20325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20326for as_dir in $PATH
20327do
20328  IFS=$as_save_IFS
20329  test -z "$as_dir" && as_dir=.
20330    for ac_exec_ext in '' $ac_executable_extensions; do
20331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20332    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20334    break 2
20335  fi
20336done
20337  done
20338IFS=$as_save_IFS
20339
20340  ;;
20341esac
20342fi
20343DSYMUTIL=$ac_cv_path_DSYMUTIL
20344if test -n "$DSYMUTIL"; then
20345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20346$as_echo "$DSYMUTIL" >&6; }
20347else
20348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20349$as_echo "no" >&6; }
20350fi
20351
20352
20353  test -n "$DSYMUTIL" && break
20354done
20355
20356    else
20357      # If it succeeded, then it was overridden by the user. We will use it
20358      # for the tool.
20359
20360      # First remove it from the list of overridden variables, so we can test
20361      # for unknown variables in the end.
20362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20363
20364      # Check if we try to supply an empty value
20365      if test "x$DSYMUTIL" = x; then
20366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
20367$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
20368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20369$as_echo_n "checking for DSYMUTIL... " >&6; }
20370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20371$as_echo "disabled" >&6; }
20372      else
20373        # Check if the provided tool contains a complete path.
20374        tool_specified="$DSYMUTIL"
20375        tool_basename="${tool_specified##*/}"
20376        if test "x$tool_basename" = "x$tool_specified"; then
20377          # A command without a complete path is provided, search $PATH.
20378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
20379$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
20380          # Extract the first word of "$tool_basename", so it can be a program name with args.
20381set dummy $tool_basename; ac_word=$2
20382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20383$as_echo_n "checking for $ac_word... " >&6; }
20384if ${ac_cv_path_DSYMUTIL+:} false; then :
20385  $as_echo_n "(cached) " >&6
20386else
20387  case $DSYMUTIL in
20388  [\\/]* | ?:[\\/]*)
20389  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
20390  ;;
20391  *)
20392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20393for as_dir in $PATH
20394do
20395  IFS=$as_save_IFS
20396  test -z "$as_dir" && as_dir=.
20397    for ac_exec_ext in '' $ac_executable_extensions; do
20398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20399    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
20400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20401    break 2
20402  fi
20403done
20404  done
20405IFS=$as_save_IFS
20406
20407  ;;
20408esac
20409fi
20410DSYMUTIL=$ac_cv_path_DSYMUTIL
20411if test -n "$DSYMUTIL"; then
20412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
20413$as_echo "$DSYMUTIL" >&6; }
20414else
20415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20416$as_echo "no" >&6; }
20417fi
20418
20419
20420          if test "x$DSYMUTIL" = x; then
20421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20422          fi
20423        else
20424          # Otherwise we believe it is a complete path. Use it as it is.
20425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
20426$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
20427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
20428$as_echo_n "checking for DSYMUTIL... " >&6; }
20429          if test ! -x "$tool_specified"; then
20430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20431$as_echo "not found" >&6; }
20432            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
20433          fi
20434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20435$as_echo "$tool_specified" >&6; }
20436        fi
20437      fi
20438    fi
20439  fi
20440
20441
20442
20443  if test "x$DSYMUTIL" = x; then
20444    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
20445  fi
20446
20447
20448
20449
20450
20451  # Publish this variable in the help.
20452
20453
20454  if [ -z "${XATTR+x}" ]; then
20455    # The variable is not set by user, try to locate tool using the code snippet
20456    for ac_prog in xattr
20457do
20458  # Extract the first word of "$ac_prog", so it can be a program name with args.
20459set dummy $ac_prog; ac_word=$2
20460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20461$as_echo_n "checking for $ac_word... " >&6; }
20462if ${ac_cv_path_XATTR+:} false; then :
20463  $as_echo_n "(cached) " >&6
20464else
20465  case $XATTR in
20466  [\\/]* | ?:[\\/]*)
20467  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20468  ;;
20469  *)
20470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20471for as_dir in $PATH
20472do
20473  IFS=$as_save_IFS
20474  test -z "$as_dir" && as_dir=.
20475    for ac_exec_ext in '' $ac_executable_extensions; do
20476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20477    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20479    break 2
20480  fi
20481done
20482  done
20483IFS=$as_save_IFS
20484
20485  ;;
20486esac
20487fi
20488XATTR=$ac_cv_path_XATTR
20489if test -n "$XATTR"; then
20490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20491$as_echo "$XATTR" >&6; }
20492else
20493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20494$as_echo "no" >&6; }
20495fi
20496
20497
20498  test -n "$XATTR" && break
20499done
20500
20501  else
20502    # The variable is set, but is it from the command line or the environment?
20503
20504    # Try to remove the string !XATTR! from our list.
20505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
20506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20507      # If it failed, the variable was not from the command line. Ignore it,
20508      # but warn the user (except for BASH, which is always set by the calling BASH).
20509      if test "xXATTR" != xBASH; then
20510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
20511$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
20512      fi
20513      # Try to locate tool using the code snippet
20514      for ac_prog in xattr
20515do
20516  # Extract the first word of "$ac_prog", so it can be a program name with args.
20517set dummy $ac_prog; ac_word=$2
20518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20519$as_echo_n "checking for $ac_word... " >&6; }
20520if ${ac_cv_path_XATTR+:} false; then :
20521  $as_echo_n "(cached) " >&6
20522else
20523  case $XATTR in
20524  [\\/]* | ?:[\\/]*)
20525  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20526  ;;
20527  *)
20528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20529for as_dir in $PATH
20530do
20531  IFS=$as_save_IFS
20532  test -z "$as_dir" && as_dir=.
20533    for ac_exec_ext in '' $ac_executable_extensions; do
20534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20535    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20537    break 2
20538  fi
20539done
20540  done
20541IFS=$as_save_IFS
20542
20543  ;;
20544esac
20545fi
20546XATTR=$ac_cv_path_XATTR
20547if test -n "$XATTR"; then
20548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20549$as_echo "$XATTR" >&6; }
20550else
20551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20552$as_echo "no" >&6; }
20553fi
20554
20555
20556  test -n "$XATTR" && break
20557done
20558
20559    else
20560      # If it succeeded, then it was overridden by the user. We will use it
20561      # for the tool.
20562
20563      # First remove it from the list of overridden variables, so we can test
20564      # for unknown variables in the end.
20565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20566
20567      # Check if we try to supply an empty value
20568      if test "x$XATTR" = x; then
20569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
20570$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
20571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20572$as_echo_n "checking for XATTR... " >&6; }
20573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20574$as_echo "disabled" >&6; }
20575      else
20576        # Check if the provided tool contains a complete path.
20577        tool_specified="$XATTR"
20578        tool_basename="${tool_specified##*/}"
20579        if test "x$tool_basename" = "x$tool_specified"; then
20580          # A command without a complete path is provided, search $PATH.
20581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
20582$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
20583          # Extract the first word of "$tool_basename", so it can be a program name with args.
20584set dummy $tool_basename; ac_word=$2
20585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20586$as_echo_n "checking for $ac_word... " >&6; }
20587if ${ac_cv_path_XATTR+:} false; then :
20588  $as_echo_n "(cached) " >&6
20589else
20590  case $XATTR in
20591  [\\/]* | ?:[\\/]*)
20592  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
20593  ;;
20594  *)
20595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20596for as_dir in $PATH
20597do
20598  IFS=$as_save_IFS
20599  test -z "$as_dir" && as_dir=.
20600    for ac_exec_ext in '' $ac_executable_extensions; do
20601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20602    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
20603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20604    break 2
20605  fi
20606done
20607  done
20608IFS=$as_save_IFS
20609
20610  ;;
20611esac
20612fi
20613XATTR=$ac_cv_path_XATTR
20614if test -n "$XATTR"; then
20615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
20616$as_echo "$XATTR" >&6; }
20617else
20618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20619$as_echo "no" >&6; }
20620fi
20621
20622
20623          if test "x$XATTR" = x; then
20624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20625          fi
20626        else
20627          # Otherwise we believe it is a complete path. Use it as it is.
20628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
20629$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
20630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
20631$as_echo_n "checking for XATTR... " >&6; }
20632          if test ! -x "$tool_specified"; then
20633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20634$as_echo "not found" >&6; }
20635            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
20636          fi
20637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20638$as_echo "$tool_specified" >&6; }
20639        fi
20640      fi
20641    fi
20642  fi
20643
20644
20645
20646  if test "x$XATTR" = x; then
20647    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
20648  fi
20649
20650
20651
20652
20653  # Publish this variable in the help.
20654
20655
20656  if [ -z "${CODESIGN+x}" ]; then
20657    # The variable is not set by user, try to locate tool using the code snippet
20658    for ac_prog in codesign
20659do
20660  # Extract the first word of "$ac_prog", so it can be a program name with args.
20661set dummy $ac_prog; ac_word=$2
20662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20663$as_echo_n "checking for $ac_word... " >&6; }
20664if ${ac_cv_path_CODESIGN+:} false; then :
20665  $as_echo_n "(cached) " >&6
20666else
20667  case $CODESIGN in
20668  [\\/]* | ?:[\\/]*)
20669  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20670  ;;
20671  *)
20672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20673for as_dir in $PATH
20674do
20675  IFS=$as_save_IFS
20676  test -z "$as_dir" && as_dir=.
20677    for ac_exec_ext in '' $ac_executable_extensions; do
20678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20679    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20681    break 2
20682  fi
20683done
20684  done
20685IFS=$as_save_IFS
20686
20687  ;;
20688esac
20689fi
20690CODESIGN=$ac_cv_path_CODESIGN
20691if test -n "$CODESIGN"; then
20692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20693$as_echo "$CODESIGN" >&6; }
20694else
20695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20696$as_echo "no" >&6; }
20697fi
20698
20699
20700  test -n "$CODESIGN" && break
20701done
20702
20703  else
20704    # The variable is set, but is it from the command line or the environment?
20705
20706    # Try to remove the string !CODESIGN! from our list.
20707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
20708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20709      # If it failed, the variable was not from the command line. Ignore it,
20710      # but warn the user (except for BASH, which is always set by the calling BASH).
20711      if test "xCODESIGN" != xBASH; then
20712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
20713$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
20714      fi
20715      # Try to locate tool using the code snippet
20716      for ac_prog in codesign
20717do
20718  # Extract the first word of "$ac_prog", so it can be a program name with args.
20719set dummy $ac_prog; ac_word=$2
20720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20721$as_echo_n "checking for $ac_word... " >&6; }
20722if ${ac_cv_path_CODESIGN+:} false; then :
20723  $as_echo_n "(cached) " >&6
20724else
20725  case $CODESIGN in
20726  [\\/]* | ?:[\\/]*)
20727  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20728  ;;
20729  *)
20730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20731for as_dir in $PATH
20732do
20733  IFS=$as_save_IFS
20734  test -z "$as_dir" && as_dir=.
20735    for ac_exec_ext in '' $ac_executable_extensions; do
20736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20737    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20739    break 2
20740  fi
20741done
20742  done
20743IFS=$as_save_IFS
20744
20745  ;;
20746esac
20747fi
20748CODESIGN=$ac_cv_path_CODESIGN
20749if test -n "$CODESIGN"; then
20750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20751$as_echo "$CODESIGN" >&6; }
20752else
20753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20754$as_echo "no" >&6; }
20755fi
20756
20757
20758  test -n "$CODESIGN" && break
20759done
20760
20761    else
20762      # If it succeeded, then it was overridden by the user. We will use it
20763      # for the tool.
20764
20765      # First remove it from the list of overridden variables, so we can test
20766      # for unknown variables in the end.
20767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20768
20769      # Check if we try to supply an empty value
20770      if test "x$CODESIGN" = x; then
20771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
20772$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
20773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20774$as_echo_n "checking for CODESIGN... " >&6; }
20775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20776$as_echo "disabled" >&6; }
20777      else
20778        # Check if the provided tool contains a complete path.
20779        tool_specified="$CODESIGN"
20780        tool_basename="${tool_specified##*/}"
20781        if test "x$tool_basename" = "x$tool_specified"; then
20782          # A command without a complete path is provided, search $PATH.
20783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
20784$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
20785          # Extract the first word of "$tool_basename", so it can be a program name with args.
20786set dummy $tool_basename; ac_word=$2
20787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20788$as_echo_n "checking for $ac_word... " >&6; }
20789if ${ac_cv_path_CODESIGN+:} false; then :
20790  $as_echo_n "(cached) " >&6
20791else
20792  case $CODESIGN in
20793  [\\/]* | ?:[\\/]*)
20794  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
20795  ;;
20796  *)
20797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20798for as_dir in $PATH
20799do
20800  IFS=$as_save_IFS
20801  test -z "$as_dir" && as_dir=.
20802    for ac_exec_ext in '' $ac_executable_extensions; do
20803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20804    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
20805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20806    break 2
20807  fi
20808done
20809  done
20810IFS=$as_save_IFS
20811
20812  ;;
20813esac
20814fi
20815CODESIGN=$ac_cv_path_CODESIGN
20816if test -n "$CODESIGN"; then
20817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
20818$as_echo "$CODESIGN" >&6; }
20819else
20820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20821$as_echo "no" >&6; }
20822fi
20823
20824
20825          if test "x$CODESIGN" = x; then
20826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20827          fi
20828        else
20829          # Otherwise we believe it is a complete path. Use it as it is.
20830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
20831$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
20832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
20833$as_echo_n "checking for CODESIGN... " >&6; }
20834          if test ! -x "$tool_specified"; then
20835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20836$as_echo "not found" >&6; }
20837            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
20838          fi
20839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20840$as_echo "$tool_specified" >&6; }
20841        fi
20842      fi
20843    fi
20844  fi
20845
20846
20847    if test "x$CODESIGN" != "x"; then
20848      # Verify that the openjdk_codesign certificate is present
20849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
20850$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
20851      rm -f codesign-testfile
20852      touch codesign-testfile
20853      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
20854      rm -f codesign-testfile
20855      if test "x$CODESIGN" = x; then
20856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20857$as_echo "no" >&6; }
20858      else
20859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20860$as_echo "yes" >&6; }
20861      fi
20862    fi
20863
20864
20865
20866  # Publish this variable in the help.
20867
20868
20869  if [ -z "${SETFILE+x}" ]; then
20870    # The variable is not set by user, try to locate tool using the code snippet
20871    for ac_prog in SetFile
20872do
20873  # Extract the first word of "$ac_prog", so it can be a program name with args.
20874set dummy $ac_prog; ac_word=$2
20875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20876$as_echo_n "checking for $ac_word... " >&6; }
20877if ${ac_cv_path_SETFILE+:} false; then :
20878  $as_echo_n "(cached) " >&6
20879else
20880  case $SETFILE in
20881  [\\/]* | ?:[\\/]*)
20882  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20883  ;;
20884  *)
20885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20886for as_dir in $PATH
20887do
20888  IFS=$as_save_IFS
20889  test -z "$as_dir" && as_dir=.
20890    for ac_exec_ext in '' $ac_executable_extensions; do
20891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20892    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20894    break 2
20895  fi
20896done
20897  done
20898IFS=$as_save_IFS
20899
20900  ;;
20901esac
20902fi
20903SETFILE=$ac_cv_path_SETFILE
20904if test -n "$SETFILE"; then
20905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20906$as_echo "$SETFILE" >&6; }
20907else
20908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20909$as_echo "no" >&6; }
20910fi
20911
20912
20913  test -n "$SETFILE" && break
20914done
20915
20916  else
20917    # The variable is set, but is it from the command line or the environment?
20918
20919    # Try to remove the string !SETFILE! from our list.
20920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
20921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20922      # If it failed, the variable was not from the command line. Ignore it,
20923      # but warn the user (except for BASH, which is always set by the calling BASH).
20924      if test "xSETFILE" != xBASH; then
20925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
20926$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
20927      fi
20928      # Try to locate tool using the code snippet
20929      for ac_prog in SetFile
20930do
20931  # Extract the first word of "$ac_prog", so it can be a program name with args.
20932set dummy $ac_prog; ac_word=$2
20933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20934$as_echo_n "checking for $ac_word... " >&6; }
20935if ${ac_cv_path_SETFILE+:} false; then :
20936  $as_echo_n "(cached) " >&6
20937else
20938  case $SETFILE in
20939  [\\/]* | ?:[\\/]*)
20940  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
20941  ;;
20942  *)
20943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20944for as_dir in $PATH
20945do
20946  IFS=$as_save_IFS
20947  test -z "$as_dir" && as_dir=.
20948    for ac_exec_ext in '' $ac_executable_extensions; do
20949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20950    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
20951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20952    break 2
20953  fi
20954done
20955  done
20956IFS=$as_save_IFS
20957
20958  ;;
20959esac
20960fi
20961SETFILE=$ac_cv_path_SETFILE
20962if test -n "$SETFILE"; then
20963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
20964$as_echo "$SETFILE" >&6; }
20965else
20966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20967$as_echo "no" >&6; }
20968fi
20969
20970
20971  test -n "$SETFILE" && break
20972done
20973
20974    else
20975      # If it succeeded, then it was overridden by the user. We will use it
20976      # for the tool.
20977
20978      # First remove it from the list of overridden variables, so we can test
20979      # for unknown variables in the end.
20980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20981
20982      # Check if we try to supply an empty value
20983      if test "x$SETFILE" = x; then
20984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
20985$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
20986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
20987$as_echo_n "checking for SETFILE... " >&6; }
20988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20989$as_echo "disabled" >&6; }
20990      else
20991        # Check if the provided tool contains a complete path.
20992        tool_specified="$SETFILE"
20993        tool_basename="${tool_specified##*/}"
20994        if test "x$tool_basename" = "x$tool_specified"; then
20995          # A command without a complete path is provided, search $PATH.
20996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
20997$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
20998          # Extract the first word of "$tool_basename", so it can be a program name with args.
20999set dummy $tool_basename; ac_word=$2
21000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21001$as_echo_n "checking for $ac_word... " >&6; }
21002if ${ac_cv_path_SETFILE+:} false; then :
21003  $as_echo_n "(cached) " >&6
21004else
21005  case $SETFILE in
21006  [\\/]* | ?:[\\/]*)
21007  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
21008  ;;
21009  *)
21010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21011for as_dir in $PATH
21012do
21013  IFS=$as_save_IFS
21014  test -z "$as_dir" && as_dir=.
21015    for ac_exec_ext in '' $ac_executable_extensions; do
21016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21017    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
21018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21019    break 2
21020  fi
21021done
21022  done
21023IFS=$as_save_IFS
21024
21025  ;;
21026esac
21027fi
21028SETFILE=$ac_cv_path_SETFILE
21029if test -n "$SETFILE"; then
21030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
21031$as_echo "$SETFILE" >&6; }
21032else
21033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21034$as_echo "no" >&6; }
21035fi
21036
21037
21038          if test "x$SETFILE" = x; then
21039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21040          fi
21041        else
21042          # Otherwise we believe it is a complete path. Use it as it is.
21043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
21044$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
21045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
21046$as_echo_n "checking for SETFILE... " >&6; }
21047          if test ! -x "$tool_specified"; then
21048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21049$as_echo "not found" >&6; }
21050            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
21051          fi
21052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21053$as_echo "$tool_specified" >&6; }
21054        fi
21055      fi
21056    fi
21057  fi
21058
21059
21060
21061  if test "x$SETFILE" = x; then
21062    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
21063  fi
21064
21065
21066  fi
21067
21068
21069  # Test if bash supports pipefail.
21070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
21071$as_echo_n "checking if bash supports pipefail... " >&6; }
21072  if ${BASH} -c 'set -o pipefail'; then
21073    BASH_ARGS="$BASH_ARGS -o pipefail"
21074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21075$as_echo "yes" >&6; }
21076  else
21077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21078$as_echo "no" >&6; }
21079  fi
21080
21081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
21082$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
21083  if ${BASH} -e -c 'true'; then
21084    BASH_ARGS="$BASH_ARGS -e"
21085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21086$as_echo "yes" >&6; }
21087  else
21088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21089$as_echo "no" >&6; }
21090  fi
21091
21092
21093
21094
21095# Check if pkg-config is available.
21096
21097
21098if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
21099	if test -n "$ac_tool_prefix"; then
21100  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
21101set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
21102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21103$as_echo_n "checking for $ac_word... " >&6; }
21104if ${ac_cv_path_PKG_CONFIG+:} false; then :
21105  $as_echo_n "(cached) " >&6
21106else
21107  case $PKG_CONFIG in
21108  [\\/]* | ?:[\\/]*)
21109  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
21110  ;;
21111  *)
21112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21113for as_dir in $PATH
21114do
21115  IFS=$as_save_IFS
21116  test -z "$as_dir" && as_dir=.
21117    for ac_exec_ext in '' $ac_executable_extensions; do
21118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21119    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21121    break 2
21122  fi
21123done
21124  done
21125IFS=$as_save_IFS
21126
21127  ;;
21128esac
21129fi
21130PKG_CONFIG=$ac_cv_path_PKG_CONFIG
21131if test -n "$PKG_CONFIG"; then
21132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
21133$as_echo "$PKG_CONFIG" >&6; }
21134else
21135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21136$as_echo "no" >&6; }
21137fi
21138
21139
21140fi
21141if test -z "$ac_cv_path_PKG_CONFIG"; then
21142  ac_pt_PKG_CONFIG=$PKG_CONFIG
21143  # Extract the first word of "pkg-config", so it can be a program name with args.
21144set dummy pkg-config; ac_word=$2
21145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21146$as_echo_n "checking for $ac_word... " >&6; }
21147if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
21148  $as_echo_n "(cached) " >&6
21149else
21150  case $ac_pt_PKG_CONFIG in
21151  [\\/]* | ?:[\\/]*)
21152  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
21153  ;;
21154  *)
21155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21156for as_dir in $PATH
21157do
21158  IFS=$as_save_IFS
21159  test -z "$as_dir" && as_dir=.
21160    for ac_exec_ext in '' $ac_executable_extensions; do
21161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21162    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21164    break 2
21165  fi
21166done
21167  done
21168IFS=$as_save_IFS
21169
21170  ;;
21171esac
21172fi
21173ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
21174if test -n "$ac_pt_PKG_CONFIG"; then
21175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
21176$as_echo "$ac_pt_PKG_CONFIG" >&6; }
21177else
21178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21179$as_echo "no" >&6; }
21180fi
21181
21182  if test "x$ac_pt_PKG_CONFIG" = x; then
21183    PKG_CONFIG=""
21184  else
21185    case $cross_compiling:$ac_tool_warned in
21186yes:)
21187{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21188$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21189ac_tool_warned=yes ;;
21190esac
21191    PKG_CONFIG=$ac_pt_PKG_CONFIG
21192  fi
21193else
21194  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
21195fi
21196
21197fi
21198if test -n "$PKG_CONFIG"; then
21199	_pkg_min_version=0.9.0
21200	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
21201$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
21202	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
21203		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21204$as_echo "yes" >&6; }
21205	else
21206		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21207$as_echo "no" >&6; }
21208		PKG_CONFIG=""
21209	fi
21210
21211fi
21212
21213# After basic tools have been setup, we can check build os specific details.
21214
21215  ###############################################################################
21216
21217  # Note that this is the build platform OS version!
21218
21219  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
21220  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
21221  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
21222  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
21223
21224
21225
21226
21227
21228###############################################################################
21229#
21230# Determine OpenJDK variants, options and version numbers.
21231#
21232###############################################################################
21233
21234# We need build & target for this.
21235
21236
21237  ###############################################################################
21238  #
21239  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
21240  # We always build headless support.
21241  #
21242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
21243$as_echo_n "checking headful support... " >&6; }
21244  # Check whether --enable-headful was given.
21245if test "${enable_headful+set}" = set; then :
21246  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
21247else
21248  SUPPORT_HEADFUL=yes
21249fi
21250
21251
21252  SUPPORT_HEADLESS=yes
21253  BUILD_HEADLESS="BUILD_HEADLESS:=true"
21254
21255  if test "x$SUPPORT_HEADFUL" = xyes; then
21256    # We are building both headful and headless.
21257    headful_msg="include support for both headful and headless"
21258  fi
21259
21260  if test "x$SUPPORT_HEADFUL" = xno; then
21261    # Thus we are building headless only.
21262    BUILD_HEADLESS="BUILD_HEADLESS:=true"
21263    headful_msg="headless only"
21264  fi
21265
21266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
21267$as_echo "$headful_msg" >&6; }
21268
21269
21270
21271
21272
21273  # Control wether Hotspot runs Queens test after build.
21274  # Check whether --enable-hotspot-test-in-build was given.
21275if test "${enable_hotspot_test_in_build+set}" = set; then :
21276  enableval=$enable_hotspot_test_in_build;
21277else
21278  enable_hotspot_test_in_build=no
21279fi
21280
21281  if test "x$enable_hotspot_test_in_build" = "xyes"; then
21282    TEST_IN_BUILD=true
21283  else
21284    TEST_IN_BUILD=false
21285  fi
21286
21287
21288  ###############################################################################
21289  #
21290  # Choose cacerts source file
21291  #
21292
21293# Check whether --with-cacerts-file was given.
21294if test "${with_cacerts_file+set}" = set; then :
21295  withval=$with_cacerts_file;
21296fi
21297
21298  if test "x$with_cacerts_file" != x; then
21299    CACERTS_FILE=$with_cacerts_file
21300  fi
21301
21302
21303  ###############################################################################
21304  #
21305  # Enable or disable unlimited crypto
21306  #
21307  # Check whether --enable-unlimited-crypto was given.
21308if test "${enable_unlimited_crypto+set}" = set; then :
21309  enableval=$enable_unlimited_crypto;
21310else
21311  enable_unlimited_crypto=no
21312fi
21313
21314  if test "x$enable_unlimited_crypto" = "xyes"; then
21315    UNLIMITED_CRYPTO=true
21316  else
21317    UNLIMITED_CRYPTO=false
21318  fi
21319
21320
21321  ###############################################################################
21322  #
21323  # Enable or disable the elliptic curve crypto implementation
21324  #
21325
21326
21327  ###############################################################################
21328  #
21329  # Compress jars
21330  #
21331  COMPRESS_JARS=false
21332
21333
21334
21335
21336  # Source the version numbers
21337  . $AUTOCONF_DIR/version-numbers
21338
21339  # Get the settings from parameters
21340
21341# Check whether --with-milestone was given.
21342if test "${with_milestone+set}" = set; then :
21343  withval=$with_milestone;
21344fi
21345
21346  if test "x$with_milestone" = xyes; then
21347    as_fn_error $? "Milestone must have a value" "$LINENO" 5
21348  elif test "x$with_milestone" != x; then
21349    MILESTONE="$with_milestone"
21350  fi
21351  if test "x$MILESTONE" = x; then
21352    MILESTONE=internal
21353  fi
21354
21355
21356# Check whether --with-update-version was given.
21357if test "${with_update_version+set}" = set; then :
21358  withval=$with_update_version;
21359fi
21360
21361  if test "x$with_update_version" = xyes; then
21362    as_fn_error $? "Update version must have a value" "$LINENO" 5
21363  elif test "x$with_update_version" != x; then
21364    JDK_UPDATE_VERSION="$with_update_version"
21365    # On macosx 10.7, it's not possible to set --with-update-version=0X due
21366    # to a bug in expr (which reduces it to just X). To work around this, we
21367    # always add a 0 to one digit update versions.
21368    if test "${#JDK_UPDATE_VERSION}" = "1"; then
21369      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
21370    fi
21371  fi
21372
21373
21374# Check whether --with-user-release-suffix was given.
21375if test "${with_user_release_suffix+set}" = set; then :
21376  withval=$with_user_release_suffix;
21377fi
21378
21379  if test "x$with_user_release_suffix" = xyes; then
21380    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
21381  elif test "x$with_user_release_suffix" != x; then
21382    USER_RELEASE_SUFFIX="$with_user_release_suffix"
21383  fi
21384
21385
21386# Check whether --with-build-number was given.
21387if test "${with_build_number+set}" = set; then :
21388  withval=$with_build_number;
21389fi
21390
21391  if test "x$with_build_number" = xyes; then
21392    as_fn_error $? "Build number must have a value" "$LINENO" 5
21393  elif test "x$with_build_number" != x; then
21394    JDK_BUILD_NUMBER="$with_build_number"
21395  fi
21396  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
21397  if test "x$JDK_BUILD_NUMBER" = x; then
21398    JDK_BUILD_NUMBER=b00
21399    if test "x$USER_RELEASE_SUFFIX" = x; then
21400      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
21401      # Avoid [:alnum:] since it depends on the locale.
21402      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
21403      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21404    fi
21405  fi
21406
21407  # Now set the JDK version, milestone, build number etc.
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424# Check whether --with-copyright-year was given.
21425if test "${with_copyright_year+set}" = set; then :
21426  withval=$with_copyright_year;
21427fi
21428
21429  if test "x$with_copyright_year" = xyes; then
21430    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
21431  elif test "x$with_copyright_year" != x; then
21432    COPYRIGHT_YEAR="$with_copyright_year"
21433  else
21434    COPYRIGHT_YEAR=`date +'%Y'`
21435  fi
21436
21437
21438  if test "x$JDK_UPDATE_VERSION" != x; then
21439    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
21440  else
21441    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
21442  fi
21443
21444
21445  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
21446
21447
21448
21449###############################################################################
21450#
21451# Setup BootJDK, used to bootstrap the build.
21452#
21453###############################################################################
21454
21455
21456  BOOT_JDK_FOUND=no
21457
21458# Check whether --with-boot-jdk was given.
21459if test "${with_boot_jdk+set}" = set; then :
21460  withval=$with_boot_jdk;
21461fi
21462
21463
21464  # We look for the Boot JDK through various means, going from more certain to
21465  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
21466  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
21467  # must check if this is indeed valid; otherwise we'll continue looking.
21468
21469  # Test: Is bootjdk explicitely set by command line arguments?
21470
21471  if test "x$BOOT_JDK_FOUND" = xno; then
21472    # Now execute the test
21473
21474  if test "x$with_boot_jdk" != x; then
21475    BOOT_JDK=$with_boot_jdk
21476    BOOT_JDK_FOUND=maybe
21477    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
21478$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
21479  fi
21480
21481
21482    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21483    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21484      # Do we have a bin/java?
21485      if test ! -x "$BOOT_JDK/bin/java"; then
21486        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21488        BOOT_JDK_FOUND=no
21489      else
21490        # Do we have a bin/javac?
21491        if test ! -x "$BOOT_JDK/bin/javac"; then
21492          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21494          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21495$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21496          BOOT_JDK_FOUND=no
21497        else
21498          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21499          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21500
21501          # Extra M4 quote needed to protect [] in grep expression.
21502          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21503          if test "x$FOUND_CORRECT_VERSION" = x; then
21504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21506            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21507$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21508            BOOT_JDK_FOUND=no
21509          else
21510            # We're done! :-)
21511            BOOT_JDK_FOUND=yes
21512
21513  # Only process if variable expands to non-empty
21514
21515  if test "x$BOOT_JDK" != x; then
21516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21517
21518  # Input might be given as Windows format, start by converting to
21519  # unix format.
21520  path="$BOOT_JDK"
21521  new_path=`$CYGPATH -u "$path"`
21522
21523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21526  # "foo.exe" is OK but "foo" is an error.
21527  #
21528  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21529  # It is also a way to make sure we got the proper file name for the real test later on.
21530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21531  if test "x$test_shortpath" = x; then
21532    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21534    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21535  fi
21536
21537  # Call helper function which possibly converts this using DOS-style short mode.
21538  # If so, the updated path is stored in $new_path.
21539
21540  input_path="$new_path"
21541  # Check if we need to convert this using DOS-style short mode. If the path
21542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21543  # take no chances and rewrite it.
21544  # Note: m4 eats our [], so we need to use [ and ] instead.
21545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21546  if test "x$has_forbidden_chars" != x; then
21547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21551      # Going to short mode and back again did indeed matter. Since short mode is
21552      # case insensitive, let's make it lowercase to improve readability.
21553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21554      # Now convert it back to Unix-style (cygpath)
21555      input_path=`$CYGPATH -u "$shortmode_path"`
21556      new_path="$input_path"
21557    fi
21558  fi
21559
21560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21561  if test "x$test_cygdrive_prefix" = x; then
21562    # As a simple fix, exclude /usr/bin since it's not a real path.
21563    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21565      # a path prefixed by /cygdrive for fixpath to work.
21566      new_path="$CYGWIN_ROOT_PATH$input_path"
21567    fi
21568  fi
21569
21570
21571  if test "x$path" != "x$new_path"; then
21572    BOOT_JDK="$new_path"
21573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21575  fi
21576
21577    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21578
21579  path="$BOOT_JDK"
21580  has_colon=`$ECHO $path | $GREP ^.:`
21581  new_path="$path"
21582  if test "x$has_colon" = x; then
21583    # Not in mixed or Windows style, start by that.
21584    new_path=`cmd //c echo $path`
21585  fi
21586
21587
21588  input_path="$new_path"
21589  # Check if we need to convert this using DOS-style short mode. If the path
21590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21591  # take no chances and rewrite it.
21592  # Note: m4 eats our [], so we need to use [ and ] instead.
21593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21594  if test "x$has_forbidden_chars" != x; then
21595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21597  fi
21598
21599
21600  windows_path="$new_path"
21601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21602    unix_path=`$CYGPATH -u "$windows_path"`
21603    new_path="$unix_path"
21604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21606    new_path="$unix_path"
21607  fi
21608
21609  if test "x$path" != "x$new_path"; then
21610    BOOT_JDK="$new_path"
21611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21613  fi
21614
21615  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21616  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21617
21618    else
21619      # We're on a unix platform. Hooray! :)
21620      path="$BOOT_JDK"
21621      has_space=`$ECHO "$path" | $GREP " "`
21622      if test "x$has_space" != x; then
21623        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21625        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21626      fi
21627
21628      # Use eval to expand a potential ~
21629      eval path="$path"
21630      if test ! -f "$path" && test ! -d "$path"; then
21631        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21632      fi
21633
21634      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21635    fi
21636  fi
21637
21638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21639$as_echo_n "checking for Boot JDK... " >&6; }
21640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21641$as_echo "$BOOT_JDK" >&6; }
21642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21643$as_echo_n "checking Boot JDK version... " >&6; }
21644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21646$as_echo "$BOOT_JDK_VERSION" >&6; }
21647          fi # end check jdk version
21648        fi # end check javac
21649      fi # end check java
21650    fi # end check boot jdk found
21651  fi
21652
21653  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
21654    # Having specified an argument which is incorrect will produce an instant failure;
21655    # we should not go on looking
21656    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
21657  fi
21658
21659  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21660
21661  if test "x$BOOT_JDK_FOUND" = xno; then
21662    # Now execute the test
21663
21664  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21665    # First check at user selected default
21666
21667  if test "x$BOOT_JDK_FOUND" = xno; then
21668    # Now execute the test
21669
21670  if test -x /usr/libexec/java_home; then
21671    BOOT_JDK=`/usr/libexec/java_home `
21672    BOOT_JDK_FOUND=maybe
21673    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21674$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21675  fi
21676
21677
21678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21680      # Do we have a bin/java?
21681      if test ! -x "$BOOT_JDK/bin/java"; then
21682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21684        BOOT_JDK_FOUND=no
21685      else
21686        # Do we have a bin/javac?
21687        if test ! -x "$BOOT_JDK/bin/javac"; then
21688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21692          BOOT_JDK_FOUND=no
21693        else
21694          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21695          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21696
21697          # Extra M4 quote needed to protect [] in grep expression.
21698          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21699          if test "x$FOUND_CORRECT_VERSION" = x; then
21700            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21702            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21703$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21704            BOOT_JDK_FOUND=no
21705          else
21706            # We're done! :-)
21707            BOOT_JDK_FOUND=yes
21708
21709  # Only process if variable expands to non-empty
21710
21711  if test "x$BOOT_JDK" != x; then
21712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21713
21714  # Input might be given as Windows format, start by converting to
21715  # unix format.
21716  path="$BOOT_JDK"
21717  new_path=`$CYGPATH -u "$path"`
21718
21719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21722  # "foo.exe" is OK but "foo" is an error.
21723  #
21724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21725  # It is also a way to make sure we got the proper file name for the real test later on.
21726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21727  if test "x$test_shortpath" = x; then
21728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21731  fi
21732
21733  # Call helper function which possibly converts this using DOS-style short mode.
21734  # If so, the updated path is stored in $new_path.
21735
21736  input_path="$new_path"
21737  # Check if we need to convert this using DOS-style short mode. If the path
21738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21739  # take no chances and rewrite it.
21740  # Note: m4 eats our [], so we need to use [ and ] instead.
21741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21742  if test "x$has_forbidden_chars" != x; then
21743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21747      # Going to short mode and back again did indeed matter. Since short mode is
21748      # case insensitive, let's make it lowercase to improve readability.
21749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21750      # Now convert it back to Unix-style (cygpath)
21751      input_path=`$CYGPATH -u "$shortmode_path"`
21752      new_path="$input_path"
21753    fi
21754  fi
21755
21756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21757  if test "x$test_cygdrive_prefix" = x; then
21758    # As a simple fix, exclude /usr/bin since it's not a real path.
21759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21761      # a path prefixed by /cygdrive for fixpath to work.
21762      new_path="$CYGWIN_ROOT_PATH$input_path"
21763    fi
21764  fi
21765
21766
21767  if test "x$path" != "x$new_path"; then
21768    BOOT_JDK="$new_path"
21769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21771  fi
21772
21773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21774
21775  path="$BOOT_JDK"
21776  has_colon=`$ECHO $path | $GREP ^.:`
21777  new_path="$path"
21778  if test "x$has_colon" = x; then
21779    # Not in mixed or Windows style, start by that.
21780    new_path=`cmd //c echo $path`
21781  fi
21782
21783
21784  input_path="$new_path"
21785  # Check if we need to convert this using DOS-style short mode. If the path
21786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21787  # take no chances and rewrite it.
21788  # Note: m4 eats our [], so we need to use [ and ] instead.
21789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21790  if test "x$has_forbidden_chars" != x; then
21791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21793  fi
21794
21795
21796  windows_path="$new_path"
21797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21798    unix_path=`$CYGPATH -u "$windows_path"`
21799    new_path="$unix_path"
21800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21802    new_path="$unix_path"
21803  fi
21804
21805  if test "x$path" != "x$new_path"; then
21806    BOOT_JDK="$new_path"
21807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21809  fi
21810
21811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21813
21814    else
21815      # We're on a unix platform. Hooray! :)
21816      path="$BOOT_JDK"
21817      has_space=`$ECHO "$path" | $GREP " "`
21818      if test "x$has_space" != x; then
21819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21822      fi
21823
21824      # Use eval to expand a potential ~
21825      eval path="$path"
21826      if test ! -f "$path" && test ! -d "$path"; then
21827        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21828      fi
21829
21830      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21831    fi
21832  fi
21833
21834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21835$as_echo_n "checking for Boot JDK... " >&6; }
21836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21837$as_echo "$BOOT_JDK" >&6; }
21838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21839$as_echo_n "checking Boot JDK version... " >&6; }
21840            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21842$as_echo "$BOOT_JDK_VERSION" >&6; }
21843          fi # end check jdk version
21844        fi # end check javac
21845      fi # end check java
21846    fi # end check boot jdk found
21847  fi
21848
21849    # If that did not work out (e.g. too old), try explicit versions instead
21850
21851  if test "x$BOOT_JDK_FOUND" = xno; then
21852    # Now execute the test
21853
21854  if test -x /usr/libexec/java_home; then
21855    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21856    BOOT_JDK_FOUND=maybe
21857    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21858$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21859  fi
21860
21861
21862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21864      # Do we have a bin/java?
21865      if test ! -x "$BOOT_JDK/bin/java"; then
21866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21868        BOOT_JDK_FOUND=no
21869      else
21870        # Do we have a bin/javac?
21871        if test ! -x "$BOOT_JDK/bin/javac"; then
21872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21876          BOOT_JDK_FOUND=no
21877        else
21878          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21879          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21880
21881          # Extra M4 quote needed to protect [] in grep expression.
21882          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21883          if test "x$FOUND_CORRECT_VERSION" = x; then
21884            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21886            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21887$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21888            BOOT_JDK_FOUND=no
21889          else
21890            # We're done! :-)
21891            BOOT_JDK_FOUND=yes
21892
21893  # Only process if variable expands to non-empty
21894
21895  if test "x$BOOT_JDK" != x; then
21896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21897
21898  # Input might be given as Windows format, start by converting to
21899  # unix format.
21900  path="$BOOT_JDK"
21901  new_path=`$CYGPATH -u "$path"`
21902
21903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21906  # "foo.exe" is OK but "foo" is an error.
21907  #
21908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21909  # It is also a way to make sure we got the proper file name for the real test later on.
21910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21911  if test "x$test_shortpath" = x; then
21912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21914    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21915  fi
21916
21917  # Call helper function which possibly converts this using DOS-style short mode.
21918  # If so, the updated path is stored in $new_path.
21919
21920  input_path="$new_path"
21921  # Check if we need to convert this using DOS-style short mode. If the path
21922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21923  # take no chances and rewrite it.
21924  # Note: m4 eats our [], so we need to use [ and ] instead.
21925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21926  if test "x$has_forbidden_chars" != x; then
21927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21931      # Going to short mode and back again did indeed matter. Since short mode is
21932      # case insensitive, let's make it lowercase to improve readability.
21933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21934      # Now convert it back to Unix-style (cygpath)
21935      input_path=`$CYGPATH -u "$shortmode_path"`
21936      new_path="$input_path"
21937    fi
21938  fi
21939
21940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21941  if test "x$test_cygdrive_prefix" = x; then
21942    # As a simple fix, exclude /usr/bin since it's not a real path.
21943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21945      # a path prefixed by /cygdrive for fixpath to work.
21946      new_path="$CYGWIN_ROOT_PATH$input_path"
21947    fi
21948  fi
21949
21950
21951  if test "x$path" != "x$new_path"; then
21952    BOOT_JDK="$new_path"
21953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21955  fi
21956
21957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21958
21959  path="$BOOT_JDK"
21960  has_colon=`$ECHO $path | $GREP ^.:`
21961  new_path="$path"
21962  if test "x$has_colon" = x; then
21963    # Not in mixed or Windows style, start by that.
21964    new_path=`cmd //c echo $path`
21965  fi
21966
21967
21968  input_path="$new_path"
21969  # Check if we need to convert this using DOS-style short mode. If the path
21970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21971  # take no chances and rewrite it.
21972  # Note: m4 eats our [], so we need to use [ and ] instead.
21973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21974  if test "x$has_forbidden_chars" != x; then
21975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21977  fi
21978
21979
21980  windows_path="$new_path"
21981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21982    unix_path=`$CYGPATH -u "$windows_path"`
21983    new_path="$unix_path"
21984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21986    new_path="$unix_path"
21987  fi
21988
21989  if test "x$path" != "x$new_path"; then
21990    BOOT_JDK="$new_path"
21991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21993  fi
21994
21995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21997
21998    else
21999      # We're on a unix platform. Hooray! :)
22000      path="$BOOT_JDK"
22001      has_space=`$ECHO "$path" | $GREP " "`
22002      if test "x$has_space" != x; then
22003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22006      fi
22007
22008      # Use eval to expand a potential ~
22009      eval path="$path"
22010      if test ! -f "$path" && test ! -d "$path"; then
22011        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22012      fi
22013
22014      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22015    fi
22016  fi
22017
22018            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22019$as_echo_n "checking for Boot JDK... " >&6; }
22020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22021$as_echo "$BOOT_JDK" >&6; }
22022            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22023$as_echo_n "checking Boot JDK version... " >&6; }
22024            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22026$as_echo "$BOOT_JDK_VERSION" >&6; }
22027          fi # end check jdk version
22028        fi # end check javac
22029      fi # end check java
22030    fi # end check boot jdk found
22031  fi
22032
22033
22034  if test "x$BOOT_JDK_FOUND" = xno; then
22035    # Now execute the test
22036
22037  if test -x /usr/libexec/java_home; then
22038    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
22039    BOOT_JDK_FOUND=maybe
22040    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
22041$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
22042  fi
22043
22044
22045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22047      # Do we have a bin/java?
22048      if test ! -x "$BOOT_JDK/bin/java"; then
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22051        BOOT_JDK_FOUND=no
22052      else
22053        # Do we have a bin/javac?
22054        if test ! -x "$BOOT_JDK/bin/javac"; then
22055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22059          BOOT_JDK_FOUND=no
22060        else
22061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22063
22064          # Extra M4 quote needed to protect [] in grep expression.
22065          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22066          if test "x$FOUND_CORRECT_VERSION" = x; then
22067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22071            BOOT_JDK_FOUND=no
22072          else
22073            # We're done! :-)
22074            BOOT_JDK_FOUND=yes
22075
22076  # Only process if variable expands to non-empty
22077
22078  if test "x$BOOT_JDK" != x; then
22079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22080
22081  # Input might be given as Windows format, start by converting to
22082  # unix format.
22083  path="$BOOT_JDK"
22084  new_path=`$CYGPATH -u "$path"`
22085
22086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22089  # "foo.exe" is OK but "foo" is an error.
22090  #
22091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22092  # It is also a way to make sure we got the proper file name for the real test later on.
22093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22094  if test "x$test_shortpath" = x; then
22095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22098  fi
22099
22100  # Call helper function which possibly converts this using DOS-style short mode.
22101  # If so, the updated path is stored in $new_path.
22102
22103  input_path="$new_path"
22104  # Check if we need to convert this using DOS-style short mode. If the path
22105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22106  # take no chances and rewrite it.
22107  # Note: m4 eats our [], so we need to use [ and ] instead.
22108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22109  if test "x$has_forbidden_chars" != x; then
22110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22114      # Going to short mode and back again did indeed matter. Since short mode is
22115      # case insensitive, let's make it lowercase to improve readability.
22116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22117      # Now convert it back to Unix-style (cygpath)
22118      input_path=`$CYGPATH -u "$shortmode_path"`
22119      new_path="$input_path"
22120    fi
22121  fi
22122
22123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22124  if test "x$test_cygdrive_prefix" = x; then
22125    # As a simple fix, exclude /usr/bin since it's not a real path.
22126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22128      # a path prefixed by /cygdrive for fixpath to work.
22129      new_path="$CYGWIN_ROOT_PATH$input_path"
22130    fi
22131  fi
22132
22133
22134  if test "x$path" != "x$new_path"; then
22135    BOOT_JDK="$new_path"
22136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22138  fi
22139
22140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22141
22142  path="$BOOT_JDK"
22143  has_colon=`$ECHO $path | $GREP ^.:`
22144  new_path="$path"
22145  if test "x$has_colon" = x; then
22146    # Not in mixed or Windows style, start by that.
22147    new_path=`cmd //c echo $path`
22148  fi
22149
22150
22151  input_path="$new_path"
22152  # Check if we need to convert this using DOS-style short mode. If the path
22153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22154  # take no chances and rewrite it.
22155  # Note: m4 eats our [], so we need to use [ and ] instead.
22156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22157  if test "x$has_forbidden_chars" != x; then
22158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22160  fi
22161
22162
22163  windows_path="$new_path"
22164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22165    unix_path=`$CYGPATH -u "$windows_path"`
22166    new_path="$unix_path"
22167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22169    new_path="$unix_path"
22170  fi
22171
22172  if test "x$path" != "x$new_path"; then
22173    BOOT_JDK="$new_path"
22174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22176  fi
22177
22178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22180
22181    else
22182      # We're on a unix platform. Hooray! :)
22183      path="$BOOT_JDK"
22184      has_space=`$ECHO "$path" | $GREP " "`
22185      if test "x$has_space" != x; then
22186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22189      fi
22190
22191      # Use eval to expand a potential ~
22192      eval path="$path"
22193      if test ! -f "$path" && test ! -d "$path"; then
22194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22195      fi
22196
22197      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22198    fi
22199  fi
22200
22201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22202$as_echo_n "checking for Boot JDK... " >&6; }
22203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22204$as_echo "$BOOT_JDK" >&6; }
22205            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22206$as_echo_n "checking Boot JDK version... " >&6; }
22207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22209$as_echo "$BOOT_JDK_VERSION" >&6; }
22210          fi # end check jdk version
22211        fi # end check javac
22212      fi # end check java
22213    fi # end check boot jdk found
22214  fi
22215
22216
22217  if test "x$BOOT_JDK_FOUND" = xno; then
22218    # Now execute the test
22219
22220  if test -x /usr/libexec/java_home; then
22221    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
22222    BOOT_JDK_FOUND=maybe
22223    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
22224$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
22225  fi
22226
22227
22228    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22229    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22230      # Do we have a bin/java?
22231      if test ! -x "$BOOT_JDK/bin/java"; then
22232        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22234        BOOT_JDK_FOUND=no
22235      else
22236        # Do we have a bin/javac?
22237        if test ! -x "$BOOT_JDK/bin/javac"; then
22238          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22240          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22241$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22242          BOOT_JDK_FOUND=no
22243        else
22244          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22245          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22246
22247          # Extra M4 quote needed to protect [] in grep expression.
22248          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22249          if test "x$FOUND_CORRECT_VERSION" = x; then
22250            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22252            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22253$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22254            BOOT_JDK_FOUND=no
22255          else
22256            # We're done! :-)
22257            BOOT_JDK_FOUND=yes
22258
22259  # Only process if variable expands to non-empty
22260
22261  if test "x$BOOT_JDK" != x; then
22262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22263
22264  # Input might be given as Windows format, start by converting to
22265  # unix format.
22266  path="$BOOT_JDK"
22267  new_path=`$CYGPATH -u "$path"`
22268
22269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22272  # "foo.exe" is OK but "foo" is an error.
22273  #
22274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22275  # It is also a way to make sure we got the proper file name for the real test later on.
22276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22277  if test "x$test_shortpath" = x; then
22278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22280    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22281  fi
22282
22283  # Call helper function which possibly converts this using DOS-style short mode.
22284  # If so, the updated path is stored in $new_path.
22285
22286  input_path="$new_path"
22287  # Check if we need to convert this using DOS-style short mode. If the path
22288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22289  # take no chances and rewrite it.
22290  # Note: m4 eats our [], so we need to use [ and ] instead.
22291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22292  if test "x$has_forbidden_chars" != x; then
22293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22297      # Going to short mode and back again did indeed matter. Since short mode is
22298      # case insensitive, let's make it lowercase to improve readability.
22299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22300      # Now convert it back to Unix-style (cygpath)
22301      input_path=`$CYGPATH -u "$shortmode_path"`
22302      new_path="$input_path"
22303    fi
22304  fi
22305
22306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22307  if test "x$test_cygdrive_prefix" = x; then
22308    # As a simple fix, exclude /usr/bin since it's not a real path.
22309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22311      # a path prefixed by /cygdrive for fixpath to work.
22312      new_path="$CYGWIN_ROOT_PATH$input_path"
22313    fi
22314  fi
22315
22316
22317  if test "x$path" != "x$new_path"; then
22318    BOOT_JDK="$new_path"
22319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22321  fi
22322
22323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22324
22325  path="$BOOT_JDK"
22326  has_colon=`$ECHO $path | $GREP ^.:`
22327  new_path="$path"
22328  if test "x$has_colon" = x; then
22329    # Not in mixed or Windows style, start by that.
22330    new_path=`cmd //c echo $path`
22331  fi
22332
22333
22334  input_path="$new_path"
22335  # Check if we need to convert this using DOS-style short mode. If the path
22336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22337  # take no chances and rewrite it.
22338  # Note: m4 eats our [], so we need to use [ and ] instead.
22339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22340  if test "x$has_forbidden_chars" != x; then
22341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22343  fi
22344
22345
22346  windows_path="$new_path"
22347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22348    unix_path=`$CYGPATH -u "$windows_path"`
22349    new_path="$unix_path"
22350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22352    new_path="$unix_path"
22353  fi
22354
22355  if test "x$path" != "x$new_path"; then
22356    BOOT_JDK="$new_path"
22357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22359  fi
22360
22361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22363
22364    else
22365      # We're on a unix platform. Hooray! :)
22366      path="$BOOT_JDK"
22367      has_space=`$ECHO "$path" | $GREP " "`
22368      if test "x$has_space" != x; then
22369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22371        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22372      fi
22373
22374      # Use eval to expand a potential ~
22375      eval path="$path"
22376      if test ! -f "$path" && test ! -d "$path"; then
22377        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22378      fi
22379
22380      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22381    fi
22382  fi
22383
22384            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22385$as_echo_n "checking for Boot JDK... " >&6; }
22386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22387$as_echo "$BOOT_JDK" >&6; }
22388            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22389$as_echo_n "checking Boot JDK version... " >&6; }
22390            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22391            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22392$as_echo "$BOOT_JDK_VERSION" >&6; }
22393          fi # end check jdk version
22394        fi # end check javac
22395      fi # end check java
22396    fi # end check boot jdk found
22397  fi
22398
22399  fi
22400
22401
22402    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22403    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22404      # Do we have a bin/java?
22405      if test ! -x "$BOOT_JDK/bin/java"; then
22406        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22408        BOOT_JDK_FOUND=no
22409      else
22410        # Do we have a bin/javac?
22411        if test ! -x "$BOOT_JDK/bin/javac"; then
22412          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22414          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22415$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22416          BOOT_JDK_FOUND=no
22417        else
22418          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22419          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22420
22421          # Extra M4 quote needed to protect [] in grep expression.
22422          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22423          if test "x$FOUND_CORRECT_VERSION" = x; then
22424            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22426            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22427$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22428            BOOT_JDK_FOUND=no
22429          else
22430            # We're done! :-)
22431            BOOT_JDK_FOUND=yes
22432
22433  # Only process if variable expands to non-empty
22434
22435  if test "x$BOOT_JDK" != x; then
22436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22437
22438  # Input might be given as Windows format, start by converting to
22439  # unix format.
22440  path="$BOOT_JDK"
22441  new_path=`$CYGPATH -u "$path"`
22442
22443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22446  # "foo.exe" is OK but "foo" is an error.
22447  #
22448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22449  # It is also a way to make sure we got the proper file name for the real test later on.
22450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22451  if test "x$test_shortpath" = x; then
22452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22454    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22455  fi
22456
22457  # Call helper function which possibly converts this using DOS-style short mode.
22458  # If so, the updated path is stored in $new_path.
22459
22460  input_path="$new_path"
22461  # Check if we need to convert this using DOS-style short mode. If the path
22462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22463  # take no chances and rewrite it.
22464  # Note: m4 eats our [], so we need to use [ and ] instead.
22465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22466  if test "x$has_forbidden_chars" != x; then
22467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22471      # Going to short mode and back again did indeed matter. Since short mode is
22472      # case insensitive, let's make it lowercase to improve readability.
22473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22474      # Now convert it back to Unix-style (cygpath)
22475      input_path=`$CYGPATH -u "$shortmode_path"`
22476      new_path="$input_path"
22477    fi
22478  fi
22479
22480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22481  if test "x$test_cygdrive_prefix" = x; then
22482    # As a simple fix, exclude /usr/bin since it's not a real path.
22483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22485      # a path prefixed by /cygdrive for fixpath to work.
22486      new_path="$CYGWIN_ROOT_PATH$input_path"
22487    fi
22488  fi
22489
22490
22491  if test "x$path" != "x$new_path"; then
22492    BOOT_JDK="$new_path"
22493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22495  fi
22496
22497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22498
22499  path="$BOOT_JDK"
22500  has_colon=`$ECHO $path | $GREP ^.:`
22501  new_path="$path"
22502  if test "x$has_colon" = x; then
22503    # Not in mixed or Windows style, start by that.
22504    new_path=`cmd //c echo $path`
22505  fi
22506
22507
22508  input_path="$new_path"
22509  # Check if we need to convert this using DOS-style short mode. If the path
22510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22511  # take no chances and rewrite it.
22512  # Note: m4 eats our [], so we need to use [ and ] instead.
22513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22514  if test "x$has_forbidden_chars" != x; then
22515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22517  fi
22518
22519
22520  windows_path="$new_path"
22521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22522    unix_path=`$CYGPATH -u "$windows_path"`
22523    new_path="$unix_path"
22524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22526    new_path="$unix_path"
22527  fi
22528
22529  if test "x$path" != "x$new_path"; then
22530    BOOT_JDK="$new_path"
22531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22533  fi
22534
22535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22537
22538    else
22539      # We're on a unix platform. Hooray! :)
22540      path="$BOOT_JDK"
22541      has_space=`$ECHO "$path" | $GREP " "`
22542      if test "x$has_space" != x; then
22543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22546      fi
22547
22548      # Use eval to expand a potential ~
22549      eval path="$path"
22550      if test ! -f "$path" && test ! -d "$path"; then
22551        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22552      fi
22553
22554      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22555    fi
22556  fi
22557
22558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22559$as_echo_n "checking for Boot JDK... " >&6; }
22560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22561$as_echo "$BOOT_JDK" >&6; }
22562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22563$as_echo_n "checking Boot JDK version... " >&6; }
22564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22566$as_echo "$BOOT_JDK_VERSION" >&6; }
22567          fi # end check jdk version
22568        fi # end check javac
22569      fi # end check java
22570    fi # end check boot jdk found
22571  fi
22572
22573
22574  # Test: Is $JAVA_HOME set?
22575
22576  if test "x$BOOT_JDK_FOUND" = xno; then
22577    # Now execute the test
22578
22579  if test "x$JAVA_HOME" != x; then
22580    JAVA_HOME_PROCESSED="$JAVA_HOME"
22581
22582  # Only process if variable expands to non-empty
22583
22584  if test "x$JAVA_HOME_PROCESSED" != x; then
22585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22586
22587  # Input might be given as Windows format, start by converting to
22588  # unix format.
22589  path="$JAVA_HOME_PROCESSED"
22590  new_path=`$CYGPATH -u "$path"`
22591
22592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22595  # "foo.exe" is OK but "foo" is an error.
22596  #
22597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22598  # It is also a way to make sure we got the proper file name for the real test later on.
22599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22600  if test "x$test_shortpath" = x; then
22601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22602$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22603    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22604  fi
22605
22606  # Call helper function which possibly converts this using DOS-style short mode.
22607  # If so, the updated path is stored in $new_path.
22608
22609  input_path="$new_path"
22610  # Check if we need to convert this using DOS-style short mode. If the path
22611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22612  # take no chances and rewrite it.
22613  # Note: m4 eats our [], so we need to use [ and ] instead.
22614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22615  if test "x$has_forbidden_chars" != x; then
22616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22620      # Going to short mode and back again did indeed matter. Since short mode is
22621      # case insensitive, let's make it lowercase to improve readability.
22622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22623      # Now convert it back to Unix-style (cygpath)
22624      input_path=`$CYGPATH -u "$shortmode_path"`
22625      new_path="$input_path"
22626    fi
22627  fi
22628
22629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22630  if test "x$test_cygdrive_prefix" = x; then
22631    # As a simple fix, exclude /usr/bin since it's not a real path.
22632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22634      # a path prefixed by /cygdrive for fixpath to work.
22635      new_path="$CYGWIN_ROOT_PATH$input_path"
22636    fi
22637  fi
22638
22639
22640  if test "x$path" != "x$new_path"; then
22641    JAVA_HOME_PROCESSED="$new_path"
22642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22643$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22644  fi
22645
22646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22647
22648  path="$JAVA_HOME_PROCESSED"
22649  has_colon=`$ECHO $path | $GREP ^.:`
22650  new_path="$path"
22651  if test "x$has_colon" = x; then
22652    # Not in mixed or Windows style, start by that.
22653    new_path=`cmd //c echo $path`
22654  fi
22655
22656
22657  input_path="$new_path"
22658  # Check if we need to convert this using DOS-style short mode. If the path
22659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22660  # take no chances and rewrite it.
22661  # Note: m4 eats our [], so we need to use [ and ] instead.
22662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22663  if test "x$has_forbidden_chars" != x; then
22664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22666  fi
22667
22668
22669  windows_path="$new_path"
22670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22671    unix_path=`$CYGPATH -u "$windows_path"`
22672    new_path="$unix_path"
22673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22675    new_path="$unix_path"
22676  fi
22677
22678  if test "x$path" != "x$new_path"; then
22679    JAVA_HOME_PROCESSED="$new_path"
22680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22681$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22682  fi
22683
22684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22686
22687    else
22688      # We're on a unix platform. Hooray! :)
22689      path="$JAVA_HOME_PROCESSED"
22690      has_space=`$ECHO "$path" | $GREP " "`
22691      if test "x$has_space" != x; then
22692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22693$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22695      fi
22696
22697      # Use eval to expand a potential ~
22698      eval path="$path"
22699      if test ! -f "$path" && test ! -d "$path"; then
22700        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22701      fi
22702
22703      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22704    fi
22705  fi
22706
22707    if test ! -d "$JAVA_HOME_PROCESSED"; then
22708      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22709$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22710    else
22711      # Aha, the user has set a JAVA_HOME
22712      # let us use that as the Boot JDK.
22713      BOOT_JDK="$JAVA_HOME_PROCESSED"
22714      BOOT_JDK_FOUND=maybe
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22716$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22717    fi
22718  fi
22719
22720
22721    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22722    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22723      # Do we have a bin/java?
22724      if test ! -x "$BOOT_JDK/bin/java"; then
22725        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22727        BOOT_JDK_FOUND=no
22728      else
22729        # Do we have a bin/javac?
22730        if test ! -x "$BOOT_JDK/bin/javac"; then
22731          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22733          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22734$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22735          BOOT_JDK_FOUND=no
22736        else
22737          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22738          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22739
22740          # Extra M4 quote needed to protect [] in grep expression.
22741          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22742          if test "x$FOUND_CORRECT_VERSION" = x; then
22743            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22745            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22746$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22747            BOOT_JDK_FOUND=no
22748          else
22749            # We're done! :-)
22750            BOOT_JDK_FOUND=yes
22751
22752  # Only process if variable expands to non-empty
22753
22754  if test "x$BOOT_JDK" != x; then
22755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22756
22757  # Input might be given as Windows format, start by converting to
22758  # unix format.
22759  path="$BOOT_JDK"
22760  new_path=`$CYGPATH -u "$path"`
22761
22762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22765  # "foo.exe" is OK but "foo" is an error.
22766  #
22767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22768  # It is also a way to make sure we got the proper file name for the real test later on.
22769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22770  if test "x$test_shortpath" = x; then
22771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22772$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22773    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22774  fi
22775
22776  # Call helper function which possibly converts this using DOS-style short mode.
22777  # If so, the updated path is stored in $new_path.
22778
22779  input_path="$new_path"
22780  # Check if we need to convert this using DOS-style short mode. If the path
22781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22782  # take no chances and rewrite it.
22783  # Note: m4 eats our [], so we need to use [ and ] instead.
22784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22785  if test "x$has_forbidden_chars" != x; then
22786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22790      # Going to short mode and back again did indeed matter. Since short mode is
22791      # case insensitive, let's make it lowercase to improve readability.
22792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22793      # Now convert it back to Unix-style (cygpath)
22794      input_path=`$CYGPATH -u "$shortmode_path"`
22795      new_path="$input_path"
22796    fi
22797  fi
22798
22799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22800  if test "x$test_cygdrive_prefix" = x; then
22801    # As a simple fix, exclude /usr/bin since it's not a real path.
22802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22804      # a path prefixed by /cygdrive for fixpath to work.
22805      new_path="$CYGWIN_ROOT_PATH$input_path"
22806    fi
22807  fi
22808
22809
22810  if test "x$path" != "x$new_path"; then
22811    BOOT_JDK="$new_path"
22812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22813$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22814  fi
22815
22816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22817
22818  path="$BOOT_JDK"
22819  has_colon=`$ECHO $path | $GREP ^.:`
22820  new_path="$path"
22821  if test "x$has_colon" = x; then
22822    # Not in mixed or Windows style, start by that.
22823    new_path=`cmd //c echo $path`
22824  fi
22825
22826
22827  input_path="$new_path"
22828  # Check if we need to convert this using DOS-style short mode. If the path
22829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22830  # take no chances and rewrite it.
22831  # Note: m4 eats our [], so we need to use [ and ] instead.
22832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22833  if test "x$has_forbidden_chars" != x; then
22834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22836  fi
22837
22838
22839  windows_path="$new_path"
22840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841    unix_path=`$CYGPATH -u "$windows_path"`
22842    new_path="$unix_path"
22843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22845    new_path="$unix_path"
22846  fi
22847
22848  if test "x$path" != "x$new_path"; then
22849    BOOT_JDK="$new_path"
22850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22852  fi
22853
22854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22856
22857    else
22858      # We're on a unix platform. Hooray! :)
22859      path="$BOOT_JDK"
22860      has_space=`$ECHO "$path" | $GREP " "`
22861      if test "x$has_space" != x; then
22862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22864        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22865      fi
22866
22867      # Use eval to expand a potential ~
22868      eval path="$path"
22869      if test ! -f "$path" && test ! -d "$path"; then
22870        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22871      fi
22872
22873      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22874    fi
22875  fi
22876
22877            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22878$as_echo_n "checking for Boot JDK... " >&6; }
22879            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22880$as_echo "$BOOT_JDK" >&6; }
22881            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22882$as_echo_n "checking Boot JDK version... " >&6; }
22883            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22885$as_echo "$BOOT_JDK_VERSION" >&6; }
22886          fi # end check jdk version
22887        fi # end check javac
22888      fi # end check java
22889    fi # end check boot jdk found
22890  fi
22891
22892
22893  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22894
22895  if test "x$BOOT_JDK_FOUND" = xno; then
22896    # Now execute the test
22897
22898  # Extract the first word of "javac", so it can be a program name with args.
22899set dummy javac; ac_word=$2
22900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22901$as_echo_n "checking for $ac_word... " >&6; }
22902if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22903  $as_echo_n "(cached) " >&6
22904else
22905  case $JAVAC_CHECK in
22906  [\\/]* | ?:[\\/]*)
22907  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22908  ;;
22909  *)
22910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22911for as_dir in $PATH
22912do
22913  IFS=$as_save_IFS
22914  test -z "$as_dir" && as_dir=.
22915    for ac_exec_ext in '' $ac_executable_extensions; do
22916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22917    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22919    break 2
22920  fi
22921done
22922  done
22923IFS=$as_save_IFS
22924
22925  ;;
22926esac
22927fi
22928JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22929if test -n "$JAVAC_CHECK"; then
22930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22931$as_echo "$JAVAC_CHECK" >&6; }
22932else
22933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22934$as_echo "no" >&6; }
22935fi
22936
22937
22938  # Extract the first word of "java", so it can be a program name with args.
22939set dummy java; ac_word=$2
22940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22941$as_echo_n "checking for $ac_word... " >&6; }
22942if ${ac_cv_path_JAVA_CHECK+:} false; then :
22943  $as_echo_n "(cached) " >&6
22944else
22945  case $JAVA_CHECK in
22946  [\\/]* | ?:[\\/]*)
22947  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22948  ;;
22949  *)
22950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22951for as_dir in $PATH
22952do
22953  IFS=$as_save_IFS
22954  test -z "$as_dir" && as_dir=.
22955    for ac_exec_ext in '' $ac_executable_extensions; do
22956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22957    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22959    break 2
22960  fi
22961done
22962  done
22963IFS=$as_save_IFS
22964
22965  ;;
22966esac
22967fi
22968JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22969if test -n "$JAVA_CHECK"; then
22970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22971$as_echo "$JAVA_CHECK" >&6; }
22972else
22973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22974$as_echo "no" >&6; }
22975fi
22976
22977
22978  BINARY="$JAVAC_CHECK"
22979  if test "x$JAVAC_CHECK" = x; then
22980    BINARY="$JAVA_CHECK"
22981  fi
22982  if test "x$BINARY" != x; then
22983    # So there is a java(c) binary, it might be part of a JDK.
22984    # Lets find the JDK/JRE directory by following symbolic links.
22985    # Linux/GNU systems often have links from /usr/bin/java to
22986    # /etc/alternatives/java to the real JDK binary.
22987
22988  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22989    # Follow a chain of symbolic links. Use readlink
22990    # where it exists, else fall back to horribly
22991    # complicated shell code.
22992    if test "x$READLINK_TESTED" != yes; then
22993      # On MacOSX there is a readlink tool with a different
22994      # purpose than the GNU readlink tool. Check the found readlink.
22995      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22996      if test "x$ISGNU" = x; then
22997        # A readlink that we do not know how to use.
22998        # Are there other non-GNU readlinks out there?
22999        READLINK_TESTED=yes
23000        READLINK=
23001      fi
23002    fi
23003
23004    if test "x$READLINK" != x; then
23005      BINARY=`$READLINK -f $BINARY`
23006    else
23007      # Save the current directory for restoring afterwards
23008      STARTDIR=$PWD
23009      COUNTER=0
23010      sym_link_dir=`$DIRNAME $BINARY`
23011      sym_link_file=`$BASENAME $BINARY`
23012      cd $sym_link_dir
23013      # Use -P flag to resolve symlinks in directories.
23014      cd `$THEPWDCMD -P`
23015      sym_link_dir=`$THEPWDCMD -P`
23016      # Resolve file symlinks
23017      while test $COUNTER -lt 20; do
23018        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
23019        if test "x$ISLINK" == x; then
23020          # This is not a symbolic link! We are done!
23021          break
23022        fi
23023        # Again resolve directory symlinks since the target of the just found
23024        # link could be in a different directory
23025        cd `$DIRNAME $ISLINK`
23026        sym_link_dir=`$THEPWDCMD -P`
23027        sym_link_file=`$BASENAME $ISLINK`
23028        let COUNTER=COUNTER+1
23029      done
23030      cd $STARTDIR
23031      BINARY=$sym_link_dir/$sym_link_file
23032    fi
23033  fi
23034
23035    BOOT_JDK=`dirname "$BINARY"`
23036    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
23037    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
23038      # Looks like we found ourselves an JDK
23039      BOOT_JDK_FOUND=maybe
23040      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
23041$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
23042    fi
23043  fi
23044
23045
23046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23048      # Do we have a bin/java?
23049      if test ! -x "$BOOT_JDK/bin/java"; then
23050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23052        BOOT_JDK_FOUND=no
23053      else
23054        # Do we have a bin/javac?
23055        if test ! -x "$BOOT_JDK/bin/javac"; then
23056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23060          BOOT_JDK_FOUND=no
23061        else
23062          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23063          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23064
23065          # Extra M4 quote needed to protect [] in grep expression.
23066          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23067          if test "x$FOUND_CORRECT_VERSION" = x; then
23068            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23070            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23071$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23072            BOOT_JDK_FOUND=no
23073          else
23074            # We're done! :-)
23075            BOOT_JDK_FOUND=yes
23076
23077  # Only process if variable expands to non-empty
23078
23079  if test "x$BOOT_JDK" != x; then
23080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23081
23082  # Input might be given as Windows format, start by converting to
23083  # unix format.
23084  path="$BOOT_JDK"
23085  new_path=`$CYGPATH -u "$path"`
23086
23087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23090  # "foo.exe" is OK but "foo" is an error.
23091  #
23092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23093  # It is also a way to make sure we got the proper file name for the real test later on.
23094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23095  if test "x$test_shortpath" = x; then
23096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23098    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23099  fi
23100
23101  # Call helper function which possibly converts this using DOS-style short mode.
23102  # If so, the updated path is stored in $new_path.
23103
23104  input_path="$new_path"
23105  # Check if we need to convert this using DOS-style short mode. If the path
23106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23107  # take no chances and rewrite it.
23108  # Note: m4 eats our [], so we need to use [ and ] instead.
23109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23110  if test "x$has_forbidden_chars" != x; then
23111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23115      # Going to short mode and back again did indeed matter. Since short mode is
23116      # case insensitive, let's make it lowercase to improve readability.
23117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23118      # Now convert it back to Unix-style (cygpath)
23119      input_path=`$CYGPATH -u "$shortmode_path"`
23120      new_path="$input_path"
23121    fi
23122  fi
23123
23124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23125  if test "x$test_cygdrive_prefix" = x; then
23126    # As a simple fix, exclude /usr/bin since it's not a real path.
23127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23129      # a path prefixed by /cygdrive for fixpath to work.
23130      new_path="$CYGWIN_ROOT_PATH$input_path"
23131    fi
23132  fi
23133
23134
23135  if test "x$path" != "x$new_path"; then
23136    BOOT_JDK="$new_path"
23137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23139  fi
23140
23141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23142
23143  path="$BOOT_JDK"
23144  has_colon=`$ECHO $path | $GREP ^.:`
23145  new_path="$path"
23146  if test "x$has_colon" = x; then
23147    # Not in mixed or Windows style, start by that.
23148    new_path=`cmd //c echo $path`
23149  fi
23150
23151
23152  input_path="$new_path"
23153  # Check if we need to convert this using DOS-style short mode. If the path
23154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23155  # take no chances and rewrite it.
23156  # Note: m4 eats our [], so we need to use [ and ] instead.
23157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23158  if test "x$has_forbidden_chars" != x; then
23159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23161  fi
23162
23163
23164  windows_path="$new_path"
23165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23166    unix_path=`$CYGPATH -u "$windows_path"`
23167    new_path="$unix_path"
23168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23170    new_path="$unix_path"
23171  fi
23172
23173  if test "x$path" != "x$new_path"; then
23174    BOOT_JDK="$new_path"
23175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23177  fi
23178
23179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23181
23182    else
23183      # We're on a unix platform. Hooray! :)
23184      path="$BOOT_JDK"
23185      has_space=`$ECHO "$path" | $GREP " "`
23186      if test "x$has_space" != x; then
23187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23190      fi
23191
23192      # Use eval to expand a potential ~
23193      eval path="$path"
23194      if test ! -f "$path" && test ! -d "$path"; then
23195        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23196      fi
23197
23198      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23199    fi
23200  fi
23201
23202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23203$as_echo_n "checking for Boot JDK... " >&6; }
23204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23205$as_echo "$BOOT_JDK" >&6; }
23206            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23207$as_echo_n "checking Boot JDK version... " >&6; }
23208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23210$as_echo "$BOOT_JDK_VERSION" >&6; }
23211          fi # end check jdk version
23212        fi # end check javac
23213      fi # end check java
23214    fi # end check boot jdk found
23215  fi
23216
23217
23218  # Test: Is there a JDK installed in default, well-known locations?
23219
23220  if test "x$BOOT_JDK_FOUND" = xno; then
23221    # Now execute the test
23222
23223  if test "x$OPENJDK_TARGET_OS" = xwindows; then
23224
23225  if test "x$BOOT_JDK_FOUND" = xno; then
23226    # Now execute the test
23227
23228  if test "x$ProgramW6432" != x; then
23229    VIRTUAL_DIR="$ProgramW6432/Java"
23230
23231  windows_path="$VIRTUAL_DIR"
23232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23233    unix_path=`$CYGPATH -u "$windows_path"`
23234    VIRTUAL_DIR="$unix_path"
23235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23237    VIRTUAL_DIR="$unix_path"
23238  fi
23239
23240
23241  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23242  BOOT_JDK_SUFFIX=""
23243  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23244  if test "x$ALL_JDKS_FOUND" != x; then
23245    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23246
23247  if test "x$BOOT_JDK_FOUND" = xno; then
23248    # Now execute the test
23249
23250        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23251        if test -d "$BOOT_JDK"; then
23252          BOOT_JDK_FOUND=maybe
23253          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23254$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23255        fi
23256
23257
23258    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23259    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23260      # Do we have a bin/java?
23261      if test ! -x "$BOOT_JDK/bin/java"; then
23262        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23264        BOOT_JDK_FOUND=no
23265      else
23266        # Do we have a bin/javac?
23267        if test ! -x "$BOOT_JDK/bin/javac"; then
23268          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23270          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23271$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23272          BOOT_JDK_FOUND=no
23273        else
23274          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23275          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23276
23277          # Extra M4 quote needed to protect [] in grep expression.
23278          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23279          if test "x$FOUND_CORRECT_VERSION" = x; then
23280            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23282            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23283$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23284            BOOT_JDK_FOUND=no
23285          else
23286            # We're done! :-)
23287            BOOT_JDK_FOUND=yes
23288
23289  # Only process if variable expands to non-empty
23290
23291  if test "x$BOOT_JDK" != x; then
23292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23293
23294  # Input might be given as Windows format, start by converting to
23295  # unix format.
23296  path="$BOOT_JDK"
23297  new_path=`$CYGPATH -u "$path"`
23298
23299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23302  # "foo.exe" is OK but "foo" is an error.
23303  #
23304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23305  # It is also a way to make sure we got the proper file name for the real test later on.
23306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23307  if test "x$test_shortpath" = x; then
23308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23310    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23311  fi
23312
23313  # Call helper function which possibly converts this using DOS-style short mode.
23314  # If so, the updated path is stored in $new_path.
23315
23316  input_path="$new_path"
23317  # Check if we need to convert this using DOS-style short mode. If the path
23318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23319  # take no chances and rewrite it.
23320  # Note: m4 eats our [], so we need to use [ and ] instead.
23321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23322  if test "x$has_forbidden_chars" != x; then
23323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23327      # Going to short mode and back again did indeed matter. Since short mode is
23328      # case insensitive, let's make it lowercase to improve readability.
23329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23330      # Now convert it back to Unix-style (cygpath)
23331      input_path=`$CYGPATH -u "$shortmode_path"`
23332      new_path="$input_path"
23333    fi
23334  fi
23335
23336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23337  if test "x$test_cygdrive_prefix" = x; then
23338    # As a simple fix, exclude /usr/bin since it's not a real path.
23339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23341      # a path prefixed by /cygdrive for fixpath to work.
23342      new_path="$CYGWIN_ROOT_PATH$input_path"
23343    fi
23344  fi
23345
23346
23347  if test "x$path" != "x$new_path"; then
23348    BOOT_JDK="$new_path"
23349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23351  fi
23352
23353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23354
23355  path="$BOOT_JDK"
23356  has_colon=`$ECHO $path | $GREP ^.:`
23357  new_path="$path"
23358  if test "x$has_colon" = x; then
23359    # Not in mixed or Windows style, start by that.
23360    new_path=`cmd //c echo $path`
23361  fi
23362
23363
23364  input_path="$new_path"
23365  # Check if we need to convert this using DOS-style short mode. If the path
23366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23367  # take no chances and rewrite it.
23368  # Note: m4 eats our [], so we need to use [ and ] instead.
23369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23370  if test "x$has_forbidden_chars" != x; then
23371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23373  fi
23374
23375
23376  windows_path="$new_path"
23377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23378    unix_path=`$CYGPATH -u "$windows_path"`
23379    new_path="$unix_path"
23380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23382    new_path="$unix_path"
23383  fi
23384
23385  if test "x$path" != "x$new_path"; then
23386    BOOT_JDK="$new_path"
23387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23389  fi
23390
23391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23393
23394    else
23395      # We're on a unix platform. Hooray! :)
23396      path="$BOOT_JDK"
23397      has_space=`$ECHO "$path" | $GREP " "`
23398      if test "x$has_space" != x; then
23399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23402      fi
23403
23404      # Use eval to expand a potential ~
23405      eval path="$path"
23406      if test ! -f "$path" && test ! -d "$path"; then
23407        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23408      fi
23409
23410      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23411    fi
23412  fi
23413
23414            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23415$as_echo_n "checking for Boot JDK... " >&6; }
23416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23417$as_echo "$BOOT_JDK" >&6; }
23418            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23419$as_echo_n "checking Boot JDK version... " >&6; }
23420            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23422$as_echo "$BOOT_JDK_VERSION" >&6; }
23423          fi # end check jdk version
23424        fi # end check javac
23425      fi # end check java
23426    fi # end check boot jdk found
23427  fi
23428
23429    done
23430  fi
23431
23432  fi
23433
23434
23435    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23436    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23437      # Do we have a bin/java?
23438      if test ! -x "$BOOT_JDK/bin/java"; then
23439        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23441        BOOT_JDK_FOUND=no
23442      else
23443        # Do we have a bin/javac?
23444        if test ! -x "$BOOT_JDK/bin/javac"; then
23445          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23448$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23449          BOOT_JDK_FOUND=no
23450        else
23451          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23452          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23453
23454          # Extra M4 quote needed to protect [] in grep expression.
23455          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23456          if test "x$FOUND_CORRECT_VERSION" = x; then
23457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23459            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23460$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23461            BOOT_JDK_FOUND=no
23462          else
23463            # We're done! :-)
23464            BOOT_JDK_FOUND=yes
23465
23466  # Only process if variable expands to non-empty
23467
23468  if test "x$BOOT_JDK" != x; then
23469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23470
23471  # Input might be given as Windows format, start by converting to
23472  # unix format.
23473  path="$BOOT_JDK"
23474  new_path=`$CYGPATH -u "$path"`
23475
23476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23479  # "foo.exe" is OK but "foo" is an error.
23480  #
23481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23482  # It is also a way to make sure we got the proper file name for the real test later on.
23483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23484  if test "x$test_shortpath" = x; then
23485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23488  fi
23489
23490  # Call helper function which possibly converts this using DOS-style short mode.
23491  # If so, the updated path is stored in $new_path.
23492
23493  input_path="$new_path"
23494  # Check if we need to convert this using DOS-style short mode. If the path
23495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23496  # take no chances and rewrite it.
23497  # Note: m4 eats our [], so we need to use [ and ] instead.
23498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23499  if test "x$has_forbidden_chars" != x; then
23500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23504      # Going to short mode and back again did indeed matter. Since short mode is
23505      # case insensitive, let's make it lowercase to improve readability.
23506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23507      # Now convert it back to Unix-style (cygpath)
23508      input_path=`$CYGPATH -u "$shortmode_path"`
23509      new_path="$input_path"
23510    fi
23511  fi
23512
23513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23514  if test "x$test_cygdrive_prefix" = x; then
23515    # As a simple fix, exclude /usr/bin since it's not a real path.
23516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23518      # a path prefixed by /cygdrive for fixpath to work.
23519      new_path="$CYGWIN_ROOT_PATH$input_path"
23520    fi
23521  fi
23522
23523
23524  if test "x$path" != "x$new_path"; then
23525    BOOT_JDK="$new_path"
23526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23528  fi
23529
23530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23531
23532  path="$BOOT_JDK"
23533  has_colon=`$ECHO $path | $GREP ^.:`
23534  new_path="$path"
23535  if test "x$has_colon" = x; then
23536    # Not in mixed or Windows style, start by that.
23537    new_path=`cmd //c echo $path`
23538  fi
23539
23540
23541  input_path="$new_path"
23542  # Check if we need to convert this using DOS-style short mode. If the path
23543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23544  # take no chances and rewrite it.
23545  # Note: m4 eats our [], so we need to use [ and ] instead.
23546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23547  if test "x$has_forbidden_chars" != x; then
23548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23550  fi
23551
23552
23553  windows_path="$new_path"
23554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23555    unix_path=`$CYGPATH -u "$windows_path"`
23556    new_path="$unix_path"
23557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23559    new_path="$unix_path"
23560  fi
23561
23562  if test "x$path" != "x$new_path"; then
23563    BOOT_JDK="$new_path"
23564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23566  fi
23567
23568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23570
23571    else
23572      # We're on a unix platform. Hooray! :)
23573      path="$BOOT_JDK"
23574      has_space=`$ECHO "$path" | $GREP " "`
23575      if test "x$has_space" != x; then
23576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23579      fi
23580
23581      # Use eval to expand a potential ~
23582      eval path="$path"
23583      if test ! -f "$path" && test ! -d "$path"; then
23584        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23585      fi
23586
23587      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23588    fi
23589  fi
23590
23591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23592$as_echo_n "checking for Boot JDK... " >&6; }
23593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23594$as_echo "$BOOT_JDK" >&6; }
23595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23596$as_echo_n "checking Boot JDK version... " >&6; }
23597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23599$as_echo "$BOOT_JDK_VERSION" >&6; }
23600          fi # end check jdk version
23601        fi # end check javac
23602      fi # end check java
23603    fi # end check boot jdk found
23604  fi
23605
23606
23607  if test "x$BOOT_JDK_FOUND" = xno; then
23608    # Now execute the test
23609
23610  if test "x$PROGRAMW6432" != x; then
23611    VIRTUAL_DIR="$PROGRAMW6432/Java"
23612
23613  windows_path="$VIRTUAL_DIR"
23614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23615    unix_path=`$CYGPATH -u "$windows_path"`
23616    VIRTUAL_DIR="$unix_path"
23617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23619    VIRTUAL_DIR="$unix_path"
23620  fi
23621
23622
23623  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23624  BOOT_JDK_SUFFIX=""
23625  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23626  if test "x$ALL_JDKS_FOUND" != x; then
23627    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23628
23629  if test "x$BOOT_JDK_FOUND" = xno; then
23630    # Now execute the test
23631
23632        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23633        if test -d "$BOOT_JDK"; then
23634          BOOT_JDK_FOUND=maybe
23635          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23636$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23637        fi
23638
23639
23640    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23641    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23642      # Do we have a bin/java?
23643      if test ! -x "$BOOT_JDK/bin/java"; then
23644        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23646        BOOT_JDK_FOUND=no
23647      else
23648        # Do we have a bin/javac?
23649        if test ! -x "$BOOT_JDK/bin/javac"; then
23650          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23652          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23653$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23654          BOOT_JDK_FOUND=no
23655        else
23656          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23657          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23658
23659          # Extra M4 quote needed to protect [] in grep expression.
23660          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23661          if test "x$FOUND_CORRECT_VERSION" = x; then
23662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23664            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23665$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23666            BOOT_JDK_FOUND=no
23667          else
23668            # We're done! :-)
23669            BOOT_JDK_FOUND=yes
23670
23671  # Only process if variable expands to non-empty
23672
23673  if test "x$BOOT_JDK" != x; then
23674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23675
23676  # Input might be given as Windows format, start by converting to
23677  # unix format.
23678  path="$BOOT_JDK"
23679  new_path=`$CYGPATH -u "$path"`
23680
23681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23684  # "foo.exe" is OK but "foo" is an error.
23685  #
23686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23687  # It is also a way to make sure we got the proper file name for the real test later on.
23688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23689  if test "x$test_shortpath" = x; then
23690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23692    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23693  fi
23694
23695  # Call helper function which possibly converts this using DOS-style short mode.
23696  # If so, the updated path is stored in $new_path.
23697
23698  input_path="$new_path"
23699  # Check if we need to convert this using DOS-style short mode. If the path
23700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23701  # take no chances and rewrite it.
23702  # Note: m4 eats our [], so we need to use [ and ] instead.
23703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23704  if test "x$has_forbidden_chars" != x; then
23705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23709      # Going to short mode and back again did indeed matter. Since short mode is
23710      # case insensitive, let's make it lowercase to improve readability.
23711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23712      # Now convert it back to Unix-style (cygpath)
23713      input_path=`$CYGPATH -u "$shortmode_path"`
23714      new_path="$input_path"
23715    fi
23716  fi
23717
23718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23719  if test "x$test_cygdrive_prefix" = x; then
23720    # As a simple fix, exclude /usr/bin since it's not a real path.
23721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23723      # a path prefixed by /cygdrive for fixpath to work.
23724      new_path="$CYGWIN_ROOT_PATH$input_path"
23725    fi
23726  fi
23727
23728
23729  if test "x$path" != "x$new_path"; then
23730    BOOT_JDK="$new_path"
23731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23733  fi
23734
23735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23736
23737  path="$BOOT_JDK"
23738  has_colon=`$ECHO $path | $GREP ^.:`
23739  new_path="$path"
23740  if test "x$has_colon" = x; then
23741    # Not in mixed or Windows style, start by that.
23742    new_path=`cmd //c echo $path`
23743  fi
23744
23745
23746  input_path="$new_path"
23747  # Check if we need to convert this using DOS-style short mode. If the path
23748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23749  # take no chances and rewrite it.
23750  # Note: m4 eats our [], so we need to use [ and ] instead.
23751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23752  if test "x$has_forbidden_chars" != x; then
23753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23755  fi
23756
23757
23758  windows_path="$new_path"
23759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23760    unix_path=`$CYGPATH -u "$windows_path"`
23761    new_path="$unix_path"
23762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23764    new_path="$unix_path"
23765  fi
23766
23767  if test "x$path" != "x$new_path"; then
23768    BOOT_JDK="$new_path"
23769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23771  fi
23772
23773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23775
23776    else
23777      # We're on a unix platform. Hooray! :)
23778      path="$BOOT_JDK"
23779      has_space=`$ECHO "$path" | $GREP " "`
23780      if test "x$has_space" != x; then
23781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23784      fi
23785
23786      # Use eval to expand a potential ~
23787      eval path="$path"
23788      if test ! -f "$path" && test ! -d "$path"; then
23789        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23790      fi
23791
23792      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23793    fi
23794  fi
23795
23796            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23797$as_echo_n "checking for Boot JDK... " >&6; }
23798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23799$as_echo "$BOOT_JDK" >&6; }
23800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23801$as_echo_n "checking Boot JDK version... " >&6; }
23802            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23804$as_echo "$BOOT_JDK_VERSION" >&6; }
23805          fi # end check jdk version
23806        fi # end check javac
23807      fi # end check java
23808    fi # end check boot jdk found
23809  fi
23810
23811    done
23812  fi
23813
23814  fi
23815
23816
23817    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23818    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23819      # Do we have a bin/java?
23820      if test ! -x "$BOOT_JDK/bin/java"; then
23821        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23823        BOOT_JDK_FOUND=no
23824      else
23825        # Do we have a bin/javac?
23826        if test ! -x "$BOOT_JDK/bin/javac"; then
23827          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23829          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23830$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23831          BOOT_JDK_FOUND=no
23832        else
23833          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23834          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23835
23836          # Extra M4 quote needed to protect [] in grep expression.
23837          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23838          if test "x$FOUND_CORRECT_VERSION" = x; then
23839            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23841            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23842$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23843            BOOT_JDK_FOUND=no
23844          else
23845            # We're done! :-)
23846            BOOT_JDK_FOUND=yes
23847
23848  # Only process if variable expands to non-empty
23849
23850  if test "x$BOOT_JDK" != x; then
23851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23852
23853  # Input might be given as Windows format, start by converting to
23854  # unix format.
23855  path="$BOOT_JDK"
23856  new_path=`$CYGPATH -u "$path"`
23857
23858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23861  # "foo.exe" is OK but "foo" is an error.
23862  #
23863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23864  # It is also a way to make sure we got the proper file name for the real test later on.
23865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23866  if test "x$test_shortpath" = x; then
23867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23869    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23870  fi
23871
23872  # Call helper function which possibly converts this using DOS-style short mode.
23873  # If so, the updated path is stored in $new_path.
23874
23875  input_path="$new_path"
23876  # Check if we need to convert this using DOS-style short mode. If the path
23877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23878  # take no chances and rewrite it.
23879  # Note: m4 eats our [], so we need to use [ and ] instead.
23880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23881  if test "x$has_forbidden_chars" != x; then
23882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23886      # Going to short mode and back again did indeed matter. Since short mode is
23887      # case insensitive, let's make it lowercase to improve readability.
23888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23889      # Now convert it back to Unix-style (cygpath)
23890      input_path=`$CYGPATH -u "$shortmode_path"`
23891      new_path="$input_path"
23892    fi
23893  fi
23894
23895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23896  if test "x$test_cygdrive_prefix" = x; then
23897    # As a simple fix, exclude /usr/bin since it's not a real path.
23898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23900      # a path prefixed by /cygdrive for fixpath to work.
23901      new_path="$CYGWIN_ROOT_PATH$input_path"
23902    fi
23903  fi
23904
23905
23906  if test "x$path" != "x$new_path"; then
23907    BOOT_JDK="$new_path"
23908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23910  fi
23911
23912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23913
23914  path="$BOOT_JDK"
23915  has_colon=`$ECHO $path | $GREP ^.:`
23916  new_path="$path"
23917  if test "x$has_colon" = x; then
23918    # Not in mixed or Windows style, start by that.
23919    new_path=`cmd //c echo $path`
23920  fi
23921
23922
23923  input_path="$new_path"
23924  # Check if we need to convert this using DOS-style short mode. If the path
23925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23926  # take no chances and rewrite it.
23927  # Note: m4 eats our [], so we need to use [ and ] instead.
23928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23929  if test "x$has_forbidden_chars" != x; then
23930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23932  fi
23933
23934
23935  windows_path="$new_path"
23936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23937    unix_path=`$CYGPATH -u "$windows_path"`
23938    new_path="$unix_path"
23939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23941    new_path="$unix_path"
23942  fi
23943
23944  if test "x$path" != "x$new_path"; then
23945    BOOT_JDK="$new_path"
23946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23948  fi
23949
23950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23952
23953    else
23954      # We're on a unix platform. Hooray! :)
23955      path="$BOOT_JDK"
23956      has_space=`$ECHO "$path" | $GREP " "`
23957      if test "x$has_space" != x; then
23958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23961      fi
23962
23963      # Use eval to expand a potential ~
23964      eval path="$path"
23965      if test ! -f "$path" && test ! -d "$path"; then
23966        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23967      fi
23968
23969      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23970    fi
23971  fi
23972
23973            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23974$as_echo_n "checking for Boot JDK... " >&6; }
23975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23976$as_echo "$BOOT_JDK" >&6; }
23977            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23978$as_echo_n "checking Boot JDK version... " >&6; }
23979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23981$as_echo "$BOOT_JDK_VERSION" >&6; }
23982          fi # end check jdk version
23983        fi # end check javac
23984      fi # end check java
23985    fi # end check boot jdk found
23986  fi
23987
23988
23989  if test "x$BOOT_JDK_FOUND" = xno; then
23990    # Now execute the test
23991
23992  if test "x$PROGRAMFILES" != x; then
23993    VIRTUAL_DIR="$PROGRAMFILES/Java"
23994
23995  windows_path="$VIRTUAL_DIR"
23996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23997    unix_path=`$CYGPATH -u "$windows_path"`
23998    VIRTUAL_DIR="$unix_path"
23999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24001    VIRTUAL_DIR="$unix_path"
24002  fi
24003
24004
24005  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24006  BOOT_JDK_SUFFIX=""
24007  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24008  if test "x$ALL_JDKS_FOUND" != x; then
24009    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24010
24011  if test "x$BOOT_JDK_FOUND" = xno; then
24012    # Now execute the test
24013
24014        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24015        if test -d "$BOOT_JDK"; then
24016          BOOT_JDK_FOUND=maybe
24017          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24018$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24019        fi
24020
24021
24022    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24023    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24024      # Do we have a bin/java?
24025      if test ! -x "$BOOT_JDK/bin/java"; then
24026        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24028        BOOT_JDK_FOUND=no
24029      else
24030        # Do we have a bin/javac?
24031        if test ! -x "$BOOT_JDK/bin/javac"; then
24032          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24034          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24035$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24036          BOOT_JDK_FOUND=no
24037        else
24038          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24039          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24040
24041          # Extra M4 quote needed to protect [] in grep expression.
24042          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24043          if test "x$FOUND_CORRECT_VERSION" = x; then
24044            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24046            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24047$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24048            BOOT_JDK_FOUND=no
24049          else
24050            # We're done! :-)
24051            BOOT_JDK_FOUND=yes
24052
24053  # Only process if variable expands to non-empty
24054
24055  if test "x$BOOT_JDK" != x; then
24056    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24057
24058  # Input might be given as Windows format, start by converting to
24059  # unix format.
24060  path="$BOOT_JDK"
24061  new_path=`$CYGPATH -u "$path"`
24062
24063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24066  # "foo.exe" is OK but "foo" is an error.
24067  #
24068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24069  # It is also a way to make sure we got the proper file name for the real test later on.
24070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24071  if test "x$test_shortpath" = x; then
24072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24074    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24075  fi
24076
24077  # Call helper function which possibly converts this using DOS-style short mode.
24078  # If so, the updated path is stored in $new_path.
24079
24080  input_path="$new_path"
24081  # Check if we need to convert this using DOS-style short mode. If the path
24082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24083  # take no chances and rewrite it.
24084  # Note: m4 eats our [], so we need to use [ and ] instead.
24085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24086  if test "x$has_forbidden_chars" != x; then
24087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24091      # Going to short mode and back again did indeed matter. Since short mode is
24092      # case insensitive, let's make it lowercase to improve readability.
24093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24094      # Now convert it back to Unix-style (cygpath)
24095      input_path=`$CYGPATH -u "$shortmode_path"`
24096      new_path="$input_path"
24097    fi
24098  fi
24099
24100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24101  if test "x$test_cygdrive_prefix" = x; then
24102    # As a simple fix, exclude /usr/bin since it's not a real path.
24103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24105      # a path prefixed by /cygdrive for fixpath to work.
24106      new_path="$CYGWIN_ROOT_PATH$input_path"
24107    fi
24108  fi
24109
24110
24111  if test "x$path" != "x$new_path"; then
24112    BOOT_JDK="$new_path"
24113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24115  fi
24116
24117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24118
24119  path="$BOOT_JDK"
24120  has_colon=`$ECHO $path | $GREP ^.:`
24121  new_path="$path"
24122  if test "x$has_colon" = x; then
24123    # Not in mixed or Windows style, start by that.
24124    new_path=`cmd //c echo $path`
24125  fi
24126
24127
24128  input_path="$new_path"
24129  # Check if we need to convert this using DOS-style short mode. If the path
24130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24131  # take no chances and rewrite it.
24132  # Note: m4 eats our [], so we need to use [ and ] instead.
24133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24134  if test "x$has_forbidden_chars" != x; then
24135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24137  fi
24138
24139
24140  windows_path="$new_path"
24141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24142    unix_path=`$CYGPATH -u "$windows_path"`
24143    new_path="$unix_path"
24144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24146    new_path="$unix_path"
24147  fi
24148
24149  if test "x$path" != "x$new_path"; then
24150    BOOT_JDK="$new_path"
24151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24153  fi
24154
24155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24157
24158    else
24159      # We're on a unix platform. Hooray! :)
24160      path="$BOOT_JDK"
24161      has_space=`$ECHO "$path" | $GREP " "`
24162      if test "x$has_space" != x; then
24163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24164$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24165        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24166      fi
24167
24168      # Use eval to expand a potential ~
24169      eval path="$path"
24170      if test ! -f "$path" && test ! -d "$path"; then
24171        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24172      fi
24173
24174      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24175    fi
24176  fi
24177
24178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24179$as_echo_n "checking for Boot JDK... " >&6; }
24180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24181$as_echo "$BOOT_JDK" >&6; }
24182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24183$as_echo_n "checking Boot JDK version... " >&6; }
24184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24186$as_echo "$BOOT_JDK_VERSION" >&6; }
24187          fi # end check jdk version
24188        fi # end check javac
24189      fi # end check java
24190    fi # end check boot jdk found
24191  fi
24192
24193    done
24194  fi
24195
24196  fi
24197
24198
24199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24201      # Do we have a bin/java?
24202      if test ! -x "$BOOT_JDK/bin/java"; then
24203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24205        BOOT_JDK_FOUND=no
24206      else
24207        # Do we have a bin/javac?
24208        if test ! -x "$BOOT_JDK/bin/javac"; then
24209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24213          BOOT_JDK_FOUND=no
24214        else
24215          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24216          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24217
24218          # Extra M4 quote needed to protect [] in grep expression.
24219          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24220          if test "x$FOUND_CORRECT_VERSION" = x; then
24221            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24223            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24224$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24225            BOOT_JDK_FOUND=no
24226          else
24227            # We're done! :-)
24228            BOOT_JDK_FOUND=yes
24229
24230  # Only process if variable expands to non-empty
24231
24232  if test "x$BOOT_JDK" != x; then
24233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24234
24235  # Input might be given as Windows format, start by converting to
24236  # unix format.
24237  path="$BOOT_JDK"
24238  new_path=`$CYGPATH -u "$path"`
24239
24240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24243  # "foo.exe" is OK but "foo" is an error.
24244  #
24245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24246  # It is also a way to make sure we got the proper file name for the real test later on.
24247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24248  if test "x$test_shortpath" = x; then
24249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24251    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24252  fi
24253
24254  # Call helper function which possibly converts this using DOS-style short mode.
24255  # If so, the updated path is stored in $new_path.
24256
24257  input_path="$new_path"
24258  # Check if we need to convert this using DOS-style short mode. If the path
24259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24260  # take no chances and rewrite it.
24261  # Note: m4 eats our [], so we need to use [ and ] instead.
24262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24263  if test "x$has_forbidden_chars" != x; then
24264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24268      # Going to short mode and back again did indeed matter. Since short mode is
24269      # case insensitive, let's make it lowercase to improve readability.
24270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24271      # Now convert it back to Unix-style (cygpath)
24272      input_path=`$CYGPATH -u "$shortmode_path"`
24273      new_path="$input_path"
24274    fi
24275  fi
24276
24277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24278  if test "x$test_cygdrive_prefix" = x; then
24279    # As a simple fix, exclude /usr/bin since it's not a real path.
24280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24282      # a path prefixed by /cygdrive for fixpath to work.
24283      new_path="$CYGWIN_ROOT_PATH$input_path"
24284    fi
24285  fi
24286
24287
24288  if test "x$path" != "x$new_path"; then
24289    BOOT_JDK="$new_path"
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24292  fi
24293
24294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24295
24296  path="$BOOT_JDK"
24297  has_colon=`$ECHO $path | $GREP ^.:`
24298  new_path="$path"
24299  if test "x$has_colon" = x; then
24300    # Not in mixed or Windows style, start by that.
24301    new_path=`cmd //c echo $path`
24302  fi
24303
24304
24305  input_path="$new_path"
24306  # Check if we need to convert this using DOS-style short mode. If the path
24307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24308  # take no chances and rewrite it.
24309  # Note: m4 eats our [], so we need to use [ and ] instead.
24310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24311  if test "x$has_forbidden_chars" != x; then
24312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24314  fi
24315
24316
24317  windows_path="$new_path"
24318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24319    unix_path=`$CYGPATH -u "$windows_path"`
24320    new_path="$unix_path"
24321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24323    new_path="$unix_path"
24324  fi
24325
24326  if test "x$path" != "x$new_path"; then
24327    BOOT_JDK="$new_path"
24328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24330  fi
24331
24332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24334
24335    else
24336      # We're on a unix platform. Hooray! :)
24337      path="$BOOT_JDK"
24338      has_space=`$ECHO "$path" | $GREP " "`
24339      if test "x$has_space" != x; then
24340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24343      fi
24344
24345      # Use eval to expand a potential ~
24346      eval path="$path"
24347      if test ! -f "$path" && test ! -d "$path"; then
24348        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24349      fi
24350
24351      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24352    fi
24353  fi
24354
24355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24356$as_echo_n "checking for Boot JDK... " >&6; }
24357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24358$as_echo "$BOOT_JDK" >&6; }
24359            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24360$as_echo_n "checking Boot JDK version... " >&6; }
24361            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24363$as_echo "$BOOT_JDK_VERSION" >&6; }
24364          fi # end check jdk version
24365        fi # end check javac
24366      fi # end check java
24367    fi # end check boot jdk found
24368  fi
24369
24370
24371  if test "x$BOOT_JDK_FOUND" = xno; then
24372    # Now execute the test
24373
24374  if test "x$ProgramFiles" != x; then
24375    VIRTUAL_DIR="$ProgramFiles/Java"
24376
24377  windows_path="$VIRTUAL_DIR"
24378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24379    unix_path=`$CYGPATH -u "$windows_path"`
24380    VIRTUAL_DIR="$unix_path"
24381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24383    VIRTUAL_DIR="$unix_path"
24384  fi
24385
24386
24387  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24388  BOOT_JDK_SUFFIX=""
24389  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24390  if test "x$ALL_JDKS_FOUND" != x; then
24391    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24392
24393  if test "x$BOOT_JDK_FOUND" = xno; then
24394    # Now execute the test
24395
24396        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24397        if test -d "$BOOT_JDK"; then
24398          BOOT_JDK_FOUND=maybe
24399          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24400$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24401        fi
24402
24403
24404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24406      # Do we have a bin/java?
24407      if test ! -x "$BOOT_JDK/bin/java"; then
24408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24410        BOOT_JDK_FOUND=no
24411      else
24412        # Do we have a bin/javac?
24413        if test ! -x "$BOOT_JDK/bin/javac"; then
24414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24418          BOOT_JDK_FOUND=no
24419        else
24420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24422
24423          # Extra M4 quote needed to protect [] in grep expression.
24424          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24425          if test "x$FOUND_CORRECT_VERSION" = x; then
24426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24430            BOOT_JDK_FOUND=no
24431          else
24432            # We're done! :-)
24433            BOOT_JDK_FOUND=yes
24434
24435  # Only process if variable expands to non-empty
24436
24437  if test "x$BOOT_JDK" != x; then
24438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24439
24440  # Input might be given as Windows format, start by converting to
24441  # unix format.
24442  path="$BOOT_JDK"
24443  new_path=`$CYGPATH -u "$path"`
24444
24445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24448  # "foo.exe" is OK but "foo" is an error.
24449  #
24450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24451  # It is also a way to make sure we got the proper file name for the real test later on.
24452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24453  if test "x$test_shortpath" = x; then
24454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24457  fi
24458
24459  # Call helper function which possibly converts this using DOS-style short mode.
24460  # If so, the updated path is stored in $new_path.
24461
24462  input_path="$new_path"
24463  # Check if we need to convert this using DOS-style short mode. If the path
24464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24465  # take no chances and rewrite it.
24466  # Note: m4 eats our [], so we need to use [ and ] instead.
24467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24468  if test "x$has_forbidden_chars" != x; then
24469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24473      # Going to short mode and back again did indeed matter. Since short mode is
24474      # case insensitive, let's make it lowercase to improve readability.
24475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24476      # Now convert it back to Unix-style (cygpath)
24477      input_path=`$CYGPATH -u "$shortmode_path"`
24478      new_path="$input_path"
24479    fi
24480  fi
24481
24482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24483  if test "x$test_cygdrive_prefix" = x; then
24484    # As a simple fix, exclude /usr/bin since it's not a real path.
24485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24487      # a path prefixed by /cygdrive for fixpath to work.
24488      new_path="$CYGWIN_ROOT_PATH$input_path"
24489    fi
24490  fi
24491
24492
24493  if test "x$path" != "x$new_path"; then
24494    BOOT_JDK="$new_path"
24495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24497  fi
24498
24499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24500
24501  path="$BOOT_JDK"
24502  has_colon=`$ECHO $path | $GREP ^.:`
24503  new_path="$path"
24504  if test "x$has_colon" = x; then
24505    # Not in mixed or Windows style, start by that.
24506    new_path=`cmd //c echo $path`
24507  fi
24508
24509
24510  input_path="$new_path"
24511  # Check if we need to convert this using DOS-style short mode. If the path
24512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24513  # take no chances and rewrite it.
24514  # Note: m4 eats our [], so we need to use [ and ] instead.
24515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24516  if test "x$has_forbidden_chars" != x; then
24517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24519  fi
24520
24521
24522  windows_path="$new_path"
24523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24524    unix_path=`$CYGPATH -u "$windows_path"`
24525    new_path="$unix_path"
24526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24528    new_path="$unix_path"
24529  fi
24530
24531  if test "x$path" != "x$new_path"; then
24532    BOOT_JDK="$new_path"
24533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24535  fi
24536
24537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24539
24540    else
24541      # We're on a unix platform. Hooray! :)
24542      path="$BOOT_JDK"
24543      has_space=`$ECHO "$path" | $GREP " "`
24544      if test "x$has_space" != x; then
24545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24548      fi
24549
24550      # Use eval to expand a potential ~
24551      eval path="$path"
24552      if test ! -f "$path" && test ! -d "$path"; then
24553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24554      fi
24555
24556      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24557    fi
24558  fi
24559
24560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24561$as_echo_n "checking for Boot JDK... " >&6; }
24562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24563$as_echo "$BOOT_JDK" >&6; }
24564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24565$as_echo_n "checking Boot JDK version... " >&6; }
24566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24568$as_echo "$BOOT_JDK_VERSION" >&6; }
24569          fi # end check jdk version
24570        fi # end check javac
24571      fi # end check java
24572    fi # end check boot jdk found
24573  fi
24574
24575    done
24576  fi
24577
24578  fi
24579
24580
24581    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24582    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24583      # Do we have a bin/java?
24584      if test ! -x "$BOOT_JDK/bin/java"; then
24585        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24587        BOOT_JDK_FOUND=no
24588      else
24589        # Do we have a bin/javac?
24590        if test ! -x "$BOOT_JDK/bin/javac"; then
24591          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24593          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24594$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24595          BOOT_JDK_FOUND=no
24596        else
24597          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24598          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24599
24600          # Extra M4 quote needed to protect [] in grep expression.
24601          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24602          if test "x$FOUND_CORRECT_VERSION" = x; then
24603            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24605            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24606$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24607            BOOT_JDK_FOUND=no
24608          else
24609            # We're done! :-)
24610            BOOT_JDK_FOUND=yes
24611
24612  # Only process if variable expands to non-empty
24613
24614  if test "x$BOOT_JDK" != x; then
24615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24616
24617  # Input might be given as Windows format, start by converting to
24618  # unix format.
24619  path="$BOOT_JDK"
24620  new_path=`$CYGPATH -u "$path"`
24621
24622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24625  # "foo.exe" is OK but "foo" is an error.
24626  #
24627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24628  # It is also a way to make sure we got the proper file name for the real test later on.
24629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24630  if test "x$test_shortpath" = x; then
24631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24633    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24634  fi
24635
24636  # Call helper function which possibly converts this using DOS-style short mode.
24637  # If so, the updated path is stored in $new_path.
24638
24639  input_path="$new_path"
24640  # Check if we need to convert this using DOS-style short mode. If the path
24641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24642  # take no chances and rewrite it.
24643  # Note: m4 eats our [], so we need to use [ and ] instead.
24644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24645  if test "x$has_forbidden_chars" != x; then
24646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24650      # Going to short mode and back again did indeed matter. Since short mode is
24651      # case insensitive, let's make it lowercase to improve readability.
24652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24653      # Now convert it back to Unix-style (cygpath)
24654      input_path=`$CYGPATH -u "$shortmode_path"`
24655      new_path="$input_path"
24656    fi
24657  fi
24658
24659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24660  if test "x$test_cygdrive_prefix" = x; then
24661    # As a simple fix, exclude /usr/bin since it's not a real path.
24662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24664      # a path prefixed by /cygdrive for fixpath to work.
24665      new_path="$CYGWIN_ROOT_PATH$input_path"
24666    fi
24667  fi
24668
24669
24670  if test "x$path" != "x$new_path"; then
24671    BOOT_JDK="$new_path"
24672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24674  fi
24675
24676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24677
24678  path="$BOOT_JDK"
24679  has_colon=`$ECHO $path | $GREP ^.:`
24680  new_path="$path"
24681  if test "x$has_colon" = x; then
24682    # Not in mixed or Windows style, start by that.
24683    new_path=`cmd //c echo $path`
24684  fi
24685
24686
24687  input_path="$new_path"
24688  # Check if we need to convert this using DOS-style short mode. If the path
24689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24690  # take no chances and rewrite it.
24691  # Note: m4 eats our [], so we need to use [ and ] instead.
24692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24693  if test "x$has_forbidden_chars" != x; then
24694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24696  fi
24697
24698
24699  windows_path="$new_path"
24700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24701    unix_path=`$CYGPATH -u "$windows_path"`
24702    new_path="$unix_path"
24703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24705    new_path="$unix_path"
24706  fi
24707
24708  if test "x$path" != "x$new_path"; then
24709    BOOT_JDK="$new_path"
24710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24712  fi
24713
24714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24716
24717    else
24718      # We're on a unix platform. Hooray! :)
24719      path="$BOOT_JDK"
24720      has_space=`$ECHO "$path" | $GREP " "`
24721      if test "x$has_space" != x; then
24722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24725      fi
24726
24727      # Use eval to expand a potential ~
24728      eval path="$path"
24729      if test ! -f "$path" && test ! -d "$path"; then
24730        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24731      fi
24732
24733      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24734    fi
24735  fi
24736
24737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24738$as_echo_n "checking for Boot JDK... " >&6; }
24739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24740$as_echo "$BOOT_JDK" >&6; }
24741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24742$as_echo_n "checking Boot JDK version... " >&6; }
24743            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24745$as_echo "$BOOT_JDK_VERSION" >&6; }
24746          fi # end check jdk version
24747        fi # end check javac
24748      fi # end check java
24749    fi # end check boot jdk found
24750  fi
24751
24752
24753  if test "x$BOOT_JDK_FOUND" = xno; then
24754    # Now execute the test
24755
24756  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24757  BOOT_JDK_SUFFIX=""
24758  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24759  if test "x$ALL_JDKS_FOUND" != x; then
24760    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24761
24762  if test "x$BOOT_JDK_FOUND" = xno; then
24763    # Now execute the test
24764
24765        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24766        if test -d "$BOOT_JDK"; then
24767          BOOT_JDK_FOUND=maybe
24768          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24769$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24770        fi
24771
24772
24773    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24774    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24775      # Do we have a bin/java?
24776      if test ! -x "$BOOT_JDK/bin/java"; then
24777        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24779        BOOT_JDK_FOUND=no
24780      else
24781        # Do we have a bin/javac?
24782        if test ! -x "$BOOT_JDK/bin/javac"; then
24783          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24785          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24786$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24787          BOOT_JDK_FOUND=no
24788        else
24789          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24790          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24791
24792          # Extra M4 quote needed to protect [] in grep expression.
24793          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24794          if test "x$FOUND_CORRECT_VERSION" = x; then
24795            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24797            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24798$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24799            BOOT_JDK_FOUND=no
24800          else
24801            # We're done! :-)
24802            BOOT_JDK_FOUND=yes
24803
24804  # Only process if variable expands to non-empty
24805
24806  if test "x$BOOT_JDK" != x; then
24807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24808
24809  # Input might be given as Windows format, start by converting to
24810  # unix format.
24811  path="$BOOT_JDK"
24812  new_path=`$CYGPATH -u "$path"`
24813
24814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24817  # "foo.exe" is OK but "foo" is an error.
24818  #
24819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24820  # It is also a way to make sure we got the proper file name for the real test later on.
24821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24822  if test "x$test_shortpath" = x; then
24823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24826  fi
24827
24828  # Call helper function which possibly converts this using DOS-style short mode.
24829  # If so, the updated path is stored in $new_path.
24830
24831  input_path="$new_path"
24832  # Check if we need to convert this using DOS-style short mode. If the path
24833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24834  # take no chances and rewrite it.
24835  # Note: m4 eats our [], so we need to use [ and ] instead.
24836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24837  if test "x$has_forbidden_chars" != x; then
24838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24842      # Going to short mode and back again did indeed matter. Since short mode is
24843      # case insensitive, let's make it lowercase to improve readability.
24844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24845      # Now convert it back to Unix-style (cygpath)
24846      input_path=`$CYGPATH -u "$shortmode_path"`
24847      new_path="$input_path"
24848    fi
24849  fi
24850
24851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24852  if test "x$test_cygdrive_prefix" = x; then
24853    # As a simple fix, exclude /usr/bin since it's not a real path.
24854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24856      # a path prefixed by /cygdrive for fixpath to work.
24857      new_path="$CYGWIN_ROOT_PATH$input_path"
24858    fi
24859  fi
24860
24861
24862  if test "x$path" != "x$new_path"; then
24863    BOOT_JDK="$new_path"
24864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24866  fi
24867
24868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869
24870  path="$BOOT_JDK"
24871  has_colon=`$ECHO $path | $GREP ^.:`
24872  new_path="$path"
24873  if test "x$has_colon" = x; then
24874    # Not in mixed or Windows style, start by that.
24875    new_path=`cmd //c echo $path`
24876  fi
24877
24878
24879  input_path="$new_path"
24880  # Check if we need to convert this using DOS-style short mode. If the path
24881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24882  # take no chances and rewrite it.
24883  # Note: m4 eats our [], so we need to use [ and ] instead.
24884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24885  if test "x$has_forbidden_chars" != x; then
24886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24888  fi
24889
24890
24891  windows_path="$new_path"
24892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893    unix_path=`$CYGPATH -u "$windows_path"`
24894    new_path="$unix_path"
24895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24897    new_path="$unix_path"
24898  fi
24899
24900  if test "x$path" != "x$new_path"; then
24901    BOOT_JDK="$new_path"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904  fi
24905
24906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24908
24909    else
24910      # We're on a unix platform. Hooray! :)
24911      path="$BOOT_JDK"
24912      has_space=`$ECHO "$path" | $GREP " "`
24913      if test "x$has_space" != x; then
24914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24917      fi
24918
24919      # Use eval to expand a potential ~
24920      eval path="$path"
24921      if test ! -f "$path" && test ! -d "$path"; then
24922        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24923      fi
24924
24925      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24926    fi
24927  fi
24928
24929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24930$as_echo_n "checking for Boot JDK... " >&6; }
24931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24932$as_echo "$BOOT_JDK" >&6; }
24933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24934$as_echo_n "checking Boot JDK version... " >&6; }
24935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24937$as_echo "$BOOT_JDK_VERSION" >&6; }
24938          fi # end check jdk version
24939        fi # end check javac
24940      fi # end check java
24941    fi # end check boot jdk found
24942  fi
24943
24944    done
24945  fi
24946
24947
24948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24950      # Do we have a bin/java?
24951      if test ! -x "$BOOT_JDK/bin/java"; then
24952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24954        BOOT_JDK_FOUND=no
24955      else
24956        # Do we have a bin/javac?
24957        if test ! -x "$BOOT_JDK/bin/javac"; then
24958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24962          BOOT_JDK_FOUND=no
24963        else
24964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24966
24967          # Extra M4 quote needed to protect [] in grep expression.
24968          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24969          if test "x$FOUND_CORRECT_VERSION" = x; then
24970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24974            BOOT_JDK_FOUND=no
24975          else
24976            # We're done! :-)
24977            BOOT_JDK_FOUND=yes
24978
24979  # Only process if variable expands to non-empty
24980
24981  if test "x$BOOT_JDK" != x; then
24982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24983
24984  # Input might be given as Windows format, start by converting to
24985  # unix format.
24986  path="$BOOT_JDK"
24987  new_path=`$CYGPATH -u "$path"`
24988
24989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24992  # "foo.exe" is OK but "foo" is an error.
24993  #
24994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24995  # It is also a way to make sure we got the proper file name for the real test later on.
24996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24997  if test "x$test_shortpath" = x; then
24998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25001  fi
25002
25003  # Call helper function which possibly converts this using DOS-style short mode.
25004  # If so, the updated path is stored in $new_path.
25005
25006  input_path="$new_path"
25007  # Check if we need to convert this using DOS-style short mode. If the path
25008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25009  # take no chances and rewrite it.
25010  # Note: m4 eats our [], so we need to use [ and ] instead.
25011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25012  if test "x$has_forbidden_chars" != x; then
25013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25017      # Going to short mode and back again did indeed matter. Since short mode is
25018      # case insensitive, let's make it lowercase to improve readability.
25019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25020      # Now convert it back to Unix-style (cygpath)
25021      input_path=`$CYGPATH -u "$shortmode_path"`
25022      new_path="$input_path"
25023    fi
25024  fi
25025
25026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25027  if test "x$test_cygdrive_prefix" = x; then
25028    # As a simple fix, exclude /usr/bin since it's not a real path.
25029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25031      # a path prefixed by /cygdrive for fixpath to work.
25032      new_path="$CYGWIN_ROOT_PATH$input_path"
25033    fi
25034  fi
25035
25036
25037  if test "x$path" != "x$new_path"; then
25038    BOOT_JDK="$new_path"
25039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25041  fi
25042
25043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25044
25045  path="$BOOT_JDK"
25046  has_colon=`$ECHO $path | $GREP ^.:`
25047  new_path="$path"
25048  if test "x$has_colon" = x; then
25049    # Not in mixed or Windows style, start by that.
25050    new_path=`cmd //c echo $path`
25051  fi
25052
25053
25054  input_path="$new_path"
25055  # Check if we need to convert this using DOS-style short mode. If the path
25056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25057  # take no chances and rewrite it.
25058  # Note: m4 eats our [], so we need to use [ and ] instead.
25059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25060  if test "x$has_forbidden_chars" != x; then
25061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25063  fi
25064
25065
25066  windows_path="$new_path"
25067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25068    unix_path=`$CYGPATH -u "$windows_path"`
25069    new_path="$unix_path"
25070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25072    new_path="$unix_path"
25073  fi
25074
25075  if test "x$path" != "x$new_path"; then
25076    BOOT_JDK="$new_path"
25077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25079  fi
25080
25081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25083
25084    else
25085      # We're on a unix platform. Hooray! :)
25086      path="$BOOT_JDK"
25087      has_space=`$ECHO "$path" | $GREP " "`
25088      if test "x$has_space" != x; then
25089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25092      fi
25093
25094      # Use eval to expand a potential ~
25095      eval path="$path"
25096      if test ! -f "$path" && test ! -d "$path"; then
25097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25098      fi
25099
25100      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25101    fi
25102  fi
25103
25104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25105$as_echo_n "checking for Boot JDK... " >&6; }
25106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25107$as_echo "$BOOT_JDK" >&6; }
25108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25109$as_echo_n "checking Boot JDK version... " >&6; }
25110            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25112$as_echo "$BOOT_JDK_VERSION" >&6; }
25113          fi # end check jdk version
25114        fi # end check javac
25115      fi # end check java
25116    fi # end check boot jdk found
25117  fi
25118
25119  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
25120
25121  if test "x$BOOT_JDK_FOUND" = xno; then
25122    # Now execute the test
25123
25124  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
25125  BOOT_JDK_SUFFIX="/Contents/Home"
25126  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25127  if test "x$ALL_JDKS_FOUND" != x; then
25128    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25129
25130  if test "x$BOOT_JDK_FOUND" = xno; then
25131    # Now execute the test
25132
25133        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25134        if test -d "$BOOT_JDK"; then
25135          BOOT_JDK_FOUND=maybe
25136          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25137$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25138        fi
25139
25140
25141    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25142    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25143      # Do we have a bin/java?
25144      if test ! -x "$BOOT_JDK/bin/java"; then
25145        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25147        BOOT_JDK_FOUND=no
25148      else
25149        # Do we have a bin/javac?
25150        if test ! -x "$BOOT_JDK/bin/javac"; then
25151          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25153          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25154$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25155          BOOT_JDK_FOUND=no
25156        else
25157          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25158          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25159
25160          # Extra M4 quote needed to protect [] in grep expression.
25161          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25162          if test "x$FOUND_CORRECT_VERSION" = x; then
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25165            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25166$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25167            BOOT_JDK_FOUND=no
25168          else
25169            # We're done! :-)
25170            BOOT_JDK_FOUND=yes
25171
25172  # Only process if variable expands to non-empty
25173
25174  if test "x$BOOT_JDK" != x; then
25175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25176
25177  # Input might be given as Windows format, start by converting to
25178  # unix format.
25179  path="$BOOT_JDK"
25180  new_path=`$CYGPATH -u "$path"`
25181
25182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25185  # "foo.exe" is OK but "foo" is an error.
25186  #
25187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25188  # It is also a way to make sure we got the proper file name for the real test later on.
25189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25190  if test "x$test_shortpath" = x; then
25191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25194  fi
25195
25196  # Call helper function which possibly converts this using DOS-style short mode.
25197  # If so, the updated path is stored in $new_path.
25198
25199  input_path="$new_path"
25200  # Check if we need to convert this using DOS-style short mode. If the path
25201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25202  # take no chances and rewrite it.
25203  # Note: m4 eats our [], so we need to use [ and ] instead.
25204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25205  if test "x$has_forbidden_chars" != x; then
25206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25210      # Going to short mode and back again did indeed matter. Since short mode is
25211      # case insensitive, let's make it lowercase to improve readability.
25212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25213      # Now convert it back to Unix-style (cygpath)
25214      input_path=`$CYGPATH -u "$shortmode_path"`
25215      new_path="$input_path"
25216    fi
25217  fi
25218
25219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25220  if test "x$test_cygdrive_prefix" = x; then
25221    # As a simple fix, exclude /usr/bin since it's not a real path.
25222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25224      # a path prefixed by /cygdrive for fixpath to work.
25225      new_path="$CYGWIN_ROOT_PATH$input_path"
25226    fi
25227  fi
25228
25229
25230  if test "x$path" != "x$new_path"; then
25231    BOOT_JDK="$new_path"
25232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25234  fi
25235
25236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25237
25238  path="$BOOT_JDK"
25239  has_colon=`$ECHO $path | $GREP ^.:`
25240  new_path="$path"
25241  if test "x$has_colon" = x; then
25242    # Not in mixed or Windows style, start by that.
25243    new_path=`cmd //c echo $path`
25244  fi
25245
25246
25247  input_path="$new_path"
25248  # Check if we need to convert this using DOS-style short mode. If the path
25249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25250  # take no chances and rewrite it.
25251  # Note: m4 eats our [], so we need to use [ and ] instead.
25252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25253  if test "x$has_forbidden_chars" != x; then
25254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25256  fi
25257
25258
25259  windows_path="$new_path"
25260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25261    unix_path=`$CYGPATH -u "$windows_path"`
25262    new_path="$unix_path"
25263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25265    new_path="$unix_path"
25266  fi
25267
25268  if test "x$path" != "x$new_path"; then
25269    BOOT_JDK="$new_path"
25270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25272  fi
25273
25274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25276
25277    else
25278      # We're on a unix platform. Hooray! :)
25279      path="$BOOT_JDK"
25280      has_space=`$ECHO "$path" | $GREP " "`
25281      if test "x$has_space" != x; then
25282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25285      fi
25286
25287      # Use eval to expand a potential ~
25288      eval path="$path"
25289      if test ! -f "$path" && test ! -d "$path"; then
25290        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25291      fi
25292
25293      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25294    fi
25295  fi
25296
25297            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25298$as_echo_n "checking for Boot JDK... " >&6; }
25299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25300$as_echo "$BOOT_JDK" >&6; }
25301            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25302$as_echo_n "checking Boot JDK version... " >&6; }
25303            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25305$as_echo "$BOOT_JDK_VERSION" >&6; }
25306          fi # end check jdk version
25307        fi # end check javac
25308      fi # end check java
25309    fi # end check boot jdk found
25310  fi
25311
25312    done
25313  fi
25314
25315
25316    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25317    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25318      # Do we have a bin/java?
25319      if test ! -x "$BOOT_JDK/bin/java"; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25322        BOOT_JDK_FOUND=no
25323      else
25324        # Do we have a bin/javac?
25325        if test ! -x "$BOOT_JDK/bin/javac"; then
25326          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25328          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25329$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25330          BOOT_JDK_FOUND=no
25331        else
25332          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25333          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25334
25335          # Extra M4 quote needed to protect [] in grep expression.
25336          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25337          if test "x$FOUND_CORRECT_VERSION" = x; then
25338            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25340            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25341$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25342            BOOT_JDK_FOUND=no
25343          else
25344            # We're done! :-)
25345            BOOT_JDK_FOUND=yes
25346
25347  # Only process if variable expands to non-empty
25348
25349  if test "x$BOOT_JDK" != x; then
25350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25351
25352  # Input might be given as Windows format, start by converting to
25353  # unix format.
25354  path="$BOOT_JDK"
25355  new_path=`$CYGPATH -u "$path"`
25356
25357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25360  # "foo.exe" is OK but "foo" is an error.
25361  #
25362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25363  # It is also a way to make sure we got the proper file name for the real test later on.
25364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25365  if test "x$test_shortpath" = x; then
25366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25368    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25369  fi
25370
25371  # Call helper function which possibly converts this using DOS-style short mode.
25372  # If so, the updated path is stored in $new_path.
25373
25374  input_path="$new_path"
25375  # Check if we need to convert this using DOS-style short mode. If the path
25376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25377  # take no chances and rewrite it.
25378  # Note: m4 eats our [], so we need to use [ and ] instead.
25379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25380  if test "x$has_forbidden_chars" != x; then
25381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25385      # Going to short mode and back again did indeed matter. Since short mode is
25386      # case insensitive, let's make it lowercase to improve readability.
25387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25388      # Now convert it back to Unix-style (cygpath)
25389      input_path=`$CYGPATH -u "$shortmode_path"`
25390      new_path="$input_path"
25391    fi
25392  fi
25393
25394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25395  if test "x$test_cygdrive_prefix" = x; then
25396    # As a simple fix, exclude /usr/bin since it's not a real path.
25397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25399      # a path prefixed by /cygdrive for fixpath to work.
25400      new_path="$CYGWIN_ROOT_PATH$input_path"
25401    fi
25402  fi
25403
25404
25405  if test "x$path" != "x$new_path"; then
25406    BOOT_JDK="$new_path"
25407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25409  fi
25410
25411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25412
25413  path="$BOOT_JDK"
25414  has_colon=`$ECHO $path | $GREP ^.:`
25415  new_path="$path"
25416  if test "x$has_colon" = x; then
25417    # Not in mixed or Windows style, start by that.
25418    new_path=`cmd //c echo $path`
25419  fi
25420
25421
25422  input_path="$new_path"
25423  # Check if we need to convert this using DOS-style short mode. If the path
25424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25425  # take no chances and rewrite it.
25426  # Note: m4 eats our [], so we need to use [ and ] instead.
25427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25428  if test "x$has_forbidden_chars" != x; then
25429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25431  fi
25432
25433
25434  windows_path="$new_path"
25435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25436    unix_path=`$CYGPATH -u "$windows_path"`
25437    new_path="$unix_path"
25438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25440    new_path="$unix_path"
25441  fi
25442
25443  if test "x$path" != "x$new_path"; then
25444    BOOT_JDK="$new_path"
25445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25447  fi
25448
25449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25451
25452    else
25453      # We're on a unix platform. Hooray! :)
25454      path="$BOOT_JDK"
25455      has_space=`$ECHO "$path" | $GREP " "`
25456      if test "x$has_space" != x; then
25457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25460      fi
25461
25462      # Use eval to expand a potential ~
25463      eval path="$path"
25464      if test ! -f "$path" && test ! -d "$path"; then
25465        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25466      fi
25467
25468      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25469    fi
25470  fi
25471
25472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25473$as_echo_n "checking for Boot JDK... " >&6; }
25474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25475$as_echo "$BOOT_JDK" >&6; }
25476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25477$as_echo_n "checking Boot JDK version... " >&6; }
25478            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25480$as_echo "$BOOT_JDK_VERSION" >&6; }
25481          fi # end check jdk version
25482        fi # end check javac
25483      fi # end check java
25484    fi # end check boot jdk found
25485  fi
25486
25487
25488  if test "x$BOOT_JDK_FOUND" = xno; then
25489    # Now execute the test
25490
25491  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25492  BOOT_JDK_SUFFIX="/Contents/Home"
25493  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25494  if test "x$ALL_JDKS_FOUND" != x; then
25495    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25496
25497  if test "x$BOOT_JDK_FOUND" = xno; then
25498    # Now execute the test
25499
25500        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25501        if test -d "$BOOT_JDK"; then
25502          BOOT_JDK_FOUND=maybe
25503          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25504$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25505        fi
25506
25507
25508    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25509    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25510      # Do we have a bin/java?
25511      if test ! -x "$BOOT_JDK/bin/java"; then
25512        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25514        BOOT_JDK_FOUND=no
25515      else
25516        # Do we have a bin/javac?
25517        if test ! -x "$BOOT_JDK/bin/javac"; then
25518          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25520          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25521$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25522          BOOT_JDK_FOUND=no
25523        else
25524          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25525          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25526
25527          # Extra M4 quote needed to protect [] in grep expression.
25528          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25529          if test "x$FOUND_CORRECT_VERSION" = x; then
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25533$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25534            BOOT_JDK_FOUND=no
25535          else
25536            # We're done! :-)
25537            BOOT_JDK_FOUND=yes
25538
25539  # Only process if variable expands to non-empty
25540
25541  if test "x$BOOT_JDK" != x; then
25542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25543
25544  # Input might be given as Windows format, start by converting to
25545  # unix format.
25546  path="$BOOT_JDK"
25547  new_path=`$CYGPATH -u "$path"`
25548
25549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25552  # "foo.exe" is OK but "foo" is an error.
25553  #
25554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25555  # It is also a way to make sure we got the proper file name for the real test later on.
25556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25557  if test "x$test_shortpath" = x; then
25558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25559$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25560    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25561  fi
25562
25563  # Call helper function which possibly converts this using DOS-style short mode.
25564  # If so, the updated path is stored in $new_path.
25565
25566  input_path="$new_path"
25567  # Check if we need to convert this using DOS-style short mode. If the path
25568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25569  # take no chances and rewrite it.
25570  # Note: m4 eats our [], so we need to use [ and ] instead.
25571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25572  if test "x$has_forbidden_chars" != x; then
25573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25577      # Going to short mode and back again did indeed matter. Since short mode is
25578      # case insensitive, let's make it lowercase to improve readability.
25579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25580      # Now convert it back to Unix-style (cygpath)
25581      input_path=`$CYGPATH -u "$shortmode_path"`
25582      new_path="$input_path"
25583    fi
25584  fi
25585
25586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25587  if test "x$test_cygdrive_prefix" = x; then
25588    # As a simple fix, exclude /usr/bin since it's not a real path.
25589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25591      # a path prefixed by /cygdrive for fixpath to work.
25592      new_path="$CYGWIN_ROOT_PATH$input_path"
25593    fi
25594  fi
25595
25596
25597  if test "x$path" != "x$new_path"; then
25598    BOOT_JDK="$new_path"
25599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25601  fi
25602
25603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25604
25605  path="$BOOT_JDK"
25606  has_colon=`$ECHO $path | $GREP ^.:`
25607  new_path="$path"
25608  if test "x$has_colon" = x; then
25609    # Not in mixed or Windows style, start by that.
25610    new_path=`cmd //c echo $path`
25611  fi
25612
25613
25614  input_path="$new_path"
25615  # Check if we need to convert this using DOS-style short mode. If the path
25616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25617  # take no chances and rewrite it.
25618  # Note: m4 eats our [], so we need to use [ and ] instead.
25619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25620  if test "x$has_forbidden_chars" != x; then
25621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25623  fi
25624
25625
25626  windows_path="$new_path"
25627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25628    unix_path=`$CYGPATH -u "$windows_path"`
25629    new_path="$unix_path"
25630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25632    new_path="$unix_path"
25633  fi
25634
25635  if test "x$path" != "x$new_path"; then
25636    BOOT_JDK="$new_path"
25637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25639  fi
25640
25641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25643
25644    else
25645      # We're on a unix platform. Hooray! :)
25646      path="$BOOT_JDK"
25647      has_space=`$ECHO "$path" | $GREP " "`
25648      if test "x$has_space" != x; then
25649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25652      fi
25653
25654      # Use eval to expand a potential ~
25655      eval path="$path"
25656      if test ! -f "$path" && test ! -d "$path"; then
25657        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25658      fi
25659
25660      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25661    fi
25662  fi
25663
25664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25665$as_echo_n "checking for Boot JDK... " >&6; }
25666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25667$as_echo "$BOOT_JDK" >&6; }
25668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25669$as_echo_n "checking Boot JDK version... " >&6; }
25670            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25672$as_echo "$BOOT_JDK_VERSION" >&6; }
25673          fi # end check jdk version
25674        fi # end check javac
25675      fi # end check java
25676    fi # end check boot jdk found
25677  fi
25678
25679    done
25680  fi
25681
25682
25683    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25684    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25685      # Do we have a bin/java?
25686      if test ! -x "$BOOT_JDK/bin/java"; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25689        BOOT_JDK_FOUND=no
25690      else
25691        # Do we have a bin/javac?
25692        if test ! -x "$BOOT_JDK/bin/javac"; then
25693          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25695          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25696$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25697          BOOT_JDK_FOUND=no
25698        else
25699          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25700          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25701
25702          # Extra M4 quote needed to protect [] in grep expression.
25703          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25704          if test "x$FOUND_CORRECT_VERSION" = x; then
25705            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25707            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25708$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25709            BOOT_JDK_FOUND=no
25710          else
25711            # We're done! :-)
25712            BOOT_JDK_FOUND=yes
25713
25714  # Only process if variable expands to non-empty
25715
25716  if test "x$BOOT_JDK" != x; then
25717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25718
25719  # Input might be given as Windows format, start by converting to
25720  # unix format.
25721  path="$BOOT_JDK"
25722  new_path=`$CYGPATH -u "$path"`
25723
25724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25727  # "foo.exe" is OK but "foo" is an error.
25728  #
25729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25730  # It is also a way to make sure we got the proper file name for the real test later on.
25731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25732  if test "x$test_shortpath" = x; then
25733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25735    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25736  fi
25737
25738  # Call helper function which possibly converts this using DOS-style short mode.
25739  # If so, the updated path is stored in $new_path.
25740
25741  input_path="$new_path"
25742  # Check if we need to convert this using DOS-style short mode. If the path
25743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25744  # take no chances and rewrite it.
25745  # Note: m4 eats our [], so we need to use [ and ] instead.
25746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25747  if test "x$has_forbidden_chars" != x; then
25748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25752      # Going to short mode and back again did indeed matter. Since short mode is
25753      # case insensitive, let's make it lowercase to improve readability.
25754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25755      # Now convert it back to Unix-style (cygpath)
25756      input_path=`$CYGPATH -u "$shortmode_path"`
25757      new_path="$input_path"
25758    fi
25759  fi
25760
25761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25762  if test "x$test_cygdrive_prefix" = x; then
25763    # As a simple fix, exclude /usr/bin since it's not a real path.
25764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25766      # a path prefixed by /cygdrive for fixpath to work.
25767      new_path="$CYGWIN_ROOT_PATH$input_path"
25768    fi
25769  fi
25770
25771
25772  if test "x$path" != "x$new_path"; then
25773    BOOT_JDK="$new_path"
25774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25775$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25776  fi
25777
25778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25779
25780  path="$BOOT_JDK"
25781  has_colon=`$ECHO $path | $GREP ^.:`
25782  new_path="$path"
25783  if test "x$has_colon" = x; then
25784    # Not in mixed or Windows style, start by that.
25785    new_path=`cmd //c echo $path`
25786  fi
25787
25788
25789  input_path="$new_path"
25790  # Check if we need to convert this using DOS-style short mode. If the path
25791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25792  # take no chances and rewrite it.
25793  # Note: m4 eats our [], so we need to use [ and ] instead.
25794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25795  if test "x$has_forbidden_chars" != x; then
25796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25798  fi
25799
25800
25801  windows_path="$new_path"
25802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25803    unix_path=`$CYGPATH -u "$windows_path"`
25804    new_path="$unix_path"
25805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25807    new_path="$unix_path"
25808  fi
25809
25810  if test "x$path" != "x$new_path"; then
25811    BOOT_JDK="$new_path"
25812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25813$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25814  fi
25815
25816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25818
25819    else
25820      # We're on a unix platform. Hooray! :)
25821      path="$BOOT_JDK"
25822      has_space=`$ECHO "$path" | $GREP " "`
25823      if test "x$has_space" != x; then
25824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25827      fi
25828
25829      # Use eval to expand a potential ~
25830      eval path="$path"
25831      if test ! -f "$path" && test ! -d "$path"; then
25832        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25833      fi
25834
25835      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25836    fi
25837  fi
25838
25839            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25840$as_echo_n "checking for Boot JDK... " >&6; }
25841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25842$as_echo "$BOOT_JDK" >&6; }
25843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25844$as_echo_n "checking Boot JDK version... " >&6; }
25845            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25847$as_echo "$BOOT_JDK_VERSION" >&6; }
25848          fi # end check jdk version
25849        fi # end check javac
25850      fi # end check java
25851    fi # end check boot jdk found
25852  fi
25853
25854  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25855
25856  if test "x$BOOT_JDK_FOUND" = xno; then
25857    # Now execute the test
25858
25859  BOOT_JDK_PREFIX="/usr/lib/jvm"
25860  BOOT_JDK_SUFFIX=""
25861  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25862  if test "x$ALL_JDKS_FOUND" != x; then
25863    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25864
25865  if test "x$BOOT_JDK_FOUND" = xno; then
25866    # Now execute the test
25867
25868        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25869        if test -d "$BOOT_JDK"; then
25870          BOOT_JDK_FOUND=maybe
25871          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25872$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25873        fi
25874
25875
25876    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25877    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25878      # Do we have a bin/java?
25879      if test ! -x "$BOOT_JDK/bin/java"; then
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25882        BOOT_JDK_FOUND=no
25883      else
25884        # Do we have a bin/javac?
25885        if test ! -x "$BOOT_JDK/bin/javac"; then
25886          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25888          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25889$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25890          BOOT_JDK_FOUND=no
25891        else
25892          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25893          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25894
25895          # Extra M4 quote needed to protect [] in grep expression.
25896          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25897          if test "x$FOUND_CORRECT_VERSION" = x; then
25898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25900            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25901$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25902            BOOT_JDK_FOUND=no
25903          else
25904            # We're done! :-)
25905            BOOT_JDK_FOUND=yes
25906
25907  # Only process if variable expands to non-empty
25908
25909  if test "x$BOOT_JDK" != x; then
25910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25911
25912  # Input might be given as Windows format, start by converting to
25913  # unix format.
25914  path="$BOOT_JDK"
25915  new_path=`$CYGPATH -u "$path"`
25916
25917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25920  # "foo.exe" is OK but "foo" is an error.
25921  #
25922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25923  # It is also a way to make sure we got the proper file name for the real test later on.
25924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25925  if test "x$test_shortpath" = x; then
25926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25929  fi
25930
25931  # Call helper function which possibly converts this using DOS-style short mode.
25932  # If so, the updated path is stored in $new_path.
25933
25934  input_path="$new_path"
25935  # Check if we need to convert this using DOS-style short mode. If the path
25936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25937  # take no chances and rewrite it.
25938  # Note: m4 eats our [], so we need to use [ and ] instead.
25939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25940  if test "x$has_forbidden_chars" != x; then
25941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25945      # Going to short mode and back again did indeed matter. Since short mode is
25946      # case insensitive, let's make it lowercase to improve readability.
25947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25948      # Now convert it back to Unix-style (cygpath)
25949      input_path=`$CYGPATH -u "$shortmode_path"`
25950      new_path="$input_path"
25951    fi
25952  fi
25953
25954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25955  if test "x$test_cygdrive_prefix" = x; then
25956    # As a simple fix, exclude /usr/bin since it's not a real path.
25957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25959      # a path prefixed by /cygdrive for fixpath to work.
25960      new_path="$CYGWIN_ROOT_PATH$input_path"
25961    fi
25962  fi
25963
25964
25965  if test "x$path" != "x$new_path"; then
25966    BOOT_JDK="$new_path"
25967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25969  fi
25970
25971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25972
25973  path="$BOOT_JDK"
25974  has_colon=`$ECHO $path | $GREP ^.:`
25975  new_path="$path"
25976  if test "x$has_colon" = x; then
25977    # Not in mixed or Windows style, start by that.
25978    new_path=`cmd //c echo $path`
25979  fi
25980
25981
25982  input_path="$new_path"
25983  # Check if we need to convert this using DOS-style short mode. If the path
25984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25985  # take no chances and rewrite it.
25986  # Note: m4 eats our [], so we need to use [ and ] instead.
25987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25988  if test "x$has_forbidden_chars" != x; then
25989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25991  fi
25992
25993
25994  windows_path="$new_path"
25995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25996    unix_path=`$CYGPATH -u "$windows_path"`
25997    new_path="$unix_path"
25998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26000    new_path="$unix_path"
26001  fi
26002
26003  if test "x$path" != "x$new_path"; then
26004    BOOT_JDK="$new_path"
26005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26007  fi
26008
26009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26011
26012    else
26013      # We're on a unix platform. Hooray! :)
26014      path="$BOOT_JDK"
26015      has_space=`$ECHO "$path" | $GREP " "`
26016      if test "x$has_space" != x; then
26017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26020      fi
26021
26022      # Use eval to expand a potential ~
26023      eval path="$path"
26024      if test ! -f "$path" && test ! -d "$path"; then
26025        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26026      fi
26027
26028      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26029    fi
26030  fi
26031
26032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26033$as_echo_n "checking for Boot JDK... " >&6; }
26034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26035$as_echo "$BOOT_JDK" >&6; }
26036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26037$as_echo_n "checking Boot JDK version... " >&6; }
26038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26040$as_echo "$BOOT_JDK_VERSION" >&6; }
26041          fi # end check jdk version
26042        fi # end check javac
26043      fi # end check java
26044    fi # end check boot jdk found
26045  fi
26046
26047    done
26048  fi
26049
26050
26051    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26052    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26053      # Do we have a bin/java?
26054      if test ! -x "$BOOT_JDK/bin/java"; then
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26057        BOOT_JDK_FOUND=no
26058      else
26059        # Do we have a bin/javac?
26060        if test ! -x "$BOOT_JDK/bin/javac"; then
26061          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26063          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26064$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26065          BOOT_JDK_FOUND=no
26066        else
26067          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26068          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26069
26070          # Extra M4 quote needed to protect [] in grep expression.
26071          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26072          if test "x$FOUND_CORRECT_VERSION" = x; then
26073            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26075            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26076$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26077            BOOT_JDK_FOUND=no
26078          else
26079            # We're done! :-)
26080            BOOT_JDK_FOUND=yes
26081
26082  # Only process if variable expands to non-empty
26083
26084  if test "x$BOOT_JDK" != x; then
26085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26086
26087  # Input might be given as Windows format, start by converting to
26088  # unix format.
26089  path="$BOOT_JDK"
26090  new_path=`$CYGPATH -u "$path"`
26091
26092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26095  # "foo.exe" is OK but "foo" is an error.
26096  #
26097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26098  # It is also a way to make sure we got the proper file name for the real test later on.
26099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26100  if test "x$test_shortpath" = x; then
26101    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26103    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26104  fi
26105
26106  # Call helper function which possibly converts this using DOS-style short mode.
26107  # If so, the updated path is stored in $new_path.
26108
26109  input_path="$new_path"
26110  # Check if we need to convert this using DOS-style short mode. If the path
26111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26112  # take no chances and rewrite it.
26113  # Note: m4 eats our [], so we need to use [ and ] instead.
26114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26115  if test "x$has_forbidden_chars" != x; then
26116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26120      # Going to short mode and back again did indeed matter. Since short mode is
26121      # case insensitive, let's make it lowercase to improve readability.
26122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26123      # Now convert it back to Unix-style (cygpath)
26124      input_path=`$CYGPATH -u "$shortmode_path"`
26125      new_path="$input_path"
26126    fi
26127  fi
26128
26129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26130  if test "x$test_cygdrive_prefix" = x; then
26131    # As a simple fix, exclude /usr/bin since it's not a real path.
26132    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26134      # a path prefixed by /cygdrive for fixpath to work.
26135      new_path="$CYGWIN_ROOT_PATH$input_path"
26136    fi
26137  fi
26138
26139
26140  if test "x$path" != "x$new_path"; then
26141    BOOT_JDK="$new_path"
26142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26144  fi
26145
26146    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26147
26148  path="$BOOT_JDK"
26149  has_colon=`$ECHO $path | $GREP ^.:`
26150  new_path="$path"
26151  if test "x$has_colon" = x; then
26152    # Not in mixed or Windows style, start by that.
26153    new_path=`cmd //c echo $path`
26154  fi
26155
26156
26157  input_path="$new_path"
26158  # Check if we need to convert this using DOS-style short mode. If the path
26159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26160  # take no chances and rewrite it.
26161  # Note: m4 eats our [], so we need to use [ and ] instead.
26162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26163  if test "x$has_forbidden_chars" != x; then
26164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26166  fi
26167
26168
26169  windows_path="$new_path"
26170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26171    unix_path=`$CYGPATH -u "$windows_path"`
26172    new_path="$unix_path"
26173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26175    new_path="$unix_path"
26176  fi
26177
26178  if test "x$path" != "x$new_path"; then
26179    BOOT_JDK="$new_path"
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26182  fi
26183
26184  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26185  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26186
26187    else
26188      # We're on a unix platform. Hooray! :)
26189      path="$BOOT_JDK"
26190      has_space=`$ECHO "$path" | $GREP " "`
26191      if test "x$has_space" != x; then
26192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26194        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26195      fi
26196
26197      # Use eval to expand a potential ~
26198      eval path="$path"
26199      if test ! -f "$path" && test ! -d "$path"; then
26200        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26201      fi
26202
26203      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26204    fi
26205  fi
26206
26207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26208$as_echo_n "checking for Boot JDK... " >&6; }
26209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26210$as_echo "$BOOT_JDK" >&6; }
26211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26212$as_echo_n "checking Boot JDK version... " >&6; }
26213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26215$as_echo "$BOOT_JDK_VERSION" >&6; }
26216          fi # end check jdk version
26217        fi # end check javac
26218      fi # end check java
26219    fi # end check boot jdk found
26220  fi
26221
26222  fi
26223
26224
26225    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26226    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26227      # Do we have a bin/java?
26228      if test ! -x "$BOOT_JDK/bin/java"; then
26229        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26231        BOOT_JDK_FOUND=no
26232      else
26233        # Do we have a bin/javac?
26234        if test ! -x "$BOOT_JDK/bin/javac"; then
26235          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26237          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26238$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26239          BOOT_JDK_FOUND=no
26240        else
26241          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26242          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26243
26244          # Extra M4 quote needed to protect [] in grep expression.
26245          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26246          if test "x$FOUND_CORRECT_VERSION" = x; then
26247            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26249            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26250$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26251            BOOT_JDK_FOUND=no
26252          else
26253            # We're done! :-)
26254            BOOT_JDK_FOUND=yes
26255
26256  # Only process if variable expands to non-empty
26257
26258  if test "x$BOOT_JDK" != x; then
26259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26260
26261  # Input might be given as Windows format, start by converting to
26262  # unix format.
26263  path="$BOOT_JDK"
26264  new_path=`$CYGPATH -u "$path"`
26265
26266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26269  # "foo.exe" is OK but "foo" is an error.
26270  #
26271  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26272  # It is also a way to make sure we got the proper file name for the real test later on.
26273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26274  if test "x$test_shortpath" = x; then
26275    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26277    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26278  fi
26279
26280  # Call helper function which possibly converts this using DOS-style short mode.
26281  # If so, the updated path is stored in $new_path.
26282
26283  input_path="$new_path"
26284  # Check if we need to convert this using DOS-style short mode. If the path
26285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26286  # take no chances and rewrite it.
26287  # Note: m4 eats our [], so we need to use [ and ] instead.
26288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26289  if test "x$has_forbidden_chars" != x; then
26290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26294      # Going to short mode and back again did indeed matter. Since short mode is
26295      # case insensitive, let's make it lowercase to improve readability.
26296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26297      # Now convert it back to Unix-style (cygpath)
26298      input_path=`$CYGPATH -u "$shortmode_path"`
26299      new_path="$input_path"
26300    fi
26301  fi
26302
26303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26304  if test "x$test_cygdrive_prefix" = x; then
26305    # As a simple fix, exclude /usr/bin since it's not a real path.
26306    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26308      # a path prefixed by /cygdrive for fixpath to work.
26309      new_path="$CYGWIN_ROOT_PATH$input_path"
26310    fi
26311  fi
26312
26313
26314  if test "x$path" != "x$new_path"; then
26315    BOOT_JDK="$new_path"
26316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26318  fi
26319
26320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26321
26322  path="$BOOT_JDK"
26323  has_colon=`$ECHO $path | $GREP ^.:`
26324  new_path="$path"
26325  if test "x$has_colon" = x; then
26326    # Not in mixed or Windows style, start by that.
26327    new_path=`cmd //c echo $path`
26328  fi
26329
26330
26331  input_path="$new_path"
26332  # Check if we need to convert this using DOS-style short mode. If the path
26333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26334  # take no chances and rewrite it.
26335  # Note: m4 eats our [], so we need to use [ and ] instead.
26336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26337  if test "x$has_forbidden_chars" != x; then
26338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26340  fi
26341
26342
26343  windows_path="$new_path"
26344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26345    unix_path=`$CYGPATH -u "$windows_path"`
26346    new_path="$unix_path"
26347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26349    new_path="$unix_path"
26350  fi
26351
26352  if test "x$path" != "x$new_path"; then
26353    BOOT_JDK="$new_path"
26354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26355$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26356  fi
26357
26358  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26359  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26360
26361    else
26362      # We're on a unix platform. Hooray! :)
26363      path="$BOOT_JDK"
26364      has_space=`$ECHO "$path" | $GREP " "`
26365      if test "x$has_space" != x; then
26366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26368        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26369      fi
26370
26371      # Use eval to expand a potential ~
26372      eval path="$path"
26373      if test ! -f "$path" && test ! -d "$path"; then
26374        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26375      fi
26376
26377      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26378    fi
26379  fi
26380
26381            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26382$as_echo_n "checking for Boot JDK... " >&6; }
26383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26384$as_echo "$BOOT_JDK" >&6; }
26385            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26386$as_echo_n "checking Boot JDK version... " >&6; }
26387            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26389$as_echo "$BOOT_JDK_VERSION" >&6; }
26390          fi # end check jdk version
26391        fi # end check javac
26392      fi # end check java
26393    fi # end check boot jdk found
26394  fi
26395
26396
26397  # If we haven't found anything yet, we've truly lost. Give up.
26398  if test "x$BOOT_JDK_FOUND" = xno; then
26399
26400  # Print a helpful message on how to acquire the necessary build dependency.
26401  # openjdk is the help tag: freetype, cups, alsa etc
26402  MISSING_DEPENDENCY=openjdk
26403
26404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26405    cygwin_help $MISSING_DEPENDENCY
26406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26407    msys_help $MISSING_DEPENDENCY
26408  else
26409    PKGHANDLER_COMMAND=
26410
26411    case $PKGHANDLER in
26412      apt-get)
26413        apt_help     $MISSING_DEPENDENCY ;;
26414      yum)
26415        yum_help     $MISSING_DEPENDENCY ;;
26416      port)
26417        port_help    $MISSING_DEPENDENCY ;;
26418      pkgutil)
26419        pkgutil_help $MISSING_DEPENDENCY ;;
26420      pkgadd)
26421        pkgadd_help  $MISSING_DEPENDENCY ;;
26422    esac
26423
26424    if test "x$PKGHANDLER_COMMAND" != x; then
26425      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
26426    fi
26427  fi
26428
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
26430$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
26431    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
26432$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26433    as_fn_error $? "Cannot continue" "$LINENO" 5
26434  fi
26435
26436
26437
26438  # Setup tools from the Boot JDK.
26439
26440  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26441
26442  # Publish this variable in the help.
26443
26444
26445  if [ -z "${JAVA+x}" ]; then
26446    # The variable is not set by user, try to locate tool using the code snippet
26447
26448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26449$as_echo_n "checking for java in Boot JDK... " >&6; }
26450      JAVA=$BOOT_JDK/bin/java
26451      if test ! -x $JAVA; then
26452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26453$as_echo "not found" >&6; }
26454        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26455$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26456        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26457      fi
26458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26459$as_echo "ok" >&6; }
26460
26461
26462  else
26463    # The variable is set, but is it from the command line or the environment?
26464
26465    # Try to remove the string !JAVA! from our list.
26466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26468      # If it failed, the variable was not from the command line. Ignore it,
26469      # but warn the user (except for BASH, which is always set by the calling BASH).
26470      if test "xJAVA" != xBASH; then
26471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26472$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26473      fi
26474      # Try to locate tool using the code snippet
26475
26476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26477$as_echo_n "checking for java in Boot JDK... " >&6; }
26478      JAVA=$BOOT_JDK/bin/java
26479      if test ! -x $JAVA; then
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26481$as_echo "not found" >&6; }
26482        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26483$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26484        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26485      fi
26486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26487$as_echo "ok" >&6; }
26488
26489
26490    else
26491      # If it succeeded, then it was overridden by the user. We will use it
26492      # for the tool.
26493
26494      # First remove it from the list of overridden variables, so we can test
26495      # for unknown variables in the end.
26496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26497
26498      # Check if we try to supply an empty value
26499      if test "x$JAVA" = x; then
26500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
26501$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
26502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26503$as_echo_n "checking for JAVA... " >&6; }
26504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26505$as_echo "disabled" >&6; }
26506      else
26507        # Check if the provided tool contains a complete path.
26508        tool_specified="$JAVA"
26509        tool_basename="${tool_specified##*/}"
26510        if test "x$tool_basename" = "x$tool_specified"; then
26511          # A command without a complete path is provided, search $PATH.
26512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26513$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26514          # Extract the first word of "$tool_basename", so it can be a program name with args.
26515set dummy $tool_basename; ac_word=$2
26516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26517$as_echo_n "checking for $ac_word... " >&6; }
26518if ${ac_cv_path_JAVA+:} false; then :
26519  $as_echo_n "(cached) " >&6
26520else
26521  case $JAVA in
26522  [\\/]* | ?:[\\/]*)
26523  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26524  ;;
26525  *)
26526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26527for as_dir in $PATH
26528do
26529  IFS=$as_save_IFS
26530  test -z "$as_dir" && as_dir=.
26531    for ac_exec_ext in '' $ac_executable_extensions; do
26532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26533    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26535    break 2
26536  fi
26537done
26538  done
26539IFS=$as_save_IFS
26540
26541  ;;
26542esac
26543fi
26544JAVA=$ac_cv_path_JAVA
26545if test -n "$JAVA"; then
26546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26547$as_echo "$JAVA" >&6; }
26548else
26549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26550$as_echo "no" >&6; }
26551fi
26552
26553
26554          if test "x$JAVA" = x; then
26555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26556          fi
26557        else
26558          # Otherwise we believe it is a complete path. Use it as it is.
26559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26560$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26562$as_echo_n "checking for JAVA... " >&6; }
26563          if test ! -x "$tool_specified"; then
26564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26565$as_echo "not found" >&6; }
26566            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26567          fi
26568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26569$as_echo "$tool_specified" >&6; }
26570        fi
26571      fi
26572    fi
26573  fi
26574
26575
26576
26577  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26578
26579  # Publish this variable in the help.
26580
26581
26582  if [ -z "${JAVAC+x}" ]; then
26583    # The variable is not set by user, try to locate tool using the code snippet
26584
26585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26586$as_echo_n "checking for javac in Boot JDK... " >&6; }
26587      JAVAC=$BOOT_JDK/bin/javac
26588      if test ! -x $JAVAC; then
26589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26590$as_echo "not found" >&6; }
26591        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26593        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26594      fi
26595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26596$as_echo "ok" >&6; }
26597
26598
26599  else
26600    # The variable is set, but is it from the command line or the environment?
26601
26602    # Try to remove the string !JAVAC! from our list.
26603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26605      # If it failed, the variable was not from the command line. Ignore it,
26606      # but warn the user (except for BASH, which is always set by the calling BASH).
26607      if test "xJAVAC" != xBASH; then
26608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26609$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26610      fi
26611      # Try to locate tool using the code snippet
26612
26613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26614$as_echo_n "checking for javac in Boot JDK... " >&6; }
26615      JAVAC=$BOOT_JDK/bin/javac
26616      if test ! -x $JAVAC; then
26617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26618$as_echo "not found" >&6; }
26619        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26620$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26621        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26622      fi
26623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26624$as_echo "ok" >&6; }
26625
26626
26627    else
26628      # If it succeeded, then it was overridden by the user. We will use it
26629      # for the tool.
26630
26631      # First remove it from the list of overridden variables, so we can test
26632      # for unknown variables in the end.
26633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26634
26635      # Check if we try to supply an empty value
26636      if test "x$JAVAC" = x; then
26637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
26638$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
26639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26640$as_echo_n "checking for JAVAC... " >&6; }
26641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26642$as_echo "disabled" >&6; }
26643      else
26644        # Check if the provided tool contains a complete path.
26645        tool_specified="$JAVAC"
26646        tool_basename="${tool_specified##*/}"
26647        if test "x$tool_basename" = "x$tool_specified"; then
26648          # A command without a complete path is provided, search $PATH.
26649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26650$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26651          # Extract the first word of "$tool_basename", so it can be a program name with args.
26652set dummy $tool_basename; ac_word=$2
26653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26654$as_echo_n "checking for $ac_word... " >&6; }
26655if ${ac_cv_path_JAVAC+:} false; then :
26656  $as_echo_n "(cached) " >&6
26657else
26658  case $JAVAC in
26659  [\\/]* | ?:[\\/]*)
26660  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26661  ;;
26662  *)
26663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26664for as_dir in $PATH
26665do
26666  IFS=$as_save_IFS
26667  test -z "$as_dir" && as_dir=.
26668    for ac_exec_ext in '' $ac_executable_extensions; do
26669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26670    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26672    break 2
26673  fi
26674done
26675  done
26676IFS=$as_save_IFS
26677
26678  ;;
26679esac
26680fi
26681JAVAC=$ac_cv_path_JAVAC
26682if test -n "$JAVAC"; then
26683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26684$as_echo "$JAVAC" >&6; }
26685else
26686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26687$as_echo "no" >&6; }
26688fi
26689
26690
26691          if test "x$JAVAC" = x; then
26692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26693          fi
26694        else
26695          # Otherwise we believe it is a complete path. Use it as it is.
26696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26697$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26699$as_echo_n "checking for JAVAC... " >&6; }
26700          if test ! -x "$tool_specified"; then
26701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26702$as_echo "not found" >&6; }
26703            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26704          fi
26705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26706$as_echo "$tool_specified" >&6; }
26707        fi
26708      fi
26709    fi
26710  fi
26711
26712
26713
26714  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26715
26716  # Publish this variable in the help.
26717
26718
26719  if [ -z "${JAVAH+x}" ]; then
26720    # The variable is not set by user, try to locate tool using the code snippet
26721
26722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26723$as_echo_n "checking for javah in Boot JDK... " >&6; }
26724      JAVAH=$BOOT_JDK/bin/javah
26725      if test ! -x $JAVAH; then
26726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26727$as_echo "not found" >&6; }
26728        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26729$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26730        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26731      fi
26732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26733$as_echo "ok" >&6; }
26734
26735
26736  else
26737    # The variable is set, but is it from the command line or the environment?
26738
26739    # Try to remove the string !JAVAH! from our list.
26740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26742      # If it failed, the variable was not from the command line. Ignore it,
26743      # but warn the user (except for BASH, which is always set by the calling BASH).
26744      if test "xJAVAH" != xBASH; then
26745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26746$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26747      fi
26748      # Try to locate tool using the code snippet
26749
26750      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26751$as_echo_n "checking for javah in Boot JDK... " >&6; }
26752      JAVAH=$BOOT_JDK/bin/javah
26753      if test ! -x $JAVAH; then
26754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26755$as_echo "not found" >&6; }
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26757$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26758        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26759      fi
26760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26761$as_echo "ok" >&6; }
26762
26763
26764    else
26765      # If it succeeded, then it was overridden by the user. We will use it
26766      # for the tool.
26767
26768      # First remove it from the list of overridden variables, so we can test
26769      # for unknown variables in the end.
26770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26771
26772      # Check if we try to supply an empty value
26773      if test "x$JAVAH" = x; then
26774        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
26775$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26777$as_echo_n "checking for JAVAH... " >&6; }
26778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26779$as_echo "disabled" >&6; }
26780      else
26781        # Check if the provided tool contains a complete path.
26782        tool_specified="$JAVAH"
26783        tool_basename="${tool_specified##*/}"
26784        if test "x$tool_basename" = "x$tool_specified"; then
26785          # A command without a complete path is provided, search $PATH.
26786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26787$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26788          # Extract the first word of "$tool_basename", so it can be a program name with args.
26789set dummy $tool_basename; ac_word=$2
26790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26791$as_echo_n "checking for $ac_word... " >&6; }
26792if ${ac_cv_path_JAVAH+:} false; then :
26793  $as_echo_n "(cached) " >&6
26794else
26795  case $JAVAH in
26796  [\\/]* | ?:[\\/]*)
26797  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26798  ;;
26799  *)
26800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26801for as_dir in $PATH
26802do
26803  IFS=$as_save_IFS
26804  test -z "$as_dir" && as_dir=.
26805    for ac_exec_ext in '' $ac_executable_extensions; do
26806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26807    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26809    break 2
26810  fi
26811done
26812  done
26813IFS=$as_save_IFS
26814
26815  ;;
26816esac
26817fi
26818JAVAH=$ac_cv_path_JAVAH
26819if test -n "$JAVAH"; then
26820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26821$as_echo "$JAVAH" >&6; }
26822else
26823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26824$as_echo "no" >&6; }
26825fi
26826
26827
26828          if test "x$JAVAH" = x; then
26829            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26830          fi
26831        else
26832          # Otherwise we believe it is a complete path. Use it as it is.
26833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26834$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26836$as_echo_n "checking for JAVAH... " >&6; }
26837          if test ! -x "$tool_specified"; then
26838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26839$as_echo "not found" >&6; }
26840            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26841          fi
26842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26843$as_echo "$tool_specified" >&6; }
26844        fi
26845      fi
26846    fi
26847  fi
26848
26849
26850
26851  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26852
26853  # Publish this variable in the help.
26854
26855
26856  if [ -z "${JAR+x}" ]; then
26857    # The variable is not set by user, try to locate tool using the code snippet
26858
26859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26860$as_echo_n "checking for jar in Boot JDK... " >&6; }
26861      JAR=$BOOT_JDK/bin/jar
26862      if test ! -x $JAR; then
26863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26864$as_echo "not found" >&6; }
26865        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26866$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26867        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26868      fi
26869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26870$as_echo "ok" >&6; }
26871
26872
26873  else
26874    # The variable is set, but is it from the command line or the environment?
26875
26876    # Try to remove the string !JAR! from our list.
26877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26879      # If it failed, the variable was not from the command line. Ignore it,
26880      # but warn the user (except for BASH, which is always set by the calling BASH).
26881      if test "xJAR" != xBASH; then
26882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26883$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26884      fi
26885      # Try to locate tool using the code snippet
26886
26887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26888$as_echo_n "checking for jar in Boot JDK... " >&6; }
26889      JAR=$BOOT_JDK/bin/jar
26890      if test ! -x $JAR; then
26891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26892$as_echo "not found" >&6; }
26893        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26894$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26895        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26896      fi
26897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26898$as_echo "ok" >&6; }
26899
26900
26901    else
26902      # If it succeeded, then it was overridden by the user. We will use it
26903      # for the tool.
26904
26905      # First remove it from the list of overridden variables, so we can test
26906      # for unknown variables in the end.
26907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26908
26909      # Check if we try to supply an empty value
26910      if test "x$JAR" = x; then
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
26912$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
26913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26914$as_echo_n "checking for JAR... " >&6; }
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
26916$as_echo "disabled" >&6; }
26917      else
26918        # Check if the provided tool contains a complete path.
26919        tool_specified="$JAR"
26920        tool_basename="${tool_specified##*/}"
26921        if test "x$tool_basename" = "x$tool_specified"; then
26922          # A command without a complete path is provided, search $PATH.
26923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26924$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26925          # Extract the first word of "$tool_basename", so it can be a program name with args.
26926set dummy $tool_basename; ac_word=$2
26927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26928$as_echo_n "checking for $ac_word... " >&6; }
26929if ${ac_cv_path_JAR+:} false; then :
26930  $as_echo_n "(cached) " >&6
26931else
26932  case $JAR in
26933  [\\/]* | ?:[\\/]*)
26934  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26935  ;;
26936  *)
26937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26938for as_dir in $PATH
26939do
26940  IFS=$as_save_IFS
26941  test -z "$as_dir" && as_dir=.
26942    for ac_exec_ext in '' $ac_executable_extensions; do
26943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26944    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26946    break 2
26947  fi
26948done
26949  done
26950IFS=$as_save_IFS
26951
26952  ;;
26953esac
26954fi
26955JAR=$ac_cv_path_JAR
26956if test -n "$JAR"; then
26957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26958$as_echo "$JAR" >&6; }
26959else
26960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26961$as_echo "no" >&6; }
26962fi
26963
26964
26965          if test "x$JAR" = x; then
26966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26967          fi
26968        else
26969          # Otherwise we believe it is a complete path. Use it as it is.
26970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26971$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26973$as_echo_n "checking for JAR... " >&6; }
26974          if test ! -x "$tool_specified"; then
26975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26976$as_echo "not found" >&6; }
26977            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26978          fi
26979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26980$as_echo "$tool_specified" >&6; }
26981        fi
26982      fi
26983    fi
26984  fi
26985
26986
26987
26988  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26989
26990  # Publish this variable in the help.
26991
26992
26993  if [ -z "${JARSIGNER+x}" ]; then
26994    # The variable is not set by user, try to locate tool using the code snippet
26995
26996      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26997$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26998      JARSIGNER=$BOOT_JDK/bin/jarsigner
26999      if test ! -x $JARSIGNER; then
27000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27001$as_echo "not found" >&6; }
27002        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
27003$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
27004        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
27005      fi
27006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27007$as_echo "ok" >&6; }
27008
27009
27010  else
27011    # The variable is set, but is it from the command line or the environment?
27012
27013    # Try to remove the string !JARSIGNER! from our list.
27014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
27015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27016      # If it failed, the variable was not from the command line. Ignore it,
27017      # but warn the user (except for BASH, which is always set by the calling BASH).
27018      if test "xJARSIGNER" != xBASH; then
27019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
27020$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
27021      fi
27022      # Try to locate tool using the code snippet
27023
27024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
27025$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
27026      JARSIGNER=$BOOT_JDK/bin/jarsigner
27027      if test ! -x $JARSIGNER; then
27028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27029$as_echo "not found" >&6; }
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
27031$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
27032        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
27033      fi
27034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27035$as_echo "ok" >&6; }
27036
27037
27038    else
27039      # If it succeeded, then it was overridden by the user. We will use it
27040      # for the tool.
27041
27042      # First remove it from the list of overridden variables, so we can test
27043      # for unknown variables in the end.
27044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27045
27046      # Check if we try to supply an empty value
27047      if test "x$JARSIGNER" = x; then
27048        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
27049$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
27050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
27051$as_echo_n "checking for JARSIGNER... " >&6; }
27052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
27053$as_echo "disabled" >&6; }
27054      else
27055        # Check if the provided tool contains a complete path.
27056        tool_specified="$JARSIGNER"
27057        tool_basename="${tool_specified##*/}"
27058        if test "x$tool_basename" = "x$tool_specified"; then
27059          # A command without a complete path is provided, search $PATH.
27060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
27061$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
27062          # Extract the first word of "$tool_basename", so it can be a program name with args.
27063set dummy $tool_basename; ac_word=$2
27064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27065$as_echo_n "checking for $ac_word... " >&6; }
27066if ${ac_cv_path_JARSIGNER+:} false; then :
27067  $as_echo_n "(cached) " >&6
27068else
27069  case $JARSIGNER in
27070  [\\/]* | ?:[\\/]*)
27071  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
27072  ;;
27073  *)
27074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27075for as_dir in $PATH
27076do
27077  IFS=$as_save_IFS
27078  test -z "$as_dir" && as_dir=.
27079    for ac_exec_ext in '' $ac_executable_extensions; do
27080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27081    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
27082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27083    break 2
27084  fi
27085done
27086  done
27087IFS=$as_save_IFS
27088
27089  ;;
27090esac
27091fi
27092JARSIGNER=$ac_cv_path_JARSIGNER
27093if test -n "$JARSIGNER"; then
27094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
27095$as_echo "$JARSIGNER" >&6; }
27096else
27097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27098$as_echo "no" >&6; }
27099fi
27100
27101
27102          if test "x$JARSIGNER" = x; then
27103            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27104          fi
27105        else
27106          # Otherwise we believe it is a complete path. Use it as it is.
27107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
27108$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
27109          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
27110$as_echo_n "checking for JARSIGNER... " >&6; }
27111          if test ! -x "$tool_specified"; then
27112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27113$as_echo "not found" >&6; }
27114            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
27115          fi
27116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27117$as_echo "$tool_specified" >&6; }
27118        fi
27119      fi
27120    fi
27121  fi
27122
27123
27124
27125  # Finally, set some other options...
27126
27127  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
27128  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
27129
27130
27131
27132  # Check if the boot jdk is 32 or 64 bit
27133  if "$JAVA" -d64 -version > /dev/null 2>&1; then
27134    BOOT_JDK_BITS="64"
27135  else
27136    BOOT_JDK_BITS="32"
27137  fi
27138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
27139$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
27140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
27141$as_echo "$BOOT_JDK_BITS" >&6; }
27142
27143
27144
27145###############################################################################
27146#
27147# Configure the sources to use. We can add or override individual directories.
27148#
27149###############################################################################
27150
27151
27152  # Where are the sources. Any of these can be overridden
27153  # using --with-override-corba and the likes.
27154  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
27155  CORBA_TOPDIR="$SRC_ROOT/corba"
27156  JAXP_TOPDIR="$SRC_ROOT/jaxp"
27157  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
27158  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
27159  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
27160  JDK_TOPDIR="$SRC_ROOT/jdk"
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171  ###############################################################################
27172  #
27173  # Pickup additional source for a component from outside of the source root
27174  # or override source for a component.
27175  #
27176
27177# Check whether --with-add-source-root was given.
27178if test "${with_add_source_root+set}" = set; then :
27179  withval=$with_add_source_root;
27180fi
27181
27182
27183
27184# Check whether --with-override-source-root was given.
27185if test "${with_override_source_root+set}" = set; then :
27186  withval=$with_override_source_root;
27187fi
27188
27189
27190
27191# Check whether --with-adds-and-overrides was given.
27192if test "${with_adds_and_overrides+set}" = set; then :
27193  withval=$with_adds_and_overrides;
27194fi
27195
27196
27197  if test "x$with_adds_and_overrides" != x; then
27198    with_add_source_root="$with_adds_and_overrides/adds"
27199    with_override_source_root="$with_adds_and_overrides/overrides"
27200  fi
27201
27202  if test "x$with_add_source_root" != x; then
27203    if ! test -d $with_add_source_root; then
27204      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
27205    fi
27206    CURDIR="$PWD"
27207    cd "$with_add_source_root"
27208    ADD_SRC_ROOT="`pwd`"
27209    cd "$CURDIR"
27210    # Verify that the addon source root does not have any root makefiles.
27211    # If it does, then it is usually an error, prevent this.
27212    if test -f $with_add_source_root/langtools/make/Makefile; then
27213      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
27214    fi
27215    if test -f $with_add_source_root/corba/make/Makefile; then
27216      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
27217    fi
27218    if test -f $with_add_source_root/jaxp/make/Makefile; then
27219      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
27220    fi
27221    if test -f $with_add_source_root/jaxws/make/Makefile; then
27222      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
27223    fi
27224    if test -f $with_add_source_root/hotspot/make/Makefile; then
27225      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
27226    fi
27227    if test -f $with_add_source_root/nashorn/make/Makefile; then
27228      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
27229    fi
27230    if test -f $with_add_source_root/jdk/make/Makefile; then
27231      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
27232    fi
27233  fi
27234
27235
27236  if test "x$with_override_source_root" != x; then
27237    if ! test -d $with_override_source_root; then
27238      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
27239    fi
27240    CURDIR="$PWD"
27241    cd "$with_override_source_root"
27242    OVERRIDE_SRC_ROOT="`pwd`"
27243    cd "$CURDIR"
27244    if test -f $with_override_source_root/langtools/make/Makefile; then
27245      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
27246    fi
27247    if test -f $with_override_source_root/corba/make/Makefile; then
27248      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
27249    fi
27250    if test -f $with_override_source_root/jaxp/make/Makefile; then
27251      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
27252    fi
27253    if test -f $with_override_source_root/jaxws/make/Makefile; then
27254      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
27255    fi
27256    if test -f $with_override_source_root/hotspot/make/Makefile; then
27257      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
27258    fi
27259    if test -f $with_override_source_root/nashorn/make/Makefile; then
27260      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
27261    fi
27262    if test -f $with_override_source_root/jdk/make/Makefile; then
27263      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
27264    fi
27265  fi
27266
27267
27268  ###############################################################################
27269  #
27270  # Override a repo completely, this is used for example when you have 3 small
27271  # development sandboxes of the langtools sources and want to avoid having 3 full
27272  # OpenJDK sources checked out on disk.
27273  #
27274  # Assuming that the 3 langtools sandboxes are located here:
27275  # /home/fredrik/sandbox1/langtools
27276  # /home/fredrik/sandbox2/langtools
27277  # /home/fredrik/sandbox3/langtools
27278  #
27279  # From the source root you create build subdirs manually:
27280  #     mkdir -p build1 build2 build3
27281  # in each build directory run:
27282  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
27283  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
27284  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
27285  #
27286
27287
27288# Check whether --with-override-langtools was given.
27289if test "${with_override_langtools+set}" = set; then :
27290  withval=$with_override_langtools;
27291fi
27292
27293
27294
27295# Check whether --with-override-corba was given.
27296if test "${with_override_corba+set}" = set; then :
27297  withval=$with_override_corba;
27298fi
27299
27300
27301
27302# Check whether --with-override-jaxp was given.
27303if test "${with_override_jaxp+set}" = set; then :
27304  withval=$with_override_jaxp;
27305fi
27306
27307
27308
27309# Check whether --with-override-jaxws was given.
27310if test "${with_override_jaxws+set}" = set; then :
27311  withval=$with_override_jaxws;
27312fi
27313
27314
27315
27316# Check whether --with-override-hotspot was given.
27317if test "${with_override_hotspot+set}" = set; then :
27318  withval=$with_override_hotspot;
27319fi
27320
27321
27322
27323# Check whether --with-override-nashorn was given.
27324if test "${with_override_nashorn+set}" = set; then :
27325  withval=$with_override_nashorn;
27326fi
27327
27328
27329
27330# Check whether --with-override-jdk was given.
27331if test "${with_override_jdk+set}" = set; then :
27332  withval=$with_override_jdk;
27333fi
27334
27335
27336  if test "x$with_override_langtools" != x; then
27337    CURDIR="$PWD"
27338    cd "$with_override_langtools"
27339    LANGTOOLS_TOPDIR="`pwd`"
27340    cd "$CURDIR"
27341    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
27342      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
27343    fi
27344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
27345$as_echo_n "checking if langtools should be overridden... " >&6; }
27346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
27347$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
27348  fi
27349  if test "x$with_override_corba" != x; then
27350    CURDIR="$PWD"
27351    cd "$with_override_corba"
27352    CORBA_TOPDIR="`pwd`"
27353    cd "$CURDIR"
27354    if ! test -f $CORBA_TOPDIR/make/Makefile; then
27355      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
27356    fi
27357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
27358$as_echo_n "checking if corba should be overridden... " >&6; }
27359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
27360$as_echo "yes with $CORBA_TOPDIR" >&6; }
27361  fi
27362  if test "x$with_override_jaxp" != x; then
27363    CURDIR="$PWD"
27364    cd "$with_override_jaxp"
27365    JAXP_TOPDIR="`pwd`"
27366    cd "$CURDIR"
27367    if ! test -f $JAXP_TOPDIR/make/Makefile; then
27368      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
27369    fi
27370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
27371$as_echo_n "checking if jaxp should be overridden... " >&6; }
27372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
27373$as_echo "yes with $JAXP_TOPDIR" >&6; }
27374  fi
27375  if test "x$with_override_jaxws" != x; then
27376    CURDIR="$PWD"
27377    cd "$with_override_jaxws"
27378    JAXWS_TOPDIR="`pwd`"
27379    cd "$CURDIR"
27380    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
27381      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
27382    fi
27383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
27384$as_echo_n "checking if jaxws should be overridden... " >&6; }
27385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
27386$as_echo "yes with $JAXWS_TOPDIR" >&6; }
27387  fi
27388  if test "x$with_override_hotspot" != x; then
27389    CURDIR="$PWD"
27390    cd "$with_override_hotspot"
27391    HOTSPOT_TOPDIR="`pwd`"
27392    cd "$CURDIR"
27393    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
27394      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
27395    fi
27396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
27397$as_echo_n "checking if hotspot should be overridden... " >&6; }
27398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
27399$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
27400  fi
27401  if test "x$with_override_nashorn" != x; then
27402    CURDIR="$PWD"
27403    cd "$with_override_nashorn"
27404    NASHORN_TOPDIR="`pwd`"
27405    cd "$CURDIR"
27406    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
27407      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
27408    fi
27409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
27410$as_echo_n "checking if nashorn should be overridden... " >&6; }
27411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
27412$as_echo "yes with $NASHORN_TOPDIR" >&6; }
27413  fi
27414  if test "x$with_override_jdk" != x; then
27415    CURDIR="$PWD"
27416    cd "$with_override_jdk"
27417    JDK_TOPDIR="`pwd`"
27418    cd "$CURDIR"
27419    if ! test -f $JDK_TOPDIR/make/Makefile; then
27420      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
27421    fi
27422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
27423$as_echo_n "checking if JDK should be overridden... " >&6; }
27424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
27425$as_echo "yes with $JDK_TOPDIR" >&6; }
27426  fi
27427
27428
27429  BUILD_OUTPUT="$OUTPUT_ROOT"
27430
27431
27432  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
27433  BUILD_HOTSPOT=true
27434
27435
27436
27437# Check whether --with-import-hotspot was given.
27438if test "${with_import_hotspot+set}" = set; then :
27439  withval=$with_import_hotspot;
27440fi
27441
27442  if test "x$with_import_hotspot" != x; then
27443    CURDIR="$PWD"
27444    cd "$with_import_hotspot"
27445    HOTSPOT_DIST="`pwd`"
27446    cd "$CURDIR"
27447    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27448      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27449    fi
27450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27451$as_echo_n "checking if hotspot should be imported... " >&6; }
27452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27453$as_echo "yes from $HOTSPOT_DIST" >&6; }
27454    BUILD_HOTSPOT=false
27455  fi
27456
27457  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27458
27459
27460###############################################################################
27461#
27462# Setup the toolchain (compilers etc), i.e. tools used to compile and process
27463# native code.
27464#
27465###############################################################################
27466
27467# First determine the toolchain type (compiler family)
27468
27469
27470# Check whether --with-toolchain-type was given.
27471if test "${with_toolchain_type+set}" = set; then :
27472  withval=$with_toolchain_type;
27473fi
27474
27475
27476  # Use indirect variable referencing
27477  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27478  VALID_TOOLCHAINS=${!toolchain_var_name}
27479
27480  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27481    if test -n "$XCODEBUILD"; then
27482      # On Mac OS X, default toolchain to clang after Xcode 5
27483      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27484      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27485      if test $? -ne 0; then
27486        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27487      fi
27488      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
27489          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
27490          $CUT -f 1 -d .`
27491      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
27492$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
27493      if test $XCODE_MAJOR_VERSION -ge 5; then
27494          DEFAULT_TOOLCHAIN="clang"
27495      else
27496          DEFAULT_TOOLCHAIN="gcc"
27497      fi
27498    else
27499      # If Xcode is not installed, but the command line tools are
27500      # then we can't run xcodebuild. On these systems we should
27501      # default to clang
27502      DEFAULT_TOOLCHAIN="clang"
27503    fi
27504  else
27505    # First toolchain type in the list is the default
27506    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
27507  fi
27508
27509  if test "x$with_toolchain_type" = xlist; then
27510    # List all toolchains
27511    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
27512$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
27513    for toolchain in $VALID_TOOLCHAINS; do
27514      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27515      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27516      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27517    done
27518
27519    exit 0
27520  elif test "x$with_toolchain_type" != x; then
27521    # User override; check that it is valid
27522    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27523      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27524$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27525      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27526$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27527      as_fn_error $? "Cannot continue." "$LINENO" 5
27528    fi
27529    TOOLCHAIN_TYPE=$with_toolchain_type
27530  else
27531    # No flag given, use default
27532    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27533  fi
27534
27535
27536  TOOLCHAIN_CC_BINARY_clang="clang"
27537  TOOLCHAIN_CC_BINARY_gcc="gcc"
27538  TOOLCHAIN_CC_BINARY_microsoft="cl"
27539  TOOLCHAIN_CC_BINARY_solstudio="cc"
27540  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27541
27542  TOOLCHAIN_CXX_BINARY_clang="clang++"
27543  TOOLCHAIN_CXX_BINARY_gcc="g++"
27544  TOOLCHAIN_CXX_BINARY_microsoft="cl"
27545  TOOLCHAIN_CXX_BINARY_solstudio="CC"
27546  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27547
27548  # Use indirect variable referencing
27549  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27550  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27551  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27552  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27553  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27554  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27555
27556
27557  # Define filename patterns
27558  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27559    LIBRARY_PREFIX=
27560    SHARED_LIBRARY_SUFFIX='.dll'
27561    STATIC_LIBRARY_SUFFIX='.lib'
27562    SHARED_LIBRARY='$1.dll'
27563    STATIC_LIBRARY='$1.lib'
27564    OBJ_SUFFIX='.obj'
27565    EXE_SUFFIX='.exe'
27566  else
27567    LIBRARY_PREFIX=lib
27568    SHARED_LIBRARY_SUFFIX='.so'
27569    STATIC_LIBRARY_SUFFIX='.a'
27570    SHARED_LIBRARY='lib$1.so'
27571    STATIC_LIBRARY='lib$1.a'
27572    OBJ_SUFFIX='.o'
27573    EXE_SUFFIX=''
27574    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27575      SHARED_LIBRARY='lib$1.dylib'
27576      SHARED_LIBRARY_SUFFIX='.dylib'
27577    fi
27578  fi
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27590    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27591$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27592  else
27593    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27594$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27595  fi
27596
27597
27598# User supplied flags should be used when configure detects compilers
27599
27600  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27601    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27602$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27603  fi
27604
27605  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27606    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27607$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27608  fi
27609
27610  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27611    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27612$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27613  fi
27614
27615
27616# Check whether --with-extra-cflags was given.
27617if test "${with_extra_cflags+set}" = set; then :
27618  withval=$with_extra_cflags;
27619fi
27620
27621
27622
27623# Check whether --with-extra-cxxflags was given.
27624if test "${with_extra_cxxflags+set}" = set; then :
27625  withval=$with_extra_cxxflags;
27626fi
27627
27628
27629
27630# Check whether --with-extra-ldflags was given.
27631if test "${with_extra_ldflags+set}" = set; then :
27632  withval=$with_extra_ldflags;
27633fi
27634
27635
27636  EXTRA_CFLAGS="$with_extra_cflags"
27637  EXTRA_CXXFLAGS="$with_extra_cxxflags"
27638  EXTRA_LDFLAGS="$with_extra_ldflags"
27639
27640  # Hotspot needs these set in their legacy form
27641  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
27642  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
27643  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
27644
27645
27646
27647
27648
27649  # The global CFLAGS and LDLAGS variables are used by configure tests and
27650  # should include the extra parameters
27651  CFLAGS="$EXTRA_CFLAGS"
27652  CXXFLAGS="$EXTRA_CXXFLAGS"
27653  LDFLAGS="$EXTRA_LDFLAGS"
27654  CPPFLAGS=""
27655
27656# The sysroot cflags are needed for configure to be able to run the compilers
27657
27658  if test "x$SYSROOT" != "x"; then
27659    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
27660      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27661        # Solaris Studio does not have a concept of sysroot. Instead we must
27662        # make sure the default include and lib dirs are appended to each
27663        # compile and link command line.
27664        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
27665        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
27666            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
27667            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
27668      fi
27669    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
27670      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
27671      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
27672    elif test "x$TOOLCHAIN_TYPE" = xclang; then
27673      SYSROOT_CFLAGS="-isysroot $SYSROOT"
27674      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
27675    fi
27676    # Propagate the sysroot args to hotspot
27677    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
27678    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
27679    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
27680    # The global CFLAGS and LDFLAGS variables need these for configure to function
27681    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
27682    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
27683    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
27684    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
27685  fi
27686
27687  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27688    # We also need -iframework<path>/System/Library/Frameworks
27689    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27690    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
27691    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
27692    # set this here so it doesn't have to be peppered throughout the forest
27693    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27694    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
27695  fi
27696
27697
27698
27699
27700
27701# Then detect the actual binaries needed
27702
27703  # FIXME: Is this needed?
27704  ac_ext=cpp
27705ac_cpp='$CXXCPP $CPPFLAGS'
27706ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27707ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27708ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27709
27710
27711  # Store the CFLAGS etc passed to the configure script.
27712  ORG_CFLAGS="$CFLAGS"
27713  ORG_CXXFLAGS="$CXXFLAGS"
27714
27715  # autoconf magic only relies on PATH, so update it if tools dir is specified
27716  OLD_PATH="$PATH"
27717
27718  # On Windows, we need to detect the visual studio installation first.
27719  # This will change the PATH, but we need to keep that new PATH even
27720  # after toolchain detection is done, since the compiler (on x86) uses
27721  # it for DLL resolution in runtime.
27722  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27723      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27724
27725  # Store path to cygwin link.exe to help excluding it when searching for
27726  # VS linker. This must be done before changing the PATH when looking for VS.
27727  # Extract the first word of "link", so it can be a program name with args.
27728set dummy link; ac_word=$2
27729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27730$as_echo_n "checking for $ac_word... " >&6; }
27731if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27732  $as_echo_n "(cached) " >&6
27733else
27734  case $CYGWIN_LINK in
27735  [\\/]* | ?:[\\/]*)
27736  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27737  ;;
27738  *)
27739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27740for as_dir in $PATH
27741do
27742  IFS=$as_save_IFS
27743  test -z "$as_dir" && as_dir=.
27744    for ac_exec_ext in '' $ac_executable_extensions; do
27745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27746    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27748    break 2
27749  fi
27750done
27751  done
27752IFS=$as_save_IFS
27753
27754  ;;
27755esac
27756fi
27757CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27758if test -n "$CYGWIN_LINK"; then
27759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27760$as_echo "$CYGWIN_LINK" >&6; }
27761else
27762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27763$as_echo "no" >&6; }
27764fi
27765
27766
27767  if test "x$CYGWIN_LINK" != x; then
27768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27769$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27770    "$CYGWIN_LINK" --version > /dev/null
27771    if test $? -eq 0 ; then
27772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27773$as_echo "yes" >&6; }
27774    else
27775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27776$as_echo "no" >&6; }
27777      # This might be the VS linker. Don't exclude it later on.
27778      CYGWIN_LINK=""
27779    fi
27780  fi
27781
27782  # First-hand choice is to locate and run the vsvars bat file.
27783
27784
27785# Check whether --with-toolchain-version was given.
27786if test "${with_toolchain_version+set}" = set; then :
27787  withval=$with_toolchain_version;
27788fi
27789
27790
27791  if test "x$with_toolchain_version" = xlist; then
27792    # List all toolchains
27793    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27794$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27795    for version in $VALID_VS_VERSIONS; do
27796      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27797      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
27798    done
27799
27800    exit 0
27801  elif test "x$DEVKIT_VS_VERSION" != x; then
27802    VS_VERSION=$DEVKIT_VS_VERSION
27803    TOOLCHAIN_VERSION=$VS_VERSION
27804    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27805    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27806    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27807    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27808    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27809    VS_PATH="$TOOLCHAIN_PATH:$PATH"
27810
27811    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27812    # can still be exported as INCLUDE for compiler invocations without
27813    # SYSROOT_CFLAGS
27814    OLDIFS="$IFS"
27815    IFS=";"
27816    for i in $DEVKIT_VS_INCLUDE; do
27817      ipath=$i
27818
27819  unix_path="$ipath"
27820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27821    windows_path=`$CYGPATH -m "$unix_path"`
27822    ipath="$windows_path"
27823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27824    windows_path=`cmd //c echo $unix_path`
27825    ipath="$windows_path"
27826  fi
27827
27828      VS_INCLUDE="$VS_INCLUDE;$ipath"
27829    done
27830    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27831    # as LIB for compiler invocations without SYSROOT_LDFLAGS
27832    for i in $DEVKIT_VS_LIB; do
27833      libpath=$i
27834
27835  unix_path="$libpath"
27836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27837    windows_path=`$CYGPATH -m "$unix_path"`
27838    libpath="$windows_path"
27839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27840    windows_path=`cmd //c echo $unix_path`
27841    libpath="$windows_path"
27842  fi
27843
27844      VS_LIB="$VS_LIB;$libpath"
27845    done
27846    IFS="$OLDIFS"
27847
27848    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27849$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27850
27851  elif test "x$with_toolchain_version" != x; then
27852    # User override; check that it is valid
27853    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27854      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27855$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27856      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27857$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27858      as_fn_error $? "Cannot continue." "$LINENO" 5
27859    fi
27860    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27861  else
27862    # No flag given, use default
27863    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27864  fi
27865
27866  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27867
27868  VS_VERSION="$VS_VERSION"
27869  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27870  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27871  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27872  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27873
27874  # When using --with-tools-dir, assume it points to the correct and default
27875  # version of Visual Studio or that --with-toolchain-version was also set.
27876  if test "x$with_tools_dir" != x; then
27877
27878  if test "x$VS_ENV_CMD" = x; then
27879    VS_VERSION="${VS_VERSION}"
27880    VS_BASE="$with_tools_dir/../.."
27881    METHOD="--with-tools-dir"
27882
27883    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27884      VCVARSFILE="vc/bin/vcvars32.bat"
27885    else
27886      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27887    fi
27888
27889
27890  windows_path="$VS_BASE"
27891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27892    unix_path=`$CYGPATH -u "$windows_path"`
27893    VS_BASE="$unix_path"
27894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27896    VS_BASE="$unix_path"
27897  fi
27898
27899    if test -d "$VS_BASE"; then
27900      if test -f "$VS_BASE/$VCVARSFILE"; then
27901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27902$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27903        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27904        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27905        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27906        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27907      else
27908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27909$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27911$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27912      fi
27913    fi
27914  fi
27915
27916
27917  if test "x$VS_ENV_CMD" = x; then
27918    VS_VERSION="${VS_VERSION}"
27919    VS_BASE="$with_tools_dir/../../.."
27920    METHOD="--with-tools-dir"
27921
27922    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27923      VCVARSFILE="vc/bin/vcvars32.bat"
27924    else
27925      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27926    fi
27927
27928
27929  windows_path="$VS_BASE"
27930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27931    unix_path=`$CYGPATH -u "$windows_path"`
27932    VS_BASE="$unix_path"
27933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27935    VS_BASE="$unix_path"
27936  fi
27937
27938    if test -d "$VS_BASE"; then
27939      if test -f "$VS_BASE/$VCVARSFILE"; then
27940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27941$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27942        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27943        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27944        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27945        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27946      else
27947        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27948$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27949        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27950$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27951      fi
27952    fi
27953  fi
27954
27955    if test "x$VS_ENV_CMD" = x; then
27956      # Having specified an argument which is incorrect will produce an instant failure;
27957      # we should not go on looking
27958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27959$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27960      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27961$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27962      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27963$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27964      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27965    fi
27966  fi
27967
27968  VS_ENV_CMD=""
27969  VS_ENV_ARGS=""
27970
27971  if test "x$VS_COMNTOOLS" != x; then
27972
27973  if test "x$VS_ENV_CMD" = x; then
27974    VS_VERSION="${VS_VERSION}"
27975    VS_BASE="$VS_COMNTOOLS/../.."
27976    METHOD="$VS_COMNTOOLS_VAR variable"
27977
27978    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27979      VCVARSFILE="vc/bin/vcvars32.bat"
27980    else
27981      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27982    fi
27983
27984
27985  windows_path="$VS_BASE"
27986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27987    unix_path=`$CYGPATH -u "$windows_path"`
27988    VS_BASE="$unix_path"
27989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27991    VS_BASE="$unix_path"
27992  fi
27993
27994    if test -d "$VS_BASE"; then
27995      if test -f "$VS_BASE/$VCVARSFILE"; then
27996        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27997$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27998        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27999        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28000        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28001        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28002      else
28003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28004$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28005        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28006$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28007      fi
28008    fi
28009  fi
28010
28011  fi
28012  if test "x$PROGRAMFILES" != x; then
28013
28014  if test "x$VS_ENV_CMD" = x; then
28015    VS_VERSION="${VS_VERSION}"
28016    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
28017    METHOD="well-known name"
28018
28019    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28020      VCVARSFILE="vc/bin/vcvars32.bat"
28021    else
28022      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28023    fi
28024
28025
28026  windows_path="$VS_BASE"
28027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28028    unix_path=`$CYGPATH -u "$windows_path"`
28029    VS_BASE="$unix_path"
28030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28032    VS_BASE="$unix_path"
28033  fi
28034
28035    if test -d "$VS_BASE"; then
28036      if test -f "$VS_BASE/$VCVARSFILE"; then
28037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28038$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28039        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28040        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28041        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28042        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28043      else
28044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28045$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28047$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28048      fi
28049    fi
28050  fi
28051
28052  fi
28053  # Work around the insanely named ProgramFiles(x86) env variable
28054  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
28055  if test "x$PROGRAMFILES_X86" != x; then
28056
28057  if test "x$VS_ENV_CMD" = x; then
28058    VS_VERSION="${VS_VERSION}"
28059    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
28060    METHOD="well-known name"
28061
28062    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28063      VCVARSFILE="vc/bin/vcvars32.bat"
28064    else
28065      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28066    fi
28067
28068
28069  windows_path="$VS_BASE"
28070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28071    unix_path=`$CYGPATH -u "$windows_path"`
28072    VS_BASE="$unix_path"
28073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28075    VS_BASE="$unix_path"
28076  fi
28077
28078    if test -d "$VS_BASE"; then
28079      if test -f "$VS_BASE/$VCVARSFILE"; then
28080        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28081$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28082        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28083        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28084        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28085        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28086      else
28087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28088$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28089        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28090$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28091      fi
28092    fi
28093  fi
28094
28095  fi
28096
28097  if test "x$VS_ENV_CMD" = x; then
28098    VS_VERSION="${VS_VERSION}"
28099    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
28100    METHOD="well-known name"
28101
28102    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28103      VCVARSFILE="vc/bin/vcvars32.bat"
28104    else
28105      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28106    fi
28107
28108
28109  windows_path="$VS_BASE"
28110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111    unix_path=`$CYGPATH -u "$windows_path"`
28112    VS_BASE="$unix_path"
28113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28115    VS_BASE="$unix_path"
28116  fi
28117
28118    if test -d "$VS_BASE"; then
28119      if test -f "$VS_BASE/$VCVARSFILE"; then
28120        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28121$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28122        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28123        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28124        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28125        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28126      else
28127        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28128$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28129        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28130$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28131      fi
28132    fi
28133  fi
28134
28135
28136  if test "x$VS_ENV_CMD" = x; then
28137    VS_VERSION="${VS_VERSION}"
28138    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
28139    METHOD="well-known name"
28140
28141    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28142      VCVARSFILE="vc/bin/vcvars32.bat"
28143    else
28144      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
28145    fi
28146
28147
28148  windows_path="$VS_BASE"
28149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28150    unix_path=`$CYGPATH -u "$windows_path"`
28151    VS_BASE="$unix_path"
28152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28154    VS_BASE="$unix_path"
28155  fi
28156
28157    if test -d "$VS_BASE"; then
28158      if test -f "$VS_BASE/$VCVARSFILE"; then
28159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28160$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28161        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
28162        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28163        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
28164        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
28165      else
28166        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
28167$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
28168        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
28169$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
28170      fi
28171    fi
28172  fi
28173
28174
28175  if test "x$SDK_INSTALL_DIR" != x; then
28176    if test "x$ProgramW6432" != x; then
28177
28178  if test "x$VS_ENV_CMD" = x; then
28179    VS_VERSION="${VS_VERSION}"
28180    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
28181    METHOD="well-known name"
28182
28183  windows_path="$WIN_SDK_BASE"
28184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28185    unix_path=`$CYGPATH -u "$windows_path"`
28186    WIN_SDK_BASE="$unix_path"
28187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28189    WIN_SDK_BASE="$unix_path"
28190  fi
28191
28192    if test -d "$WIN_SDK_BASE"; then
28193      # There have been cases of partial or broken SDK installations. A missing
28194      # lib dir is not going to work.
28195      if test ! -d "$WIN_SDK_BASE/lib"; then
28196        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28197$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28198        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28199$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28200      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28203        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28204        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28205          VS_ENV_ARGS="/x86"
28206        else
28207          VS_ENV_ARGS="/x64"
28208        fi
28209        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28210        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28211        # TODO: improve detection for other versions of SDK
28212        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28213      else
28214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28215$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28217$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28218      fi
28219    fi
28220  fi
28221
28222    fi
28223    if test "x$PROGRAMW6432" != x; then
28224
28225  if test "x$VS_ENV_CMD" = x; then
28226    VS_VERSION="${VS_VERSION}"
28227    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
28228    METHOD="well-known name"
28229
28230  windows_path="$WIN_SDK_BASE"
28231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28232    unix_path=`$CYGPATH -u "$windows_path"`
28233    WIN_SDK_BASE="$unix_path"
28234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28236    WIN_SDK_BASE="$unix_path"
28237  fi
28238
28239    if test -d "$WIN_SDK_BASE"; then
28240      # There have been cases of partial or broken SDK installations. A missing
28241      # lib dir is not going to work.
28242      if test ! -d "$WIN_SDK_BASE/lib"; then
28243        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28244$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28245        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28246$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28247      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28250        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28251        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28252          VS_ENV_ARGS="/x86"
28253        else
28254          VS_ENV_ARGS="/x64"
28255        fi
28256        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28257        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28258        # TODO: improve detection for other versions of SDK
28259        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28260      else
28261        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28262$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28263        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28264$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28265      fi
28266    fi
28267  fi
28268
28269    fi
28270    if test "x$PROGRAMFILES" != x; then
28271
28272  if test "x$VS_ENV_CMD" = x; then
28273    VS_VERSION="${VS_VERSION}"
28274    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
28275    METHOD="well-known name"
28276
28277  windows_path="$WIN_SDK_BASE"
28278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28279    unix_path=`$CYGPATH -u "$windows_path"`
28280    WIN_SDK_BASE="$unix_path"
28281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28283    WIN_SDK_BASE="$unix_path"
28284  fi
28285
28286    if test -d "$WIN_SDK_BASE"; then
28287      # There have been cases of partial or broken SDK installations. A missing
28288      # lib dir is not going to work.
28289      if test ! -d "$WIN_SDK_BASE/lib"; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28293$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28294      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28295        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28296$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28297        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28298        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28299          VS_ENV_ARGS="/x86"
28300        else
28301          VS_ENV_ARGS="/x64"
28302        fi
28303        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28304        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28305        # TODO: improve detection for other versions of SDK
28306        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28307      else
28308        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28309$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28310        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28311$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28312      fi
28313    fi
28314  fi
28315
28316    fi
28317
28318  if test "x$VS_ENV_CMD" = x; then
28319    VS_VERSION="${VS_VERSION}"
28320    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
28321    METHOD="well-known name"
28322
28323  windows_path="$WIN_SDK_BASE"
28324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28325    unix_path=`$CYGPATH -u "$windows_path"`
28326    WIN_SDK_BASE="$unix_path"
28327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28329    WIN_SDK_BASE="$unix_path"
28330  fi
28331
28332    if test -d "$WIN_SDK_BASE"; then
28333      # There have been cases of partial or broken SDK installations. A missing
28334      # lib dir is not going to work.
28335      if test ! -d "$WIN_SDK_BASE/lib"; then
28336        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28337$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28338        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28339$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28340      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28341        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28342$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28343        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28344        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28345          VS_ENV_ARGS="/x86"
28346        else
28347          VS_ENV_ARGS="/x64"
28348        fi
28349        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28350        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28351        # TODO: improve detection for other versions of SDK
28352        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28353      else
28354        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28355$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28356        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28357$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28358      fi
28359    fi
28360  fi
28361
28362
28363  if test "x$VS_ENV_CMD" = x; then
28364    VS_VERSION="${VS_VERSION}"
28365    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
28366    METHOD="well-known name"
28367
28368  windows_path="$WIN_SDK_BASE"
28369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28370    unix_path=`$CYGPATH -u "$windows_path"`
28371    WIN_SDK_BASE="$unix_path"
28372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28374    WIN_SDK_BASE="$unix_path"
28375  fi
28376
28377    if test -d "$WIN_SDK_BASE"; then
28378      # There have been cases of partial or broken SDK installations. A missing
28379      # lib dir is not going to work.
28380      if test ! -d "$WIN_SDK_BASE/lib"; then
28381        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28382$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28383        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
28384$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
28385      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
28386        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28387$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28388        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
28389        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
28390          VS_ENV_ARGS="/x86"
28391        else
28392          VS_ENV_ARGS="/x64"
28393        fi
28394        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
28395        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
28396        # TODO: improve detection for other versions of SDK
28397        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
28398      else
28399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
28400$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
28401        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
28402$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
28403      fi
28404    fi
28405  fi
28406
28407  fi
28408
28409    if test "x$VS_ENV_CMD" != x; then
28410      TOOLCHAIN_VERSION=$VS_VERSION
28411      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
28412      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
28413      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
28414      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
28415      # The rest of the variables are already evaled while probing
28416      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
28417$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
28418      break
28419    fi
28420  done
28421
28422
28423  # If we have a devkit, skip all of the below.
28424  if test "x$DEVKIT_VS_VERSION" = x; then
28425    if test "x$VS_ENV_CMD" != x; then
28426      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
28427
28428  # Only process if variable expands to non-empty
28429
28430  if test "x$VS_ENV_CMD" != x; then
28431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28432
28433  # First separate the path from the arguments. This will split at the first
28434  # space.
28435  complete="$VS_ENV_CMD"
28436  path="${complete%% *}"
28437  tmp="$complete EOL"
28438  arguments="${tmp#* }"
28439
28440  # Input might be given as Windows format, start by converting to
28441  # unix format.
28442  new_path=`$CYGPATH -u "$path"`
28443
28444  # Now try to locate executable using which
28445  new_path=`$WHICH "$new_path" 2> /dev/null`
28446  # bat and cmd files are not always considered executable in cygwin causing which
28447  # to not find them
28448  if test "x$new_path" = x \
28449      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28450      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28451    new_path=`$CYGPATH -u "$path"`
28452  fi
28453  if test "x$new_path" = x; then
28454    # Oops. Which didn't find the executable.
28455    # The splitting of arguments from the executable at a space might have been incorrect,
28456    # since paths with space are more likely in Windows. Give it another try with the whole
28457    # argument.
28458    path="$complete"
28459    arguments="EOL"
28460    new_path=`$CYGPATH -u "$path"`
28461    new_path=`$WHICH "$new_path" 2> /dev/null`
28462    # bat and cmd files are not always considered executable in cygwin causing which
28463    # to not find them
28464    if test "x$new_path" = x \
28465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28467      new_path=`$CYGPATH -u "$path"`
28468    fi
28469    if test "x$new_path" = x; then
28470      # It's still not found. Now this is an unrecoverable error.
28471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28472$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28473      has_space=`$ECHO "$complete" | $GREP " "`
28474      if test "x$has_space" != x; then
28475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28477      fi
28478      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28479    fi
28480  fi
28481
28482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28485  # "foo.exe" is OK but "foo" is an error.
28486  #
28487  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28488  # It is also a way to make sure we got the proper file name for the real test later on.
28489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28490  if test "x$test_shortpath" = x; then
28491    # Short path failed, file does not exist as specified.
28492    # Try adding .exe or .cmd
28493    if test -f "${new_path}.exe"; then
28494      input_to_shortpath="${new_path}.exe"
28495    elif test -f "${new_path}.cmd"; then
28496      input_to_shortpath="${new_path}.cmd"
28497    else
28498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
28499$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
28500      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28501$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28502      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28503    fi
28504  else
28505    input_to_shortpath="$new_path"
28506  fi
28507
28508  # Call helper function which possibly converts this using DOS-style short mode.
28509  # If so, the updated path is stored in $new_path.
28510  new_path="$input_to_shortpath"
28511
28512  input_path="$input_to_shortpath"
28513  # Check if we need to convert this using DOS-style short mode. If the path
28514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28515  # take no chances and rewrite it.
28516  # Note: m4 eats our [], so we need to use [ and ] instead.
28517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28518  if test "x$has_forbidden_chars" != x; then
28519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28523      # Going to short mode and back again did indeed matter. Since short mode is
28524      # case insensitive, let's make it lowercase to improve readability.
28525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28526      # Now convert it back to Unix-style (cygpath)
28527      input_path=`$CYGPATH -u "$shortmode_path"`
28528      new_path="$input_path"
28529    fi
28530  fi
28531
28532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28533  if test "x$test_cygdrive_prefix" = x; then
28534    # As a simple fix, exclude /usr/bin since it's not a real path.
28535    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28537      # a path prefixed by /cygdrive for fixpath to work.
28538      new_path="$CYGWIN_ROOT_PATH$input_path"
28539    fi
28540  fi
28541
28542  # remove trailing .exe if any
28543  new_path="${new_path/%.exe/}"
28544
28545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28546
28547  # First separate the path from the arguments. This will split at the first
28548  # space.
28549  complete="$VS_ENV_CMD"
28550  path="${complete%% *}"
28551  tmp="$complete EOL"
28552  arguments="${tmp#* }"
28553
28554  # Input might be given as Windows format, start by converting to
28555  # unix format.
28556  new_path="$path"
28557
28558  windows_path="$new_path"
28559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28560    unix_path=`$CYGPATH -u "$windows_path"`
28561    new_path="$unix_path"
28562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28564    new_path="$unix_path"
28565  fi
28566
28567
28568  # Now try to locate executable using which
28569  new_path=`$WHICH "$new_path" 2> /dev/null`
28570
28571  if test "x$new_path" = x; then
28572    # Oops. Which didn't find the executable.
28573    # The splitting of arguments from the executable at a space might have been incorrect,
28574    # since paths with space are more likely in Windows. Give it another try with the whole
28575    # argument.
28576    path="$complete"
28577    arguments="EOL"
28578    new_path="$path"
28579
28580  windows_path="$new_path"
28581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28582    unix_path=`$CYGPATH -u "$windows_path"`
28583    new_path="$unix_path"
28584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28586    new_path="$unix_path"
28587  fi
28588
28589
28590    new_path=`$WHICH "$new_path" 2> /dev/null`
28591    # bat and cmd files are not always considered executable in MSYS causing which
28592    # to not find them
28593    if test "x$new_path" = x \
28594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28596      new_path="$path"
28597
28598  windows_path="$new_path"
28599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600    unix_path=`$CYGPATH -u "$windows_path"`
28601    new_path="$unix_path"
28602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28604    new_path="$unix_path"
28605  fi
28606
28607    fi
28608
28609    if test "x$new_path" = x; then
28610      # It's still not found. Now this is an unrecoverable error.
28611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28612$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28613      has_space=`$ECHO "$complete" | $GREP " "`
28614      if test "x$has_space" != x; then
28615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28617      fi
28618      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28619    fi
28620  fi
28621
28622  # Now new_path has a complete unix path to the binary
28623  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28624    # Keep paths in /bin as-is, but remove trailing .exe if any
28625    new_path="${new_path/%.exe/}"
28626    # Do not save /bin paths to all_fixpath_prefixes!
28627  else
28628    # Not in mixed or Windows style, start by that.
28629    new_path=`cmd //c echo $new_path`
28630
28631  input_path="$new_path"
28632  # Check if we need to convert this using DOS-style short mode. If the path
28633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28634  # take no chances and rewrite it.
28635  # Note: m4 eats our [], so we need to use [ and ] instead.
28636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28637  if test "x$has_forbidden_chars" != x; then
28638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28640  fi
28641
28642    # Output is in $new_path
28643
28644  windows_path="$new_path"
28645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28646    unix_path=`$CYGPATH -u "$windows_path"`
28647    new_path="$unix_path"
28648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28650    new_path="$unix_path"
28651  fi
28652
28653    # remove trailing .exe if any
28654    new_path="${new_path/%.exe/}"
28655
28656    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28657    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28658  fi
28659
28660    else
28661      # We're on a unix platform. Hooray! :)
28662      # First separate the path from the arguments. This will split at the first
28663      # space.
28664      complete="$VS_ENV_CMD"
28665      path="${complete%% *}"
28666      tmp="$complete EOL"
28667      arguments="${tmp#* }"
28668
28669      # Cannot rely on the command "which" here since it doesn't always work.
28670      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28671      if test -z "$is_absolute_path"; then
28672        # Path to executable is not absolute. Find it.
28673        IFS_save="$IFS"
28674        IFS=:
28675        for p in $PATH; do
28676          if test -f "$p/$path" && test -x "$p/$path"; then
28677            new_path="$p/$path"
28678            break
28679          fi
28680        done
28681        IFS="$IFS_save"
28682      else
28683        # This is an absolute path, we can use it without further modifications.
28684        new_path="$path"
28685      fi
28686
28687      if test "x$new_path" = x; then
28688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28689$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28690        has_space=`$ECHO "$complete" | $GREP " "`
28691        if test "x$has_space" != x; then
28692          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28693$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28694        fi
28695        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28696      fi
28697    fi
28698
28699    # Now join together the path and the arguments once again
28700    if test "x$arguments" != xEOL; then
28701      new_complete="$new_path ${arguments% *}"
28702    else
28703      new_complete="$new_path"
28704    fi
28705
28706    if test "x$complete" != "x$new_complete"; then
28707      VS_ENV_CMD="$new_complete"
28708      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28709$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28710    fi
28711  fi
28712
28713
28714      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28716$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28717
28718      # We need to create a couple of temporary files.
28719      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28720      $MKDIR -p $VS_ENV_TMP_DIR
28721
28722      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28723      # Instead create a shell script which will set the relevant variables when run.
28724      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28725
28726  unix_path="$WINPATH_VS_ENV_CMD"
28727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28728    windows_path=`$CYGPATH -m "$unix_path"`
28729    WINPATH_VS_ENV_CMD="$windows_path"
28730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28731    windows_path=`cmd //c echo $unix_path`
28732    WINPATH_VS_ENV_CMD="$windows_path"
28733  fi
28734
28735      WINPATH_BASH="$BASH"
28736
28737  unix_path="$WINPATH_BASH"
28738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28739    windows_path=`$CYGPATH -m "$unix_path"`
28740    WINPATH_BASH="$windows_path"
28741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28742    windows_path=`cmd //c echo $unix_path`
28743    WINPATH_BASH="$windows_path"
28744  fi
28745
28746
28747      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28748      # script (executable by bash) that will setup the important variables.
28749      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28750      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
28751      # This will end up something like:
28752      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28753      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28754      # These will end up something like:
28755      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28756      # The trailing space for everyone except PATH is no typo, but is needed due
28757      # to trailing \ in the Windows paths. These will be stripped later.
28758      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28759          >> $EXTRACT_VC_ENV_BAT_FILE
28760      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28761          >> $EXTRACT_VC_ENV_BAT_FILE
28762      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28763          >> $EXTRACT_VC_ENV_BAT_FILE
28764      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28765          >> $EXTRACT_VC_ENV_BAT_FILE
28766      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28767          >> $EXTRACT_VC_ENV_BAT_FILE
28768      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28769          >> $EXTRACT_VC_ENV_BAT_FILE
28770
28771      # Now execute the newly created bat file.
28772      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28773      # Change directory so we don't need to mess with Windows paths in redirects.
28774      cd $VS_ENV_TMP_DIR
28775      cmd /c extract-vs-env.bat | $CAT
28776      cd $CURDIR
28777
28778      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28780$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28781        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28782$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28783        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28784$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28785        as_fn_error $? "Cannot continue" "$LINENO" 5
28786      fi
28787
28788      # Now set all paths and other env variables. This will allow the rest of
28789      # the configure script to find and run the compiler in the proper way.
28790      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28791$as_echo "$as_me: Setting extracted environment variables" >&6;}
28792      . $VS_ENV_TMP_DIR/set-vs-env.sh
28793      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28794      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28795    else
28796      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28797      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28798$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28799    fi
28800  fi
28801
28802  # At this point, we should have correct variables in the environment, or we can't continue.
28803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28804$as_echo_n "checking for Visual Studio variables... " >&6; }
28805
28806  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28807      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28808    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28810$as_echo "present but broken" >&6; }
28811      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28812    else
28813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28814$as_echo "ok" >&6; }
28815      # Remove any trailing "\" ";" and " " from the variables.
28816      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28817      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28818      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28819      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28820      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28821      # Remove any paths containing # (typically F#) as that messes up make. This
28822      # is needed if visual studio was installed with F# support.
28823      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28824
28825
28826
28827
28828
28829      # Convert VS_INCLUDE into SYSROOT_CFLAGS
28830      OLDIFS="$IFS"
28831      IFS=";"
28832      for i in $VS_INCLUDE; do
28833        ipath=$i
28834        # Only process non-empty elements
28835        if test "x$ipath" != x; then
28836          IFS="$OLDIFS"
28837          # Check that directory exists before calling fixup_path
28838          testpath=$ipath
28839
28840  windows_path="$testpath"
28841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28842    unix_path=`$CYGPATH -u "$windows_path"`
28843    testpath="$unix_path"
28844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28846    testpath="$unix_path"
28847  fi
28848
28849          if test -d "$testpath"; then
28850
28851  # Only process if variable expands to non-empty
28852
28853  if test "x$ipath" != x; then
28854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28855
28856  # Input might be given as Windows format, start by converting to
28857  # unix format.
28858  path="$ipath"
28859  new_path=`$CYGPATH -u "$path"`
28860
28861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28864  # "foo.exe" is OK but "foo" is an error.
28865  #
28866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28867  # It is also a way to make sure we got the proper file name for the real test later on.
28868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28869  if test "x$test_shortpath" = x; then
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28871$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28872    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28873  fi
28874
28875  # Call helper function which possibly converts this using DOS-style short mode.
28876  # If so, the updated path is stored in $new_path.
28877
28878  input_path="$new_path"
28879  # Check if we need to convert this using DOS-style short mode. If the path
28880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28881  # take no chances and rewrite it.
28882  # Note: m4 eats our [], so we need to use [ and ] instead.
28883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28884  if test "x$has_forbidden_chars" != x; then
28885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28889      # Going to short mode and back again did indeed matter. Since short mode is
28890      # case insensitive, let's make it lowercase to improve readability.
28891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28892      # Now convert it back to Unix-style (cygpath)
28893      input_path=`$CYGPATH -u "$shortmode_path"`
28894      new_path="$input_path"
28895    fi
28896  fi
28897
28898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28899  if test "x$test_cygdrive_prefix" = x; then
28900    # As a simple fix, exclude /usr/bin since it's not a real path.
28901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28903      # a path prefixed by /cygdrive for fixpath to work.
28904      new_path="$CYGWIN_ROOT_PATH$input_path"
28905    fi
28906  fi
28907
28908
28909  if test "x$path" != "x$new_path"; then
28910    ipath="$new_path"
28911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28912$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28913  fi
28914
28915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28916
28917  path="$ipath"
28918  has_colon=`$ECHO $path | $GREP ^.:`
28919  new_path="$path"
28920  if test "x$has_colon" = x; then
28921    # Not in mixed or Windows style, start by that.
28922    new_path=`cmd //c echo $path`
28923  fi
28924
28925
28926  input_path="$new_path"
28927  # Check if we need to convert this using DOS-style short mode. If the path
28928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28929  # take no chances and rewrite it.
28930  # Note: m4 eats our [], so we need to use [ and ] instead.
28931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28932  if test "x$has_forbidden_chars" != x; then
28933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28935  fi
28936
28937
28938  windows_path="$new_path"
28939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28940    unix_path=`$CYGPATH -u "$windows_path"`
28941    new_path="$unix_path"
28942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28944    new_path="$unix_path"
28945  fi
28946
28947  if test "x$path" != "x$new_path"; then
28948    ipath="$new_path"
28949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28950$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28951  fi
28952
28953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28955
28956    else
28957      # We're on a unix platform. Hooray! :)
28958      path="$ipath"
28959      has_space=`$ECHO "$path" | $GREP " "`
28960      if test "x$has_space" != x; then
28961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28962$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28964      fi
28965
28966      # Use eval to expand a potential ~
28967      eval path="$path"
28968      if test ! -f "$path" && test ! -d "$path"; then
28969        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28970      fi
28971
28972      ipath="`cd "$path"; $THEPWDCMD -L`"
28973    fi
28974  fi
28975
28976            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28977          fi
28978          IFS=";"
28979        fi
28980      done
28981      # Convert VS_LIB into SYSROOT_LDFLAGS
28982      for i in $VS_LIB; do
28983        libpath=$i
28984        # Only process non-empty elements
28985        if test "x$libpath" != x; then
28986          IFS="$OLDIFS"
28987          # Check that directory exists before calling fixup_path
28988          testpath=$libpath
28989
28990  windows_path="$testpath"
28991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28992    unix_path=`$CYGPATH -u "$windows_path"`
28993    testpath="$unix_path"
28994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28996    testpath="$unix_path"
28997  fi
28998
28999          if test -d "$testpath"; then
29000
29001  # Only process if variable expands to non-empty
29002
29003  if test "x$libpath" != x; then
29004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29005
29006  # Input might be given as Windows format, start by converting to
29007  # unix format.
29008  path="$libpath"
29009  new_path=`$CYGPATH -u "$path"`
29010
29011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29014  # "foo.exe" is OK but "foo" is an error.
29015  #
29016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29017  # It is also a way to make sure we got the proper file name for the real test later on.
29018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29019  if test "x$test_shortpath" = x; then
29020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
29021$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
29022    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
29023  fi
29024
29025  # Call helper function which possibly converts this using DOS-style short mode.
29026  # If so, the updated path is stored in $new_path.
29027
29028  input_path="$new_path"
29029  # Check if we need to convert this using DOS-style short mode. If the path
29030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29031  # take no chances and rewrite it.
29032  # Note: m4 eats our [], so we need to use [ and ] instead.
29033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29034  if test "x$has_forbidden_chars" != x; then
29035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29039      # Going to short mode and back again did indeed matter. Since short mode is
29040      # case insensitive, let's make it lowercase to improve readability.
29041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29042      # Now convert it back to Unix-style (cygpath)
29043      input_path=`$CYGPATH -u "$shortmode_path"`
29044      new_path="$input_path"
29045    fi
29046  fi
29047
29048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29049  if test "x$test_cygdrive_prefix" = x; then
29050    # As a simple fix, exclude /usr/bin since it's not a real path.
29051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29053      # a path prefixed by /cygdrive for fixpath to work.
29054      new_path="$CYGWIN_ROOT_PATH$input_path"
29055    fi
29056  fi
29057
29058
29059  if test "x$path" != "x$new_path"; then
29060    libpath="$new_path"
29061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
29062$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
29063  fi
29064
29065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29066
29067  path="$libpath"
29068  has_colon=`$ECHO $path | $GREP ^.:`
29069  new_path="$path"
29070  if test "x$has_colon" = x; then
29071    # Not in mixed or Windows style, start by that.
29072    new_path=`cmd //c echo $path`
29073  fi
29074
29075
29076  input_path="$new_path"
29077  # Check if we need to convert this using DOS-style short mode. If the path
29078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29079  # take no chances and rewrite it.
29080  # Note: m4 eats our [], so we need to use [ and ] instead.
29081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29082  if test "x$has_forbidden_chars" != x; then
29083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29085  fi
29086
29087
29088  windows_path="$new_path"
29089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29090    unix_path=`$CYGPATH -u "$windows_path"`
29091    new_path="$unix_path"
29092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29094    new_path="$unix_path"
29095  fi
29096
29097  if test "x$path" != "x$new_path"; then
29098    libpath="$new_path"
29099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
29100$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
29101  fi
29102
29103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29105
29106    else
29107      # We're on a unix platform. Hooray! :)
29108      path="$libpath"
29109      has_space=`$ECHO "$path" | $GREP " "`
29110      if test "x$has_space" != x; then
29111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
29112$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
29113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29114      fi
29115
29116      # Use eval to expand a potential ~
29117      eval path="$path"
29118      if test ! -f "$path" && test ! -d "$path"; then
29119        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
29120      fi
29121
29122      libpath="`cd "$path"; $THEPWDCMD -L`"
29123    fi
29124  fi
29125
29126            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
29127          fi
29128          IFS=";"
29129        fi
29130      done
29131      IFS="$OLDIFS"
29132    fi
29133  else
29134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29135$as_echo "not found" >&6; }
29136
29137    if test "x$VS_ENV_CMD" = x; then
29138      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
29139$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
29140      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
29141$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
29142    else
29143      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
29144$as_echo "$as_me: Running the extraction script failed." >&6;}
29145    fi
29146    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
29147$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
29148    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
29149$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
29150    as_fn_error $? "Cannot continue" "$LINENO" 5
29151  fi
29152
29153    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
29154    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
29155    PATH="$VS_PATH"
29156    # The microsoft toolchain also requires INCLUDE and LIB to be set.
29157    export INCLUDE="$VS_INCLUDE"
29158    export LIB="$VS_LIB"
29159  fi
29160
29161  # For solaris we really need solaris tools, and not the GNU equivalent.
29162  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
29163  # so add that to path before starting to probe.
29164  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
29165  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
29166    PATH="/usr/ccs/bin:$PATH"
29167  fi
29168
29169  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
29170  # override all other locations.
29171  if test "x$TOOLCHAIN_PATH" != x; then
29172    PATH=$TOOLCHAIN_PATH:$PATH
29173  fi
29174
29175
29176  #
29177  # Setup the compilers (CC and CXX)
29178  #
29179
29180  COMPILER_NAME=C
29181  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
29182
29183  if test "x$CC" != x; then
29184    # User has supplied compiler name already, always let that override.
29185    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29186$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29187    if test "x`basename $CC`" = "x$CC"; then
29188      # A command without a complete path is provided, search $PATH.
29189
29190      for ac_prog in $CC
29191do
29192  # Extract the first word of "$ac_prog", so it can be a program name with args.
29193set dummy $ac_prog; ac_word=$2
29194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29195$as_echo_n "checking for $ac_word... " >&6; }
29196if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29197  $as_echo_n "(cached) " >&6
29198else
29199  case $POTENTIAL_CC in
29200  [\\/]* | ?:[\\/]*)
29201  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29202  ;;
29203  *)
29204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29205for as_dir in $PATH
29206do
29207  IFS=$as_save_IFS
29208  test -z "$as_dir" && as_dir=.
29209    for ac_exec_ext in '' $ac_executable_extensions; do
29210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29211    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29213    break 2
29214  fi
29215done
29216  done
29217IFS=$as_save_IFS
29218
29219  ;;
29220esac
29221fi
29222POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29223if test -n "$POTENTIAL_CC"; then
29224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29225$as_echo "$POTENTIAL_CC" >&6; }
29226else
29227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29228$as_echo "no" >&6; }
29229fi
29230
29231
29232  test -n "$POTENTIAL_CC" && break
29233done
29234
29235      if test "x$POTENTIAL_CC" != x; then
29236        CC=$POTENTIAL_CC
29237      else
29238        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29239      fi
29240    else
29241      # Otherwise it might already be a complete path
29242      if test ! -x "$CC"; then
29243        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29244      fi
29245    fi
29246  else
29247    # No user supplied value. Locate compiler ourselves.
29248
29249    # If we are cross compiling, assume cross compilation tools follows the
29250    # cross compilation standard where they are prefixed with the autoconf
29251    # standard name for the target. For example the binary
29252    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29253    # If we are not cross compiling, then the default compiler name will be
29254    # used.
29255
29256    CC=
29257    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29258    # before checking the rest of the PATH.
29259    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29260    # step, this should not be necessary.
29261    if test -n "$TOOLCHAIN_PATH"; then
29262      PATH_save="$PATH"
29263      PATH="$TOOLCHAIN_PATH"
29264      for ac_prog in $SEARCH_LIST
29265do
29266  # Extract the first word of "$ac_prog", so it can be a program name with args.
29267set dummy $ac_prog; ac_word=$2
29268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29269$as_echo_n "checking for $ac_word... " >&6; }
29270if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
29271  $as_echo_n "(cached) " >&6
29272else
29273  case $TOOLCHAIN_PATH_CC in
29274  [\\/]* | ?:[\\/]*)
29275  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
29276  ;;
29277  *)
29278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29279for as_dir in $PATH
29280do
29281  IFS=$as_save_IFS
29282  test -z "$as_dir" && as_dir=.
29283    for ac_exec_ext in '' $ac_executable_extensions; do
29284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29285    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
29286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29287    break 2
29288  fi
29289done
29290  done
29291IFS=$as_save_IFS
29292
29293  ;;
29294esac
29295fi
29296TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
29297if test -n "$TOOLCHAIN_PATH_CC"; then
29298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
29299$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
29300else
29301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29302$as_echo "no" >&6; }
29303fi
29304
29305
29306  test -n "$TOOLCHAIN_PATH_CC" && break
29307done
29308
29309      CC=$TOOLCHAIN_PATH_CC
29310      PATH="$PATH_save"
29311    fi
29312
29313    # AC_PATH_PROGS can't be run multiple times with the same variable,
29314    # so create a new name for this run.
29315    if test "x$CC" = x; then
29316      for ac_prog in $SEARCH_LIST
29317do
29318  # Extract the first word of "$ac_prog", so it can be a program name with args.
29319set dummy $ac_prog; ac_word=$2
29320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29321$as_echo_n "checking for $ac_word... " >&6; }
29322if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29323  $as_echo_n "(cached) " >&6
29324else
29325  case $POTENTIAL_CC in
29326  [\\/]* | ?:[\\/]*)
29327  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29328  ;;
29329  *)
29330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29331for as_dir in $PATH
29332do
29333  IFS=$as_save_IFS
29334  test -z "$as_dir" && as_dir=.
29335    for ac_exec_ext in '' $ac_executable_extensions; do
29336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29337    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29339    break 2
29340  fi
29341done
29342  done
29343IFS=$as_save_IFS
29344
29345  ;;
29346esac
29347fi
29348POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29349if test -n "$POTENTIAL_CC"; then
29350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29351$as_echo "$POTENTIAL_CC" >&6; }
29352else
29353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29354$as_echo "no" >&6; }
29355fi
29356
29357
29358  test -n "$POTENTIAL_CC" && break
29359done
29360
29361      CC=$POTENTIAL_CC
29362    fi
29363
29364    if test "x$CC" = x; then
29365
29366  # Print a helpful message on how to acquire the necessary build dependency.
29367  # devkit is the help tag: freetype, cups, alsa etc
29368  MISSING_DEPENDENCY=devkit
29369
29370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29371    cygwin_help $MISSING_DEPENDENCY
29372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29373    msys_help $MISSING_DEPENDENCY
29374  else
29375    PKGHANDLER_COMMAND=
29376
29377    case $PKGHANDLER in
29378      apt-get)
29379        apt_help     $MISSING_DEPENDENCY ;;
29380      yum)
29381        yum_help     $MISSING_DEPENDENCY ;;
29382      port)
29383        port_help    $MISSING_DEPENDENCY ;;
29384      pkgutil)
29385        pkgutil_help $MISSING_DEPENDENCY ;;
29386      pkgadd)
29387        pkgadd_help  $MISSING_DEPENDENCY ;;
29388    esac
29389
29390    if test "x$PKGHANDLER_COMMAND" != x; then
29391      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29392    fi
29393  fi
29394
29395      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29396    fi
29397  fi
29398
29399  # Now we have a compiler binary in CC. Make sure it's okay.
29400
29401  # Only process if variable expands to non-empty
29402
29403  if test "x$CC" != x; then
29404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29405
29406  # First separate the path from the arguments. This will split at the first
29407  # space.
29408  complete="$CC"
29409  path="${complete%% *}"
29410  tmp="$complete EOL"
29411  arguments="${tmp#* }"
29412
29413  # Input might be given as Windows format, start by converting to
29414  # unix format.
29415  new_path=`$CYGPATH -u "$path"`
29416
29417  # Now try to locate executable using which
29418  new_path=`$WHICH "$new_path" 2> /dev/null`
29419  # bat and cmd files are not always considered executable in cygwin causing which
29420  # to not find them
29421  if test "x$new_path" = x \
29422      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29423      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29424    new_path=`$CYGPATH -u "$path"`
29425  fi
29426  if test "x$new_path" = x; then
29427    # Oops. Which didn't find the executable.
29428    # The splitting of arguments from the executable at a space might have been incorrect,
29429    # since paths with space are more likely in Windows. Give it another try with the whole
29430    # argument.
29431    path="$complete"
29432    arguments="EOL"
29433    new_path=`$CYGPATH -u "$path"`
29434    new_path=`$WHICH "$new_path" 2> /dev/null`
29435    # bat and cmd files are not always considered executable in cygwin causing which
29436    # to not find them
29437    if test "x$new_path" = x \
29438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29440      new_path=`$CYGPATH -u "$path"`
29441    fi
29442    if test "x$new_path" = x; then
29443      # It's still not found. Now this is an unrecoverable error.
29444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29445$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29446      has_space=`$ECHO "$complete" | $GREP " "`
29447      if test "x$has_space" != x; then
29448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29450      fi
29451      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29452    fi
29453  fi
29454
29455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29458  # "foo.exe" is OK but "foo" is an error.
29459  #
29460  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29461  # It is also a way to make sure we got the proper file name for the real test later on.
29462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29463  if test "x$test_shortpath" = x; then
29464    # Short path failed, file does not exist as specified.
29465    # Try adding .exe or .cmd
29466    if test -f "${new_path}.exe"; then
29467      input_to_shortpath="${new_path}.exe"
29468    elif test -f "${new_path}.cmd"; then
29469      input_to_shortpath="${new_path}.cmd"
29470    else
29471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29472$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29473      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29474$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29475      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29476    fi
29477  else
29478    input_to_shortpath="$new_path"
29479  fi
29480
29481  # Call helper function which possibly converts this using DOS-style short mode.
29482  # If so, the updated path is stored in $new_path.
29483  new_path="$input_to_shortpath"
29484
29485  input_path="$input_to_shortpath"
29486  # Check if we need to convert this using DOS-style short mode. If the path
29487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29488  # take no chances and rewrite it.
29489  # Note: m4 eats our [], so we need to use [ and ] instead.
29490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29491  if test "x$has_forbidden_chars" != x; then
29492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29496      # Going to short mode and back again did indeed matter. Since short mode is
29497      # case insensitive, let's make it lowercase to improve readability.
29498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29499      # Now convert it back to Unix-style (cygpath)
29500      input_path=`$CYGPATH -u "$shortmode_path"`
29501      new_path="$input_path"
29502    fi
29503  fi
29504
29505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29506  if test "x$test_cygdrive_prefix" = x; then
29507    # As a simple fix, exclude /usr/bin since it's not a real path.
29508    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29510      # a path prefixed by /cygdrive for fixpath to work.
29511      new_path="$CYGWIN_ROOT_PATH$input_path"
29512    fi
29513  fi
29514
29515  # remove trailing .exe if any
29516  new_path="${new_path/%.exe/}"
29517
29518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29519
29520  # First separate the path from the arguments. This will split at the first
29521  # space.
29522  complete="$CC"
29523  path="${complete%% *}"
29524  tmp="$complete EOL"
29525  arguments="${tmp#* }"
29526
29527  # Input might be given as Windows format, start by converting to
29528  # unix format.
29529  new_path="$path"
29530
29531  windows_path="$new_path"
29532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29533    unix_path=`$CYGPATH -u "$windows_path"`
29534    new_path="$unix_path"
29535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29537    new_path="$unix_path"
29538  fi
29539
29540
29541  # Now try to locate executable using which
29542  new_path=`$WHICH "$new_path" 2> /dev/null`
29543
29544  if test "x$new_path" = x; then
29545    # Oops. Which didn't find the executable.
29546    # The splitting of arguments from the executable at a space might have been incorrect,
29547    # since paths with space are more likely in Windows. Give it another try with the whole
29548    # argument.
29549    path="$complete"
29550    arguments="EOL"
29551    new_path="$path"
29552
29553  windows_path="$new_path"
29554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29555    unix_path=`$CYGPATH -u "$windows_path"`
29556    new_path="$unix_path"
29557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29559    new_path="$unix_path"
29560  fi
29561
29562
29563    new_path=`$WHICH "$new_path" 2> /dev/null`
29564    # bat and cmd files are not always considered executable in MSYS causing which
29565    # to not find them
29566    if test "x$new_path" = x \
29567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29569      new_path="$path"
29570
29571  windows_path="$new_path"
29572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29573    unix_path=`$CYGPATH -u "$windows_path"`
29574    new_path="$unix_path"
29575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29577    new_path="$unix_path"
29578  fi
29579
29580    fi
29581
29582    if test "x$new_path" = x; then
29583      # It's still not found. Now this is an unrecoverable error.
29584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29585$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29586      has_space=`$ECHO "$complete" | $GREP " "`
29587      if test "x$has_space" != x; then
29588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29590      fi
29591      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29592    fi
29593  fi
29594
29595  # Now new_path has a complete unix path to the binary
29596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29597    # Keep paths in /bin as-is, but remove trailing .exe if any
29598    new_path="${new_path/%.exe/}"
29599    # Do not save /bin paths to all_fixpath_prefixes!
29600  else
29601    # Not in mixed or Windows style, start by that.
29602    new_path=`cmd //c echo $new_path`
29603
29604  input_path="$new_path"
29605  # Check if we need to convert this using DOS-style short mode. If the path
29606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29607  # take no chances and rewrite it.
29608  # Note: m4 eats our [], so we need to use [ and ] instead.
29609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29610  if test "x$has_forbidden_chars" != x; then
29611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29613  fi
29614
29615    # Output is in $new_path
29616
29617  windows_path="$new_path"
29618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29619    unix_path=`$CYGPATH -u "$windows_path"`
29620    new_path="$unix_path"
29621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29623    new_path="$unix_path"
29624  fi
29625
29626    # remove trailing .exe if any
29627    new_path="${new_path/%.exe/}"
29628
29629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29631  fi
29632
29633    else
29634      # We're on a unix platform. Hooray! :)
29635      # First separate the path from the arguments. This will split at the first
29636      # space.
29637      complete="$CC"
29638      path="${complete%% *}"
29639      tmp="$complete EOL"
29640      arguments="${tmp#* }"
29641
29642      # Cannot rely on the command "which" here since it doesn't always work.
29643      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29644      if test -z "$is_absolute_path"; then
29645        # Path to executable is not absolute. Find it.
29646        IFS_save="$IFS"
29647        IFS=:
29648        for p in $PATH; do
29649          if test -f "$p/$path" && test -x "$p/$path"; then
29650            new_path="$p/$path"
29651            break
29652          fi
29653        done
29654        IFS="$IFS_save"
29655      else
29656        # This is an absolute path, we can use it without further modifications.
29657        new_path="$path"
29658      fi
29659
29660      if test "x$new_path" = x; then
29661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29662$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29663        has_space=`$ECHO "$complete" | $GREP " "`
29664        if test "x$has_space" != x; then
29665          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29667        fi
29668        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29669      fi
29670    fi
29671
29672    # Now join together the path and the arguments once again
29673    if test "x$arguments" != xEOL; then
29674      new_complete="$new_path ${arguments% *}"
29675    else
29676      new_complete="$new_path"
29677    fi
29678
29679    if test "x$complete" != "x$new_complete"; then
29680      CC="$new_complete"
29681      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29682$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29683    fi
29684  fi
29685
29686  TEST_COMPILER="$CC"
29687  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29688  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29689  if test "x$OPENJDK_BUILD_OS" != xaix; then
29690    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29692$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29693
29694  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29695    # Follow a chain of symbolic links. Use readlink
29696    # where it exists, else fall back to horribly
29697    # complicated shell code.
29698    if test "x$READLINK_TESTED" != yes; then
29699      # On MacOSX there is a readlink tool with a different
29700      # purpose than the GNU readlink tool. Check the found readlink.
29701      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29702      if test "x$ISGNU" = x; then
29703        # A readlink that we do not know how to use.
29704        # Are there other non-GNU readlinks out there?
29705        READLINK_TESTED=yes
29706        READLINK=
29707      fi
29708    fi
29709
29710    if test "x$READLINK" != x; then
29711      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29712    else
29713      # Save the current directory for restoring afterwards
29714      STARTDIR=$PWD
29715      COUNTER=0
29716      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29717      sym_link_file=`$BASENAME $TEST_COMPILER`
29718      cd $sym_link_dir
29719      # Use -P flag to resolve symlinks in directories.
29720      cd `$THEPWDCMD -P`
29721      sym_link_dir=`$THEPWDCMD -P`
29722      # Resolve file symlinks
29723      while test $COUNTER -lt 20; do
29724        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29725        if test "x$ISLINK" == x; then
29726          # This is not a symbolic link! We are done!
29727          break
29728        fi
29729        # Again resolve directory symlinks since the target of the just found
29730        # link could be in a different directory
29731        cd `$DIRNAME $ISLINK`
29732        sym_link_dir=`$THEPWDCMD -P`
29733        sym_link_file=`$BASENAME $ISLINK`
29734        let COUNTER=COUNTER+1
29735      done
29736      cd $STARTDIR
29737      TEST_COMPILER=$sym_link_dir/$sym_link_file
29738    fi
29739  fi
29740
29741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29742$as_echo "$TEST_COMPILER" >&6; }
29743  fi
29744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29745$as_echo_n "checking if CC is disguised ccache... " >&6; }
29746
29747  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29748  if test "x$COMPILER_BASENAME" = "xccache"; then
29749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29750$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29751    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29752    # We want to control ccache invocation ourselves, so ignore this cc and try
29753    # searching again.
29754
29755    # Remove the path to the fake ccache cc from the PATH
29756    RETRY_COMPILER_SAVED_PATH="$PATH"
29757    COMPILER_DIRNAME=`$DIRNAME $CC`
29758    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29759
29760    # Try again looking for our compiler
29761    if test -n "$ac_tool_prefix"; then
29762  for ac_prog in $TOOLCHAIN_CC_BINARY
29763  do
29764    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29765set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29767$as_echo_n "checking for $ac_word... " >&6; }
29768if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29769  $as_echo_n "(cached) " >&6
29770else
29771  if test -n "$PROPER_COMPILER_CC"; then
29772  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29773else
29774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29775for as_dir in $PATH
29776do
29777  IFS=$as_save_IFS
29778  test -z "$as_dir" && as_dir=.
29779    for ac_exec_ext in '' $ac_executable_extensions; do
29780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29781    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29783    break 2
29784  fi
29785done
29786  done
29787IFS=$as_save_IFS
29788
29789fi
29790fi
29791PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29792if test -n "$PROPER_COMPILER_CC"; then
29793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29794$as_echo "$PROPER_COMPILER_CC" >&6; }
29795else
29796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29797$as_echo "no" >&6; }
29798fi
29799
29800
29801    test -n "$PROPER_COMPILER_CC" && break
29802  done
29803fi
29804if test -z "$PROPER_COMPILER_CC"; then
29805  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29806  for ac_prog in $TOOLCHAIN_CC_BINARY
29807do
29808  # Extract the first word of "$ac_prog", so it can be a program name with args.
29809set dummy $ac_prog; ac_word=$2
29810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29811$as_echo_n "checking for $ac_word... " >&6; }
29812if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29813  $as_echo_n "(cached) " >&6
29814else
29815  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29816  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29817else
29818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29819for as_dir in $PATH
29820do
29821  IFS=$as_save_IFS
29822  test -z "$as_dir" && as_dir=.
29823    for ac_exec_ext in '' $ac_executable_extensions; do
29824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29825    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29827    break 2
29828  fi
29829done
29830  done
29831IFS=$as_save_IFS
29832
29833fi
29834fi
29835ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29836if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29838$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29839else
29840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29841$as_echo "no" >&6; }
29842fi
29843
29844
29845  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29846done
29847
29848  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29849    PROPER_COMPILER_CC=""
29850  else
29851    case $cross_compiling:$ac_tool_warned in
29852yes:)
29853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29855ac_tool_warned=yes ;;
29856esac
29857    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29858  fi
29859fi
29860
29861
29862  # Only process if variable expands to non-empty
29863
29864  if test "x$PROPER_COMPILER_CC" != x; then
29865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866
29867  # First separate the path from the arguments. This will split at the first
29868  # space.
29869  complete="$PROPER_COMPILER_CC"
29870  path="${complete%% *}"
29871  tmp="$complete EOL"
29872  arguments="${tmp#* }"
29873
29874  # Input might be given as Windows format, start by converting to
29875  # unix format.
29876  new_path=`$CYGPATH -u "$path"`
29877
29878  # Now try to locate executable using which
29879  new_path=`$WHICH "$new_path" 2> /dev/null`
29880  # bat and cmd files are not always considered executable in cygwin causing which
29881  # to not find them
29882  if test "x$new_path" = x \
29883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29885    new_path=`$CYGPATH -u "$path"`
29886  fi
29887  if test "x$new_path" = x; then
29888    # Oops. Which didn't find the executable.
29889    # The splitting of arguments from the executable at a space might have been incorrect,
29890    # since paths with space are more likely in Windows. Give it another try with the whole
29891    # argument.
29892    path="$complete"
29893    arguments="EOL"
29894    new_path=`$CYGPATH -u "$path"`
29895    new_path=`$WHICH "$new_path" 2> /dev/null`
29896    # bat and cmd files are not always considered executable in cygwin causing which
29897    # to not find them
29898    if test "x$new_path" = x \
29899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29901      new_path=`$CYGPATH -u "$path"`
29902    fi
29903    if test "x$new_path" = x; then
29904      # It's still not found. Now this is an unrecoverable error.
29905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29906$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29907      has_space=`$ECHO "$complete" | $GREP " "`
29908      if test "x$has_space" != x; then
29909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29911      fi
29912      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29913    fi
29914  fi
29915
29916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29919  # "foo.exe" is OK but "foo" is an error.
29920  #
29921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29922  # It is also a way to make sure we got the proper file name for the real test later on.
29923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29924  if test "x$test_shortpath" = x; then
29925    # Short path failed, file does not exist as specified.
29926    # Try adding .exe or .cmd
29927    if test -f "${new_path}.exe"; then
29928      input_to_shortpath="${new_path}.exe"
29929    elif test -f "${new_path}.cmd"; then
29930      input_to_shortpath="${new_path}.cmd"
29931    else
29932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29933$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29936      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29937    fi
29938  else
29939    input_to_shortpath="$new_path"
29940  fi
29941
29942  # Call helper function which possibly converts this using DOS-style short mode.
29943  # If so, the updated path is stored in $new_path.
29944  new_path="$input_to_shortpath"
29945
29946  input_path="$input_to_shortpath"
29947  # Check if we need to convert this using DOS-style short mode. If the path
29948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29949  # take no chances and rewrite it.
29950  # Note: m4 eats our [], so we need to use [ and ] instead.
29951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29952  if test "x$has_forbidden_chars" != x; then
29953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29957      # Going to short mode and back again did indeed matter. Since short mode is
29958      # case insensitive, let's make it lowercase to improve readability.
29959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29960      # Now convert it back to Unix-style (cygpath)
29961      input_path=`$CYGPATH -u "$shortmode_path"`
29962      new_path="$input_path"
29963    fi
29964  fi
29965
29966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29967  if test "x$test_cygdrive_prefix" = x; then
29968    # As a simple fix, exclude /usr/bin since it's not a real path.
29969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29971      # a path prefixed by /cygdrive for fixpath to work.
29972      new_path="$CYGWIN_ROOT_PATH$input_path"
29973    fi
29974  fi
29975
29976  # remove trailing .exe if any
29977  new_path="${new_path/%.exe/}"
29978
29979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29980
29981  # First separate the path from the arguments. This will split at the first
29982  # space.
29983  complete="$PROPER_COMPILER_CC"
29984  path="${complete%% *}"
29985  tmp="$complete EOL"
29986  arguments="${tmp#* }"
29987
29988  # Input might be given as Windows format, start by converting to
29989  # unix format.
29990  new_path="$path"
29991
29992  windows_path="$new_path"
29993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29994    unix_path=`$CYGPATH -u "$windows_path"`
29995    new_path="$unix_path"
29996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29998    new_path="$unix_path"
29999  fi
30000
30001
30002  # Now try to locate executable using which
30003  new_path=`$WHICH "$new_path" 2> /dev/null`
30004
30005  if test "x$new_path" = x; then
30006    # Oops. Which didn't find the executable.
30007    # The splitting of arguments from the executable at a space might have been incorrect,
30008    # since paths with space are more likely in Windows. Give it another try with the whole
30009    # argument.
30010    path="$complete"
30011    arguments="EOL"
30012    new_path="$path"
30013
30014  windows_path="$new_path"
30015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30016    unix_path=`$CYGPATH -u "$windows_path"`
30017    new_path="$unix_path"
30018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30020    new_path="$unix_path"
30021  fi
30022
30023
30024    new_path=`$WHICH "$new_path" 2> /dev/null`
30025    # bat and cmd files are not always considered executable in MSYS causing which
30026    # to not find them
30027    if test "x$new_path" = x \
30028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30030      new_path="$path"
30031
30032  windows_path="$new_path"
30033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30034    unix_path=`$CYGPATH -u "$windows_path"`
30035    new_path="$unix_path"
30036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30038    new_path="$unix_path"
30039  fi
30040
30041    fi
30042
30043    if test "x$new_path" = x; then
30044      # It's still not found. Now this is an unrecoverable error.
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30046$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30047      has_space=`$ECHO "$complete" | $GREP " "`
30048      if test "x$has_space" != x; then
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30051      fi
30052      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30053    fi
30054  fi
30055
30056  # Now new_path has a complete unix path to the binary
30057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30058    # Keep paths in /bin as-is, but remove trailing .exe if any
30059    new_path="${new_path/%.exe/}"
30060    # Do not save /bin paths to all_fixpath_prefixes!
30061  else
30062    # Not in mixed or Windows style, start by that.
30063    new_path=`cmd //c echo $new_path`
30064
30065  input_path="$new_path"
30066  # Check if we need to convert this using DOS-style short mode. If the path
30067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30068  # take no chances and rewrite it.
30069  # Note: m4 eats our [], so we need to use [ and ] instead.
30070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30071  if test "x$has_forbidden_chars" != x; then
30072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30074  fi
30075
30076    # Output is in $new_path
30077
30078  windows_path="$new_path"
30079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30080    unix_path=`$CYGPATH -u "$windows_path"`
30081    new_path="$unix_path"
30082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30084    new_path="$unix_path"
30085  fi
30086
30087    # remove trailing .exe if any
30088    new_path="${new_path/%.exe/}"
30089
30090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30092  fi
30093
30094    else
30095      # We're on a unix platform. Hooray! :)
30096      # First separate the path from the arguments. This will split at the first
30097      # space.
30098      complete="$PROPER_COMPILER_CC"
30099      path="${complete%% *}"
30100      tmp="$complete EOL"
30101      arguments="${tmp#* }"
30102
30103      # Cannot rely on the command "which" here since it doesn't always work.
30104      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30105      if test -z "$is_absolute_path"; then
30106        # Path to executable is not absolute. Find it.
30107        IFS_save="$IFS"
30108        IFS=:
30109        for p in $PATH; do
30110          if test -f "$p/$path" && test -x "$p/$path"; then
30111            new_path="$p/$path"
30112            break
30113          fi
30114        done
30115        IFS="$IFS_save"
30116      else
30117        # This is an absolute path, we can use it without further modifications.
30118        new_path="$path"
30119      fi
30120
30121      if test "x$new_path" = x; then
30122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30123$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30124        has_space=`$ECHO "$complete" | $GREP " "`
30125        if test "x$has_space" != x; then
30126          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30127$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30128        fi
30129        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30130      fi
30131    fi
30132
30133    # Now join together the path and the arguments once again
30134    if test "x$arguments" != xEOL; then
30135      new_complete="$new_path ${arguments% *}"
30136    else
30137      new_complete="$new_path"
30138    fi
30139
30140    if test "x$complete" != "x$new_complete"; then
30141      PROPER_COMPILER_CC="$new_complete"
30142      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
30143$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
30144    fi
30145  fi
30146
30147    PATH="$RETRY_COMPILER_SAVED_PATH"
30148
30149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
30150$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
30151
30152  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30153    # Follow a chain of symbolic links. Use readlink
30154    # where it exists, else fall back to horribly
30155    # complicated shell code.
30156    if test "x$READLINK_TESTED" != yes; then
30157      # On MacOSX there is a readlink tool with a different
30158      # purpose than the GNU readlink tool. Check the found readlink.
30159      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30160      if test "x$ISGNU" = x; then
30161        # A readlink that we do not know how to use.
30162        # Are there other non-GNU readlinks out there?
30163        READLINK_TESTED=yes
30164        READLINK=
30165      fi
30166    fi
30167
30168    if test "x$READLINK" != x; then
30169      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30170    else
30171      # Save the current directory for restoring afterwards
30172      STARTDIR=$PWD
30173      COUNTER=0
30174      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30175      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30176      cd $sym_link_dir
30177      # Use -P flag to resolve symlinks in directories.
30178      cd `$THEPWDCMD -P`
30179      sym_link_dir=`$THEPWDCMD -P`
30180      # Resolve file symlinks
30181      while test $COUNTER -lt 20; do
30182        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30183        if test "x$ISLINK" == x; then
30184          # This is not a symbolic link! We are done!
30185          break
30186        fi
30187        # Again resolve directory symlinks since the target of the just found
30188        # link could be in a different directory
30189        cd `$DIRNAME $ISLINK`
30190        sym_link_dir=`$THEPWDCMD -P`
30191        sym_link_file=`$BASENAME $ISLINK`
30192        let COUNTER=COUNTER+1
30193      done
30194      cd $STARTDIR
30195      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30196    fi
30197  fi
30198
30199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30200$as_echo "$PROPER_COMPILER_CC" >&6; }
30201    CC="$PROPER_COMPILER_CC"
30202  else
30203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30204$as_echo "no, keeping CC" >&6; }
30205  fi
30206
30207
30208  COMPILER=$CC
30209  COMPILER_NAME=$COMPILER_NAME
30210
30211  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30212    # cc -V output typically looks like
30213    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30214    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30215    # Check that this is likely to be the Solaris Studio cc.
30216    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30217    if test $? -ne 0; then
30218      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30219      { $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
30220$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30221      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30222$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30224$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30225      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30226    fi
30227    # Remove usage instructions (if present), and
30228    # collapse compiler output into a single line
30229    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30230        $SED -e 's/ *[Uu]sage:.*//'`
30231    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30232        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30233  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30234    # xlc -qversion output typically looks like
30235    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30236    #     Version: 11.01.0000.0015
30237    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30238    # Check that this is likely to be the IBM XL C compiler.
30239    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30240    if test $? -ne 0; then
30241      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30242      { $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
30243$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30244      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30245$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30246      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30247$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30248      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30249    fi
30250    # Collapse compiler output into a single line
30251    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30252    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30253        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30254  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30255    # There is no specific version flag, but all output starts with a version string.
30256    # First line typically looks something like:
30257    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30258    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30259    # Check that this is likely to be Microsoft CL.EXE.
30260    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30261    if test $? -ne 0; then
30262      { $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
30263$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30264      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30265$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30266      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30267    fi
30268    # Collapse compiler output into a single line
30269    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30270    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30271        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30272  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30273    # gcc --version output typically looks like
30274    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30275    #     Copyright (C) 2013 Free Software Foundation, Inc.
30276    #     This is free software; see the source for copying conditions.  There is NO
30277    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30278    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30279    # Check that this is likely to be GCC.
30280    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30281    if test $? -ne 0; then
30282      { $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
30283$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30284      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30285$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30286      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30287    fi
30288    # Remove Copyright and legalese from version string, and
30289    # collapse into a single line
30290    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30291        $SED -e 's/ *Copyright .*//'`
30292    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30293        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30294  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30295    # clang --version output typically looks like
30296    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30297    #    clang version 3.3 (tags/RELEASE_33/final)
30298    # or
30299    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30300    #    Target: x86_64-pc-linux-gnu
30301    #    Thread model: posix
30302    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30303    # Check that this is likely to be clang
30304    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30305    if test $? -ne 0; then
30306      { $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
30307$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30308      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30309$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30310      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30311    fi
30312    # Collapse compiler output into a single line
30313    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30314    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30315        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30316  else
30317      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30318  fi
30319  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30320  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30321  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30322  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
30323
30324  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30325$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30326
30327
30328  # Now that we have resolved CC ourself, let autoconf have its go at it
30329  ac_ext=c
30330ac_cpp='$CPP $CPPFLAGS'
30331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30333ac_compiler_gnu=$ac_cv_c_compiler_gnu
30334if test -n "$ac_tool_prefix"; then
30335  for ac_prog in $CC
30336  do
30337    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30338set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30340$as_echo_n "checking for $ac_word... " >&6; }
30341if ${ac_cv_prog_CC+:} false; then :
30342  $as_echo_n "(cached) " >&6
30343else
30344  if test -n "$CC"; then
30345  ac_cv_prog_CC="$CC" # Let the user override the test.
30346else
30347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30348for as_dir in $PATH
30349do
30350  IFS=$as_save_IFS
30351  test -z "$as_dir" && as_dir=.
30352    for ac_exec_ext in '' $ac_executable_extensions; do
30353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30354    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30356    break 2
30357  fi
30358done
30359  done
30360IFS=$as_save_IFS
30361
30362fi
30363fi
30364CC=$ac_cv_prog_CC
30365if test -n "$CC"; then
30366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30367$as_echo "$CC" >&6; }
30368else
30369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30370$as_echo "no" >&6; }
30371fi
30372
30373
30374    test -n "$CC" && break
30375  done
30376fi
30377if test -z "$CC"; then
30378  ac_ct_CC=$CC
30379  for ac_prog in $CC
30380do
30381  # Extract the first word of "$ac_prog", so it can be a program name with args.
30382set dummy $ac_prog; ac_word=$2
30383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30384$as_echo_n "checking for $ac_word... " >&6; }
30385if ${ac_cv_prog_ac_ct_CC+:} false; then :
30386  $as_echo_n "(cached) " >&6
30387else
30388  if test -n "$ac_ct_CC"; then
30389  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30390else
30391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30392for as_dir in $PATH
30393do
30394  IFS=$as_save_IFS
30395  test -z "$as_dir" && as_dir=.
30396    for ac_exec_ext in '' $ac_executable_extensions; do
30397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30398    ac_cv_prog_ac_ct_CC="$ac_prog"
30399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30400    break 2
30401  fi
30402done
30403  done
30404IFS=$as_save_IFS
30405
30406fi
30407fi
30408ac_ct_CC=$ac_cv_prog_ac_ct_CC
30409if test -n "$ac_ct_CC"; then
30410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30411$as_echo "$ac_ct_CC" >&6; }
30412else
30413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30414$as_echo "no" >&6; }
30415fi
30416
30417
30418  test -n "$ac_ct_CC" && break
30419done
30420
30421  if test "x$ac_ct_CC" = x; then
30422    CC=""
30423  else
30424    case $cross_compiling:$ac_tool_warned in
30425yes:)
30426{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30427$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30428ac_tool_warned=yes ;;
30429esac
30430    CC=$ac_ct_CC
30431  fi
30432fi
30433
30434
30435test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30437as_fn_error $? "no acceptable C compiler found in \$PATH
30438See \`config.log' for more details" "$LINENO" 5; }
30439
30440# Provide some information about the compiler.
30441$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30442set X $ac_compile
30443ac_compiler=$2
30444for ac_option in --version -v -V -qversion; do
30445  { { ac_try="$ac_compiler $ac_option >&5"
30446case "(($ac_try" in
30447  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30448  *) ac_try_echo=$ac_try;;
30449esac
30450eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30451$as_echo "$ac_try_echo"; } >&5
30452  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30453  ac_status=$?
30454  if test -s conftest.err; then
30455    sed '10a\
30456... rest of stderr output deleted ...
30457         10q' conftest.err >conftest.er1
30458    cat conftest.er1 >&5
30459  fi
30460  rm -f conftest.er1 conftest.err
30461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30462  test $ac_status = 0; }
30463done
30464
30465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30466/* end confdefs.h.  */
30467
30468int
30469main ()
30470{
30471
30472  ;
30473  return 0;
30474}
30475_ACEOF
30476ac_clean_files_save=$ac_clean_files
30477ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30478# Try to create an executable without -o first, disregard a.out.
30479# It will help us diagnose broken compilers, and finding out an intuition
30480# of exeext.
30481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30482$as_echo_n "checking whether the C compiler works... " >&6; }
30483ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30484
30485# The possible output files:
30486ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30487
30488ac_rmfiles=
30489for ac_file in $ac_files
30490do
30491  case $ac_file in
30492    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30493    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30494  esac
30495done
30496rm -f $ac_rmfiles
30497
30498if { { ac_try="$ac_link_default"
30499case "(($ac_try" in
30500  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30501  *) ac_try_echo=$ac_try;;
30502esac
30503eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30504$as_echo "$ac_try_echo"; } >&5
30505  (eval "$ac_link_default") 2>&5
30506  ac_status=$?
30507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30508  test $ac_status = 0; }; then :
30509  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30510# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30511# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30512# so that the user can short-circuit this test for compilers unknown to
30513# Autoconf.
30514for ac_file in $ac_files ''
30515do
30516  test -f "$ac_file" || continue
30517  case $ac_file in
30518    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30519	;;
30520    [ab].out )
30521	# We found the default executable, but exeext='' is most
30522	# certainly right.
30523	break;;
30524    *.* )
30525	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30526	then :; else
30527	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30528	fi
30529	# We set ac_cv_exeext here because the later test for it is not
30530	# safe: cross compilers may not add the suffix if given an `-o'
30531	# argument, so we may need to know it at that point already.
30532	# Even if this section looks crufty: it has the advantage of
30533	# actually working.
30534	break;;
30535    * )
30536	break;;
30537  esac
30538done
30539test "$ac_cv_exeext" = no && ac_cv_exeext=
30540
30541else
30542  ac_file=''
30543fi
30544if test -z "$ac_file"; then :
30545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30546$as_echo "no" >&6; }
30547$as_echo "$as_me: failed program was:" >&5
30548sed 's/^/| /' conftest.$ac_ext >&5
30549
30550{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30552as_fn_error 77 "C compiler cannot create executables
30553See \`config.log' for more details" "$LINENO" 5; }
30554else
30555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30556$as_echo "yes" >&6; }
30557fi
30558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30559$as_echo_n "checking for C compiler default output file name... " >&6; }
30560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30561$as_echo "$ac_file" >&6; }
30562ac_exeext=$ac_cv_exeext
30563
30564rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30565ac_clean_files=$ac_clean_files_save
30566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30567$as_echo_n "checking for suffix of executables... " >&6; }
30568if { { ac_try="$ac_link"
30569case "(($ac_try" in
30570  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30571  *) ac_try_echo=$ac_try;;
30572esac
30573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30574$as_echo "$ac_try_echo"; } >&5
30575  (eval "$ac_link") 2>&5
30576  ac_status=$?
30577  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30578  test $ac_status = 0; }; then :
30579  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30580# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30581# work properly (i.e., refer to `conftest.exe'), while it won't with
30582# `rm'.
30583for ac_file in conftest.exe conftest conftest.*; do
30584  test -f "$ac_file" || continue
30585  case $ac_file in
30586    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30587    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30588	  break;;
30589    * ) break;;
30590  esac
30591done
30592else
30593  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30595as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30596See \`config.log' for more details" "$LINENO" 5; }
30597fi
30598rm -f conftest conftest$ac_cv_exeext
30599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30600$as_echo "$ac_cv_exeext" >&6; }
30601
30602rm -f conftest.$ac_ext
30603EXEEXT=$ac_cv_exeext
30604ac_exeext=$EXEEXT
30605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30606/* end confdefs.h.  */
30607#include <stdio.h>
30608int
30609main ()
30610{
30611FILE *f = fopen ("conftest.out", "w");
30612 return ferror (f) || fclose (f) != 0;
30613
30614  ;
30615  return 0;
30616}
30617_ACEOF
30618ac_clean_files="$ac_clean_files conftest.out"
30619# Check that the compiler produces executables we can run.  If not, either
30620# the compiler is broken, or we cross compile.
30621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30622$as_echo_n "checking whether we are cross compiling... " >&6; }
30623if test "$cross_compiling" != yes; then
30624  { { ac_try="$ac_link"
30625case "(($ac_try" in
30626  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30627  *) ac_try_echo=$ac_try;;
30628esac
30629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30630$as_echo "$ac_try_echo"; } >&5
30631  (eval "$ac_link") 2>&5
30632  ac_status=$?
30633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30634  test $ac_status = 0; }
30635  if { ac_try='./conftest$ac_cv_exeext'
30636  { { case "(($ac_try" in
30637  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30638  *) ac_try_echo=$ac_try;;
30639esac
30640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30641$as_echo "$ac_try_echo"; } >&5
30642  (eval "$ac_try") 2>&5
30643  ac_status=$?
30644  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30645  test $ac_status = 0; }; }; then
30646    cross_compiling=no
30647  else
30648    if test "$cross_compiling" = maybe; then
30649	cross_compiling=yes
30650    else
30651	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30653as_fn_error $? "cannot run C compiled programs.
30654If you meant to cross compile, use \`--host'.
30655See \`config.log' for more details" "$LINENO" 5; }
30656    fi
30657  fi
30658fi
30659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30660$as_echo "$cross_compiling" >&6; }
30661
30662rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30663ac_clean_files=$ac_clean_files_save
30664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30665$as_echo_n "checking for suffix of object files... " >&6; }
30666if ${ac_cv_objext+:} false; then :
30667  $as_echo_n "(cached) " >&6
30668else
30669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30670/* end confdefs.h.  */
30671
30672int
30673main ()
30674{
30675
30676  ;
30677  return 0;
30678}
30679_ACEOF
30680rm -f conftest.o conftest.obj
30681if { { ac_try="$ac_compile"
30682case "(($ac_try" in
30683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30684  *) ac_try_echo=$ac_try;;
30685esac
30686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30687$as_echo "$ac_try_echo"; } >&5
30688  (eval "$ac_compile") 2>&5
30689  ac_status=$?
30690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30691  test $ac_status = 0; }; then :
30692  for ac_file in conftest.o conftest.obj conftest.*; do
30693  test -f "$ac_file" || continue;
30694  case $ac_file in
30695    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30696    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30697       break;;
30698  esac
30699done
30700else
30701  $as_echo "$as_me: failed program was:" >&5
30702sed 's/^/| /' conftest.$ac_ext >&5
30703
30704{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30706as_fn_error $? "cannot compute suffix of object files: cannot compile
30707See \`config.log' for more details" "$LINENO" 5; }
30708fi
30709rm -f conftest.$ac_cv_objext conftest.$ac_ext
30710fi
30711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30712$as_echo "$ac_cv_objext" >&6; }
30713OBJEXT=$ac_cv_objext
30714ac_objext=$OBJEXT
30715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30716$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30717if ${ac_cv_c_compiler_gnu+:} false; then :
30718  $as_echo_n "(cached) " >&6
30719else
30720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30721/* end confdefs.h.  */
30722
30723int
30724main ()
30725{
30726#ifndef __GNUC__
30727       choke me
30728#endif
30729
30730  ;
30731  return 0;
30732}
30733_ACEOF
30734if ac_fn_c_try_compile "$LINENO"; then :
30735  ac_compiler_gnu=yes
30736else
30737  ac_compiler_gnu=no
30738fi
30739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30740ac_cv_c_compiler_gnu=$ac_compiler_gnu
30741
30742fi
30743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30744$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30745if test $ac_compiler_gnu = yes; then
30746  GCC=yes
30747else
30748  GCC=
30749fi
30750ac_test_CFLAGS=${CFLAGS+set}
30751ac_save_CFLAGS=$CFLAGS
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30753$as_echo_n "checking whether $CC accepts -g... " >&6; }
30754if ${ac_cv_prog_cc_g+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  ac_save_c_werror_flag=$ac_c_werror_flag
30758   ac_c_werror_flag=yes
30759   ac_cv_prog_cc_g=no
30760   CFLAGS="-g"
30761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30762/* end confdefs.h.  */
30763
30764int
30765main ()
30766{
30767
30768  ;
30769  return 0;
30770}
30771_ACEOF
30772if ac_fn_c_try_compile "$LINENO"; then :
30773  ac_cv_prog_cc_g=yes
30774else
30775  CFLAGS=""
30776      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30777/* end confdefs.h.  */
30778
30779int
30780main ()
30781{
30782
30783  ;
30784  return 0;
30785}
30786_ACEOF
30787if ac_fn_c_try_compile "$LINENO"; then :
30788
30789else
30790  ac_c_werror_flag=$ac_save_c_werror_flag
30791	 CFLAGS="-g"
30792	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30793/* end confdefs.h.  */
30794
30795int
30796main ()
30797{
30798
30799  ;
30800  return 0;
30801}
30802_ACEOF
30803if ac_fn_c_try_compile "$LINENO"; then :
30804  ac_cv_prog_cc_g=yes
30805fi
30806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30807fi
30808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30809fi
30810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30811   ac_c_werror_flag=$ac_save_c_werror_flag
30812fi
30813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30814$as_echo "$ac_cv_prog_cc_g" >&6; }
30815if test "$ac_test_CFLAGS" = set; then
30816  CFLAGS=$ac_save_CFLAGS
30817elif test $ac_cv_prog_cc_g = yes; then
30818  if test "$GCC" = yes; then
30819    CFLAGS="-g -O2"
30820  else
30821    CFLAGS="-g"
30822  fi
30823else
30824  if test "$GCC" = yes; then
30825    CFLAGS="-O2"
30826  else
30827    CFLAGS=
30828  fi
30829fi
30830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30831$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30832if ${ac_cv_prog_cc_c89+:} false; then :
30833  $as_echo_n "(cached) " >&6
30834else
30835  ac_cv_prog_cc_c89=no
30836ac_save_CC=$CC
30837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30838/* end confdefs.h.  */
30839#include <stdarg.h>
30840#include <stdio.h>
30841struct stat;
30842/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30843struct buf { int x; };
30844FILE * (*rcsopen) (struct buf *, struct stat *, int);
30845static char *e (p, i)
30846     char **p;
30847     int i;
30848{
30849  return p[i];
30850}
30851static char *f (char * (*g) (char **, int), char **p, ...)
30852{
30853  char *s;
30854  va_list v;
30855  va_start (v,p);
30856  s = g (p, va_arg (v,int));
30857  va_end (v);
30858  return s;
30859}
30860
30861/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30862   function prototypes and stuff, but not '\xHH' hex character constants.
30863   These don't provoke an error unfortunately, instead are silently treated
30864   as 'x'.  The following induces an error, until -std is added to get
30865   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30866   array size at least.  It's necessary to write '\x00'==0 to get something
30867   that's true only with -std.  */
30868int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30869
30870/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30871   inside strings and character constants.  */
30872#define FOO(x) 'x'
30873int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30874
30875int test (int i, double x);
30876struct s1 {int (*f) (int a);};
30877struct s2 {int (*f) (double a);};
30878int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30879int argc;
30880char **argv;
30881int
30882main ()
30883{
30884return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30885  ;
30886  return 0;
30887}
30888_ACEOF
30889for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30890	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30891do
30892  CC="$ac_save_CC $ac_arg"
30893  if ac_fn_c_try_compile "$LINENO"; then :
30894  ac_cv_prog_cc_c89=$ac_arg
30895fi
30896rm -f core conftest.err conftest.$ac_objext
30897  test "x$ac_cv_prog_cc_c89" != "xno" && break
30898done
30899rm -f conftest.$ac_ext
30900CC=$ac_save_CC
30901
30902fi
30903# AC_CACHE_VAL
30904case "x$ac_cv_prog_cc_c89" in
30905  x)
30906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30907$as_echo "none needed" >&6; } ;;
30908  xno)
30909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30910$as_echo "unsupported" >&6; } ;;
30911  *)
30912    CC="$CC $ac_cv_prog_cc_c89"
30913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30914$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30915esac
30916if test "x$ac_cv_prog_cc_c89" != xno; then :
30917
30918fi
30919
30920ac_ext=cpp
30921ac_cpp='$CXXCPP $CPPFLAGS'
30922ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30923ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30924ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30925
30926
30927
30928  COMPILER_NAME=C++
30929  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30930
30931  if test "x$CXX" != x; then
30932    # User has supplied compiler name already, always let that override.
30933    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30934$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30935    if test "x`basename $CXX`" = "x$CXX"; then
30936      # A command without a complete path is provided, search $PATH.
30937
30938      for ac_prog in $CXX
30939do
30940  # Extract the first word of "$ac_prog", so it can be a program name with args.
30941set dummy $ac_prog; ac_word=$2
30942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30943$as_echo_n "checking for $ac_word... " >&6; }
30944if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30945  $as_echo_n "(cached) " >&6
30946else
30947  case $POTENTIAL_CXX in
30948  [\\/]* | ?:[\\/]*)
30949  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30950  ;;
30951  *)
30952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30953for as_dir in $PATH
30954do
30955  IFS=$as_save_IFS
30956  test -z "$as_dir" && as_dir=.
30957    for ac_exec_ext in '' $ac_executable_extensions; do
30958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30959    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30961    break 2
30962  fi
30963done
30964  done
30965IFS=$as_save_IFS
30966
30967  ;;
30968esac
30969fi
30970POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30971if test -n "$POTENTIAL_CXX"; then
30972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30973$as_echo "$POTENTIAL_CXX" >&6; }
30974else
30975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30976$as_echo "no" >&6; }
30977fi
30978
30979
30980  test -n "$POTENTIAL_CXX" && break
30981done
30982
30983      if test "x$POTENTIAL_CXX" != x; then
30984        CXX=$POTENTIAL_CXX
30985      else
30986        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30987      fi
30988    else
30989      # Otherwise it might already be a complete path
30990      if test ! -x "$CXX"; then
30991        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30992      fi
30993    fi
30994  else
30995    # No user supplied value. Locate compiler ourselves.
30996
30997    # If we are cross compiling, assume cross compilation tools follows the
30998    # cross compilation standard where they are prefixed with the autoconf
30999    # standard name for the target. For example the binary
31000    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31001    # If we are not cross compiling, then the default compiler name will be
31002    # used.
31003
31004    CXX=
31005    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31006    # before checking the rest of the PATH.
31007    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31008    # step, this should not be necessary.
31009    if test -n "$TOOLCHAIN_PATH"; then
31010      PATH_save="$PATH"
31011      PATH="$TOOLCHAIN_PATH"
31012      for ac_prog in $SEARCH_LIST
31013do
31014  # Extract the first word of "$ac_prog", so it can be a program name with args.
31015set dummy $ac_prog; ac_word=$2
31016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31017$as_echo_n "checking for $ac_word... " >&6; }
31018if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
31019  $as_echo_n "(cached) " >&6
31020else
31021  case $TOOLCHAIN_PATH_CXX in
31022  [\\/]* | ?:[\\/]*)
31023  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
31024  ;;
31025  *)
31026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31027for as_dir in $PATH
31028do
31029  IFS=$as_save_IFS
31030  test -z "$as_dir" && as_dir=.
31031    for ac_exec_ext in '' $ac_executable_extensions; do
31032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31033    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
31034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31035    break 2
31036  fi
31037done
31038  done
31039IFS=$as_save_IFS
31040
31041  ;;
31042esac
31043fi
31044TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
31045if test -n "$TOOLCHAIN_PATH_CXX"; then
31046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
31047$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
31048else
31049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31050$as_echo "no" >&6; }
31051fi
31052
31053
31054  test -n "$TOOLCHAIN_PATH_CXX" && break
31055done
31056
31057      CXX=$TOOLCHAIN_PATH_CXX
31058      PATH="$PATH_save"
31059    fi
31060
31061    # AC_PATH_PROGS can't be run multiple times with the same variable,
31062    # so create a new name for this run.
31063    if test "x$CXX" = x; then
31064      for ac_prog in $SEARCH_LIST
31065do
31066  # Extract the first word of "$ac_prog", so it can be a program name with args.
31067set dummy $ac_prog; ac_word=$2
31068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31069$as_echo_n "checking for $ac_word... " >&6; }
31070if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31071  $as_echo_n "(cached) " >&6
31072else
31073  case $POTENTIAL_CXX in
31074  [\\/]* | ?:[\\/]*)
31075  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31076  ;;
31077  *)
31078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31079for as_dir in $PATH
31080do
31081  IFS=$as_save_IFS
31082  test -z "$as_dir" && as_dir=.
31083    for ac_exec_ext in '' $ac_executable_extensions; do
31084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31085    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31087    break 2
31088  fi
31089done
31090  done
31091IFS=$as_save_IFS
31092
31093  ;;
31094esac
31095fi
31096POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31097if test -n "$POTENTIAL_CXX"; then
31098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31099$as_echo "$POTENTIAL_CXX" >&6; }
31100else
31101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31102$as_echo "no" >&6; }
31103fi
31104
31105
31106  test -n "$POTENTIAL_CXX" && break
31107done
31108
31109      CXX=$POTENTIAL_CXX
31110    fi
31111
31112    if test "x$CXX" = x; then
31113
31114  # Print a helpful message on how to acquire the necessary build dependency.
31115  # devkit is the help tag: freetype, cups, alsa etc
31116  MISSING_DEPENDENCY=devkit
31117
31118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31119    cygwin_help $MISSING_DEPENDENCY
31120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31121    msys_help $MISSING_DEPENDENCY
31122  else
31123    PKGHANDLER_COMMAND=
31124
31125    case $PKGHANDLER in
31126      apt-get)
31127        apt_help     $MISSING_DEPENDENCY ;;
31128      yum)
31129        yum_help     $MISSING_DEPENDENCY ;;
31130      port)
31131        port_help    $MISSING_DEPENDENCY ;;
31132      pkgutil)
31133        pkgutil_help $MISSING_DEPENDENCY ;;
31134      pkgadd)
31135        pkgadd_help  $MISSING_DEPENDENCY ;;
31136    esac
31137
31138    if test "x$PKGHANDLER_COMMAND" != x; then
31139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31140    fi
31141  fi
31142
31143      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31144    fi
31145  fi
31146
31147  # Now we have a compiler binary in CXX. Make sure it's okay.
31148
31149  # Only process if variable expands to non-empty
31150
31151  if test "x$CXX" != x; then
31152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31153
31154  # First separate the path from the arguments. This will split at the first
31155  # space.
31156  complete="$CXX"
31157  path="${complete%% *}"
31158  tmp="$complete EOL"
31159  arguments="${tmp#* }"
31160
31161  # Input might be given as Windows format, start by converting to
31162  # unix format.
31163  new_path=`$CYGPATH -u "$path"`
31164
31165  # Now try to locate executable using which
31166  new_path=`$WHICH "$new_path" 2> /dev/null`
31167  # bat and cmd files are not always considered executable in cygwin causing which
31168  # to not find them
31169  if test "x$new_path" = x \
31170      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31171      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31172    new_path=`$CYGPATH -u "$path"`
31173  fi
31174  if test "x$new_path" = x; then
31175    # Oops. Which didn't find the executable.
31176    # The splitting of arguments from the executable at a space might have been incorrect,
31177    # since paths with space are more likely in Windows. Give it another try with the whole
31178    # argument.
31179    path="$complete"
31180    arguments="EOL"
31181    new_path=`$CYGPATH -u "$path"`
31182    new_path=`$WHICH "$new_path" 2> /dev/null`
31183    # bat and cmd files are not always considered executable in cygwin causing which
31184    # to not find them
31185    if test "x$new_path" = x \
31186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31188      new_path=`$CYGPATH -u "$path"`
31189    fi
31190    if test "x$new_path" = x; then
31191      # It's still not found. Now this is an unrecoverable error.
31192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31193$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31194      has_space=`$ECHO "$complete" | $GREP " "`
31195      if test "x$has_space" != x; then
31196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31198      fi
31199      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31200    fi
31201  fi
31202
31203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31206  # "foo.exe" is OK but "foo" is an error.
31207  #
31208  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31209  # It is also a way to make sure we got the proper file name for the real test later on.
31210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31211  if test "x$test_shortpath" = x; then
31212    # Short path failed, file does not exist as specified.
31213    # Try adding .exe or .cmd
31214    if test -f "${new_path}.exe"; then
31215      input_to_shortpath="${new_path}.exe"
31216    elif test -f "${new_path}.cmd"; then
31217      input_to_shortpath="${new_path}.cmd"
31218    else
31219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31220$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31223      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31224    fi
31225  else
31226    input_to_shortpath="$new_path"
31227  fi
31228
31229  # Call helper function which possibly converts this using DOS-style short mode.
31230  # If so, the updated path is stored in $new_path.
31231  new_path="$input_to_shortpath"
31232
31233  input_path="$input_to_shortpath"
31234  # Check if we need to convert this using DOS-style short mode. If the path
31235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31236  # take no chances and rewrite it.
31237  # Note: m4 eats our [], so we need to use [ and ] instead.
31238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31239  if test "x$has_forbidden_chars" != x; then
31240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31244      # Going to short mode and back again did indeed matter. Since short mode is
31245      # case insensitive, let's make it lowercase to improve readability.
31246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31247      # Now convert it back to Unix-style (cygpath)
31248      input_path=`$CYGPATH -u "$shortmode_path"`
31249      new_path="$input_path"
31250    fi
31251  fi
31252
31253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31254  if test "x$test_cygdrive_prefix" = x; then
31255    # As a simple fix, exclude /usr/bin since it's not a real path.
31256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31258      # a path prefixed by /cygdrive for fixpath to work.
31259      new_path="$CYGWIN_ROOT_PATH$input_path"
31260    fi
31261  fi
31262
31263  # remove trailing .exe if any
31264  new_path="${new_path/%.exe/}"
31265
31266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31267
31268  # First separate the path from the arguments. This will split at the first
31269  # space.
31270  complete="$CXX"
31271  path="${complete%% *}"
31272  tmp="$complete EOL"
31273  arguments="${tmp#* }"
31274
31275  # Input might be given as Windows format, start by converting to
31276  # unix format.
31277  new_path="$path"
31278
31279  windows_path="$new_path"
31280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31281    unix_path=`$CYGPATH -u "$windows_path"`
31282    new_path="$unix_path"
31283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31285    new_path="$unix_path"
31286  fi
31287
31288
31289  # Now try to locate executable using which
31290  new_path=`$WHICH "$new_path" 2> /dev/null`
31291
31292  if test "x$new_path" = x; then
31293    # Oops. Which didn't find the executable.
31294    # The splitting of arguments from the executable at a space might have been incorrect,
31295    # since paths with space are more likely in Windows. Give it another try with the whole
31296    # argument.
31297    path="$complete"
31298    arguments="EOL"
31299    new_path="$path"
31300
31301  windows_path="$new_path"
31302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31303    unix_path=`$CYGPATH -u "$windows_path"`
31304    new_path="$unix_path"
31305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31307    new_path="$unix_path"
31308  fi
31309
31310
31311    new_path=`$WHICH "$new_path" 2> /dev/null`
31312    # bat and cmd files are not always considered executable in MSYS causing which
31313    # to not find them
31314    if test "x$new_path" = x \
31315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31317      new_path="$path"
31318
31319  windows_path="$new_path"
31320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31321    unix_path=`$CYGPATH -u "$windows_path"`
31322    new_path="$unix_path"
31323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31325    new_path="$unix_path"
31326  fi
31327
31328    fi
31329
31330    if test "x$new_path" = x; then
31331      # It's still not found. Now this is an unrecoverable error.
31332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31333$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31334      has_space=`$ECHO "$complete" | $GREP " "`
31335      if test "x$has_space" != x; then
31336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31338      fi
31339      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31340    fi
31341  fi
31342
31343  # Now new_path has a complete unix path to the binary
31344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31345    # Keep paths in /bin as-is, but remove trailing .exe if any
31346    new_path="${new_path/%.exe/}"
31347    # Do not save /bin paths to all_fixpath_prefixes!
31348  else
31349    # Not in mixed or Windows style, start by that.
31350    new_path=`cmd //c echo $new_path`
31351
31352  input_path="$new_path"
31353  # Check if we need to convert this using DOS-style short mode. If the path
31354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31355  # take no chances and rewrite it.
31356  # Note: m4 eats our [], so we need to use [ and ] instead.
31357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31358  if test "x$has_forbidden_chars" != x; then
31359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31361  fi
31362
31363    # Output is in $new_path
31364
31365  windows_path="$new_path"
31366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31367    unix_path=`$CYGPATH -u "$windows_path"`
31368    new_path="$unix_path"
31369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31371    new_path="$unix_path"
31372  fi
31373
31374    # remove trailing .exe if any
31375    new_path="${new_path/%.exe/}"
31376
31377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31379  fi
31380
31381    else
31382      # We're on a unix platform. Hooray! :)
31383      # First separate the path from the arguments. This will split at the first
31384      # space.
31385      complete="$CXX"
31386      path="${complete%% *}"
31387      tmp="$complete EOL"
31388      arguments="${tmp#* }"
31389
31390      # Cannot rely on the command "which" here since it doesn't always work.
31391      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31392      if test -z "$is_absolute_path"; then
31393        # Path to executable is not absolute. Find it.
31394        IFS_save="$IFS"
31395        IFS=:
31396        for p in $PATH; do
31397          if test -f "$p/$path" && test -x "$p/$path"; then
31398            new_path="$p/$path"
31399            break
31400          fi
31401        done
31402        IFS="$IFS_save"
31403      else
31404        # This is an absolute path, we can use it without further modifications.
31405        new_path="$path"
31406      fi
31407
31408      if test "x$new_path" = x; then
31409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31410$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31411        has_space=`$ECHO "$complete" | $GREP " "`
31412        if test "x$has_space" != x; then
31413          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31415        fi
31416        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31417      fi
31418    fi
31419
31420    # Now join together the path and the arguments once again
31421    if test "x$arguments" != xEOL; then
31422      new_complete="$new_path ${arguments% *}"
31423    else
31424      new_complete="$new_path"
31425    fi
31426
31427    if test "x$complete" != "x$new_complete"; then
31428      CXX="$new_complete"
31429      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31430$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31431    fi
31432  fi
31433
31434  TEST_COMPILER="$CXX"
31435  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31436  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31437  if test "x$OPENJDK_BUILD_OS" != xaix; then
31438    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31440$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31441
31442  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31443    # Follow a chain of symbolic links. Use readlink
31444    # where it exists, else fall back to horribly
31445    # complicated shell code.
31446    if test "x$READLINK_TESTED" != yes; then
31447      # On MacOSX there is a readlink tool with a different
31448      # purpose than the GNU readlink tool. Check the found readlink.
31449      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31450      if test "x$ISGNU" = x; then
31451        # A readlink that we do not know how to use.
31452        # Are there other non-GNU readlinks out there?
31453        READLINK_TESTED=yes
31454        READLINK=
31455      fi
31456    fi
31457
31458    if test "x$READLINK" != x; then
31459      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31460    else
31461      # Save the current directory for restoring afterwards
31462      STARTDIR=$PWD
31463      COUNTER=0
31464      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31465      sym_link_file=`$BASENAME $TEST_COMPILER`
31466      cd $sym_link_dir
31467      # Use -P flag to resolve symlinks in directories.
31468      cd `$THEPWDCMD -P`
31469      sym_link_dir=`$THEPWDCMD -P`
31470      # Resolve file symlinks
31471      while test $COUNTER -lt 20; do
31472        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31473        if test "x$ISLINK" == x; then
31474          # This is not a symbolic link! We are done!
31475          break
31476        fi
31477        # Again resolve directory symlinks since the target of the just found
31478        # link could be in a different directory
31479        cd `$DIRNAME $ISLINK`
31480        sym_link_dir=`$THEPWDCMD -P`
31481        sym_link_file=`$BASENAME $ISLINK`
31482        let COUNTER=COUNTER+1
31483      done
31484      cd $STARTDIR
31485      TEST_COMPILER=$sym_link_dir/$sym_link_file
31486    fi
31487  fi
31488
31489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31490$as_echo "$TEST_COMPILER" >&6; }
31491  fi
31492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31493$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31494
31495  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31496  if test "x$COMPILER_BASENAME" = "xccache"; then
31497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31498$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31499    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31500    # We want to control ccache invocation ourselves, so ignore this cc and try
31501    # searching again.
31502
31503    # Remove the path to the fake ccache cc from the PATH
31504    RETRY_COMPILER_SAVED_PATH="$PATH"
31505    COMPILER_DIRNAME=`$DIRNAME $CXX`
31506    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31507
31508    # Try again looking for our compiler
31509    if test -n "$ac_tool_prefix"; then
31510  for ac_prog in $TOOLCHAIN_CXX_BINARY
31511  do
31512    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31513set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31515$as_echo_n "checking for $ac_word... " >&6; }
31516if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31517  $as_echo_n "(cached) " >&6
31518else
31519  if test -n "$PROPER_COMPILER_CXX"; then
31520  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31521else
31522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31523for as_dir in $PATH
31524do
31525  IFS=$as_save_IFS
31526  test -z "$as_dir" && as_dir=.
31527    for ac_exec_ext in '' $ac_executable_extensions; do
31528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31529    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31531    break 2
31532  fi
31533done
31534  done
31535IFS=$as_save_IFS
31536
31537fi
31538fi
31539PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31540if test -n "$PROPER_COMPILER_CXX"; then
31541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31542$as_echo "$PROPER_COMPILER_CXX" >&6; }
31543else
31544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31545$as_echo "no" >&6; }
31546fi
31547
31548
31549    test -n "$PROPER_COMPILER_CXX" && break
31550  done
31551fi
31552if test -z "$PROPER_COMPILER_CXX"; then
31553  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31554  for ac_prog in $TOOLCHAIN_CXX_BINARY
31555do
31556  # Extract the first word of "$ac_prog", so it can be a program name with args.
31557set dummy $ac_prog; ac_word=$2
31558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31559$as_echo_n "checking for $ac_word... " >&6; }
31560if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31561  $as_echo_n "(cached) " >&6
31562else
31563  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31564  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31565else
31566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31567for as_dir in $PATH
31568do
31569  IFS=$as_save_IFS
31570  test -z "$as_dir" && as_dir=.
31571    for ac_exec_ext in '' $ac_executable_extensions; do
31572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31573    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31575    break 2
31576  fi
31577done
31578  done
31579IFS=$as_save_IFS
31580
31581fi
31582fi
31583ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31584if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31586$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31587else
31588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31589$as_echo "no" >&6; }
31590fi
31591
31592
31593  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31594done
31595
31596  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31597    PROPER_COMPILER_CXX=""
31598  else
31599    case $cross_compiling:$ac_tool_warned in
31600yes:)
31601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31603ac_tool_warned=yes ;;
31604esac
31605    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31606  fi
31607fi
31608
31609
31610  # Only process if variable expands to non-empty
31611
31612  if test "x$PROPER_COMPILER_CXX" != x; then
31613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31614
31615  # First separate the path from the arguments. This will split at the first
31616  # space.
31617  complete="$PROPER_COMPILER_CXX"
31618  path="${complete%% *}"
31619  tmp="$complete EOL"
31620  arguments="${tmp#* }"
31621
31622  # Input might be given as Windows format, start by converting to
31623  # unix format.
31624  new_path=`$CYGPATH -u "$path"`
31625
31626  # Now try to locate executable using which
31627  new_path=`$WHICH "$new_path" 2> /dev/null`
31628  # bat and cmd files are not always considered executable in cygwin causing which
31629  # to not find them
31630  if test "x$new_path" = x \
31631      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31632      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31633    new_path=`$CYGPATH -u "$path"`
31634  fi
31635  if test "x$new_path" = x; then
31636    # Oops. Which didn't find the executable.
31637    # The splitting of arguments from the executable at a space might have been incorrect,
31638    # since paths with space are more likely in Windows. Give it another try with the whole
31639    # argument.
31640    path="$complete"
31641    arguments="EOL"
31642    new_path=`$CYGPATH -u "$path"`
31643    new_path=`$WHICH "$new_path" 2> /dev/null`
31644    # bat and cmd files are not always considered executable in cygwin causing which
31645    # to not find them
31646    if test "x$new_path" = x \
31647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31649      new_path=`$CYGPATH -u "$path"`
31650    fi
31651    if test "x$new_path" = x; then
31652      # It's still not found. Now this is an unrecoverable error.
31653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31654$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31655      has_space=`$ECHO "$complete" | $GREP " "`
31656      if test "x$has_space" != x; then
31657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31659      fi
31660      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31661    fi
31662  fi
31663
31664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31667  # "foo.exe" is OK but "foo" is an error.
31668  #
31669  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31670  # It is also a way to make sure we got the proper file name for the real test later on.
31671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31672  if test "x$test_shortpath" = x; then
31673    # Short path failed, file does not exist as specified.
31674    # Try adding .exe or .cmd
31675    if test -f "${new_path}.exe"; then
31676      input_to_shortpath="${new_path}.exe"
31677    elif test -f "${new_path}.cmd"; then
31678      input_to_shortpath="${new_path}.cmd"
31679    else
31680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31681$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31684      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31685    fi
31686  else
31687    input_to_shortpath="$new_path"
31688  fi
31689
31690  # Call helper function which possibly converts this using DOS-style short mode.
31691  # If so, the updated path is stored in $new_path.
31692  new_path="$input_to_shortpath"
31693
31694  input_path="$input_to_shortpath"
31695  # Check if we need to convert this using DOS-style short mode. If the path
31696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31697  # take no chances and rewrite it.
31698  # Note: m4 eats our [], so we need to use [ and ] instead.
31699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31700  if test "x$has_forbidden_chars" != x; then
31701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31705      # Going to short mode and back again did indeed matter. Since short mode is
31706      # case insensitive, let's make it lowercase to improve readability.
31707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31708      # Now convert it back to Unix-style (cygpath)
31709      input_path=`$CYGPATH -u "$shortmode_path"`
31710      new_path="$input_path"
31711    fi
31712  fi
31713
31714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31715  if test "x$test_cygdrive_prefix" = x; then
31716    # As a simple fix, exclude /usr/bin since it's not a real path.
31717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31719      # a path prefixed by /cygdrive for fixpath to work.
31720      new_path="$CYGWIN_ROOT_PATH$input_path"
31721    fi
31722  fi
31723
31724  # remove trailing .exe if any
31725  new_path="${new_path/%.exe/}"
31726
31727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31728
31729  # First separate the path from the arguments. This will split at the first
31730  # space.
31731  complete="$PROPER_COMPILER_CXX"
31732  path="${complete%% *}"
31733  tmp="$complete EOL"
31734  arguments="${tmp#* }"
31735
31736  # Input might be given as Windows format, start by converting to
31737  # unix format.
31738  new_path="$path"
31739
31740  windows_path="$new_path"
31741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31742    unix_path=`$CYGPATH -u "$windows_path"`
31743    new_path="$unix_path"
31744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31746    new_path="$unix_path"
31747  fi
31748
31749
31750  # Now try to locate executable using which
31751  new_path=`$WHICH "$new_path" 2> /dev/null`
31752
31753  if test "x$new_path" = x; then
31754    # Oops. Which didn't find the executable.
31755    # The splitting of arguments from the executable at a space might have been incorrect,
31756    # since paths with space are more likely in Windows. Give it another try with the whole
31757    # argument.
31758    path="$complete"
31759    arguments="EOL"
31760    new_path="$path"
31761
31762  windows_path="$new_path"
31763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31764    unix_path=`$CYGPATH -u "$windows_path"`
31765    new_path="$unix_path"
31766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31768    new_path="$unix_path"
31769  fi
31770
31771
31772    new_path=`$WHICH "$new_path" 2> /dev/null`
31773    # bat and cmd files are not always considered executable in MSYS causing which
31774    # to not find them
31775    if test "x$new_path" = x \
31776        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31777        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31778      new_path="$path"
31779
31780  windows_path="$new_path"
31781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31782    unix_path=`$CYGPATH -u "$windows_path"`
31783    new_path="$unix_path"
31784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31786    new_path="$unix_path"
31787  fi
31788
31789    fi
31790
31791    if test "x$new_path" = x; then
31792      # It's still not found. Now this is an unrecoverable error.
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31794$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31795      has_space=`$ECHO "$complete" | $GREP " "`
31796      if test "x$has_space" != x; then
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31799      fi
31800      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31801    fi
31802  fi
31803
31804  # Now new_path has a complete unix path to the binary
31805  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31806    # Keep paths in /bin as-is, but remove trailing .exe if any
31807    new_path="${new_path/%.exe/}"
31808    # Do not save /bin paths to all_fixpath_prefixes!
31809  else
31810    # Not in mixed or Windows style, start by that.
31811    new_path=`cmd //c echo $new_path`
31812
31813  input_path="$new_path"
31814  # Check if we need to convert this using DOS-style short mode. If the path
31815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31816  # take no chances and rewrite it.
31817  # Note: m4 eats our [], so we need to use [ and ] instead.
31818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31819  if test "x$has_forbidden_chars" != x; then
31820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31822  fi
31823
31824    # Output is in $new_path
31825
31826  windows_path="$new_path"
31827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31828    unix_path=`$CYGPATH -u "$windows_path"`
31829    new_path="$unix_path"
31830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31832    new_path="$unix_path"
31833  fi
31834
31835    # remove trailing .exe if any
31836    new_path="${new_path/%.exe/}"
31837
31838    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31839    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31840  fi
31841
31842    else
31843      # We're on a unix platform. Hooray! :)
31844      # First separate the path from the arguments. This will split at the first
31845      # space.
31846      complete="$PROPER_COMPILER_CXX"
31847      path="${complete%% *}"
31848      tmp="$complete EOL"
31849      arguments="${tmp#* }"
31850
31851      # Cannot rely on the command "which" here since it doesn't always work.
31852      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31853      if test -z "$is_absolute_path"; then
31854        # Path to executable is not absolute. Find it.
31855        IFS_save="$IFS"
31856        IFS=:
31857        for p in $PATH; do
31858          if test -f "$p/$path" && test -x "$p/$path"; then
31859            new_path="$p/$path"
31860            break
31861          fi
31862        done
31863        IFS="$IFS_save"
31864      else
31865        # This is an absolute path, we can use it without further modifications.
31866        new_path="$path"
31867      fi
31868
31869      if test "x$new_path" = x; then
31870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31871$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31872        has_space=`$ECHO "$complete" | $GREP " "`
31873        if test "x$has_space" != x; then
31874          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31875$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31876        fi
31877        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31878      fi
31879    fi
31880
31881    # Now join together the path and the arguments once again
31882    if test "x$arguments" != xEOL; then
31883      new_complete="$new_path ${arguments% *}"
31884    else
31885      new_complete="$new_path"
31886    fi
31887
31888    if test "x$complete" != "x$new_complete"; then
31889      PROPER_COMPILER_CXX="$new_complete"
31890      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31891$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31892    fi
31893  fi
31894
31895    PATH="$RETRY_COMPILER_SAVED_PATH"
31896
31897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31898$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31899
31900  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31901    # Follow a chain of symbolic links. Use readlink
31902    # where it exists, else fall back to horribly
31903    # complicated shell code.
31904    if test "x$READLINK_TESTED" != yes; then
31905      # On MacOSX there is a readlink tool with a different
31906      # purpose than the GNU readlink tool. Check the found readlink.
31907      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31908      if test "x$ISGNU" = x; then
31909        # A readlink that we do not know how to use.
31910        # Are there other non-GNU readlinks out there?
31911        READLINK_TESTED=yes
31912        READLINK=
31913      fi
31914    fi
31915
31916    if test "x$READLINK" != x; then
31917      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31918    else
31919      # Save the current directory for restoring afterwards
31920      STARTDIR=$PWD
31921      COUNTER=0
31922      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31923      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31924      cd $sym_link_dir
31925      # Use -P flag to resolve symlinks in directories.
31926      cd `$THEPWDCMD -P`
31927      sym_link_dir=`$THEPWDCMD -P`
31928      # Resolve file symlinks
31929      while test $COUNTER -lt 20; do
31930        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31931        if test "x$ISLINK" == x; then
31932          # This is not a symbolic link! We are done!
31933          break
31934        fi
31935        # Again resolve directory symlinks since the target of the just found
31936        # link could be in a different directory
31937        cd `$DIRNAME $ISLINK`
31938        sym_link_dir=`$THEPWDCMD -P`
31939        sym_link_file=`$BASENAME $ISLINK`
31940        let COUNTER=COUNTER+1
31941      done
31942      cd $STARTDIR
31943      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31944    fi
31945  fi
31946
31947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31948$as_echo "$PROPER_COMPILER_CXX" >&6; }
31949    CXX="$PROPER_COMPILER_CXX"
31950  else
31951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31952$as_echo "no, keeping CXX" >&6; }
31953  fi
31954
31955
31956  COMPILER=$CXX
31957  COMPILER_NAME=$COMPILER_NAME
31958
31959  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31960    # cc -V output typically looks like
31961    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31962    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31963    # Check that this is likely to be the Solaris Studio cc.
31964    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31965    if test $? -ne 0; then
31966      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31967      { $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
31968$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31969      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31970$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31972$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31973      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31974    fi
31975    # Remove usage instructions (if present), and
31976    # collapse compiler output into a single line
31977    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31978        $SED -e 's/ *[Uu]sage:.*//'`
31979    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31980        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31981  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31982    # xlc -qversion output typically looks like
31983    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31984    #     Version: 11.01.0000.0015
31985    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31986    # Check that this is likely to be the IBM XL C compiler.
31987    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31988    if test $? -ne 0; then
31989      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31990      { $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
31991$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31992      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31993$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31995$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31996      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31997    fi
31998    # Collapse compiler output into a single line
31999    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32000    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32001        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32002  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32003    # There is no specific version flag, but all output starts with a version string.
32004    # First line typically looks something like:
32005    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32006    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32007    # Check that this is likely to be Microsoft CL.EXE.
32008    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32009    if test $? -ne 0; then
32010      { $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
32011$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32012      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32013$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32014      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32015    fi
32016    # Collapse compiler output into a single line
32017    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32018    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32019        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32020  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32021    # gcc --version output typically looks like
32022    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32023    #     Copyright (C) 2013 Free Software Foundation, Inc.
32024    #     This is free software; see the source for copying conditions.  There is NO
32025    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32026    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32027    # Check that this is likely to be GCC.
32028    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32029    if test $? -ne 0; then
32030      { $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
32031$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32032      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32033$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32034      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32035    fi
32036    # Remove Copyright and legalese from version string, and
32037    # collapse into a single line
32038    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32039        $SED -e 's/ *Copyright .*//'`
32040    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32041        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32042  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32043    # clang --version output typically looks like
32044    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32045    #    clang version 3.3 (tags/RELEASE_33/final)
32046    # or
32047    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32048    #    Target: x86_64-pc-linux-gnu
32049    #    Thread model: posix
32050    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32051    # Check that this is likely to be clang
32052    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32053    if test $? -ne 0; then
32054      { $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
32055$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32057$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32058      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32059    fi
32060    # Collapse compiler output into a single line
32061    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32062    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32063        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32064  else
32065      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32066  fi
32067  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32068  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32069  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32070  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
32071
32072  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32073$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32074
32075
32076  # Now that we have resolved CXX ourself, let autoconf have its go at it
32077  ac_ext=cpp
32078ac_cpp='$CXXCPP $CPPFLAGS'
32079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32082if test -z "$CXX"; then
32083  if test -n "$CCC"; then
32084    CXX=$CCC
32085  else
32086    if test -n "$ac_tool_prefix"; then
32087  for ac_prog in $CXX
32088  do
32089    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32092$as_echo_n "checking for $ac_word... " >&6; }
32093if ${ac_cv_prog_CXX+:} false; then :
32094  $as_echo_n "(cached) " >&6
32095else
32096  if test -n "$CXX"; then
32097  ac_cv_prog_CXX="$CXX" # Let the user override the test.
32098else
32099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32100for as_dir in $PATH
32101do
32102  IFS=$as_save_IFS
32103  test -z "$as_dir" && as_dir=.
32104    for ac_exec_ext in '' $ac_executable_extensions; do
32105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32106    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
32107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32108    break 2
32109  fi
32110done
32111  done
32112IFS=$as_save_IFS
32113
32114fi
32115fi
32116CXX=$ac_cv_prog_CXX
32117if test -n "$CXX"; then
32118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
32119$as_echo "$CXX" >&6; }
32120else
32121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32122$as_echo "no" >&6; }
32123fi
32124
32125
32126    test -n "$CXX" && break
32127  done
32128fi
32129if test -z "$CXX"; then
32130  ac_ct_CXX=$CXX
32131  for ac_prog in $CXX
32132do
32133  # Extract the first word of "$ac_prog", so it can be a program name with args.
32134set dummy $ac_prog; ac_word=$2
32135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32136$as_echo_n "checking for $ac_word... " >&6; }
32137if ${ac_cv_prog_ac_ct_CXX+:} false; then :
32138  $as_echo_n "(cached) " >&6
32139else
32140  if test -n "$ac_ct_CXX"; then
32141  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
32142else
32143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32144for as_dir in $PATH
32145do
32146  IFS=$as_save_IFS
32147  test -z "$as_dir" && as_dir=.
32148    for ac_exec_ext in '' $ac_executable_extensions; do
32149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32150    ac_cv_prog_ac_ct_CXX="$ac_prog"
32151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32152    break 2
32153  fi
32154done
32155  done
32156IFS=$as_save_IFS
32157
32158fi
32159fi
32160ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
32161if test -n "$ac_ct_CXX"; then
32162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
32163$as_echo "$ac_ct_CXX" >&6; }
32164else
32165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32166$as_echo "no" >&6; }
32167fi
32168
32169
32170  test -n "$ac_ct_CXX" && break
32171done
32172
32173  if test "x$ac_ct_CXX" = x; then
32174    CXX="g++"
32175  else
32176    case $cross_compiling:$ac_tool_warned in
32177yes:)
32178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32180ac_tool_warned=yes ;;
32181esac
32182    CXX=$ac_ct_CXX
32183  fi
32184fi
32185
32186  fi
32187fi
32188# Provide some information about the compiler.
32189$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32190set X $ac_compile
32191ac_compiler=$2
32192for ac_option in --version -v -V -qversion; do
32193  { { ac_try="$ac_compiler $ac_option >&5"
32194case "(($ac_try" in
32195  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32196  *) ac_try_echo=$ac_try;;
32197esac
32198eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32199$as_echo "$ac_try_echo"; } >&5
32200  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32201  ac_status=$?
32202  if test -s conftest.err; then
32203    sed '10a\
32204... rest of stderr output deleted ...
32205         10q' conftest.err >conftest.er1
32206    cat conftest.er1 >&5
32207  fi
32208  rm -f conftest.er1 conftest.err
32209  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32210  test $ac_status = 0; }
32211done
32212
32213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32214$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32215if ${ac_cv_cxx_compiler_gnu+:} false; then :
32216  $as_echo_n "(cached) " >&6
32217else
32218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32219/* end confdefs.h.  */
32220
32221int
32222main ()
32223{
32224#ifndef __GNUC__
32225       choke me
32226#endif
32227
32228  ;
32229  return 0;
32230}
32231_ACEOF
32232if ac_fn_cxx_try_compile "$LINENO"; then :
32233  ac_compiler_gnu=yes
32234else
32235  ac_compiler_gnu=no
32236fi
32237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32238ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32239
32240fi
32241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32242$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32243if test $ac_compiler_gnu = yes; then
32244  GXX=yes
32245else
32246  GXX=
32247fi
32248ac_test_CXXFLAGS=${CXXFLAGS+set}
32249ac_save_CXXFLAGS=$CXXFLAGS
32250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32251$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32252if ${ac_cv_prog_cxx_g+:} false; then :
32253  $as_echo_n "(cached) " >&6
32254else
32255  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32256   ac_cxx_werror_flag=yes
32257   ac_cv_prog_cxx_g=no
32258   CXXFLAGS="-g"
32259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32260/* end confdefs.h.  */
32261
32262int
32263main ()
32264{
32265
32266  ;
32267  return 0;
32268}
32269_ACEOF
32270if ac_fn_cxx_try_compile "$LINENO"; then :
32271  ac_cv_prog_cxx_g=yes
32272else
32273  CXXFLAGS=""
32274      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32275/* end confdefs.h.  */
32276
32277int
32278main ()
32279{
32280
32281  ;
32282  return 0;
32283}
32284_ACEOF
32285if ac_fn_cxx_try_compile "$LINENO"; then :
32286
32287else
32288  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32289	 CXXFLAGS="-g"
32290	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32291/* end confdefs.h.  */
32292
32293int
32294main ()
32295{
32296
32297  ;
32298  return 0;
32299}
32300_ACEOF
32301if ac_fn_cxx_try_compile "$LINENO"; then :
32302  ac_cv_prog_cxx_g=yes
32303fi
32304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32305fi
32306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32307fi
32308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32309   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32310fi
32311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32312$as_echo "$ac_cv_prog_cxx_g" >&6; }
32313if test "$ac_test_CXXFLAGS" = set; then
32314  CXXFLAGS=$ac_save_CXXFLAGS
32315elif test $ac_cv_prog_cxx_g = yes; then
32316  if test "$GXX" = yes; then
32317    CXXFLAGS="-g -O2"
32318  else
32319    CXXFLAGS="-g"
32320  fi
32321else
32322  if test "$GXX" = yes; then
32323    CXXFLAGS="-O2"
32324  else
32325    CXXFLAGS=
32326  fi
32327fi
32328ac_ext=cpp
32329ac_cpp='$CXXCPP $CPPFLAGS'
32330ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32331ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32332ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32333
32334
32335  #
32336  # Setup the preprocessor (CPP and CXXCPP)
32337  #
32338  ac_ext=c
32339ac_cpp='$CPP $CPPFLAGS'
32340ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32341ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32342ac_compiler_gnu=$ac_cv_c_compiler_gnu
32343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
32344$as_echo_n "checking how to run the C preprocessor... " >&6; }
32345# On Suns, sometimes $CPP names a directory.
32346if test -n "$CPP" && test -d "$CPP"; then
32347  CPP=
32348fi
32349if test -z "$CPP"; then
32350  if ${ac_cv_prog_CPP+:} false; then :
32351  $as_echo_n "(cached) " >&6
32352else
32353      # Double quotes because CPP needs to be expanded
32354    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
32355    do
32356      ac_preproc_ok=false
32357for ac_c_preproc_warn_flag in '' yes
32358do
32359  # Use a header file that comes with gcc, so configuring glibc
32360  # with a fresh cross-compiler works.
32361  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32362  # <limits.h> exists even on freestanding compilers.
32363  # On the NeXT, cc -E runs the code through the compiler's parser,
32364  # not just through cpp. "Syntax error" is here to catch this case.
32365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32366/* end confdefs.h.  */
32367#ifdef __STDC__
32368# include <limits.h>
32369#else
32370# include <assert.h>
32371#endif
32372		     Syntax error
32373_ACEOF
32374if ac_fn_c_try_cpp "$LINENO"; then :
32375
32376else
32377  # Broken: fails on valid input.
32378continue
32379fi
32380rm -f conftest.err conftest.i conftest.$ac_ext
32381
32382  # OK, works on sane cases.  Now check whether nonexistent headers
32383  # can be detected and how.
32384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32385/* end confdefs.h.  */
32386#include <ac_nonexistent.h>
32387_ACEOF
32388if ac_fn_c_try_cpp "$LINENO"; then :
32389  # Broken: success on invalid input.
32390continue
32391else
32392  # Passes both tests.
32393ac_preproc_ok=:
32394break
32395fi
32396rm -f conftest.err conftest.i conftest.$ac_ext
32397
32398done
32399# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32400rm -f conftest.i conftest.err conftest.$ac_ext
32401if $ac_preproc_ok; then :
32402  break
32403fi
32404
32405    done
32406    ac_cv_prog_CPP=$CPP
32407
32408fi
32409  CPP=$ac_cv_prog_CPP
32410else
32411  ac_cv_prog_CPP=$CPP
32412fi
32413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
32414$as_echo "$CPP" >&6; }
32415ac_preproc_ok=false
32416for ac_c_preproc_warn_flag in '' yes
32417do
32418  # Use a header file that comes with gcc, so configuring glibc
32419  # with a fresh cross-compiler works.
32420  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32421  # <limits.h> exists even on freestanding compilers.
32422  # On the NeXT, cc -E runs the code through the compiler's parser,
32423  # not just through cpp. "Syntax error" is here to catch this case.
32424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32425/* end confdefs.h.  */
32426#ifdef __STDC__
32427# include <limits.h>
32428#else
32429# include <assert.h>
32430#endif
32431		     Syntax error
32432_ACEOF
32433if ac_fn_c_try_cpp "$LINENO"; then :
32434
32435else
32436  # Broken: fails on valid input.
32437continue
32438fi
32439rm -f conftest.err conftest.i conftest.$ac_ext
32440
32441  # OK, works on sane cases.  Now check whether nonexistent headers
32442  # can be detected and how.
32443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32444/* end confdefs.h.  */
32445#include <ac_nonexistent.h>
32446_ACEOF
32447if ac_fn_c_try_cpp "$LINENO"; then :
32448  # Broken: success on invalid input.
32449continue
32450else
32451  # Passes both tests.
32452ac_preproc_ok=:
32453break
32454fi
32455rm -f conftest.err conftest.i conftest.$ac_ext
32456
32457done
32458# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32459rm -f conftest.i conftest.err conftest.$ac_ext
32460if $ac_preproc_ok; then :
32461
32462else
32463  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32465as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
32466See \`config.log' for more details" "$LINENO" 5; }
32467fi
32468
32469ac_ext=cpp
32470ac_cpp='$CXXCPP $CPPFLAGS'
32471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32474
32475
32476  # Only process if variable expands to non-empty
32477
32478  if test "x$CPP" != x; then
32479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32480
32481  # First separate the path from the arguments. This will split at the first
32482  # space.
32483  complete="$CPP"
32484  path="${complete%% *}"
32485  tmp="$complete EOL"
32486  arguments="${tmp#* }"
32487
32488  # Input might be given as Windows format, start by converting to
32489  # unix format.
32490  new_path=`$CYGPATH -u "$path"`
32491
32492  # Now try to locate executable using which
32493  new_path=`$WHICH "$new_path" 2> /dev/null`
32494  # bat and cmd files are not always considered executable in cygwin causing which
32495  # to not find them
32496  if test "x$new_path" = x \
32497      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32498      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32499    new_path=`$CYGPATH -u "$path"`
32500  fi
32501  if test "x$new_path" = x; then
32502    # Oops. Which didn't find the executable.
32503    # The splitting of arguments from the executable at a space might have been incorrect,
32504    # since paths with space are more likely in Windows. Give it another try with the whole
32505    # argument.
32506    path="$complete"
32507    arguments="EOL"
32508    new_path=`$CYGPATH -u "$path"`
32509    new_path=`$WHICH "$new_path" 2> /dev/null`
32510    # bat and cmd files are not always considered executable in cygwin causing which
32511    # to not find them
32512    if test "x$new_path" = x \
32513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32515      new_path=`$CYGPATH -u "$path"`
32516    fi
32517    if test "x$new_path" = x; then
32518      # It's still not found. Now this is an unrecoverable error.
32519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32520$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32521      has_space=`$ECHO "$complete" | $GREP " "`
32522      if test "x$has_space" != x; then
32523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32525      fi
32526      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32527    fi
32528  fi
32529
32530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32533  # "foo.exe" is OK but "foo" is an error.
32534  #
32535  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32536  # It is also a way to make sure we got the proper file name for the real test later on.
32537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32538  if test "x$test_shortpath" = x; then
32539    # Short path failed, file does not exist as specified.
32540    # Try adding .exe or .cmd
32541    if test -f "${new_path}.exe"; then
32542      input_to_shortpath="${new_path}.exe"
32543    elif test -f "${new_path}.cmd"; then
32544      input_to_shortpath="${new_path}.cmd"
32545    else
32546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
32547$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
32548      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32549$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32550      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32551    fi
32552  else
32553    input_to_shortpath="$new_path"
32554  fi
32555
32556  # Call helper function which possibly converts this using DOS-style short mode.
32557  # If so, the updated path is stored in $new_path.
32558  new_path="$input_to_shortpath"
32559
32560  input_path="$input_to_shortpath"
32561  # Check if we need to convert this using DOS-style short mode. If the path
32562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32563  # take no chances and rewrite it.
32564  # Note: m4 eats our [], so we need to use [ and ] instead.
32565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32566  if test "x$has_forbidden_chars" != x; then
32567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32571      # Going to short mode and back again did indeed matter. Since short mode is
32572      # case insensitive, let's make it lowercase to improve readability.
32573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32574      # Now convert it back to Unix-style (cygpath)
32575      input_path=`$CYGPATH -u "$shortmode_path"`
32576      new_path="$input_path"
32577    fi
32578  fi
32579
32580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32581  if test "x$test_cygdrive_prefix" = x; then
32582    # As a simple fix, exclude /usr/bin since it's not a real path.
32583    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32585      # a path prefixed by /cygdrive for fixpath to work.
32586      new_path="$CYGWIN_ROOT_PATH$input_path"
32587    fi
32588  fi
32589
32590  # remove trailing .exe if any
32591  new_path="${new_path/%.exe/}"
32592
32593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32594
32595  # First separate the path from the arguments. This will split at the first
32596  # space.
32597  complete="$CPP"
32598  path="${complete%% *}"
32599  tmp="$complete EOL"
32600  arguments="${tmp#* }"
32601
32602  # Input might be given as Windows format, start by converting to
32603  # unix format.
32604  new_path="$path"
32605
32606  windows_path="$new_path"
32607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32608    unix_path=`$CYGPATH -u "$windows_path"`
32609    new_path="$unix_path"
32610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32612    new_path="$unix_path"
32613  fi
32614
32615
32616  # Now try to locate executable using which
32617  new_path=`$WHICH "$new_path" 2> /dev/null`
32618
32619  if test "x$new_path" = x; then
32620    # Oops. Which didn't find the executable.
32621    # The splitting of arguments from the executable at a space might have been incorrect,
32622    # since paths with space are more likely in Windows. Give it another try with the whole
32623    # argument.
32624    path="$complete"
32625    arguments="EOL"
32626    new_path="$path"
32627
32628  windows_path="$new_path"
32629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32630    unix_path=`$CYGPATH -u "$windows_path"`
32631    new_path="$unix_path"
32632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32634    new_path="$unix_path"
32635  fi
32636
32637
32638    new_path=`$WHICH "$new_path" 2> /dev/null`
32639    # bat and cmd files are not always considered executable in MSYS causing which
32640    # to not find them
32641    if test "x$new_path" = x \
32642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32644      new_path="$path"
32645
32646  windows_path="$new_path"
32647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32648    unix_path=`$CYGPATH -u "$windows_path"`
32649    new_path="$unix_path"
32650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32652    new_path="$unix_path"
32653  fi
32654
32655    fi
32656
32657    if test "x$new_path" = x; then
32658      # It's still not found. Now this is an unrecoverable error.
32659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32660$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32661      has_space=`$ECHO "$complete" | $GREP " "`
32662      if test "x$has_space" != x; then
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32665      fi
32666      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32667    fi
32668  fi
32669
32670  # Now new_path has a complete unix path to the binary
32671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32672    # Keep paths in /bin as-is, but remove trailing .exe if any
32673    new_path="${new_path/%.exe/}"
32674    # Do not save /bin paths to all_fixpath_prefixes!
32675  else
32676    # Not in mixed or Windows style, start by that.
32677    new_path=`cmd //c echo $new_path`
32678
32679  input_path="$new_path"
32680  # Check if we need to convert this using DOS-style short mode. If the path
32681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32682  # take no chances and rewrite it.
32683  # Note: m4 eats our [], so we need to use [ and ] instead.
32684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32685  if test "x$has_forbidden_chars" != x; then
32686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32688  fi
32689
32690    # Output is in $new_path
32691
32692  windows_path="$new_path"
32693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32694    unix_path=`$CYGPATH -u "$windows_path"`
32695    new_path="$unix_path"
32696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32698    new_path="$unix_path"
32699  fi
32700
32701    # remove trailing .exe if any
32702    new_path="${new_path/%.exe/}"
32703
32704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32706  fi
32707
32708    else
32709      # We're on a unix platform. Hooray! :)
32710      # First separate the path from the arguments. This will split at the first
32711      # space.
32712      complete="$CPP"
32713      path="${complete%% *}"
32714      tmp="$complete EOL"
32715      arguments="${tmp#* }"
32716
32717      # Cannot rely on the command "which" here since it doesn't always work.
32718      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32719      if test -z "$is_absolute_path"; then
32720        # Path to executable is not absolute. Find it.
32721        IFS_save="$IFS"
32722        IFS=:
32723        for p in $PATH; do
32724          if test -f "$p/$path" && test -x "$p/$path"; then
32725            new_path="$p/$path"
32726            break
32727          fi
32728        done
32729        IFS="$IFS_save"
32730      else
32731        # This is an absolute path, we can use it without further modifications.
32732        new_path="$path"
32733      fi
32734
32735      if test "x$new_path" = x; then
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32737$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32738        has_space=`$ECHO "$complete" | $GREP " "`
32739        if test "x$has_space" != x; then
32740          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32741$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32742        fi
32743        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32744      fi
32745    fi
32746
32747    # Now join together the path and the arguments once again
32748    if test "x$arguments" != xEOL; then
32749      new_complete="$new_path ${arguments% *}"
32750    else
32751      new_complete="$new_path"
32752    fi
32753
32754    if test "x$complete" != "x$new_complete"; then
32755      CPP="$new_complete"
32756      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32757$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32758    fi
32759  fi
32760
32761  ac_ext=cpp
32762ac_cpp='$CXXCPP $CPPFLAGS'
32763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32767$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32768if test -z "$CXXCPP"; then
32769  if ${ac_cv_prog_CXXCPP+:} false; then :
32770  $as_echo_n "(cached) " >&6
32771else
32772      # Double quotes because CXXCPP needs to be expanded
32773    for CXXCPP in "$CXX -E" "/lib/cpp"
32774    do
32775      ac_preproc_ok=false
32776for ac_cxx_preproc_warn_flag in '' yes
32777do
32778  # Use a header file that comes with gcc, so configuring glibc
32779  # with a fresh cross-compiler works.
32780  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32781  # <limits.h> exists even on freestanding compilers.
32782  # On the NeXT, cc -E runs the code through the compiler's parser,
32783  # not just through cpp. "Syntax error" is here to catch this case.
32784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32785/* end confdefs.h.  */
32786#ifdef __STDC__
32787# include <limits.h>
32788#else
32789# include <assert.h>
32790#endif
32791		     Syntax error
32792_ACEOF
32793if ac_fn_cxx_try_cpp "$LINENO"; then :
32794
32795else
32796  # Broken: fails on valid input.
32797continue
32798fi
32799rm -f conftest.err conftest.i conftest.$ac_ext
32800
32801  # OK, works on sane cases.  Now check whether nonexistent headers
32802  # can be detected and how.
32803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32804/* end confdefs.h.  */
32805#include <ac_nonexistent.h>
32806_ACEOF
32807if ac_fn_cxx_try_cpp "$LINENO"; then :
32808  # Broken: success on invalid input.
32809continue
32810else
32811  # Passes both tests.
32812ac_preproc_ok=:
32813break
32814fi
32815rm -f conftest.err conftest.i conftest.$ac_ext
32816
32817done
32818# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32819rm -f conftest.i conftest.err conftest.$ac_ext
32820if $ac_preproc_ok; then :
32821  break
32822fi
32823
32824    done
32825    ac_cv_prog_CXXCPP=$CXXCPP
32826
32827fi
32828  CXXCPP=$ac_cv_prog_CXXCPP
32829else
32830  ac_cv_prog_CXXCPP=$CXXCPP
32831fi
32832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32833$as_echo "$CXXCPP" >&6; }
32834ac_preproc_ok=false
32835for ac_cxx_preproc_warn_flag in '' yes
32836do
32837  # Use a header file that comes with gcc, so configuring glibc
32838  # with a fresh cross-compiler works.
32839  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32840  # <limits.h> exists even on freestanding compilers.
32841  # On the NeXT, cc -E runs the code through the compiler's parser,
32842  # not just through cpp. "Syntax error" is here to catch this case.
32843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32844/* end confdefs.h.  */
32845#ifdef __STDC__
32846# include <limits.h>
32847#else
32848# include <assert.h>
32849#endif
32850		     Syntax error
32851_ACEOF
32852if ac_fn_cxx_try_cpp "$LINENO"; then :
32853
32854else
32855  # Broken: fails on valid input.
32856continue
32857fi
32858rm -f conftest.err conftest.i conftest.$ac_ext
32859
32860  # OK, works on sane cases.  Now check whether nonexistent headers
32861  # can be detected and how.
32862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32863/* end confdefs.h.  */
32864#include <ac_nonexistent.h>
32865_ACEOF
32866if ac_fn_cxx_try_cpp "$LINENO"; then :
32867  # Broken: success on invalid input.
32868continue
32869else
32870  # Passes both tests.
32871ac_preproc_ok=:
32872break
32873fi
32874rm -f conftest.err conftest.i conftest.$ac_ext
32875
32876done
32877# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32878rm -f conftest.i conftest.err conftest.$ac_ext
32879if $ac_preproc_ok; then :
32880
32881else
32882  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32884as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32885See \`config.log' for more details" "$LINENO" 5; }
32886fi
32887
32888ac_ext=cpp
32889ac_cpp='$CXXCPP $CPPFLAGS'
32890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32893
32894
32895  # Only process if variable expands to non-empty
32896
32897  if test "x$CXXCPP" != x; then
32898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32899
32900  # First separate the path from the arguments. This will split at the first
32901  # space.
32902  complete="$CXXCPP"
32903  path="${complete%% *}"
32904  tmp="$complete EOL"
32905  arguments="${tmp#* }"
32906
32907  # Input might be given as Windows format, start by converting to
32908  # unix format.
32909  new_path=`$CYGPATH -u "$path"`
32910
32911  # Now try to locate executable using which
32912  new_path=`$WHICH "$new_path" 2> /dev/null`
32913  # bat and cmd files are not always considered executable in cygwin causing which
32914  # to not find them
32915  if test "x$new_path" = x \
32916      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32917      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32918    new_path=`$CYGPATH -u "$path"`
32919  fi
32920  if test "x$new_path" = x; then
32921    # Oops. Which didn't find the executable.
32922    # The splitting of arguments from the executable at a space might have been incorrect,
32923    # since paths with space are more likely in Windows. Give it another try with the whole
32924    # argument.
32925    path="$complete"
32926    arguments="EOL"
32927    new_path=`$CYGPATH -u "$path"`
32928    new_path=`$WHICH "$new_path" 2> /dev/null`
32929    # bat and cmd files are not always considered executable in cygwin causing which
32930    # to not find them
32931    if test "x$new_path" = x \
32932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32934      new_path=`$CYGPATH -u "$path"`
32935    fi
32936    if test "x$new_path" = x; then
32937      # It's still not found. Now this is an unrecoverable error.
32938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32939$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32940      has_space=`$ECHO "$complete" | $GREP " "`
32941      if test "x$has_space" != x; then
32942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32944      fi
32945      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32946    fi
32947  fi
32948
32949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32952  # "foo.exe" is OK but "foo" is an error.
32953  #
32954  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32955  # It is also a way to make sure we got the proper file name for the real test later on.
32956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32957  if test "x$test_shortpath" = x; then
32958    # Short path failed, file does not exist as specified.
32959    # Try adding .exe or .cmd
32960    if test -f "${new_path}.exe"; then
32961      input_to_shortpath="${new_path}.exe"
32962    elif test -f "${new_path}.cmd"; then
32963      input_to_shortpath="${new_path}.cmd"
32964    else
32965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32966$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32969      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32970    fi
32971  else
32972    input_to_shortpath="$new_path"
32973  fi
32974
32975  # Call helper function which possibly converts this using DOS-style short mode.
32976  # If so, the updated path is stored in $new_path.
32977  new_path="$input_to_shortpath"
32978
32979  input_path="$input_to_shortpath"
32980  # Check if we need to convert this using DOS-style short mode. If the path
32981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32982  # take no chances and rewrite it.
32983  # Note: m4 eats our [], so we need to use [ and ] instead.
32984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32985  if test "x$has_forbidden_chars" != x; then
32986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32990      # Going to short mode and back again did indeed matter. Since short mode is
32991      # case insensitive, let's make it lowercase to improve readability.
32992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32993      # Now convert it back to Unix-style (cygpath)
32994      input_path=`$CYGPATH -u "$shortmode_path"`
32995      new_path="$input_path"
32996    fi
32997  fi
32998
32999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33000  if test "x$test_cygdrive_prefix" = x; then
33001    # As a simple fix, exclude /usr/bin since it's not a real path.
33002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33004      # a path prefixed by /cygdrive for fixpath to work.
33005      new_path="$CYGWIN_ROOT_PATH$input_path"
33006    fi
33007  fi
33008
33009  # remove trailing .exe if any
33010  new_path="${new_path/%.exe/}"
33011
33012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33013
33014  # First separate the path from the arguments. This will split at the first
33015  # space.
33016  complete="$CXXCPP"
33017  path="${complete%% *}"
33018  tmp="$complete EOL"
33019  arguments="${tmp#* }"
33020
33021  # Input might be given as Windows format, start by converting to
33022  # unix format.
33023  new_path="$path"
33024
33025  windows_path="$new_path"
33026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33027    unix_path=`$CYGPATH -u "$windows_path"`
33028    new_path="$unix_path"
33029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33031    new_path="$unix_path"
33032  fi
33033
33034
33035  # Now try to locate executable using which
33036  new_path=`$WHICH "$new_path" 2> /dev/null`
33037
33038  if test "x$new_path" = x; then
33039    # Oops. Which didn't find the executable.
33040    # The splitting of arguments from the executable at a space might have been incorrect,
33041    # since paths with space are more likely in Windows. Give it another try with the whole
33042    # argument.
33043    path="$complete"
33044    arguments="EOL"
33045    new_path="$path"
33046
33047  windows_path="$new_path"
33048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33049    unix_path=`$CYGPATH -u "$windows_path"`
33050    new_path="$unix_path"
33051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33053    new_path="$unix_path"
33054  fi
33055
33056
33057    new_path=`$WHICH "$new_path" 2> /dev/null`
33058    # bat and cmd files are not always considered executable in MSYS causing which
33059    # to not find them
33060    if test "x$new_path" = x \
33061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33063      new_path="$path"
33064
33065  windows_path="$new_path"
33066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33067    unix_path=`$CYGPATH -u "$windows_path"`
33068    new_path="$unix_path"
33069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33071    new_path="$unix_path"
33072  fi
33073
33074    fi
33075
33076    if test "x$new_path" = x; then
33077      # It's still not found. Now this is an unrecoverable error.
33078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
33079$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
33080      has_space=`$ECHO "$complete" | $GREP " "`
33081      if test "x$has_space" != x; then
33082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33084      fi
33085      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
33086    fi
33087  fi
33088
33089  # Now new_path has a complete unix path to the binary
33090  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33091    # Keep paths in /bin as-is, but remove trailing .exe if any
33092    new_path="${new_path/%.exe/}"
33093    # Do not save /bin paths to all_fixpath_prefixes!
33094  else
33095    # Not in mixed or Windows style, start by that.
33096    new_path=`cmd //c echo $new_path`
33097
33098  input_path="$new_path"
33099  # Check if we need to convert this using DOS-style short mode. If the path
33100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33101  # take no chances and rewrite it.
33102  # Note: m4 eats our [], so we need to use [ and ] instead.
33103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33104  if test "x$has_forbidden_chars" != x; then
33105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33107  fi
33108
33109    # Output is in $new_path
33110
33111  windows_path="$new_path"
33112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33113    unix_path=`$CYGPATH -u "$windows_path"`
33114    new_path="$unix_path"
33115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33117    new_path="$unix_path"
33118  fi
33119
33120    # remove trailing .exe if any
33121    new_path="${new_path/%.exe/}"
33122
33123    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33124    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33125  fi
33126
33127    else
33128      # We're on a unix platform. Hooray! :)
33129      # First separate the path from the arguments. This will split at the first
33130      # space.
33131      complete="$CXXCPP"
33132      path="${complete%% *}"
33133      tmp="$complete EOL"
33134      arguments="${tmp#* }"
33135
33136      # Cannot rely on the command "which" here since it doesn't always work.
33137      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33138      if test -z "$is_absolute_path"; then
33139        # Path to executable is not absolute. Find it.
33140        IFS_save="$IFS"
33141        IFS=:
33142        for p in $PATH; do
33143          if test -f "$p/$path" && test -x "$p/$path"; then
33144            new_path="$p/$path"
33145            break
33146          fi
33147        done
33148        IFS="$IFS_save"
33149      else
33150        # This is an absolute path, we can use it without further modifications.
33151        new_path="$path"
33152      fi
33153
33154      if test "x$new_path" = x; then
33155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
33156$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
33157        has_space=`$ECHO "$complete" | $GREP " "`
33158        if test "x$has_space" != x; then
33159          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33161        fi
33162        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
33163      fi
33164    fi
33165
33166    # Now join together the path and the arguments once again
33167    if test "x$arguments" != xEOL; then
33168      new_complete="$new_path ${arguments% *}"
33169    else
33170      new_complete="$new_path"
33171    fi
33172
33173    if test "x$complete" != "x$new_complete"; then
33174      CXXCPP="$new_complete"
33175      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
33176$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
33177    fi
33178  fi
33179
33180
33181  #
33182  # Setup the linker (LD)
33183  #
33184  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33185    # In the Microsoft toolchain we have a separate LD command "link".
33186    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
33187    # a cygwin program for something completely different.
33188    # Extract the first word of "link", so it can be a program name with args.
33189set dummy link; ac_word=$2
33190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33191$as_echo_n "checking for $ac_word... " >&6; }
33192if ${ac_cv_prog_LD+:} false; then :
33193  $as_echo_n "(cached) " >&6
33194else
33195  if test -n "$LD"; then
33196  ac_cv_prog_LD="$LD" # Let the user override the test.
33197else
33198  ac_prog_rejected=no
33199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33200for as_dir in $PATH
33201do
33202  IFS=$as_save_IFS
33203  test -z "$as_dir" && as_dir=.
33204    for ac_exec_ext in '' $ac_executable_extensions; do
33205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33206    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33207       ac_prog_rejected=yes
33208       continue
33209     fi
33210    ac_cv_prog_LD="link"
33211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33212    break 2
33213  fi
33214done
33215  done
33216IFS=$as_save_IFS
33217
33218if test $ac_prog_rejected = yes; then
33219  # We found a bogon in the path, so make sure we never use it.
33220  set dummy $ac_cv_prog_LD
33221  shift
33222  if test $# != 0; then
33223    # We chose a different compiler from the bogus one.
33224    # However, it has the same basename, so the bogon will be chosen
33225    # first if we set LD to just the basename; use the full file name.
33226    shift
33227    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
33228  fi
33229fi
33230fi
33231fi
33232LD=$ac_cv_prog_LD
33233if test -n "$LD"; then
33234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
33235$as_echo "$LD" >&6; }
33236else
33237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33238$as_echo "no" >&6; }
33239fi
33240
33241
33242
33243  # Only process if variable expands to non-empty
33244
33245  if test "x$LD" != x; then
33246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33247
33248  # First separate the path from the arguments. This will split at the first
33249  # space.
33250  complete="$LD"
33251  path="${complete%% *}"
33252  tmp="$complete EOL"
33253  arguments="${tmp#* }"
33254
33255  # Input might be given as Windows format, start by converting to
33256  # unix format.
33257  new_path=`$CYGPATH -u "$path"`
33258
33259  # Now try to locate executable using which
33260  new_path=`$WHICH "$new_path" 2> /dev/null`
33261  # bat and cmd files are not always considered executable in cygwin causing which
33262  # to not find them
33263  if test "x$new_path" = x \
33264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33266    new_path=`$CYGPATH -u "$path"`
33267  fi
33268  if test "x$new_path" = x; then
33269    # Oops. Which didn't find the executable.
33270    # The splitting of arguments from the executable at a space might have been incorrect,
33271    # since paths with space are more likely in Windows. Give it another try with the whole
33272    # argument.
33273    path="$complete"
33274    arguments="EOL"
33275    new_path=`$CYGPATH -u "$path"`
33276    new_path=`$WHICH "$new_path" 2> /dev/null`
33277    # bat and cmd files are not always considered executable in cygwin causing which
33278    # to not find them
33279    if test "x$new_path" = x \
33280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33282      new_path=`$CYGPATH -u "$path"`
33283    fi
33284    if test "x$new_path" = x; then
33285      # It's still not found. Now this is an unrecoverable error.
33286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33287$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33288      has_space=`$ECHO "$complete" | $GREP " "`
33289      if test "x$has_space" != x; then
33290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33292      fi
33293      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33294    fi
33295  fi
33296
33297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33300  # "foo.exe" is OK but "foo" is an error.
33301  #
33302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33303  # It is also a way to make sure we got the proper file name for the real test later on.
33304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33305  if test "x$test_shortpath" = x; then
33306    # Short path failed, file does not exist as specified.
33307    # Try adding .exe or .cmd
33308    if test -f "${new_path}.exe"; then
33309      input_to_shortpath="${new_path}.exe"
33310    elif test -f "${new_path}.cmd"; then
33311      input_to_shortpath="${new_path}.cmd"
33312    else
33313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
33314$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
33315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33317      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33318    fi
33319  else
33320    input_to_shortpath="$new_path"
33321  fi
33322
33323  # Call helper function which possibly converts this using DOS-style short mode.
33324  # If so, the updated path is stored in $new_path.
33325  new_path="$input_to_shortpath"
33326
33327  input_path="$input_to_shortpath"
33328  # Check if we need to convert this using DOS-style short mode. If the path
33329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33330  # take no chances and rewrite it.
33331  # Note: m4 eats our [], so we need to use [ and ] instead.
33332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33333  if test "x$has_forbidden_chars" != x; then
33334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33338      # Going to short mode and back again did indeed matter. Since short mode is
33339      # case insensitive, let's make it lowercase to improve readability.
33340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33341      # Now convert it back to Unix-style (cygpath)
33342      input_path=`$CYGPATH -u "$shortmode_path"`
33343      new_path="$input_path"
33344    fi
33345  fi
33346
33347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33348  if test "x$test_cygdrive_prefix" = x; then
33349    # As a simple fix, exclude /usr/bin since it's not a real path.
33350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33352      # a path prefixed by /cygdrive for fixpath to work.
33353      new_path="$CYGWIN_ROOT_PATH$input_path"
33354    fi
33355  fi
33356
33357  # remove trailing .exe if any
33358  new_path="${new_path/%.exe/}"
33359
33360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33361
33362  # First separate the path from the arguments. This will split at the first
33363  # space.
33364  complete="$LD"
33365  path="${complete%% *}"
33366  tmp="$complete EOL"
33367  arguments="${tmp#* }"
33368
33369  # Input might be given as Windows format, start by converting to
33370  # unix format.
33371  new_path="$path"
33372
33373  windows_path="$new_path"
33374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33375    unix_path=`$CYGPATH -u "$windows_path"`
33376    new_path="$unix_path"
33377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33379    new_path="$unix_path"
33380  fi
33381
33382
33383  # Now try to locate executable using which
33384  new_path=`$WHICH "$new_path" 2> /dev/null`
33385
33386  if test "x$new_path" = x; then
33387    # Oops. Which didn't find the executable.
33388    # The splitting of arguments from the executable at a space might have been incorrect,
33389    # since paths with space are more likely in Windows. Give it another try with the whole
33390    # argument.
33391    path="$complete"
33392    arguments="EOL"
33393    new_path="$path"
33394
33395  windows_path="$new_path"
33396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33397    unix_path=`$CYGPATH -u "$windows_path"`
33398    new_path="$unix_path"
33399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33401    new_path="$unix_path"
33402  fi
33403
33404
33405    new_path=`$WHICH "$new_path" 2> /dev/null`
33406    # bat and cmd files are not always considered executable in MSYS causing which
33407    # to not find them
33408    if test "x$new_path" = x \
33409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33411      new_path="$path"
33412
33413  windows_path="$new_path"
33414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33415    unix_path=`$CYGPATH -u "$windows_path"`
33416    new_path="$unix_path"
33417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33419    new_path="$unix_path"
33420  fi
33421
33422    fi
33423
33424    if test "x$new_path" = x; then
33425      # It's still not found. Now this is an unrecoverable error.
33426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33427$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33428      has_space=`$ECHO "$complete" | $GREP " "`
33429      if test "x$has_space" != x; then
33430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33432      fi
33433      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33434    fi
33435  fi
33436
33437  # Now new_path has a complete unix path to the binary
33438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33439    # Keep paths in /bin as-is, but remove trailing .exe if any
33440    new_path="${new_path/%.exe/}"
33441    # Do not save /bin paths to all_fixpath_prefixes!
33442  else
33443    # Not in mixed or Windows style, start by that.
33444    new_path=`cmd //c echo $new_path`
33445
33446  input_path="$new_path"
33447  # Check if we need to convert this using DOS-style short mode. If the path
33448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33449  # take no chances and rewrite it.
33450  # Note: m4 eats our [], so we need to use [ and ] instead.
33451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33452  if test "x$has_forbidden_chars" != x; then
33453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33455  fi
33456
33457    # Output is in $new_path
33458
33459  windows_path="$new_path"
33460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33461    unix_path=`$CYGPATH -u "$windows_path"`
33462    new_path="$unix_path"
33463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33465    new_path="$unix_path"
33466  fi
33467
33468    # remove trailing .exe if any
33469    new_path="${new_path/%.exe/}"
33470
33471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33473  fi
33474
33475    else
33476      # We're on a unix platform. Hooray! :)
33477      # First separate the path from the arguments. This will split at the first
33478      # space.
33479      complete="$LD"
33480      path="${complete%% *}"
33481      tmp="$complete EOL"
33482      arguments="${tmp#* }"
33483
33484      # Cannot rely on the command "which" here since it doesn't always work.
33485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33486      if test -z "$is_absolute_path"; then
33487        # Path to executable is not absolute. Find it.
33488        IFS_save="$IFS"
33489        IFS=:
33490        for p in $PATH; do
33491          if test -f "$p/$path" && test -x "$p/$path"; then
33492            new_path="$p/$path"
33493            break
33494          fi
33495        done
33496        IFS="$IFS_save"
33497      else
33498        # This is an absolute path, we can use it without further modifications.
33499        new_path="$path"
33500      fi
33501
33502      if test "x$new_path" = x; then
33503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
33504$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
33505        has_space=`$ECHO "$complete" | $GREP " "`
33506        if test "x$has_space" != x; then
33507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33509        fi
33510        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
33511      fi
33512    fi
33513
33514    # Now join together the path and the arguments once again
33515    if test "x$arguments" != xEOL; then
33516      new_complete="$new_path ${arguments% *}"
33517    else
33518      new_complete="$new_path"
33519    fi
33520
33521    if test "x$complete" != "x$new_complete"; then
33522      LD="$new_complete"
33523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
33524$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
33525    fi
33526  fi
33527
33528    # Verify that we indeed succeeded with this trick.
33529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33530$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33531    "$LD" --version > /dev/null
33532    if test $? -eq 0 ; then
33533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33534$as_echo "no" >&6; }
33535      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33536    else
33537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33538$as_echo "yes" >&6; }
33539    fi
33540    LDCXX="$LD"
33541  else
33542    # All other toolchains use the compiler to link.
33543    LD="$CC"
33544    LDCXX="$CXX"
33545  fi
33546
33547  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
33548
33549
33550  #
33551  # Setup the assembler (AS)
33552  #
33553  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
33554    # FIXME: should this really be solaris, or solstudio?
33555
33556
33557  # Publish this variable in the help.
33558
33559
33560  if [ -z "${AS+x}" ]; then
33561    # The variable is not set by user, try to locate tool using the code snippet
33562    for ac_prog in as
33563do
33564  # Extract the first word of "$ac_prog", so it can be a program name with args.
33565set dummy $ac_prog; ac_word=$2
33566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33567$as_echo_n "checking for $ac_word... " >&6; }
33568if ${ac_cv_path_AS+:} false; then :
33569  $as_echo_n "(cached) " >&6
33570else
33571  case $AS in
33572  [\\/]* | ?:[\\/]*)
33573  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33574  ;;
33575  *)
33576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33577for as_dir in $PATH
33578do
33579  IFS=$as_save_IFS
33580  test -z "$as_dir" && as_dir=.
33581    for ac_exec_ext in '' $ac_executable_extensions; do
33582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33583    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33585    break 2
33586  fi
33587done
33588  done
33589IFS=$as_save_IFS
33590
33591  ;;
33592esac
33593fi
33594AS=$ac_cv_path_AS
33595if test -n "$AS"; then
33596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33597$as_echo "$AS" >&6; }
33598else
33599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33600$as_echo "no" >&6; }
33601fi
33602
33603
33604  test -n "$AS" && break
33605done
33606
33607  else
33608    # The variable is set, but is it from the command line or the environment?
33609
33610    # Try to remove the string !AS! from our list.
33611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
33612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33613      # If it failed, the variable was not from the command line. Ignore it,
33614      # but warn the user (except for BASH, which is always set by the calling BASH).
33615      if test "xAS" != xBASH; then
33616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33617$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33618      fi
33619      # Try to locate tool using the code snippet
33620      for ac_prog in as
33621do
33622  # Extract the first word of "$ac_prog", so it can be a program name with args.
33623set dummy $ac_prog; ac_word=$2
33624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33625$as_echo_n "checking for $ac_word... " >&6; }
33626if ${ac_cv_path_AS+:} false; then :
33627  $as_echo_n "(cached) " >&6
33628else
33629  case $AS in
33630  [\\/]* | ?:[\\/]*)
33631  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33632  ;;
33633  *)
33634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33635for as_dir in $PATH
33636do
33637  IFS=$as_save_IFS
33638  test -z "$as_dir" && as_dir=.
33639    for ac_exec_ext in '' $ac_executable_extensions; do
33640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33641    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33643    break 2
33644  fi
33645done
33646  done
33647IFS=$as_save_IFS
33648
33649  ;;
33650esac
33651fi
33652AS=$ac_cv_path_AS
33653if test -n "$AS"; then
33654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33655$as_echo "$AS" >&6; }
33656else
33657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33658$as_echo "no" >&6; }
33659fi
33660
33661
33662  test -n "$AS" && break
33663done
33664
33665    else
33666      # If it succeeded, then it was overridden by the user. We will use it
33667      # for the tool.
33668
33669      # First remove it from the list of overridden variables, so we can test
33670      # for unknown variables in the end.
33671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33672
33673      # Check if we try to supply an empty value
33674      if test "x$AS" = x; then
33675        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
33676$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
33677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33678$as_echo_n "checking for AS... " >&6; }
33679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
33680$as_echo "disabled" >&6; }
33681      else
33682        # Check if the provided tool contains a complete path.
33683        tool_specified="$AS"
33684        tool_basename="${tool_specified##*/}"
33685        if test "x$tool_basename" = "x$tool_specified"; then
33686          # A command without a complete path is provided, search $PATH.
33687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33688$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33689          # Extract the first word of "$tool_basename", so it can be a program name with args.
33690set dummy $tool_basename; ac_word=$2
33691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33692$as_echo_n "checking for $ac_word... " >&6; }
33693if ${ac_cv_path_AS+:} false; then :
33694  $as_echo_n "(cached) " >&6
33695else
33696  case $AS in
33697  [\\/]* | ?:[\\/]*)
33698  ac_cv_path_AS="$AS" # Let the user override the test with a path.
33699  ;;
33700  *)
33701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33702for as_dir in $PATH
33703do
33704  IFS=$as_save_IFS
33705  test -z "$as_dir" && as_dir=.
33706    for ac_exec_ext in '' $ac_executable_extensions; do
33707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33708    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33710    break 2
33711  fi
33712done
33713  done
33714IFS=$as_save_IFS
33715
33716  ;;
33717esac
33718fi
33719AS=$ac_cv_path_AS
33720if test -n "$AS"; then
33721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33722$as_echo "$AS" >&6; }
33723else
33724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33725$as_echo "no" >&6; }
33726fi
33727
33728
33729          if test "x$AS" = x; then
33730            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33731          fi
33732        else
33733          # Otherwise we believe it is a complete path. Use it as it is.
33734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33735$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33736          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33737$as_echo_n "checking for AS... " >&6; }
33738          if test ! -x "$tool_specified"; then
33739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33740$as_echo "not found" >&6; }
33741            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33742          fi
33743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33744$as_echo "$tool_specified" >&6; }
33745        fi
33746      fi
33747    fi
33748  fi
33749
33750
33751
33752  # Only process if variable expands to non-empty
33753
33754  if test "x$AS" != x; then
33755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33756
33757  # First separate the path from the arguments. This will split at the first
33758  # space.
33759  complete="$AS"
33760  path="${complete%% *}"
33761  tmp="$complete EOL"
33762  arguments="${tmp#* }"
33763
33764  # Input might be given as Windows format, start by converting to
33765  # unix format.
33766  new_path=`$CYGPATH -u "$path"`
33767
33768  # Now try to locate executable using which
33769  new_path=`$WHICH "$new_path" 2> /dev/null`
33770  # bat and cmd files are not always considered executable in cygwin causing which
33771  # to not find them
33772  if test "x$new_path" = x \
33773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33775    new_path=`$CYGPATH -u "$path"`
33776  fi
33777  if test "x$new_path" = x; then
33778    # Oops. Which didn't find the executable.
33779    # The splitting of arguments from the executable at a space might have been incorrect,
33780    # since paths with space are more likely in Windows. Give it another try with the whole
33781    # argument.
33782    path="$complete"
33783    arguments="EOL"
33784    new_path=`$CYGPATH -u "$path"`
33785    new_path=`$WHICH "$new_path" 2> /dev/null`
33786    # bat and cmd files are not always considered executable in cygwin causing which
33787    # to not find them
33788    if test "x$new_path" = x \
33789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33791      new_path=`$CYGPATH -u "$path"`
33792    fi
33793    if test "x$new_path" = x; then
33794      # It's still not found. Now this is an unrecoverable error.
33795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33796$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33797      has_space=`$ECHO "$complete" | $GREP " "`
33798      if test "x$has_space" != x; then
33799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33801      fi
33802      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33803    fi
33804  fi
33805
33806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33809  # "foo.exe" is OK but "foo" is an error.
33810  #
33811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33812  # It is also a way to make sure we got the proper file name for the real test later on.
33813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33814  if test "x$test_shortpath" = x; then
33815    # Short path failed, file does not exist as specified.
33816    # Try adding .exe or .cmd
33817    if test -f "${new_path}.exe"; then
33818      input_to_shortpath="${new_path}.exe"
33819    elif test -f "${new_path}.cmd"; then
33820      input_to_shortpath="${new_path}.cmd"
33821    else
33822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33823$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33826      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33827    fi
33828  else
33829    input_to_shortpath="$new_path"
33830  fi
33831
33832  # Call helper function which possibly converts this using DOS-style short mode.
33833  # If so, the updated path is stored in $new_path.
33834  new_path="$input_to_shortpath"
33835
33836  input_path="$input_to_shortpath"
33837  # Check if we need to convert this using DOS-style short mode. If the path
33838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33839  # take no chances and rewrite it.
33840  # Note: m4 eats our [], so we need to use [ and ] instead.
33841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33842  if test "x$has_forbidden_chars" != x; then
33843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33847      # Going to short mode and back again did indeed matter. Since short mode is
33848      # case insensitive, let's make it lowercase to improve readability.
33849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33850      # Now convert it back to Unix-style (cygpath)
33851      input_path=`$CYGPATH -u "$shortmode_path"`
33852      new_path="$input_path"
33853    fi
33854  fi
33855
33856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33857  if test "x$test_cygdrive_prefix" = x; then
33858    # As a simple fix, exclude /usr/bin since it's not a real path.
33859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33861      # a path prefixed by /cygdrive for fixpath to work.
33862      new_path="$CYGWIN_ROOT_PATH$input_path"
33863    fi
33864  fi
33865
33866  # remove trailing .exe if any
33867  new_path="${new_path/%.exe/}"
33868
33869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33870
33871  # First separate the path from the arguments. This will split at the first
33872  # space.
33873  complete="$AS"
33874  path="${complete%% *}"
33875  tmp="$complete EOL"
33876  arguments="${tmp#* }"
33877
33878  # Input might be given as Windows format, start by converting to
33879  # unix format.
33880  new_path="$path"
33881
33882  windows_path="$new_path"
33883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33884    unix_path=`$CYGPATH -u "$windows_path"`
33885    new_path="$unix_path"
33886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33888    new_path="$unix_path"
33889  fi
33890
33891
33892  # Now try to locate executable using which
33893  new_path=`$WHICH "$new_path" 2> /dev/null`
33894
33895  if test "x$new_path" = x; then
33896    # Oops. Which didn't find the executable.
33897    # The splitting of arguments from the executable at a space might have been incorrect,
33898    # since paths with space are more likely in Windows. Give it another try with the whole
33899    # argument.
33900    path="$complete"
33901    arguments="EOL"
33902    new_path="$path"
33903
33904  windows_path="$new_path"
33905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33906    unix_path=`$CYGPATH -u "$windows_path"`
33907    new_path="$unix_path"
33908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33910    new_path="$unix_path"
33911  fi
33912
33913
33914    new_path=`$WHICH "$new_path" 2> /dev/null`
33915    # bat and cmd files are not always considered executable in MSYS causing which
33916    # to not find them
33917    if test "x$new_path" = x \
33918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33920      new_path="$path"
33921
33922  windows_path="$new_path"
33923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924    unix_path=`$CYGPATH -u "$windows_path"`
33925    new_path="$unix_path"
33926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33928    new_path="$unix_path"
33929  fi
33930
33931    fi
33932
33933    if test "x$new_path" = x; then
33934      # It's still not found. Now this is an unrecoverable error.
33935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33936$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33937      has_space=`$ECHO "$complete" | $GREP " "`
33938      if test "x$has_space" != x; then
33939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33941      fi
33942      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33943    fi
33944  fi
33945
33946  # Now new_path has a complete unix path to the binary
33947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33948    # Keep paths in /bin as-is, but remove trailing .exe if any
33949    new_path="${new_path/%.exe/}"
33950    # Do not save /bin paths to all_fixpath_prefixes!
33951  else
33952    # Not in mixed or Windows style, start by that.
33953    new_path=`cmd //c echo $new_path`
33954
33955  input_path="$new_path"
33956  # Check if we need to convert this using DOS-style short mode. If the path
33957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33958  # take no chances and rewrite it.
33959  # Note: m4 eats our [], so we need to use [ and ] instead.
33960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33961  if test "x$has_forbidden_chars" != x; then
33962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33964  fi
33965
33966    # Output is in $new_path
33967
33968  windows_path="$new_path"
33969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33970    unix_path=`$CYGPATH -u "$windows_path"`
33971    new_path="$unix_path"
33972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33974    new_path="$unix_path"
33975  fi
33976
33977    # remove trailing .exe if any
33978    new_path="${new_path/%.exe/}"
33979
33980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33982  fi
33983
33984    else
33985      # We're on a unix platform. Hooray! :)
33986      # First separate the path from the arguments. This will split at the first
33987      # space.
33988      complete="$AS"
33989      path="${complete%% *}"
33990      tmp="$complete EOL"
33991      arguments="${tmp#* }"
33992
33993      # Cannot rely on the command "which" here since it doesn't always work.
33994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33995      if test -z "$is_absolute_path"; then
33996        # Path to executable is not absolute. Find it.
33997        IFS_save="$IFS"
33998        IFS=:
33999        for p in $PATH; do
34000          if test -f "$p/$path" && test -x "$p/$path"; then
34001            new_path="$p/$path"
34002            break
34003          fi
34004        done
34005        IFS="$IFS_save"
34006      else
34007        # This is an absolute path, we can use it without further modifications.
34008        new_path="$path"
34009      fi
34010
34011      if test "x$new_path" = x; then
34012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
34013$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
34014        has_space=`$ECHO "$complete" | $GREP " "`
34015        if test "x$has_space" != x; then
34016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34018        fi
34019        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
34020      fi
34021    fi
34022
34023    # Now join together the path and the arguments once again
34024    if test "x$arguments" != xEOL; then
34025      new_complete="$new_path ${arguments% *}"
34026    else
34027      new_complete="$new_path"
34028    fi
34029
34030    if test "x$complete" != "x$new_complete"; then
34031      AS="$new_complete"
34032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
34033$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
34034    fi
34035  fi
34036
34037  else
34038    # FIXME: is this correct for microsoft?
34039    AS="$CC -c"
34040  fi
34041
34042
34043  #
34044  # Setup the archiver (AR)
34045  #
34046  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34047    # The corresponding ar tool is lib.exe (used to create static libraries)
34048    # Extract the first word of "lib", so it can be a program name with args.
34049set dummy lib; ac_word=$2
34050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34051$as_echo_n "checking for $ac_word... " >&6; }
34052if ${ac_cv_prog_AR+:} false; then :
34053  $as_echo_n "(cached) " >&6
34054else
34055  if test -n "$AR"; then
34056  ac_cv_prog_AR="$AR" # Let the user override the test.
34057else
34058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34059for as_dir in $PATH
34060do
34061  IFS=$as_save_IFS
34062  test -z "$as_dir" && as_dir=.
34063    for ac_exec_ext in '' $ac_executable_extensions; do
34064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34065    ac_cv_prog_AR="lib"
34066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34067    break 2
34068  fi
34069done
34070  done
34071IFS=$as_save_IFS
34072
34073fi
34074fi
34075AR=$ac_cv_prog_AR
34076if test -n "$AR"; then
34077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34078$as_echo "$AR" >&6; }
34079else
34080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34081$as_echo "no" >&6; }
34082fi
34083
34084
34085  else
34086
34087
34088  # Publish this variable in the help.
34089
34090
34091  if [ -z "${AR+x}" ]; then
34092    # The variable is not set by user, try to locate tool using the code snippet
34093    if test -n "$ac_tool_prefix"; then
34094  for ac_prog in ar
34095  do
34096    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34097set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34099$as_echo_n "checking for $ac_word... " >&6; }
34100if ${ac_cv_prog_AR+:} false; then :
34101  $as_echo_n "(cached) " >&6
34102else
34103  if test -n "$AR"; then
34104  ac_cv_prog_AR="$AR" # Let the user override the test.
34105else
34106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34107for as_dir in $PATH
34108do
34109  IFS=$as_save_IFS
34110  test -z "$as_dir" && as_dir=.
34111    for ac_exec_ext in '' $ac_executable_extensions; do
34112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34113    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
34114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34115    break 2
34116  fi
34117done
34118  done
34119IFS=$as_save_IFS
34120
34121fi
34122fi
34123AR=$ac_cv_prog_AR
34124if test -n "$AR"; then
34125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34126$as_echo "$AR" >&6; }
34127else
34128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34129$as_echo "no" >&6; }
34130fi
34131
34132
34133    test -n "$AR" && break
34134  done
34135fi
34136if test -z "$AR"; then
34137  ac_ct_AR=$AR
34138  for ac_prog in ar
34139do
34140  # Extract the first word of "$ac_prog", so it can be a program name with args.
34141set dummy $ac_prog; ac_word=$2
34142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34143$as_echo_n "checking for $ac_word... " >&6; }
34144if ${ac_cv_prog_ac_ct_AR+:} false; then :
34145  $as_echo_n "(cached) " >&6
34146else
34147  if test -n "$ac_ct_AR"; then
34148  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
34149else
34150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34151for as_dir in $PATH
34152do
34153  IFS=$as_save_IFS
34154  test -z "$as_dir" && as_dir=.
34155    for ac_exec_ext in '' $ac_executable_extensions; do
34156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34157    ac_cv_prog_ac_ct_AR="$ac_prog"
34158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34159    break 2
34160  fi
34161done
34162  done
34163IFS=$as_save_IFS
34164
34165fi
34166fi
34167ac_ct_AR=$ac_cv_prog_ac_ct_AR
34168if test -n "$ac_ct_AR"; then
34169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34170$as_echo "$ac_ct_AR" >&6; }
34171else
34172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34173$as_echo "no" >&6; }
34174fi
34175
34176
34177  test -n "$ac_ct_AR" && break
34178done
34179
34180  if test "x$ac_ct_AR" = x; then
34181    AR=""
34182  else
34183    case $cross_compiling:$ac_tool_warned in
34184yes:)
34185{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34186$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34187ac_tool_warned=yes ;;
34188esac
34189    AR=$ac_ct_AR
34190  fi
34191fi
34192
34193  else
34194    # The variable is set, but is it from the command line or the environment?
34195
34196    # Try to remove the string !AR! from our list.
34197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
34198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34199      # If it failed, the variable was not from the command line. Ignore it,
34200      # but warn the user (except for BASH, which is always set by the calling BASH).
34201      if test "xAR" != xBASH; then
34202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
34203$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
34204      fi
34205      # Try to locate tool using the code snippet
34206      if test -n "$ac_tool_prefix"; then
34207  for ac_prog in ar
34208  do
34209    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34210set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34212$as_echo_n "checking for $ac_word... " >&6; }
34213if ${ac_cv_prog_AR+:} false; then :
34214  $as_echo_n "(cached) " >&6
34215else
34216  if test -n "$AR"; then
34217  ac_cv_prog_AR="$AR" # Let the user override the test.
34218else
34219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34220for as_dir in $PATH
34221do
34222  IFS=$as_save_IFS
34223  test -z "$as_dir" && as_dir=.
34224    for ac_exec_ext in '' $ac_executable_extensions; do
34225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34226    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
34227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34228    break 2
34229  fi
34230done
34231  done
34232IFS=$as_save_IFS
34233
34234fi
34235fi
34236AR=$ac_cv_prog_AR
34237if test -n "$AR"; then
34238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34239$as_echo "$AR" >&6; }
34240else
34241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34242$as_echo "no" >&6; }
34243fi
34244
34245
34246    test -n "$AR" && break
34247  done
34248fi
34249if test -z "$AR"; then
34250  ac_ct_AR=$AR
34251  for ac_prog in ar
34252do
34253  # Extract the first word of "$ac_prog", so it can be a program name with args.
34254set dummy $ac_prog; ac_word=$2
34255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34256$as_echo_n "checking for $ac_word... " >&6; }
34257if ${ac_cv_prog_ac_ct_AR+:} false; then :
34258  $as_echo_n "(cached) " >&6
34259else
34260  if test -n "$ac_ct_AR"; then
34261  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
34262else
34263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34264for as_dir in $PATH
34265do
34266  IFS=$as_save_IFS
34267  test -z "$as_dir" && as_dir=.
34268    for ac_exec_ext in '' $ac_executable_extensions; do
34269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34270    ac_cv_prog_ac_ct_AR="$ac_prog"
34271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34272    break 2
34273  fi
34274done
34275  done
34276IFS=$as_save_IFS
34277
34278fi
34279fi
34280ac_ct_AR=$ac_cv_prog_ac_ct_AR
34281if test -n "$ac_ct_AR"; then
34282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
34283$as_echo "$ac_ct_AR" >&6; }
34284else
34285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34286$as_echo "no" >&6; }
34287fi
34288
34289
34290  test -n "$ac_ct_AR" && break
34291done
34292
34293  if test "x$ac_ct_AR" = x; then
34294    AR=""
34295  else
34296    case $cross_compiling:$ac_tool_warned in
34297yes:)
34298{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34299$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34300ac_tool_warned=yes ;;
34301esac
34302    AR=$ac_ct_AR
34303  fi
34304fi
34305
34306    else
34307      # If it succeeded, then it was overridden by the user. We will use it
34308      # for the tool.
34309
34310      # First remove it from the list of overridden variables, so we can test
34311      # for unknown variables in the end.
34312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34313
34314      # Check if we try to supply an empty value
34315      if test "x$AR" = x; then
34316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
34317$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
34318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34319$as_echo_n "checking for AR... " >&6; }
34320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34321$as_echo "disabled" >&6; }
34322      else
34323        # Check if the provided tool contains a complete path.
34324        tool_specified="$AR"
34325        tool_basename="${tool_specified##*/}"
34326        if test "x$tool_basename" = "x$tool_specified"; then
34327          # A command without a complete path is provided, search $PATH.
34328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
34329$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
34330          # Extract the first word of "$tool_basename", so it can be a program name with args.
34331set dummy $tool_basename; ac_word=$2
34332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34333$as_echo_n "checking for $ac_word... " >&6; }
34334if ${ac_cv_path_AR+:} false; then :
34335  $as_echo_n "(cached) " >&6
34336else
34337  case $AR in
34338  [\\/]* | ?:[\\/]*)
34339  ac_cv_path_AR="$AR" # Let the user override the test with a path.
34340  ;;
34341  *)
34342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34343for as_dir in $PATH
34344do
34345  IFS=$as_save_IFS
34346  test -z "$as_dir" && as_dir=.
34347    for ac_exec_ext in '' $ac_executable_extensions; do
34348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34349    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
34350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34351    break 2
34352  fi
34353done
34354  done
34355IFS=$as_save_IFS
34356
34357  ;;
34358esac
34359fi
34360AR=$ac_cv_path_AR
34361if test -n "$AR"; then
34362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
34363$as_echo "$AR" >&6; }
34364else
34365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34366$as_echo "no" >&6; }
34367fi
34368
34369
34370          if test "x$AR" = x; then
34371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34372          fi
34373        else
34374          # Otherwise we believe it is a complete path. Use it as it is.
34375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
34376$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
34377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
34378$as_echo_n "checking for AR... " >&6; }
34379          if test ! -x "$tool_specified"; then
34380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34381$as_echo "not found" >&6; }
34382            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
34383          fi
34384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34385$as_echo "$tool_specified" >&6; }
34386        fi
34387      fi
34388    fi
34389  fi
34390
34391
34392  fi
34393
34394  # Only process if variable expands to non-empty
34395
34396  if test "x$AR" != x; then
34397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34398
34399  # First separate the path from the arguments. This will split at the first
34400  # space.
34401  complete="$AR"
34402  path="${complete%% *}"
34403  tmp="$complete EOL"
34404  arguments="${tmp#* }"
34405
34406  # Input might be given as Windows format, start by converting to
34407  # unix format.
34408  new_path=`$CYGPATH -u "$path"`
34409
34410  # Now try to locate executable using which
34411  new_path=`$WHICH "$new_path" 2> /dev/null`
34412  # bat and cmd files are not always considered executable in cygwin causing which
34413  # to not find them
34414  if test "x$new_path" = x \
34415      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34416      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34417    new_path=`$CYGPATH -u "$path"`
34418  fi
34419  if test "x$new_path" = x; then
34420    # Oops. Which didn't find the executable.
34421    # The splitting of arguments from the executable at a space might have been incorrect,
34422    # since paths with space are more likely in Windows. Give it another try with the whole
34423    # argument.
34424    path="$complete"
34425    arguments="EOL"
34426    new_path=`$CYGPATH -u "$path"`
34427    new_path=`$WHICH "$new_path" 2> /dev/null`
34428    # bat and cmd files are not always considered executable in cygwin causing which
34429    # to not find them
34430    if test "x$new_path" = x \
34431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34433      new_path=`$CYGPATH -u "$path"`
34434    fi
34435    if test "x$new_path" = x; then
34436      # It's still not found. Now this is an unrecoverable error.
34437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34438$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34439      has_space=`$ECHO "$complete" | $GREP " "`
34440      if test "x$has_space" != x; then
34441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34443      fi
34444      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34445    fi
34446  fi
34447
34448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34451  # "foo.exe" is OK but "foo" is an error.
34452  #
34453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34454  # It is also a way to make sure we got the proper file name for the real test later on.
34455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34456  if test "x$test_shortpath" = x; then
34457    # Short path failed, file does not exist as specified.
34458    # Try adding .exe or .cmd
34459    if test -f "${new_path}.exe"; then
34460      input_to_shortpath="${new_path}.exe"
34461    elif test -f "${new_path}.cmd"; then
34462      input_to_shortpath="${new_path}.cmd"
34463    else
34464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
34465$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
34466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34468      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34469    fi
34470  else
34471    input_to_shortpath="$new_path"
34472  fi
34473
34474  # Call helper function which possibly converts this using DOS-style short mode.
34475  # If so, the updated path is stored in $new_path.
34476  new_path="$input_to_shortpath"
34477
34478  input_path="$input_to_shortpath"
34479  # Check if we need to convert this using DOS-style short mode. If the path
34480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34481  # take no chances and rewrite it.
34482  # Note: m4 eats our [], so we need to use [ and ] instead.
34483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34484  if test "x$has_forbidden_chars" != x; then
34485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34489      # Going to short mode and back again did indeed matter. Since short mode is
34490      # case insensitive, let's make it lowercase to improve readability.
34491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34492      # Now convert it back to Unix-style (cygpath)
34493      input_path=`$CYGPATH -u "$shortmode_path"`
34494      new_path="$input_path"
34495    fi
34496  fi
34497
34498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34499  if test "x$test_cygdrive_prefix" = x; then
34500    # As a simple fix, exclude /usr/bin since it's not a real path.
34501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34503      # a path prefixed by /cygdrive for fixpath to work.
34504      new_path="$CYGWIN_ROOT_PATH$input_path"
34505    fi
34506  fi
34507
34508  # remove trailing .exe if any
34509  new_path="${new_path/%.exe/}"
34510
34511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34512
34513  # First separate the path from the arguments. This will split at the first
34514  # space.
34515  complete="$AR"
34516  path="${complete%% *}"
34517  tmp="$complete EOL"
34518  arguments="${tmp#* }"
34519
34520  # Input might be given as Windows format, start by converting to
34521  # unix format.
34522  new_path="$path"
34523
34524  windows_path="$new_path"
34525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34526    unix_path=`$CYGPATH -u "$windows_path"`
34527    new_path="$unix_path"
34528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34530    new_path="$unix_path"
34531  fi
34532
34533
34534  # Now try to locate executable using which
34535  new_path=`$WHICH "$new_path" 2> /dev/null`
34536
34537  if test "x$new_path" = x; then
34538    # Oops. Which didn't find the executable.
34539    # The splitting of arguments from the executable at a space might have been incorrect,
34540    # since paths with space are more likely in Windows. Give it another try with the whole
34541    # argument.
34542    path="$complete"
34543    arguments="EOL"
34544    new_path="$path"
34545
34546  windows_path="$new_path"
34547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34548    unix_path=`$CYGPATH -u "$windows_path"`
34549    new_path="$unix_path"
34550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34552    new_path="$unix_path"
34553  fi
34554
34555
34556    new_path=`$WHICH "$new_path" 2> /dev/null`
34557    # bat and cmd files are not always considered executable in MSYS causing which
34558    # to not find them
34559    if test "x$new_path" = x \
34560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34562      new_path="$path"
34563
34564  windows_path="$new_path"
34565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34566    unix_path=`$CYGPATH -u "$windows_path"`
34567    new_path="$unix_path"
34568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34570    new_path="$unix_path"
34571  fi
34572
34573    fi
34574
34575    if test "x$new_path" = x; then
34576      # It's still not found. Now this is an unrecoverable error.
34577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34578$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34579      has_space=`$ECHO "$complete" | $GREP " "`
34580      if test "x$has_space" != x; then
34581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34583      fi
34584      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34585    fi
34586  fi
34587
34588  # Now new_path has a complete unix path to the binary
34589  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34590    # Keep paths in /bin as-is, but remove trailing .exe if any
34591    new_path="${new_path/%.exe/}"
34592    # Do not save /bin paths to all_fixpath_prefixes!
34593  else
34594    # Not in mixed or Windows style, start by that.
34595    new_path=`cmd //c echo $new_path`
34596
34597  input_path="$new_path"
34598  # Check if we need to convert this using DOS-style short mode. If the path
34599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34600  # take no chances and rewrite it.
34601  # Note: m4 eats our [], so we need to use [ and ] instead.
34602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34603  if test "x$has_forbidden_chars" != x; then
34604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34606  fi
34607
34608    # Output is in $new_path
34609
34610  windows_path="$new_path"
34611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34612    unix_path=`$CYGPATH -u "$windows_path"`
34613    new_path="$unix_path"
34614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34616    new_path="$unix_path"
34617  fi
34618
34619    # remove trailing .exe if any
34620    new_path="${new_path/%.exe/}"
34621
34622    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34623    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34624  fi
34625
34626    else
34627      # We're on a unix platform. Hooray! :)
34628      # First separate the path from the arguments. This will split at the first
34629      # space.
34630      complete="$AR"
34631      path="${complete%% *}"
34632      tmp="$complete EOL"
34633      arguments="${tmp#* }"
34634
34635      # Cannot rely on the command "which" here since it doesn't always work.
34636      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34637      if test -z "$is_absolute_path"; then
34638        # Path to executable is not absolute. Find it.
34639        IFS_save="$IFS"
34640        IFS=:
34641        for p in $PATH; do
34642          if test -f "$p/$path" && test -x "$p/$path"; then
34643            new_path="$p/$path"
34644            break
34645          fi
34646        done
34647        IFS="$IFS_save"
34648      else
34649        # This is an absolute path, we can use it without further modifications.
34650        new_path="$path"
34651      fi
34652
34653      if test "x$new_path" = x; then
34654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34655$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34656        has_space=`$ECHO "$complete" | $GREP " "`
34657        if test "x$has_space" != x; then
34658          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34659$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34660        fi
34661        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34662      fi
34663    fi
34664
34665    # Now join together the path and the arguments once again
34666    if test "x$arguments" != xEOL; then
34667      new_complete="$new_path ${arguments% *}"
34668    else
34669      new_complete="$new_path"
34670    fi
34671
34672    if test "x$complete" != "x$new_complete"; then
34673      AR="$new_complete"
34674      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34675$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34676    fi
34677  fi
34678
34679
34680
34681  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34682
34683
34684  # Publish this variable in the help.
34685
34686
34687  if [ -z "${LIPO+x}" ]; then
34688    # The variable is not set by user, try to locate tool using the code snippet
34689    for ac_prog in lipo
34690do
34691  # Extract the first word of "$ac_prog", so it can be a program name with args.
34692set dummy $ac_prog; ac_word=$2
34693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34694$as_echo_n "checking for $ac_word... " >&6; }
34695if ${ac_cv_path_LIPO+:} false; then :
34696  $as_echo_n "(cached) " >&6
34697else
34698  case $LIPO in
34699  [\\/]* | ?:[\\/]*)
34700  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34701  ;;
34702  *)
34703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34704for as_dir in $PATH
34705do
34706  IFS=$as_save_IFS
34707  test -z "$as_dir" && as_dir=.
34708    for ac_exec_ext in '' $ac_executable_extensions; do
34709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34710    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34712    break 2
34713  fi
34714done
34715  done
34716IFS=$as_save_IFS
34717
34718  ;;
34719esac
34720fi
34721LIPO=$ac_cv_path_LIPO
34722if test -n "$LIPO"; then
34723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34724$as_echo "$LIPO" >&6; }
34725else
34726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34727$as_echo "no" >&6; }
34728fi
34729
34730
34731  test -n "$LIPO" && break
34732done
34733
34734  else
34735    # The variable is set, but is it from the command line or the environment?
34736
34737    # Try to remove the string !LIPO! from our list.
34738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34740      # If it failed, the variable was not from the command line. Ignore it,
34741      # but warn the user (except for BASH, which is always set by the calling BASH).
34742      if test "xLIPO" != xBASH; then
34743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34744$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34745      fi
34746      # Try to locate tool using the code snippet
34747      for ac_prog in lipo
34748do
34749  # Extract the first word of "$ac_prog", so it can be a program name with args.
34750set dummy $ac_prog; ac_word=$2
34751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34752$as_echo_n "checking for $ac_word... " >&6; }
34753if ${ac_cv_path_LIPO+:} false; then :
34754  $as_echo_n "(cached) " >&6
34755else
34756  case $LIPO in
34757  [\\/]* | ?:[\\/]*)
34758  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34759  ;;
34760  *)
34761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34762for as_dir in $PATH
34763do
34764  IFS=$as_save_IFS
34765  test -z "$as_dir" && as_dir=.
34766    for ac_exec_ext in '' $ac_executable_extensions; do
34767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34768    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34770    break 2
34771  fi
34772done
34773  done
34774IFS=$as_save_IFS
34775
34776  ;;
34777esac
34778fi
34779LIPO=$ac_cv_path_LIPO
34780if test -n "$LIPO"; then
34781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34782$as_echo "$LIPO" >&6; }
34783else
34784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34785$as_echo "no" >&6; }
34786fi
34787
34788
34789  test -n "$LIPO" && break
34790done
34791
34792    else
34793      # If it succeeded, then it was overridden by the user. We will use it
34794      # for the tool.
34795
34796      # First remove it from the list of overridden variables, so we can test
34797      # for unknown variables in the end.
34798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34799
34800      # Check if we try to supply an empty value
34801      if test "x$LIPO" = x; then
34802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
34803$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
34804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34805$as_echo_n "checking for LIPO... " >&6; }
34806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
34807$as_echo "disabled" >&6; }
34808      else
34809        # Check if the provided tool contains a complete path.
34810        tool_specified="$LIPO"
34811        tool_basename="${tool_specified##*/}"
34812        if test "x$tool_basename" = "x$tool_specified"; then
34813          # A command without a complete path is provided, search $PATH.
34814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34815$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34816          # Extract the first word of "$tool_basename", so it can be a program name with args.
34817set dummy $tool_basename; ac_word=$2
34818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34819$as_echo_n "checking for $ac_word... " >&6; }
34820if ${ac_cv_path_LIPO+:} false; then :
34821  $as_echo_n "(cached) " >&6
34822else
34823  case $LIPO in
34824  [\\/]* | ?:[\\/]*)
34825  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34826  ;;
34827  *)
34828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34829for as_dir in $PATH
34830do
34831  IFS=$as_save_IFS
34832  test -z "$as_dir" && as_dir=.
34833    for ac_exec_ext in '' $ac_executable_extensions; do
34834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34835    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34837    break 2
34838  fi
34839done
34840  done
34841IFS=$as_save_IFS
34842
34843  ;;
34844esac
34845fi
34846LIPO=$ac_cv_path_LIPO
34847if test -n "$LIPO"; then
34848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34849$as_echo "$LIPO" >&6; }
34850else
34851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34852$as_echo "no" >&6; }
34853fi
34854
34855
34856          if test "x$LIPO" = x; then
34857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34858          fi
34859        else
34860          # Otherwise we believe it is a complete path. Use it as it is.
34861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34862$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34864$as_echo_n "checking for LIPO... " >&6; }
34865          if test ! -x "$tool_specified"; then
34866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34867$as_echo "not found" >&6; }
34868            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34869          fi
34870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34871$as_echo "$tool_specified" >&6; }
34872        fi
34873      fi
34874    fi
34875  fi
34876
34877
34878
34879  # Only process if variable expands to non-empty
34880
34881  if test "x$LIPO" != x; then
34882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34883
34884  # First separate the path from the arguments. This will split at the first
34885  # space.
34886  complete="$LIPO"
34887  path="${complete%% *}"
34888  tmp="$complete EOL"
34889  arguments="${tmp#* }"
34890
34891  # Input might be given as Windows format, start by converting to
34892  # unix format.
34893  new_path=`$CYGPATH -u "$path"`
34894
34895  # Now try to locate executable using which
34896  new_path=`$WHICH "$new_path" 2> /dev/null`
34897  # bat and cmd files are not always considered executable in cygwin causing which
34898  # to not find them
34899  if test "x$new_path" = x \
34900      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34901      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34902    new_path=`$CYGPATH -u "$path"`
34903  fi
34904  if test "x$new_path" = x; then
34905    # Oops. Which didn't find the executable.
34906    # The splitting of arguments from the executable at a space might have been incorrect,
34907    # since paths with space are more likely in Windows. Give it another try with the whole
34908    # argument.
34909    path="$complete"
34910    arguments="EOL"
34911    new_path=`$CYGPATH -u "$path"`
34912    new_path=`$WHICH "$new_path" 2> /dev/null`
34913    # bat and cmd files are not always considered executable in cygwin causing which
34914    # to not find them
34915    if test "x$new_path" = x \
34916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34918      new_path=`$CYGPATH -u "$path"`
34919    fi
34920    if test "x$new_path" = x; then
34921      # It's still not found. Now this is an unrecoverable error.
34922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34923$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34924      has_space=`$ECHO "$complete" | $GREP " "`
34925      if test "x$has_space" != x; then
34926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34928      fi
34929      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34930    fi
34931  fi
34932
34933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34936  # "foo.exe" is OK but "foo" is an error.
34937  #
34938  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34939  # It is also a way to make sure we got the proper file name for the real test later on.
34940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34941  if test "x$test_shortpath" = x; then
34942    # Short path failed, file does not exist as specified.
34943    # Try adding .exe or .cmd
34944    if test -f "${new_path}.exe"; then
34945      input_to_shortpath="${new_path}.exe"
34946    elif test -f "${new_path}.cmd"; then
34947      input_to_shortpath="${new_path}.cmd"
34948    else
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34950$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34951      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34952$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34953      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34954    fi
34955  else
34956    input_to_shortpath="$new_path"
34957  fi
34958
34959  # Call helper function which possibly converts this using DOS-style short mode.
34960  # If so, the updated path is stored in $new_path.
34961  new_path="$input_to_shortpath"
34962
34963  input_path="$input_to_shortpath"
34964  # Check if we need to convert this using DOS-style short mode. If the path
34965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34966  # take no chances and rewrite it.
34967  # Note: m4 eats our [], so we need to use [ and ] instead.
34968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34969  if test "x$has_forbidden_chars" != x; then
34970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34974      # Going to short mode and back again did indeed matter. Since short mode is
34975      # case insensitive, let's make it lowercase to improve readability.
34976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34977      # Now convert it back to Unix-style (cygpath)
34978      input_path=`$CYGPATH -u "$shortmode_path"`
34979      new_path="$input_path"
34980    fi
34981  fi
34982
34983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34984  if test "x$test_cygdrive_prefix" = x; then
34985    # As a simple fix, exclude /usr/bin since it's not a real path.
34986    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34988      # a path prefixed by /cygdrive for fixpath to work.
34989      new_path="$CYGWIN_ROOT_PATH$input_path"
34990    fi
34991  fi
34992
34993  # remove trailing .exe if any
34994  new_path="${new_path/%.exe/}"
34995
34996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34997
34998  # First separate the path from the arguments. This will split at the first
34999  # space.
35000  complete="$LIPO"
35001  path="${complete%% *}"
35002  tmp="$complete EOL"
35003  arguments="${tmp#* }"
35004
35005  # Input might be given as Windows format, start by converting to
35006  # unix format.
35007  new_path="$path"
35008
35009  windows_path="$new_path"
35010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35011    unix_path=`$CYGPATH -u "$windows_path"`
35012    new_path="$unix_path"
35013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35015    new_path="$unix_path"
35016  fi
35017
35018
35019  # Now try to locate executable using which
35020  new_path=`$WHICH "$new_path" 2> /dev/null`
35021
35022  if test "x$new_path" = x; then
35023    # Oops. Which didn't find the executable.
35024    # The splitting of arguments from the executable at a space might have been incorrect,
35025    # since paths with space are more likely in Windows. Give it another try with the whole
35026    # argument.
35027    path="$complete"
35028    arguments="EOL"
35029    new_path="$path"
35030
35031  windows_path="$new_path"
35032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35033    unix_path=`$CYGPATH -u "$windows_path"`
35034    new_path="$unix_path"
35035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35037    new_path="$unix_path"
35038  fi
35039
35040
35041    new_path=`$WHICH "$new_path" 2> /dev/null`
35042    # bat and cmd files are not always considered executable in MSYS causing which
35043    # to not find them
35044    if test "x$new_path" = x \
35045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35047      new_path="$path"
35048
35049  windows_path="$new_path"
35050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35051    unix_path=`$CYGPATH -u "$windows_path"`
35052    new_path="$unix_path"
35053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35055    new_path="$unix_path"
35056  fi
35057
35058    fi
35059
35060    if test "x$new_path" = x; then
35061      # It's still not found. Now this is an unrecoverable error.
35062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
35063$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
35064      has_space=`$ECHO "$complete" | $GREP " "`
35065      if test "x$has_space" != x; then
35066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35068      fi
35069      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
35070    fi
35071  fi
35072
35073  # Now new_path has a complete unix path to the binary
35074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35075    # Keep paths in /bin as-is, but remove trailing .exe if any
35076    new_path="${new_path/%.exe/}"
35077    # Do not save /bin paths to all_fixpath_prefixes!
35078  else
35079    # Not in mixed or Windows style, start by that.
35080    new_path=`cmd //c echo $new_path`
35081
35082  input_path="$new_path"
35083  # Check if we need to convert this using DOS-style short mode. If the path
35084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35085  # take no chances and rewrite it.
35086  # Note: m4 eats our [], so we need to use [ and ] instead.
35087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35088  if test "x$has_forbidden_chars" != x; then
35089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35091  fi
35092
35093    # Output is in $new_path
35094
35095  windows_path="$new_path"
35096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35097    unix_path=`$CYGPATH -u "$windows_path"`
35098    new_path="$unix_path"
35099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35101    new_path="$unix_path"
35102  fi
35103
35104    # remove trailing .exe if any
35105    new_path="${new_path/%.exe/}"
35106
35107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35109  fi
35110
35111    else
35112      # We're on a unix platform. Hooray! :)
35113      # First separate the path from the arguments. This will split at the first
35114      # space.
35115      complete="$LIPO"
35116      path="${complete%% *}"
35117      tmp="$complete EOL"
35118      arguments="${tmp#* }"
35119
35120      # Cannot rely on the command "which" here since it doesn't always work.
35121      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35122      if test -z "$is_absolute_path"; then
35123        # Path to executable is not absolute. Find it.
35124        IFS_save="$IFS"
35125        IFS=:
35126        for p in $PATH; do
35127          if test -f "$p/$path" && test -x "$p/$path"; then
35128            new_path="$p/$path"
35129            break
35130          fi
35131        done
35132        IFS="$IFS_save"
35133      else
35134        # This is an absolute path, we can use it without further modifications.
35135        new_path="$path"
35136      fi
35137
35138      if test "x$new_path" = x; then
35139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
35140$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
35141        has_space=`$ECHO "$complete" | $GREP " "`
35142        if test "x$has_space" != x; then
35143          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35145        fi
35146        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
35147      fi
35148    fi
35149
35150    # Now join together the path and the arguments once again
35151    if test "x$arguments" != xEOL; then
35152      new_complete="$new_path ${arguments% *}"
35153    else
35154      new_complete="$new_path"
35155    fi
35156
35157    if test "x$complete" != "x$new_complete"; then
35158      LIPO="$new_complete"
35159      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
35160$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
35161    fi
35162  fi
35163
35164  fi
35165
35166  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35167    # Extract the first word of "mt", so it can be a program name with args.
35168set dummy mt; ac_word=$2
35169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35170$as_echo_n "checking for $ac_word... " >&6; }
35171if ${ac_cv_prog_MT+:} false; then :
35172  $as_echo_n "(cached) " >&6
35173else
35174  if test -n "$MT"; then
35175  ac_cv_prog_MT="$MT" # Let the user override the test.
35176else
35177  ac_prog_rejected=no
35178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35179for as_dir in $PATH
35180do
35181  IFS=$as_save_IFS
35182  test -z "$as_dir" && as_dir=.
35183    for ac_exec_ext in '' $ac_executable_extensions; do
35184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35185    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
35186       ac_prog_rejected=yes
35187       continue
35188     fi
35189    ac_cv_prog_MT="mt"
35190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35191    break 2
35192  fi
35193done
35194  done
35195IFS=$as_save_IFS
35196
35197if test $ac_prog_rejected = yes; then
35198  # We found a bogon in the path, so make sure we never use it.
35199  set dummy $ac_cv_prog_MT
35200  shift
35201  if test $# != 0; then
35202    # We chose a different compiler from the bogus one.
35203    # However, it has the same basename, so the bogon will be chosen
35204    # first if we set MT to just the basename; use the full file name.
35205    shift
35206    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
35207  fi
35208fi
35209fi
35210fi
35211MT=$ac_cv_prog_MT
35212if test -n "$MT"; then
35213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
35214$as_echo "$MT" >&6; }
35215else
35216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35217$as_echo "no" >&6; }
35218fi
35219
35220
35221
35222  # Only process if variable expands to non-empty
35223
35224  if test "x$MT" != x; then
35225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35226
35227  # First separate the path from the arguments. This will split at the first
35228  # space.
35229  complete="$MT"
35230  path="${complete%% *}"
35231  tmp="$complete EOL"
35232  arguments="${tmp#* }"
35233
35234  # Input might be given as Windows format, start by converting to
35235  # unix format.
35236  new_path=`$CYGPATH -u "$path"`
35237
35238  # Now try to locate executable using which
35239  new_path=`$WHICH "$new_path" 2> /dev/null`
35240  # bat and cmd files are not always considered executable in cygwin causing which
35241  # to not find them
35242  if test "x$new_path" = x \
35243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35245    new_path=`$CYGPATH -u "$path"`
35246  fi
35247  if test "x$new_path" = x; then
35248    # Oops. Which didn't find the executable.
35249    # The splitting of arguments from the executable at a space might have been incorrect,
35250    # since paths with space are more likely in Windows. Give it another try with the whole
35251    # argument.
35252    path="$complete"
35253    arguments="EOL"
35254    new_path=`$CYGPATH -u "$path"`
35255    new_path=`$WHICH "$new_path" 2> /dev/null`
35256    # bat and cmd files are not always considered executable in cygwin causing which
35257    # to not find them
35258    if test "x$new_path" = x \
35259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35261      new_path=`$CYGPATH -u "$path"`
35262    fi
35263    if test "x$new_path" = x; then
35264      # It's still not found. Now this is an unrecoverable error.
35265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35266$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35267      has_space=`$ECHO "$complete" | $GREP " "`
35268      if test "x$has_space" != x; then
35269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35271      fi
35272      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35273    fi
35274  fi
35275
35276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35279  # "foo.exe" is OK but "foo" is an error.
35280  #
35281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35282  # It is also a way to make sure we got the proper file name for the real test later on.
35283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35284  if test "x$test_shortpath" = x; then
35285    # Short path failed, file does not exist as specified.
35286    # Try adding .exe or .cmd
35287    if test -f "${new_path}.exe"; then
35288      input_to_shortpath="${new_path}.exe"
35289    elif test -f "${new_path}.cmd"; then
35290      input_to_shortpath="${new_path}.cmd"
35291    else
35292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
35293$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
35294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35296      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35297    fi
35298  else
35299    input_to_shortpath="$new_path"
35300  fi
35301
35302  # Call helper function which possibly converts this using DOS-style short mode.
35303  # If so, the updated path is stored in $new_path.
35304  new_path="$input_to_shortpath"
35305
35306  input_path="$input_to_shortpath"
35307  # Check if we need to convert this using DOS-style short mode. If the path
35308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35309  # take no chances and rewrite it.
35310  # Note: m4 eats our [], so we need to use [ and ] instead.
35311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35312  if test "x$has_forbidden_chars" != x; then
35313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35317      # Going to short mode and back again did indeed matter. Since short mode is
35318      # case insensitive, let's make it lowercase to improve readability.
35319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35320      # Now convert it back to Unix-style (cygpath)
35321      input_path=`$CYGPATH -u "$shortmode_path"`
35322      new_path="$input_path"
35323    fi
35324  fi
35325
35326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35327  if test "x$test_cygdrive_prefix" = x; then
35328    # As a simple fix, exclude /usr/bin since it's not a real path.
35329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35331      # a path prefixed by /cygdrive for fixpath to work.
35332      new_path="$CYGWIN_ROOT_PATH$input_path"
35333    fi
35334  fi
35335
35336  # remove trailing .exe if any
35337  new_path="${new_path/%.exe/}"
35338
35339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35340
35341  # First separate the path from the arguments. This will split at the first
35342  # space.
35343  complete="$MT"
35344  path="${complete%% *}"
35345  tmp="$complete EOL"
35346  arguments="${tmp#* }"
35347
35348  # Input might be given as Windows format, start by converting to
35349  # unix format.
35350  new_path="$path"
35351
35352  windows_path="$new_path"
35353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35354    unix_path=`$CYGPATH -u "$windows_path"`
35355    new_path="$unix_path"
35356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35358    new_path="$unix_path"
35359  fi
35360
35361
35362  # Now try to locate executable using which
35363  new_path=`$WHICH "$new_path" 2> /dev/null`
35364
35365  if test "x$new_path" = x; then
35366    # Oops. Which didn't find the executable.
35367    # The splitting of arguments from the executable at a space might have been incorrect,
35368    # since paths with space are more likely in Windows. Give it another try with the whole
35369    # argument.
35370    path="$complete"
35371    arguments="EOL"
35372    new_path="$path"
35373
35374  windows_path="$new_path"
35375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35376    unix_path=`$CYGPATH -u "$windows_path"`
35377    new_path="$unix_path"
35378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35380    new_path="$unix_path"
35381  fi
35382
35383
35384    new_path=`$WHICH "$new_path" 2> /dev/null`
35385    # bat and cmd files are not always considered executable in MSYS causing which
35386    # to not find them
35387    if test "x$new_path" = x \
35388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35390      new_path="$path"
35391
35392  windows_path="$new_path"
35393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35394    unix_path=`$CYGPATH -u "$windows_path"`
35395    new_path="$unix_path"
35396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35398    new_path="$unix_path"
35399  fi
35400
35401    fi
35402
35403    if test "x$new_path" = x; then
35404      # It's still not found. Now this is an unrecoverable error.
35405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35406$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35407      has_space=`$ECHO "$complete" | $GREP " "`
35408      if test "x$has_space" != x; then
35409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35411      fi
35412      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35413    fi
35414  fi
35415
35416  # Now new_path has a complete unix path to the binary
35417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35418    # Keep paths in /bin as-is, but remove trailing .exe if any
35419    new_path="${new_path/%.exe/}"
35420    # Do not save /bin paths to all_fixpath_prefixes!
35421  else
35422    # Not in mixed or Windows style, start by that.
35423    new_path=`cmd //c echo $new_path`
35424
35425  input_path="$new_path"
35426  # Check if we need to convert this using DOS-style short mode. If the path
35427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35428  # take no chances and rewrite it.
35429  # Note: m4 eats our [], so we need to use [ and ] instead.
35430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35431  if test "x$has_forbidden_chars" != x; then
35432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35434  fi
35435
35436    # Output is in $new_path
35437
35438  windows_path="$new_path"
35439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35440    unix_path=`$CYGPATH -u "$windows_path"`
35441    new_path="$unix_path"
35442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35444    new_path="$unix_path"
35445  fi
35446
35447    # remove trailing .exe if any
35448    new_path="${new_path/%.exe/}"
35449
35450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35452  fi
35453
35454    else
35455      # We're on a unix platform. Hooray! :)
35456      # First separate the path from the arguments. This will split at the first
35457      # space.
35458      complete="$MT"
35459      path="${complete%% *}"
35460      tmp="$complete EOL"
35461      arguments="${tmp#* }"
35462
35463      # Cannot rely on the command "which" here since it doesn't always work.
35464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35465      if test -z "$is_absolute_path"; then
35466        # Path to executable is not absolute. Find it.
35467        IFS_save="$IFS"
35468        IFS=:
35469        for p in $PATH; do
35470          if test -f "$p/$path" && test -x "$p/$path"; then
35471            new_path="$p/$path"
35472            break
35473          fi
35474        done
35475        IFS="$IFS_save"
35476      else
35477        # This is an absolute path, we can use it without further modifications.
35478        new_path="$path"
35479      fi
35480
35481      if test "x$new_path" = x; then
35482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
35483$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
35484        has_space=`$ECHO "$complete" | $GREP " "`
35485        if test "x$has_space" != x; then
35486          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35488        fi
35489        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
35490      fi
35491    fi
35492
35493    # Now join together the path and the arguments once again
35494    if test "x$arguments" != xEOL; then
35495      new_complete="$new_path ${arguments% *}"
35496    else
35497      new_complete="$new_path"
35498    fi
35499
35500    if test "x$complete" != "x$new_complete"; then
35501      MT="$new_complete"
35502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
35503$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
35504    fi
35505  fi
35506
35507    # Setup the resource compiler (RC)
35508    # Extract the first word of "rc", so it can be a program name with args.
35509set dummy rc; ac_word=$2
35510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35511$as_echo_n "checking for $ac_word... " >&6; }
35512if ${ac_cv_prog_RC+:} false; then :
35513  $as_echo_n "(cached) " >&6
35514else
35515  if test -n "$RC"; then
35516  ac_cv_prog_RC="$RC" # Let the user override the test.
35517else
35518  ac_prog_rejected=no
35519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35520for as_dir in $PATH
35521do
35522  IFS=$as_save_IFS
35523  test -z "$as_dir" && as_dir=.
35524    for ac_exec_ext in '' $ac_executable_extensions; do
35525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35526    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
35527       ac_prog_rejected=yes
35528       continue
35529     fi
35530    ac_cv_prog_RC="rc"
35531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35532    break 2
35533  fi
35534done
35535  done
35536IFS=$as_save_IFS
35537
35538if test $ac_prog_rejected = yes; then
35539  # We found a bogon in the path, so make sure we never use it.
35540  set dummy $ac_cv_prog_RC
35541  shift
35542  if test $# != 0; then
35543    # We chose a different compiler from the bogus one.
35544    # However, it has the same basename, so the bogon will be chosen
35545    # first if we set RC to just the basename; use the full file name.
35546    shift
35547    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
35548  fi
35549fi
35550fi
35551fi
35552RC=$ac_cv_prog_RC
35553if test -n "$RC"; then
35554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
35555$as_echo "$RC" >&6; }
35556else
35557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35558$as_echo "no" >&6; }
35559fi
35560
35561
35562
35563  # Only process if variable expands to non-empty
35564
35565  if test "x$RC" != x; then
35566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35567
35568  # First separate the path from the arguments. This will split at the first
35569  # space.
35570  complete="$RC"
35571  path="${complete%% *}"
35572  tmp="$complete EOL"
35573  arguments="${tmp#* }"
35574
35575  # Input might be given as Windows format, start by converting to
35576  # unix format.
35577  new_path=`$CYGPATH -u "$path"`
35578
35579  # Now try to locate executable using which
35580  new_path=`$WHICH "$new_path" 2> /dev/null`
35581  # bat and cmd files are not always considered executable in cygwin causing which
35582  # to not find them
35583  if test "x$new_path" = x \
35584      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35585      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35586    new_path=`$CYGPATH -u "$path"`
35587  fi
35588  if test "x$new_path" = x; then
35589    # Oops. Which didn't find the executable.
35590    # The splitting of arguments from the executable at a space might have been incorrect,
35591    # since paths with space are more likely in Windows. Give it another try with the whole
35592    # argument.
35593    path="$complete"
35594    arguments="EOL"
35595    new_path=`$CYGPATH -u "$path"`
35596    new_path=`$WHICH "$new_path" 2> /dev/null`
35597    # bat and cmd files are not always considered executable in cygwin causing which
35598    # to not find them
35599    if test "x$new_path" = x \
35600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35602      new_path=`$CYGPATH -u "$path"`
35603    fi
35604    if test "x$new_path" = x; then
35605      # It's still not found. Now this is an unrecoverable error.
35606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35607$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35608      has_space=`$ECHO "$complete" | $GREP " "`
35609      if test "x$has_space" != x; then
35610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35612      fi
35613      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35614    fi
35615  fi
35616
35617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35620  # "foo.exe" is OK but "foo" is an error.
35621  #
35622  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35623  # It is also a way to make sure we got the proper file name for the real test later on.
35624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35625  if test "x$test_shortpath" = x; then
35626    # Short path failed, file does not exist as specified.
35627    # Try adding .exe or .cmd
35628    if test -f "${new_path}.exe"; then
35629      input_to_shortpath="${new_path}.exe"
35630    elif test -f "${new_path}.cmd"; then
35631      input_to_shortpath="${new_path}.cmd"
35632    else
35633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
35634$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
35635      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35636$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35637      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35638    fi
35639  else
35640    input_to_shortpath="$new_path"
35641  fi
35642
35643  # Call helper function which possibly converts this using DOS-style short mode.
35644  # If so, the updated path is stored in $new_path.
35645  new_path="$input_to_shortpath"
35646
35647  input_path="$input_to_shortpath"
35648  # Check if we need to convert this using DOS-style short mode. If the path
35649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35650  # take no chances and rewrite it.
35651  # Note: m4 eats our [], so we need to use [ and ] instead.
35652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35653  if test "x$has_forbidden_chars" != x; then
35654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35658      # Going to short mode and back again did indeed matter. Since short mode is
35659      # case insensitive, let's make it lowercase to improve readability.
35660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35661      # Now convert it back to Unix-style (cygpath)
35662      input_path=`$CYGPATH -u "$shortmode_path"`
35663      new_path="$input_path"
35664    fi
35665  fi
35666
35667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35668  if test "x$test_cygdrive_prefix" = x; then
35669    # As a simple fix, exclude /usr/bin since it's not a real path.
35670    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35672      # a path prefixed by /cygdrive for fixpath to work.
35673      new_path="$CYGWIN_ROOT_PATH$input_path"
35674    fi
35675  fi
35676
35677  # remove trailing .exe if any
35678  new_path="${new_path/%.exe/}"
35679
35680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35681
35682  # First separate the path from the arguments. This will split at the first
35683  # space.
35684  complete="$RC"
35685  path="${complete%% *}"
35686  tmp="$complete EOL"
35687  arguments="${tmp#* }"
35688
35689  # Input might be given as Windows format, start by converting to
35690  # unix format.
35691  new_path="$path"
35692
35693  windows_path="$new_path"
35694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35695    unix_path=`$CYGPATH -u "$windows_path"`
35696    new_path="$unix_path"
35697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35699    new_path="$unix_path"
35700  fi
35701
35702
35703  # Now try to locate executable using which
35704  new_path=`$WHICH "$new_path" 2> /dev/null`
35705
35706  if test "x$new_path" = x; then
35707    # Oops. Which didn't find the executable.
35708    # The splitting of arguments from the executable at a space might have been incorrect,
35709    # since paths with space are more likely in Windows. Give it another try with the whole
35710    # argument.
35711    path="$complete"
35712    arguments="EOL"
35713    new_path="$path"
35714
35715  windows_path="$new_path"
35716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35717    unix_path=`$CYGPATH -u "$windows_path"`
35718    new_path="$unix_path"
35719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35721    new_path="$unix_path"
35722  fi
35723
35724
35725    new_path=`$WHICH "$new_path" 2> /dev/null`
35726    # bat and cmd files are not always considered executable in MSYS causing which
35727    # to not find them
35728    if test "x$new_path" = x \
35729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35731      new_path="$path"
35732
35733  windows_path="$new_path"
35734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35735    unix_path=`$CYGPATH -u "$windows_path"`
35736    new_path="$unix_path"
35737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35739    new_path="$unix_path"
35740  fi
35741
35742    fi
35743
35744    if test "x$new_path" = x; then
35745      # It's still not found. Now this is an unrecoverable error.
35746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35747$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35748      has_space=`$ECHO "$complete" | $GREP " "`
35749      if test "x$has_space" != x; then
35750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35752      fi
35753      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35754    fi
35755  fi
35756
35757  # Now new_path has a complete unix path to the binary
35758  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35759    # Keep paths in /bin as-is, but remove trailing .exe if any
35760    new_path="${new_path/%.exe/}"
35761    # Do not save /bin paths to all_fixpath_prefixes!
35762  else
35763    # Not in mixed or Windows style, start by that.
35764    new_path=`cmd //c echo $new_path`
35765
35766  input_path="$new_path"
35767  # Check if we need to convert this using DOS-style short mode. If the path
35768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35769  # take no chances and rewrite it.
35770  # Note: m4 eats our [], so we need to use [ and ] instead.
35771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35772  if test "x$has_forbidden_chars" != x; then
35773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35775  fi
35776
35777    # Output is in $new_path
35778
35779  windows_path="$new_path"
35780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35781    unix_path=`$CYGPATH -u "$windows_path"`
35782    new_path="$unix_path"
35783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35785    new_path="$unix_path"
35786  fi
35787
35788    # remove trailing .exe if any
35789    new_path="${new_path/%.exe/}"
35790
35791    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35792    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35793  fi
35794
35795    else
35796      # We're on a unix platform. Hooray! :)
35797      # First separate the path from the arguments. This will split at the first
35798      # space.
35799      complete="$RC"
35800      path="${complete%% *}"
35801      tmp="$complete EOL"
35802      arguments="${tmp#* }"
35803
35804      # Cannot rely on the command "which" here since it doesn't always work.
35805      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35806      if test -z "$is_absolute_path"; then
35807        # Path to executable is not absolute. Find it.
35808        IFS_save="$IFS"
35809        IFS=:
35810        for p in $PATH; do
35811          if test -f "$p/$path" && test -x "$p/$path"; then
35812            new_path="$p/$path"
35813            break
35814          fi
35815        done
35816        IFS="$IFS_save"
35817      else
35818        # This is an absolute path, we can use it without further modifications.
35819        new_path="$path"
35820      fi
35821
35822      if test "x$new_path" = x; then
35823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35824$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35825        has_space=`$ECHO "$complete" | $GREP " "`
35826        if test "x$has_space" != x; then
35827          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35828$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35829        fi
35830        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35831      fi
35832    fi
35833
35834    # Now join together the path and the arguments once again
35835    if test "x$arguments" != xEOL; then
35836      new_complete="$new_path ${arguments% *}"
35837    else
35838      new_complete="$new_path"
35839    fi
35840
35841    if test "x$complete" != "x$new_complete"; then
35842      RC="$new_complete"
35843      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35844$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35845    fi
35846  fi
35847
35848    # Extract the first word of "dumpbin", so it can be a program name with args.
35849set dummy dumpbin; ac_word=$2
35850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35851$as_echo_n "checking for $ac_word... " >&6; }
35852if ${ac_cv_prog_DUMPBIN+:} false; then :
35853  $as_echo_n "(cached) " >&6
35854else
35855  if test -n "$DUMPBIN"; then
35856  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35857else
35858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35859for as_dir in $PATH
35860do
35861  IFS=$as_save_IFS
35862  test -z "$as_dir" && as_dir=.
35863    for ac_exec_ext in '' $ac_executable_extensions; do
35864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35865    ac_cv_prog_DUMPBIN="dumpbin"
35866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35867    break 2
35868  fi
35869done
35870  done
35871IFS=$as_save_IFS
35872
35873fi
35874fi
35875DUMPBIN=$ac_cv_prog_DUMPBIN
35876if test -n "$DUMPBIN"; then
35877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35878$as_echo "$DUMPBIN" >&6; }
35879else
35880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35881$as_echo "no" >&6; }
35882fi
35883
35884
35885
35886  # Only process if variable expands to non-empty
35887
35888  if test "x$DUMPBIN" != x; then
35889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35890
35891  # First separate the path from the arguments. This will split at the first
35892  # space.
35893  complete="$DUMPBIN"
35894  path="${complete%% *}"
35895  tmp="$complete EOL"
35896  arguments="${tmp#* }"
35897
35898  # Input might be given as Windows format, start by converting to
35899  # unix format.
35900  new_path=`$CYGPATH -u "$path"`
35901
35902  # Now try to locate executable using which
35903  new_path=`$WHICH "$new_path" 2> /dev/null`
35904  # bat and cmd files are not always considered executable in cygwin causing which
35905  # to not find them
35906  if test "x$new_path" = x \
35907      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35908      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35909    new_path=`$CYGPATH -u "$path"`
35910  fi
35911  if test "x$new_path" = x; then
35912    # Oops. Which didn't find the executable.
35913    # The splitting of arguments from the executable at a space might have been incorrect,
35914    # since paths with space are more likely in Windows. Give it another try with the whole
35915    # argument.
35916    path="$complete"
35917    arguments="EOL"
35918    new_path=`$CYGPATH -u "$path"`
35919    new_path=`$WHICH "$new_path" 2> /dev/null`
35920    # bat and cmd files are not always considered executable in cygwin causing which
35921    # to not find them
35922    if test "x$new_path" = x \
35923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35925      new_path=`$CYGPATH -u "$path"`
35926    fi
35927    if test "x$new_path" = x; then
35928      # It's still not found. Now this is an unrecoverable error.
35929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35930$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35931      has_space=`$ECHO "$complete" | $GREP " "`
35932      if test "x$has_space" != x; then
35933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35935      fi
35936      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35937    fi
35938  fi
35939
35940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35943  # "foo.exe" is OK but "foo" is an error.
35944  #
35945  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35946  # It is also a way to make sure we got the proper file name for the real test later on.
35947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35948  if test "x$test_shortpath" = x; then
35949    # Short path failed, file does not exist as specified.
35950    # Try adding .exe or .cmd
35951    if test -f "${new_path}.exe"; then
35952      input_to_shortpath="${new_path}.exe"
35953    elif test -f "${new_path}.cmd"; then
35954      input_to_shortpath="${new_path}.cmd"
35955    else
35956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35957$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35958      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35960      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35961    fi
35962  else
35963    input_to_shortpath="$new_path"
35964  fi
35965
35966  # Call helper function which possibly converts this using DOS-style short mode.
35967  # If so, the updated path is stored in $new_path.
35968  new_path="$input_to_shortpath"
35969
35970  input_path="$input_to_shortpath"
35971  # Check if we need to convert this using DOS-style short mode. If the path
35972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35973  # take no chances and rewrite it.
35974  # Note: m4 eats our [], so we need to use [ and ] instead.
35975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35976  if test "x$has_forbidden_chars" != x; then
35977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35981      # Going to short mode and back again did indeed matter. Since short mode is
35982      # case insensitive, let's make it lowercase to improve readability.
35983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35984      # Now convert it back to Unix-style (cygpath)
35985      input_path=`$CYGPATH -u "$shortmode_path"`
35986      new_path="$input_path"
35987    fi
35988  fi
35989
35990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35991  if test "x$test_cygdrive_prefix" = x; then
35992    # As a simple fix, exclude /usr/bin since it's not a real path.
35993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35995      # a path prefixed by /cygdrive for fixpath to work.
35996      new_path="$CYGWIN_ROOT_PATH$input_path"
35997    fi
35998  fi
35999
36000  # remove trailing .exe if any
36001  new_path="${new_path/%.exe/}"
36002
36003    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36004
36005  # First separate the path from the arguments. This will split at the first
36006  # space.
36007  complete="$DUMPBIN"
36008  path="${complete%% *}"
36009  tmp="$complete EOL"
36010  arguments="${tmp#* }"
36011
36012  # Input might be given as Windows format, start by converting to
36013  # unix format.
36014  new_path="$path"
36015
36016  windows_path="$new_path"
36017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36018    unix_path=`$CYGPATH -u "$windows_path"`
36019    new_path="$unix_path"
36020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36022    new_path="$unix_path"
36023  fi
36024
36025
36026  # Now try to locate executable using which
36027  new_path=`$WHICH "$new_path" 2> /dev/null`
36028
36029  if test "x$new_path" = x; then
36030    # Oops. Which didn't find the executable.
36031    # The splitting of arguments from the executable at a space might have been incorrect,
36032    # since paths with space are more likely in Windows. Give it another try with the whole
36033    # argument.
36034    path="$complete"
36035    arguments="EOL"
36036    new_path="$path"
36037
36038  windows_path="$new_path"
36039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36040    unix_path=`$CYGPATH -u "$windows_path"`
36041    new_path="$unix_path"
36042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36044    new_path="$unix_path"
36045  fi
36046
36047
36048    new_path=`$WHICH "$new_path" 2> /dev/null`
36049    # bat and cmd files are not always considered executable in MSYS causing which
36050    # to not find them
36051    if test "x$new_path" = x \
36052        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36053        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36054      new_path="$path"
36055
36056  windows_path="$new_path"
36057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36058    unix_path=`$CYGPATH -u "$windows_path"`
36059    new_path="$unix_path"
36060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36062    new_path="$unix_path"
36063  fi
36064
36065    fi
36066
36067    if test "x$new_path" = x; then
36068      # It's still not found. Now this is an unrecoverable error.
36069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
36070$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
36071      has_space=`$ECHO "$complete" | $GREP " "`
36072      if test "x$has_space" != x; then
36073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36075      fi
36076      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
36077    fi
36078  fi
36079
36080  # Now new_path has a complete unix path to the binary
36081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36082    # Keep paths in /bin as-is, but remove trailing .exe if any
36083    new_path="${new_path/%.exe/}"
36084    # Do not save /bin paths to all_fixpath_prefixes!
36085  else
36086    # Not in mixed or Windows style, start by that.
36087    new_path=`cmd //c echo $new_path`
36088
36089  input_path="$new_path"
36090  # Check if we need to convert this using DOS-style short mode. If the path
36091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36092  # take no chances and rewrite it.
36093  # Note: m4 eats our [], so we need to use [ and ] instead.
36094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36095  if test "x$has_forbidden_chars" != x; then
36096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36098  fi
36099
36100    # Output is in $new_path
36101
36102  windows_path="$new_path"
36103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36104    unix_path=`$CYGPATH -u "$windows_path"`
36105    new_path="$unix_path"
36106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36108    new_path="$unix_path"
36109  fi
36110
36111    # remove trailing .exe if any
36112    new_path="${new_path/%.exe/}"
36113
36114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36116  fi
36117
36118    else
36119      # We're on a unix platform. Hooray! :)
36120      # First separate the path from the arguments. This will split at the first
36121      # space.
36122      complete="$DUMPBIN"
36123      path="${complete%% *}"
36124      tmp="$complete EOL"
36125      arguments="${tmp#* }"
36126
36127      # Cannot rely on the command "which" here since it doesn't always work.
36128      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36129      if test -z "$is_absolute_path"; then
36130        # Path to executable is not absolute. Find it.
36131        IFS_save="$IFS"
36132        IFS=:
36133        for p in $PATH; do
36134          if test -f "$p/$path" && test -x "$p/$path"; then
36135            new_path="$p/$path"
36136            break
36137          fi
36138        done
36139        IFS="$IFS_save"
36140      else
36141        # This is an absolute path, we can use it without further modifications.
36142        new_path="$path"
36143      fi
36144
36145      if test "x$new_path" = x; then
36146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
36147$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
36148        has_space=`$ECHO "$complete" | $GREP " "`
36149        if test "x$has_space" != x; then
36150          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36152        fi
36153        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
36154      fi
36155    fi
36156
36157    # Now join together the path and the arguments once again
36158    if test "x$arguments" != xEOL; then
36159      new_complete="$new_path ${arguments% *}"
36160    else
36161      new_complete="$new_path"
36162    fi
36163
36164    if test "x$complete" != "x$new_complete"; then
36165      DUMPBIN="$new_complete"
36166      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
36167$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
36168    fi
36169  fi
36170
36171    # We need to check for 'msbuild.exe' because at the place where we expect to
36172    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
36173    # won't find the 'msbuild.exe' executable in that case (and the
36174    # 'ac_executable_extensions' is unusable due to performance reasons).
36175    # Notice that we intentionally don't fix up the path to MSBUILD because we
36176    # will call it in a DOS shell during freetype detection on Windows (see
36177    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
36178    # Extract the first word of "msbuild.exe", so it can be a program name with args.
36179set dummy msbuild.exe; ac_word=$2
36180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36181$as_echo_n "checking for $ac_word... " >&6; }
36182if ${ac_cv_prog_MSBUILD+:} false; then :
36183  $as_echo_n "(cached) " >&6
36184else
36185  if test -n "$MSBUILD"; then
36186  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
36187else
36188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36189for as_dir in $PATH
36190do
36191  IFS=$as_save_IFS
36192  test -z "$as_dir" && as_dir=.
36193    for ac_exec_ext in '' $ac_executable_extensions; do
36194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36195    ac_cv_prog_MSBUILD="msbuild.exe"
36196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36197    break 2
36198  fi
36199done
36200  done
36201IFS=$as_save_IFS
36202
36203fi
36204fi
36205MSBUILD=$ac_cv_prog_MSBUILD
36206if test -n "$MSBUILD"; then
36207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
36208$as_echo "$MSBUILD" >&6; }
36209else
36210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36211$as_echo "no" >&6; }
36212fi
36213
36214
36215  fi
36216
36217  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36218
36219
36220  # Publish this variable in the help.
36221
36222
36223  if [ -z "${STRIP+x}" ]; then
36224    # The variable is not set by user, try to locate tool using the code snippet
36225    for ac_prog in strip
36226do
36227  # Extract the first word of "$ac_prog", so it can be a program name with args.
36228set dummy $ac_prog; ac_word=$2
36229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36230$as_echo_n "checking for $ac_word... " >&6; }
36231if ${ac_cv_path_STRIP+:} false; then :
36232  $as_echo_n "(cached) " >&6
36233else
36234  case $STRIP in
36235  [\\/]* | ?:[\\/]*)
36236  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36237  ;;
36238  *)
36239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36240for as_dir in $PATH
36241do
36242  IFS=$as_save_IFS
36243  test -z "$as_dir" && as_dir=.
36244    for ac_exec_ext in '' $ac_executable_extensions; do
36245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36246    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36248    break 2
36249  fi
36250done
36251  done
36252IFS=$as_save_IFS
36253
36254  ;;
36255esac
36256fi
36257STRIP=$ac_cv_path_STRIP
36258if test -n "$STRIP"; then
36259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36260$as_echo "$STRIP" >&6; }
36261else
36262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36263$as_echo "no" >&6; }
36264fi
36265
36266
36267  test -n "$STRIP" && break
36268done
36269
36270  else
36271    # The variable is set, but is it from the command line or the environment?
36272
36273    # Try to remove the string !STRIP! from our list.
36274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36276      # If it failed, the variable was not from the command line. Ignore it,
36277      # but warn the user (except for BASH, which is always set by the calling BASH).
36278      if test "xSTRIP" != xBASH; then
36279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36280$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36281      fi
36282      # Try to locate tool using the code snippet
36283      for ac_prog in strip
36284do
36285  # Extract the first word of "$ac_prog", so it can be a program name with args.
36286set dummy $ac_prog; ac_word=$2
36287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36288$as_echo_n "checking for $ac_word... " >&6; }
36289if ${ac_cv_path_STRIP+:} false; then :
36290  $as_echo_n "(cached) " >&6
36291else
36292  case $STRIP in
36293  [\\/]* | ?:[\\/]*)
36294  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36295  ;;
36296  *)
36297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36298for as_dir in $PATH
36299do
36300  IFS=$as_save_IFS
36301  test -z "$as_dir" && as_dir=.
36302    for ac_exec_ext in '' $ac_executable_extensions; do
36303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36304    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36306    break 2
36307  fi
36308done
36309  done
36310IFS=$as_save_IFS
36311
36312  ;;
36313esac
36314fi
36315STRIP=$ac_cv_path_STRIP
36316if test -n "$STRIP"; then
36317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36318$as_echo "$STRIP" >&6; }
36319else
36320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36321$as_echo "no" >&6; }
36322fi
36323
36324
36325  test -n "$STRIP" && break
36326done
36327
36328    else
36329      # If it succeeded, then it was overridden by the user. We will use it
36330      # for the tool.
36331
36332      # First remove it from the list of overridden variables, so we can test
36333      # for unknown variables in the end.
36334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36335
36336      # Check if we try to supply an empty value
36337      if test "x$STRIP" = x; then
36338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
36339$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
36340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36341$as_echo_n "checking for STRIP... " >&6; }
36342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36343$as_echo "disabled" >&6; }
36344      else
36345        # Check if the provided tool contains a complete path.
36346        tool_specified="$STRIP"
36347        tool_basename="${tool_specified##*/}"
36348        if test "x$tool_basename" = "x$tool_specified"; then
36349          # A command without a complete path is provided, search $PATH.
36350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36351$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36352          # Extract the first word of "$tool_basename", so it can be a program name with args.
36353set dummy $tool_basename; ac_word=$2
36354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36355$as_echo_n "checking for $ac_word... " >&6; }
36356if ${ac_cv_path_STRIP+:} false; then :
36357  $as_echo_n "(cached) " >&6
36358else
36359  case $STRIP in
36360  [\\/]* | ?:[\\/]*)
36361  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36362  ;;
36363  *)
36364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36365for as_dir in $PATH
36366do
36367  IFS=$as_save_IFS
36368  test -z "$as_dir" && as_dir=.
36369    for ac_exec_ext in '' $ac_executable_extensions; do
36370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36371    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36373    break 2
36374  fi
36375done
36376  done
36377IFS=$as_save_IFS
36378
36379  ;;
36380esac
36381fi
36382STRIP=$ac_cv_path_STRIP
36383if test -n "$STRIP"; then
36384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36385$as_echo "$STRIP" >&6; }
36386else
36387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36388$as_echo "no" >&6; }
36389fi
36390
36391
36392          if test "x$STRIP" = x; then
36393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36394          fi
36395        else
36396          # Otherwise we believe it is a complete path. Use it as it is.
36397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36398$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36400$as_echo_n "checking for STRIP... " >&6; }
36401          if test ! -x "$tool_specified"; then
36402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36403$as_echo "not found" >&6; }
36404            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36405          fi
36406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36407$as_echo "$tool_specified" >&6; }
36408        fi
36409      fi
36410    fi
36411  fi
36412
36413
36414
36415  # Only process if variable expands to non-empty
36416
36417  if test "x$STRIP" != x; then
36418    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36419
36420  # First separate the path from the arguments. This will split at the first
36421  # space.
36422  complete="$STRIP"
36423  path="${complete%% *}"
36424  tmp="$complete EOL"
36425  arguments="${tmp#* }"
36426
36427  # Input might be given as Windows format, start by converting to
36428  # unix format.
36429  new_path=`$CYGPATH -u "$path"`
36430
36431  # Now try to locate executable using which
36432  new_path=`$WHICH "$new_path" 2> /dev/null`
36433  # bat and cmd files are not always considered executable in cygwin causing which
36434  # to not find them
36435  if test "x$new_path" = x \
36436      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36437      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36438    new_path=`$CYGPATH -u "$path"`
36439  fi
36440  if test "x$new_path" = x; then
36441    # Oops. Which didn't find the executable.
36442    # The splitting of arguments from the executable at a space might have been incorrect,
36443    # since paths with space are more likely in Windows. Give it another try with the whole
36444    # argument.
36445    path="$complete"
36446    arguments="EOL"
36447    new_path=`$CYGPATH -u "$path"`
36448    new_path=`$WHICH "$new_path" 2> /dev/null`
36449    # bat and cmd files are not always considered executable in cygwin causing which
36450    # to not find them
36451    if test "x$new_path" = x \
36452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36454      new_path=`$CYGPATH -u "$path"`
36455    fi
36456    if test "x$new_path" = x; then
36457      # It's still not found. Now this is an unrecoverable error.
36458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36459$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36460      has_space=`$ECHO "$complete" | $GREP " "`
36461      if test "x$has_space" != x; then
36462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36464      fi
36465      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36466    fi
36467  fi
36468
36469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36472  # "foo.exe" is OK but "foo" is an error.
36473  #
36474  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36475  # It is also a way to make sure we got the proper file name for the real test later on.
36476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36477  if test "x$test_shortpath" = x; then
36478    # Short path failed, file does not exist as specified.
36479    # Try adding .exe or .cmd
36480    if test -f "${new_path}.exe"; then
36481      input_to_shortpath="${new_path}.exe"
36482    elif test -f "${new_path}.cmd"; then
36483      input_to_shortpath="${new_path}.cmd"
36484    else
36485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36486$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36487      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36488$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36489      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36490    fi
36491  else
36492    input_to_shortpath="$new_path"
36493  fi
36494
36495  # Call helper function which possibly converts this using DOS-style short mode.
36496  # If so, the updated path is stored in $new_path.
36497  new_path="$input_to_shortpath"
36498
36499  input_path="$input_to_shortpath"
36500  # Check if we need to convert this using DOS-style short mode. If the path
36501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36502  # take no chances and rewrite it.
36503  # Note: m4 eats our [], so we need to use [ and ] instead.
36504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36505  if test "x$has_forbidden_chars" != x; then
36506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36510      # Going to short mode and back again did indeed matter. Since short mode is
36511      # case insensitive, let's make it lowercase to improve readability.
36512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36513      # Now convert it back to Unix-style (cygpath)
36514      input_path=`$CYGPATH -u "$shortmode_path"`
36515      new_path="$input_path"
36516    fi
36517  fi
36518
36519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36520  if test "x$test_cygdrive_prefix" = x; then
36521    # As a simple fix, exclude /usr/bin since it's not a real path.
36522    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36524      # a path prefixed by /cygdrive for fixpath to work.
36525      new_path="$CYGWIN_ROOT_PATH$input_path"
36526    fi
36527  fi
36528
36529  # remove trailing .exe if any
36530  new_path="${new_path/%.exe/}"
36531
36532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36533
36534  # First separate the path from the arguments. This will split at the first
36535  # space.
36536  complete="$STRIP"
36537  path="${complete%% *}"
36538  tmp="$complete EOL"
36539  arguments="${tmp#* }"
36540
36541  # Input might be given as Windows format, start by converting to
36542  # unix format.
36543  new_path="$path"
36544
36545  windows_path="$new_path"
36546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36547    unix_path=`$CYGPATH -u "$windows_path"`
36548    new_path="$unix_path"
36549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36551    new_path="$unix_path"
36552  fi
36553
36554
36555  # Now try to locate executable using which
36556  new_path=`$WHICH "$new_path" 2> /dev/null`
36557
36558  if test "x$new_path" = x; then
36559    # Oops. Which didn't find the executable.
36560    # The splitting of arguments from the executable at a space might have been incorrect,
36561    # since paths with space are more likely in Windows. Give it another try with the whole
36562    # argument.
36563    path="$complete"
36564    arguments="EOL"
36565    new_path="$path"
36566
36567  windows_path="$new_path"
36568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36569    unix_path=`$CYGPATH -u "$windows_path"`
36570    new_path="$unix_path"
36571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36573    new_path="$unix_path"
36574  fi
36575
36576
36577    new_path=`$WHICH "$new_path" 2> /dev/null`
36578    # bat and cmd files are not always considered executable in MSYS causing which
36579    # to not find them
36580    if test "x$new_path" = x \
36581        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36582        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36583      new_path="$path"
36584
36585  windows_path="$new_path"
36586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36587    unix_path=`$CYGPATH -u "$windows_path"`
36588    new_path="$unix_path"
36589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36591    new_path="$unix_path"
36592  fi
36593
36594    fi
36595
36596    if test "x$new_path" = x; then
36597      # It's still not found. Now this is an unrecoverable error.
36598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36599$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36600      has_space=`$ECHO "$complete" | $GREP " "`
36601      if test "x$has_space" != x; then
36602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36604      fi
36605      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36606    fi
36607  fi
36608
36609  # Now new_path has a complete unix path to the binary
36610  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36611    # Keep paths in /bin as-is, but remove trailing .exe if any
36612    new_path="${new_path/%.exe/}"
36613    # Do not save /bin paths to all_fixpath_prefixes!
36614  else
36615    # Not in mixed or Windows style, start by that.
36616    new_path=`cmd //c echo $new_path`
36617
36618  input_path="$new_path"
36619  # Check if we need to convert this using DOS-style short mode. If the path
36620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36621  # take no chances and rewrite it.
36622  # Note: m4 eats our [], so we need to use [ and ] instead.
36623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36624  if test "x$has_forbidden_chars" != x; then
36625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36627  fi
36628
36629    # Output is in $new_path
36630
36631  windows_path="$new_path"
36632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36633    unix_path=`$CYGPATH -u "$windows_path"`
36634    new_path="$unix_path"
36635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36637    new_path="$unix_path"
36638  fi
36639
36640    # remove trailing .exe if any
36641    new_path="${new_path/%.exe/}"
36642
36643    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36644    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36645  fi
36646
36647    else
36648      # We're on a unix platform. Hooray! :)
36649      # First separate the path from the arguments. This will split at the first
36650      # space.
36651      complete="$STRIP"
36652      path="${complete%% *}"
36653      tmp="$complete EOL"
36654      arguments="${tmp#* }"
36655
36656      # Cannot rely on the command "which" here since it doesn't always work.
36657      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36658      if test -z "$is_absolute_path"; then
36659        # Path to executable is not absolute. Find it.
36660        IFS_save="$IFS"
36661        IFS=:
36662        for p in $PATH; do
36663          if test -f "$p/$path" && test -x "$p/$path"; then
36664            new_path="$p/$path"
36665            break
36666          fi
36667        done
36668        IFS="$IFS_save"
36669      else
36670        # This is an absolute path, we can use it without further modifications.
36671        new_path="$path"
36672      fi
36673
36674      if test "x$new_path" = x; then
36675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36676$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36677        has_space=`$ECHO "$complete" | $GREP " "`
36678        if test "x$has_space" != x; then
36679          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36680$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36681        fi
36682        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36683      fi
36684    fi
36685
36686    # Now join together the path and the arguments once again
36687    if test "x$arguments" != xEOL; then
36688      new_complete="$new_path ${arguments% *}"
36689    else
36690      new_complete="$new_path"
36691    fi
36692
36693    if test "x$complete" != "x$new_complete"; then
36694      STRIP="$new_complete"
36695      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36696$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36697    fi
36698  fi
36699
36700
36701
36702  # Publish this variable in the help.
36703
36704
36705  if [ -z "${NM+x}" ]; then
36706    # The variable is not set by user, try to locate tool using the code snippet
36707    for ac_prog in nm
36708do
36709  # Extract the first word of "$ac_prog", so it can be a program name with args.
36710set dummy $ac_prog; ac_word=$2
36711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36712$as_echo_n "checking for $ac_word... " >&6; }
36713if ${ac_cv_path_NM+:} false; then :
36714  $as_echo_n "(cached) " >&6
36715else
36716  case $NM in
36717  [\\/]* | ?:[\\/]*)
36718  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36719  ;;
36720  *)
36721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36722for as_dir in $PATH
36723do
36724  IFS=$as_save_IFS
36725  test -z "$as_dir" && as_dir=.
36726    for ac_exec_ext in '' $ac_executable_extensions; do
36727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36728    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36730    break 2
36731  fi
36732done
36733  done
36734IFS=$as_save_IFS
36735
36736  ;;
36737esac
36738fi
36739NM=$ac_cv_path_NM
36740if test -n "$NM"; then
36741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36742$as_echo "$NM" >&6; }
36743else
36744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36745$as_echo "no" >&6; }
36746fi
36747
36748
36749  test -n "$NM" && break
36750done
36751
36752  else
36753    # The variable is set, but is it from the command line or the environment?
36754
36755    # Try to remove the string !NM! from our list.
36756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36758      # If it failed, the variable was not from the command line. Ignore it,
36759      # but warn the user (except for BASH, which is always set by the calling BASH).
36760      if test "xNM" != xBASH; then
36761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36762$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36763      fi
36764      # Try to locate tool using the code snippet
36765      for ac_prog in nm
36766do
36767  # Extract the first word of "$ac_prog", so it can be a program name with args.
36768set dummy $ac_prog; ac_word=$2
36769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36770$as_echo_n "checking for $ac_word... " >&6; }
36771if ${ac_cv_path_NM+:} false; then :
36772  $as_echo_n "(cached) " >&6
36773else
36774  case $NM in
36775  [\\/]* | ?:[\\/]*)
36776  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36777  ;;
36778  *)
36779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36780for as_dir in $PATH
36781do
36782  IFS=$as_save_IFS
36783  test -z "$as_dir" && as_dir=.
36784    for ac_exec_ext in '' $ac_executable_extensions; do
36785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36786    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36788    break 2
36789  fi
36790done
36791  done
36792IFS=$as_save_IFS
36793
36794  ;;
36795esac
36796fi
36797NM=$ac_cv_path_NM
36798if test -n "$NM"; then
36799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36800$as_echo "$NM" >&6; }
36801else
36802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36803$as_echo "no" >&6; }
36804fi
36805
36806
36807  test -n "$NM" && break
36808done
36809
36810    else
36811      # If it succeeded, then it was overridden by the user. We will use it
36812      # for the tool.
36813
36814      # First remove it from the list of overridden variables, so we can test
36815      # for unknown variables in the end.
36816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36817
36818      # Check if we try to supply an empty value
36819      if test "x$NM" = x; then
36820        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
36821$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
36822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36823$as_echo_n "checking for NM... " >&6; }
36824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36825$as_echo "disabled" >&6; }
36826      else
36827        # Check if the provided tool contains a complete path.
36828        tool_specified="$NM"
36829        tool_basename="${tool_specified##*/}"
36830        if test "x$tool_basename" = "x$tool_specified"; then
36831          # A command without a complete path is provided, search $PATH.
36832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36833$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36834          # Extract the first word of "$tool_basename", so it can be a program name with args.
36835set dummy $tool_basename; ac_word=$2
36836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36837$as_echo_n "checking for $ac_word... " >&6; }
36838if ${ac_cv_path_NM+:} false; then :
36839  $as_echo_n "(cached) " >&6
36840else
36841  case $NM in
36842  [\\/]* | ?:[\\/]*)
36843  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36844  ;;
36845  *)
36846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36847for as_dir in $PATH
36848do
36849  IFS=$as_save_IFS
36850  test -z "$as_dir" && as_dir=.
36851    for ac_exec_ext in '' $ac_executable_extensions; do
36852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36853    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36855    break 2
36856  fi
36857done
36858  done
36859IFS=$as_save_IFS
36860
36861  ;;
36862esac
36863fi
36864NM=$ac_cv_path_NM
36865if test -n "$NM"; then
36866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36867$as_echo "$NM" >&6; }
36868else
36869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36870$as_echo "no" >&6; }
36871fi
36872
36873
36874          if test "x$NM" = x; then
36875            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36876          fi
36877        else
36878          # Otherwise we believe it is a complete path. Use it as it is.
36879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36880$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36881          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36882$as_echo_n "checking for NM... " >&6; }
36883          if test ! -x "$tool_specified"; then
36884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36885$as_echo "not found" >&6; }
36886            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36887          fi
36888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36889$as_echo "$tool_specified" >&6; }
36890        fi
36891      fi
36892    fi
36893  fi
36894
36895
36896
36897  # Only process if variable expands to non-empty
36898
36899  if test "x$NM" != x; then
36900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36901
36902  # First separate the path from the arguments. This will split at the first
36903  # space.
36904  complete="$NM"
36905  path="${complete%% *}"
36906  tmp="$complete EOL"
36907  arguments="${tmp#* }"
36908
36909  # Input might be given as Windows format, start by converting to
36910  # unix format.
36911  new_path=`$CYGPATH -u "$path"`
36912
36913  # Now try to locate executable using which
36914  new_path=`$WHICH "$new_path" 2> /dev/null`
36915  # bat and cmd files are not always considered executable in cygwin causing which
36916  # to not find them
36917  if test "x$new_path" = x \
36918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36920    new_path=`$CYGPATH -u "$path"`
36921  fi
36922  if test "x$new_path" = x; then
36923    # Oops. Which didn't find the executable.
36924    # The splitting of arguments from the executable at a space might have been incorrect,
36925    # since paths with space are more likely in Windows. Give it another try with the whole
36926    # argument.
36927    path="$complete"
36928    arguments="EOL"
36929    new_path=`$CYGPATH -u "$path"`
36930    new_path=`$WHICH "$new_path" 2> /dev/null`
36931    # bat and cmd files are not always considered executable in cygwin causing which
36932    # to not find them
36933    if test "x$new_path" = x \
36934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36936      new_path=`$CYGPATH -u "$path"`
36937    fi
36938    if test "x$new_path" = x; then
36939      # It's still not found. Now this is an unrecoverable error.
36940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36941$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36942      has_space=`$ECHO "$complete" | $GREP " "`
36943      if test "x$has_space" != x; then
36944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36946      fi
36947      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36948    fi
36949  fi
36950
36951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36954  # "foo.exe" is OK but "foo" is an error.
36955  #
36956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36957  # It is also a way to make sure we got the proper file name for the real test later on.
36958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36959  if test "x$test_shortpath" = x; then
36960    # Short path failed, file does not exist as specified.
36961    # Try adding .exe or .cmd
36962    if test -f "${new_path}.exe"; then
36963      input_to_shortpath="${new_path}.exe"
36964    elif test -f "${new_path}.cmd"; then
36965      input_to_shortpath="${new_path}.cmd"
36966    else
36967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36968$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36971      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36972    fi
36973  else
36974    input_to_shortpath="$new_path"
36975  fi
36976
36977  # Call helper function which possibly converts this using DOS-style short mode.
36978  # If so, the updated path is stored in $new_path.
36979  new_path="$input_to_shortpath"
36980
36981  input_path="$input_to_shortpath"
36982  # Check if we need to convert this using DOS-style short mode. If the path
36983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36984  # take no chances and rewrite it.
36985  # Note: m4 eats our [], so we need to use [ and ] instead.
36986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36987  if test "x$has_forbidden_chars" != x; then
36988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36992      # Going to short mode and back again did indeed matter. Since short mode is
36993      # case insensitive, let's make it lowercase to improve readability.
36994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36995      # Now convert it back to Unix-style (cygpath)
36996      input_path=`$CYGPATH -u "$shortmode_path"`
36997      new_path="$input_path"
36998    fi
36999  fi
37000
37001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37002  if test "x$test_cygdrive_prefix" = x; then
37003    # As a simple fix, exclude /usr/bin since it's not a real path.
37004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37006      # a path prefixed by /cygdrive for fixpath to work.
37007      new_path="$CYGWIN_ROOT_PATH$input_path"
37008    fi
37009  fi
37010
37011  # remove trailing .exe if any
37012  new_path="${new_path/%.exe/}"
37013
37014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015
37016  # First separate the path from the arguments. This will split at the first
37017  # space.
37018  complete="$NM"
37019  path="${complete%% *}"
37020  tmp="$complete EOL"
37021  arguments="${tmp#* }"
37022
37023  # Input might be given as Windows format, start by converting to
37024  # unix format.
37025  new_path="$path"
37026
37027  windows_path="$new_path"
37028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37029    unix_path=`$CYGPATH -u "$windows_path"`
37030    new_path="$unix_path"
37031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37033    new_path="$unix_path"
37034  fi
37035
37036
37037  # Now try to locate executable using which
37038  new_path=`$WHICH "$new_path" 2> /dev/null`
37039
37040  if test "x$new_path" = x; then
37041    # Oops. Which didn't find the executable.
37042    # The splitting of arguments from the executable at a space might have been incorrect,
37043    # since paths with space are more likely in Windows. Give it another try with the whole
37044    # argument.
37045    path="$complete"
37046    arguments="EOL"
37047    new_path="$path"
37048
37049  windows_path="$new_path"
37050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37051    unix_path=`$CYGPATH -u "$windows_path"`
37052    new_path="$unix_path"
37053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37055    new_path="$unix_path"
37056  fi
37057
37058
37059    new_path=`$WHICH "$new_path" 2> /dev/null`
37060    # bat and cmd files are not always considered executable in MSYS causing which
37061    # to not find them
37062    if test "x$new_path" = x \
37063        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37064        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37065      new_path="$path"
37066
37067  windows_path="$new_path"
37068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37069    unix_path=`$CYGPATH -u "$windows_path"`
37070    new_path="$unix_path"
37071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37073    new_path="$unix_path"
37074  fi
37075
37076    fi
37077
37078    if test "x$new_path" = x; then
37079      # It's still not found. Now this is an unrecoverable error.
37080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37081$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37082      has_space=`$ECHO "$complete" | $GREP " "`
37083      if test "x$has_space" != x; then
37084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37086      fi
37087      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37088    fi
37089  fi
37090
37091  # Now new_path has a complete unix path to the binary
37092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37093    # Keep paths in /bin as-is, but remove trailing .exe if any
37094    new_path="${new_path/%.exe/}"
37095    # Do not save /bin paths to all_fixpath_prefixes!
37096  else
37097    # Not in mixed or Windows style, start by that.
37098    new_path=`cmd //c echo $new_path`
37099
37100  input_path="$new_path"
37101  # Check if we need to convert this using DOS-style short mode. If the path
37102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37103  # take no chances and rewrite it.
37104  # Note: m4 eats our [], so we need to use [ and ] instead.
37105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37106  if test "x$has_forbidden_chars" != x; then
37107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37109  fi
37110
37111    # Output is in $new_path
37112
37113  windows_path="$new_path"
37114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37115    unix_path=`$CYGPATH -u "$windows_path"`
37116    new_path="$unix_path"
37117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37119    new_path="$unix_path"
37120  fi
37121
37122    # remove trailing .exe if any
37123    new_path="${new_path/%.exe/}"
37124
37125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37127  fi
37128
37129    else
37130      # We're on a unix platform. Hooray! :)
37131      # First separate the path from the arguments. This will split at the first
37132      # space.
37133      complete="$NM"
37134      path="${complete%% *}"
37135      tmp="$complete EOL"
37136      arguments="${tmp#* }"
37137
37138      # Cannot rely on the command "which" here since it doesn't always work.
37139      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37140      if test -z "$is_absolute_path"; then
37141        # Path to executable is not absolute. Find it.
37142        IFS_save="$IFS"
37143        IFS=:
37144        for p in $PATH; do
37145          if test -f "$p/$path" && test -x "$p/$path"; then
37146            new_path="$p/$path"
37147            break
37148          fi
37149        done
37150        IFS="$IFS_save"
37151      else
37152        # This is an absolute path, we can use it without further modifications.
37153        new_path="$path"
37154      fi
37155
37156      if test "x$new_path" = x; then
37157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37158$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37159        has_space=`$ECHO "$complete" | $GREP " "`
37160        if test "x$has_space" != x; then
37161          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37162$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37163        fi
37164        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37165      fi
37166    fi
37167
37168    # Now join together the path and the arguments once again
37169    if test "x$arguments" != xEOL; then
37170      new_complete="$new_path ${arguments% *}"
37171    else
37172      new_complete="$new_path"
37173    fi
37174
37175    if test "x$complete" != "x$new_complete"; then
37176      NM="$new_complete"
37177      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37178$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37179    fi
37180  fi
37181
37182
37183
37184  # Publish this variable in the help.
37185
37186
37187  if [ -z "${GNM+x}" ]; then
37188    # The variable is not set by user, try to locate tool using the code snippet
37189    for ac_prog in gnm
37190do
37191  # Extract the first word of "$ac_prog", so it can be a program name with args.
37192set dummy $ac_prog; ac_word=$2
37193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37194$as_echo_n "checking for $ac_word... " >&6; }
37195if ${ac_cv_path_GNM+:} false; then :
37196  $as_echo_n "(cached) " >&6
37197else
37198  case $GNM in
37199  [\\/]* | ?:[\\/]*)
37200  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37201  ;;
37202  *)
37203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37204for as_dir in $PATH
37205do
37206  IFS=$as_save_IFS
37207  test -z "$as_dir" && as_dir=.
37208    for ac_exec_ext in '' $ac_executable_extensions; do
37209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37210    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37212    break 2
37213  fi
37214done
37215  done
37216IFS=$as_save_IFS
37217
37218  ;;
37219esac
37220fi
37221GNM=$ac_cv_path_GNM
37222if test -n "$GNM"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37224$as_echo "$GNM" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231  test -n "$GNM" && break
37232done
37233
37234  else
37235    # The variable is set, but is it from the command line or the environment?
37236
37237    # Try to remove the string !GNM! from our list.
37238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
37239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37240      # If it failed, the variable was not from the command line. Ignore it,
37241      # but warn the user (except for BASH, which is always set by the calling BASH).
37242      if test "xGNM" != xBASH; then
37243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
37244$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
37245      fi
37246      # Try to locate tool using the code snippet
37247      for ac_prog in gnm
37248do
37249  # Extract the first word of "$ac_prog", so it can be a program name with args.
37250set dummy $ac_prog; ac_word=$2
37251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37252$as_echo_n "checking for $ac_word... " >&6; }
37253if ${ac_cv_path_GNM+:} false; then :
37254  $as_echo_n "(cached) " >&6
37255else
37256  case $GNM in
37257  [\\/]* | ?:[\\/]*)
37258  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37259  ;;
37260  *)
37261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37262for as_dir in $PATH
37263do
37264  IFS=$as_save_IFS
37265  test -z "$as_dir" && as_dir=.
37266    for ac_exec_ext in '' $ac_executable_extensions; do
37267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37268    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37270    break 2
37271  fi
37272done
37273  done
37274IFS=$as_save_IFS
37275
37276  ;;
37277esac
37278fi
37279GNM=$ac_cv_path_GNM
37280if test -n "$GNM"; then
37281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37282$as_echo "$GNM" >&6; }
37283else
37284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37285$as_echo "no" >&6; }
37286fi
37287
37288
37289  test -n "$GNM" && break
37290done
37291
37292    else
37293      # If it succeeded, then it was overridden by the user. We will use it
37294      # for the tool.
37295
37296      # First remove it from the list of overridden variables, so we can test
37297      # for unknown variables in the end.
37298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37299
37300      # Check if we try to supply an empty value
37301      if test "x$GNM" = x; then
37302        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
37303$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
37304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37305$as_echo_n "checking for GNM... " >&6; }
37306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37307$as_echo "disabled" >&6; }
37308      else
37309        # Check if the provided tool contains a complete path.
37310        tool_specified="$GNM"
37311        tool_basename="${tool_specified##*/}"
37312        if test "x$tool_basename" = "x$tool_specified"; then
37313          # A command without a complete path is provided, search $PATH.
37314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
37315$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
37316          # Extract the first word of "$tool_basename", so it can be a program name with args.
37317set dummy $tool_basename; ac_word=$2
37318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37319$as_echo_n "checking for $ac_word... " >&6; }
37320if ${ac_cv_path_GNM+:} false; then :
37321  $as_echo_n "(cached) " >&6
37322else
37323  case $GNM in
37324  [\\/]* | ?:[\\/]*)
37325  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
37326  ;;
37327  *)
37328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37329for as_dir in $PATH
37330do
37331  IFS=$as_save_IFS
37332  test -z "$as_dir" && as_dir=.
37333    for ac_exec_ext in '' $ac_executable_extensions; do
37334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37335    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37337    break 2
37338  fi
37339done
37340  done
37341IFS=$as_save_IFS
37342
37343  ;;
37344esac
37345fi
37346GNM=$ac_cv_path_GNM
37347if test -n "$GNM"; then
37348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37349$as_echo "$GNM" >&6; }
37350else
37351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37352$as_echo "no" >&6; }
37353fi
37354
37355
37356          if test "x$GNM" = x; then
37357            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37358          fi
37359        else
37360          # Otherwise we believe it is a complete path. Use it as it is.
37361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37362$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37363          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37364$as_echo_n "checking for GNM... " >&6; }
37365          if test ! -x "$tool_specified"; then
37366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37367$as_echo "not found" >&6; }
37368            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37369          fi
37370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37371$as_echo "$tool_specified" >&6; }
37372        fi
37373      fi
37374    fi
37375  fi
37376
37377
37378
37379  # Only process if variable expands to non-empty
37380
37381  if test "x$GNM" != x; then
37382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37383
37384  # First separate the path from the arguments. This will split at the first
37385  # space.
37386  complete="$GNM"
37387  path="${complete%% *}"
37388  tmp="$complete EOL"
37389  arguments="${tmp#* }"
37390
37391  # Input might be given as Windows format, start by converting to
37392  # unix format.
37393  new_path=`$CYGPATH -u "$path"`
37394
37395  # Now try to locate executable using which
37396  new_path=`$WHICH "$new_path" 2> /dev/null`
37397  # bat and cmd files are not always considered executable in cygwin causing which
37398  # to not find them
37399  if test "x$new_path" = x \
37400      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37401      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37402    new_path=`$CYGPATH -u "$path"`
37403  fi
37404  if test "x$new_path" = x; then
37405    # Oops. Which didn't find the executable.
37406    # The splitting of arguments from the executable at a space might have been incorrect,
37407    # since paths with space are more likely in Windows. Give it another try with the whole
37408    # argument.
37409    path="$complete"
37410    arguments="EOL"
37411    new_path=`$CYGPATH -u "$path"`
37412    new_path=`$WHICH "$new_path" 2> /dev/null`
37413    # bat and cmd files are not always considered executable in cygwin causing which
37414    # to not find them
37415    if test "x$new_path" = x \
37416        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37417        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37418      new_path=`$CYGPATH -u "$path"`
37419    fi
37420    if test "x$new_path" = x; then
37421      # It's still not found. Now this is an unrecoverable error.
37422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37423$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37424      has_space=`$ECHO "$complete" | $GREP " "`
37425      if test "x$has_space" != x; then
37426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37428      fi
37429      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37430    fi
37431  fi
37432
37433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37436  # "foo.exe" is OK but "foo" is an error.
37437  #
37438  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37439  # It is also a way to make sure we got the proper file name for the real test later on.
37440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37441  if test "x$test_shortpath" = x; then
37442    # Short path failed, file does not exist as specified.
37443    # Try adding .exe or .cmd
37444    if test -f "${new_path}.exe"; then
37445      input_to_shortpath="${new_path}.exe"
37446    elif test -f "${new_path}.cmd"; then
37447      input_to_shortpath="${new_path}.cmd"
37448    else
37449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37450$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37451      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37452$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37453      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37454    fi
37455  else
37456    input_to_shortpath="$new_path"
37457  fi
37458
37459  # Call helper function which possibly converts this using DOS-style short mode.
37460  # If so, the updated path is stored in $new_path.
37461  new_path="$input_to_shortpath"
37462
37463  input_path="$input_to_shortpath"
37464  # Check if we need to convert this using DOS-style short mode. If the path
37465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37466  # take no chances and rewrite it.
37467  # Note: m4 eats our [], so we need to use [ and ] instead.
37468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37469  if test "x$has_forbidden_chars" != x; then
37470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37474      # Going to short mode and back again did indeed matter. Since short mode is
37475      # case insensitive, let's make it lowercase to improve readability.
37476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37477      # Now convert it back to Unix-style (cygpath)
37478      input_path=`$CYGPATH -u "$shortmode_path"`
37479      new_path="$input_path"
37480    fi
37481  fi
37482
37483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37484  if test "x$test_cygdrive_prefix" = x; then
37485    # As a simple fix, exclude /usr/bin since it's not a real path.
37486    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37488      # a path prefixed by /cygdrive for fixpath to work.
37489      new_path="$CYGWIN_ROOT_PATH$input_path"
37490    fi
37491  fi
37492
37493  # remove trailing .exe if any
37494  new_path="${new_path/%.exe/}"
37495
37496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37497
37498  # First separate the path from the arguments. This will split at the first
37499  # space.
37500  complete="$GNM"
37501  path="${complete%% *}"
37502  tmp="$complete EOL"
37503  arguments="${tmp#* }"
37504
37505  # Input might be given as Windows format, start by converting to
37506  # unix format.
37507  new_path="$path"
37508
37509  windows_path="$new_path"
37510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37511    unix_path=`$CYGPATH -u "$windows_path"`
37512    new_path="$unix_path"
37513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37515    new_path="$unix_path"
37516  fi
37517
37518
37519  # Now try to locate executable using which
37520  new_path=`$WHICH "$new_path" 2> /dev/null`
37521
37522  if test "x$new_path" = x; then
37523    # Oops. Which didn't find the executable.
37524    # The splitting of arguments from the executable at a space might have been incorrect,
37525    # since paths with space are more likely in Windows. Give it another try with the whole
37526    # argument.
37527    path="$complete"
37528    arguments="EOL"
37529    new_path="$path"
37530
37531  windows_path="$new_path"
37532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37533    unix_path=`$CYGPATH -u "$windows_path"`
37534    new_path="$unix_path"
37535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37537    new_path="$unix_path"
37538  fi
37539
37540
37541    new_path=`$WHICH "$new_path" 2> /dev/null`
37542    # bat and cmd files are not always considered executable in MSYS causing which
37543    # to not find them
37544    if test "x$new_path" = x \
37545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37547      new_path="$path"
37548
37549  windows_path="$new_path"
37550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37551    unix_path=`$CYGPATH -u "$windows_path"`
37552    new_path="$unix_path"
37553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37555    new_path="$unix_path"
37556  fi
37557
37558    fi
37559
37560    if test "x$new_path" = x; then
37561      # It's still not found. Now this is an unrecoverable error.
37562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37563$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37564      has_space=`$ECHO "$complete" | $GREP " "`
37565      if test "x$has_space" != x; then
37566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37568      fi
37569      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37570    fi
37571  fi
37572
37573  # Now new_path has a complete unix path to the binary
37574  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37575    # Keep paths in /bin as-is, but remove trailing .exe if any
37576    new_path="${new_path/%.exe/}"
37577    # Do not save /bin paths to all_fixpath_prefixes!
37578  else
37579    # Not in mixed or Windows style, start by that.
37580    new_path=`cmd //c echo $new_path`
37581
37582  input_path="$new_path"
37583  # Check if we need to convert this using DOS-style short mode. If the path
37584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37585  # take no chances and rewrite it.
37586  # Note: m4 eats our [], so we need to use [ and ] instead.
37587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37588  if test "x$has_forbidden_chars" != x; then
37589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37591  fi
37592
37593    # Output is in $new_path
37594
37595  windows_path="$new_path"
37596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37597    unix_path=`$CYGPATH -u "$windows_path"`
37598    new_path="$unix_path"
37599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37601    new_path="$unix_path"
37602  fi
37603
37604    # remove trailing .exe if any
37605    new_path="${new_path/%.exe/}"
37606
37607    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37608    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37609  fi
37610
37611    else
37612      # We're on a unix platform. Hooray! :)
37613      # First separate the path from the arguments. This will split at the first
37614      # space.
37615      complete="$GNM"
37616      path="${complete%% *}"
37617      tmp="$complete EOL"
37618      arguments="${tmp#* }"
37619
37620      # Cannot rely on the command "which" here since it doesn't always work.
37621      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37622      if test -z "$is_absolute_path"; then
37623        # Path to executable is not absolute. Find it.
37624        IFS_save="$IFS"
37625        IFS=:
37626        for p in $PATH; do
37627          if test -f "$p/$path" && test -x "$p/$path"; then
37628            new_path="$p/$path"
37629            break
37630          fi
37631        done
37632        IFS="$IFS_save"
37633      else
37634        # This is an absolute path, we can use it without further modifications.
37635        new_path="$path"
37636      fi
37637
37638      if test "x$new_path" = x; then
37639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37640$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37641        has_space=`$ECHO "$complete" | $GREP " "`
37642        if test "x$has_space" != x; then
37643          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37644$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37645        fi
37646        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37647      fi
37648    fi
37649
37650    # Now join together the path and the arguments once again
37651    if test "x$arguments" != xEOL; then
37652      new_complete="$new_path ${arguments% *}"
37653    else
37654      new_complete="$new_path"
37655    fi
37656
37657    if test "x$complete" != "x$new_complete"; then
37658      GNM="$new_complete"
37659      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37660$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37661    fi
37662  fi
37663
37664  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37665    # FIXME: we should unify this with the solaris case above.
37666
37667
37668  # Publish this variable in the help.
37669
37670
37671  if [ -z "${STRIP+x}" ]; then
37672    # The variable is not set by user, try to locate tool using the code snippet
37673    if test -n "$ac_tool_prefix"; then
37674  for ac_prog in strip
37675  do
37676    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37677set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37679$as_echo_n "checking for $ac_word... " >&6; }
37680if ${ac_cv_prog_STRIP+:} false; then :
37681  $as_echo_n "(cached) " >&6
37682else
37683  if test -n "$STRIP"; then
37684  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37685else
37686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37687for as_dir in $PATH
37688do
37689  IFS=$as_save_IFS
37690  test -z "$as_dir" && as_dir=.
37691    for ac_exec_ext in '' $ac_executable_extensions; do
37692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37693    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37695    break 2
37696  fi
37697done
37698  done
37699IFS=$as_save_IFS
37700
37701fi
37702fi
37703STRIP=$ac_cv_prog_STRIP
37704if test -n "$STRIP"; then
37705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37706$as_echo "$STRIP" >&6; }
37707else
37708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37709$as_echo "no" >&6; }
37710fi
37711
37712
37713    test -n "$STRIP" && break
37714  done
37715fi
37716if test -z "$STRIP"; then
37717  ac_ct_STRIP=$STRIP
37718  for ac_prog in strip
37719do
37720  # Extract the first word of "$ac_prog", so it can be a program name with args.
37721set dummy $ac_prog; ac_word=$2
37722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37723$as_echo_n "checking for $ac_word... " >&6; }
37724if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37725  $as_echo_n "(cached) " >&6
37726else
37727  if test -n "$ac_ct_STRIP"; then
37728  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37729else
37730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37731for as_dir in $PATH
37732do
37733  IFS=$as_save_IFS
37734  test -z "$as_dir" && as_dir=.
37735    for ac_exec_ext in '' $ac_executable_extensions; do
37736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37737    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37739    break 2
37740  fi
37741done
37742  done
37743IFS=$as_save_IFS
37744
37745fi
37746fi
37747ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37748if test -n "$ac_ct_STRIP"; then
37749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37750$as_echo "$ac_ct_STRIP" >&6; }
37751else
37752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37753$as_echo "no" >&6; }
37754fi
37755
37756
37757  test -n "$ac_ct_STRIP" && break
37758done
37759
37760  if test "x$ac_ct_STRIP" = x; then
37761    STRIP=""
37762  else
37763    case $cross_compiling:$ac_tool_warned in
37764yes:)
37765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37767ac_tool_warned=yes ;;
37768esac
37769    STRIP=$ac_ct_STRIP
37770  fi
37771fi
37772
37773  else
37774    # The variable is set, but is it from the command line or the environment?
37775
37776    # Try to remove the string !STRIP! from our list.
37777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37779      # If it failed, the variable was not from the command line. Ignore it,
37780      # but warn the user (except for BASH, which is always set by the calling BASH).
37781      if test "xSTRIP" != xBASH; then
37782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37783$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37784      fi
37785      # Try to locate tool using the code snippet
37786      if test -n "$ac_tool_prefix"; then
37787  for ac_prog in strip
37788  do
37789    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37790set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37792$as_echo_n "checking for $ac_word... " >&6; }
37793if ${ac_cv_prog_STRIP+:} false; then :
37794  $as_echo_n "(cached) " >&6
37795else
37796  if test -n "$STRIP"; then
37797  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37798else
37799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37800for as_dir in $PATH
37801do
37802  IFS=$as_save_IFS
37803  test -z "$as_dir" && as_dir=.
37804    for ac_exec_ext in '' $ac_executable_extensions; do
37805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37806    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37808    break 2
37809  fi
37810done
37811  done
37812IFS=$as_save_IFS
37813
37814fi
37815fi
37816STRIP=$ac_cv_prog_STRIP
37817if test -n "$STRIP"; then
37818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37819$as_echo "$STRIP" >&6; }
37820else
37821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37822$as_echo "no" >&6; }
37823fi
37824
37825
37826    test -n "$STRIP" && break
37827  done
37828fi
37829if test -z "$STRIP"; then
37830  ac_ct_STRIP=$STRIP
37831  for ac_prog in strip
37832do
37833  # Extract the first word of "$ac_prog", so it can be a program name with args.
37834set dummy $ac_prog; ac_word=$2
37835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37836$as_echo_n "checking for $ac_word... " >&6; }
37837if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37838  $as_echo_n "(cached) " >&6
37839else
37840  if test -n "$ac_ct_STRIP"; then
37841  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37842else
37843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37844for as_dir in $PATH
37845do
37846  IFS=$as_save_IFS
37847  test -z "$as_dir" && as_dir=.
37848    for ac_exec_ext in '' $ac_executable_extensions; do
37849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37850    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37852    break 2
37853  fi
37854done
37855  done
37856IFS=$as_save_IFS
37857
37858fi
37859fi
37860ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37861if test -n "$ac_ct_STRIP"; then
37862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37863$as_echo "$ac_ct_STRIP" >&6; }
37864else
37865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37866$as_echo "no" >&6; }
37867fi
37868
37869
37870  test -n "$ac_ct_STRIP" && break
37871done
37872
37873  if test "x$ac_ct_STRIP" = x; then
37874    STRIP=""
37875  else
37876    case $cross_compiling:$ac_tool_warned in
37877yes:)
37878{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37879$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37880ac_tool_warned=yes ;;
37881esac
37882    STRIP=$ac_ct_STRIP
37883  fi
37884fi
37885
37886    else
37887      # If it succeeded, then it was overridden by the user. We will use it
37888      # for the tool.
37889
37890      # First remove it from the list of overridden variables, so we can test
37891      # for unknown variables in the end.
37892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37893
37894      # Check if we try to supply an empty value
37895      if test "x$STRIP" = x; then
37896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37897$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37899$as_echo_n "checking for STRIP... " >&6; }
37900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37901$as_echo "disabled" >&6; }
37902      else
37903        # Check if the provided tool contains a complete path.
37904        tool_specified="$STRIP"
37905        tool_basename="${tool_specified##*/}"
37906        if test "x$tool_basename" = "x$tool_specified"; then
37907          # A command without a complete path is provided, search $PATH.
37908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37909$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37910          # Extract the first word of "$tool_basename", so it can be a program name with args.
37911set dummy $tool_basename; ac_word=$2
37912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37913$as_echo_n "checking for $ac_word... " >&6; }
37914if ${ac_cv_path_STRIP+:} false; then :
37915  $as_echo_n "(cached) " >&6
37916else
37917  case $STRIP in
37918  [\\/]* | ?:[\\/]*)
37919  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37920  ;;
37921  *)
37922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37923for as_dir in $PATH
37924do
37925  IFS=$as_save_IFS
37926  test -z "$as_dir" && as_dir=.
37927    for ac_exec_ext in '' $ac_executable_extensions; do
37928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37929    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37931    break 2
37932  fi
37933done
37934  done
37935IFS=$as_save_IFS
37936
37937  ;;
37938esac
37939fi
37940STRIP=$ac_cv_path_STRIP
37941if test -n "$STRIP"; then
37942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37943$as_echo "$STRIP" >&6; }
37944else
37945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37946$as_echo "no" >&6; }
37947fi
37948
37949
37950          if test "x$STRIP" = x; then
37951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37952          fi
37953        else
37954          # Otherwise we believe it is a complete path. Use it as it is.
37955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37956$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37958$as_echo_n "checking for STRIP... " >&6; }
37959          if test ! -x "$tool_specified"; then
37960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37961$as_echo "not found" >&6; }
37962            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37963          fi
37964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37965$as_echo "$tool_specified" >&6; }
37966        fi
37967      fi
37968    fi
37969  fi
37970
37971
37972
37973  # Only process if variable expands to non-empty
37974
37975  if test "x$STRIP" != x; then
37976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977
37978  # First separate the path from the arguments. This will split at the first
37979  # space.
37980  complete="$STRIP"
37981  path="${complete%% *}"
37982  tmp="$complete EOL"
37983  arguments="${tmp#* }"
37984
37985  # Input might be given as Windows format, start by converting to
37986  # unix format.
37987  new_path=`$CYGPATH -u "$path"`
37988
37989  # Now try to locate executable using which
37990  new_path=`$WHICH "$new_path" 2> /dev/null`
37991  # bat and cmd files are not always considered executable in cygwin causing which
37992  # to not find them
37993  if test "x$new_path" = x \
37994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37996    new_path=`$CYGPATH -u "$path"`
37997  fi
37998  if test "x$new_path" = x; then
37999    # Oops. Which didn't find the executable.
38000    # The splitting of arguments from the executable at a space might have been incorrect,
38001    # since paths with space are more likely in Windows. Give it another try with the whole
38002    # argument.
38003    path="$complete"
38004    arguments="EOL"
38005    new_path=`$CYGPATH -u "$path"`
38006    new_path=`$WHICH "$new_path" 2> /dev/null`
38007    # bat and cmd files are not always considered executable in cygwin causing which
38008    # to not find them
38009    if test "x$new_path" = x \
38010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38012      new_path=`$CYGPATH -u "$path"`
38013    fi
38014    if test "x$new_path" = x; then
38015      # It's still not found. Now this is an unrecoverable error.
38016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38017$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38018      has_space=`$ECHO "$complete" | $GREP " "`
38019      if test "x$has_space" != x; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38022      fi
38023      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38024    fi
38025  fi
38026
38027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38030  # "foo.exe" is OK but "foo" is an error.
38031  #
38032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38033  # It is also a way to make sure we got the proper file name for the real test later on.
38034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38035  if test "x$test_shortpath" = x; then
38036    # Short path failed, file does not exist as specified.
38037    # Try adding .exe or .cmd
38038    if test -f "${new_path}.exe"; then
38039      input_to_shortpath="${new_path}.exe"
38040    elif test -f "${new_path}.cmd"; then
38041      input_to_shortpath="${new_path}.cmd"
38042    else
38043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38044$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38047      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38048    fi
38049  else
38050    input_to_shortpath="$new_path"
38051  fi
38052
38053  # Call helper function which possibly converts this using DOS-style short mode.
38054  # If so, the updated path is stored in $new_path.
38055  new_path="$input_to_shortpath"
38056
38057  input_path="$input_to_shortpath"
38058  # Check if we need to convert this using DOS-style short mode. If the path
38059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38060  # take no chances and rewrite it.
38061  # Note: m4 eats our [], so we need to use [ and ] instead.
38062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38063  if test "x$has_forbidden_chars" != x; then
38064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38068      # Going to short mode and back again did indeed matter. Since short mode is
38069      # case insensitive, let's make it lowercase to improve readability.
38070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071      # Now convert it back to Unix-style (cygpath)
38072      input_path=`$CYGPATH -u "$shortmode_path"`
38073      new_path="$input_path"
38074    fi
38075  fi
38076
38077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38078  if test "x$test_cygdrive_prefix" = x; then
38079    # As a simple fix, exclude /usr/bin since it's not a real path.
38080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38082      # a path prefixed by /cygdrive for fixpath to work.
38083      new_path="$CYGWIN_ROOT_PATH$input_path"
38084    fi
38085  fi
38086
38087  # remove trailing .exe if any
38088  new_path="${new_path/%.exe/}"
38089
38090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38091
38092  # First separate the path from the arguments. This will split at the first
38093  # space.
38094  complete="$STRIP"
38095  path="${complete%% *}"
38096  tmp="$complete EOL"
38097  arguments="${tmp#* }"
38098
38099  # Input might be given as Windows format, start by converting to
38100  # unix format.
38101  new_path="$path"
38102
38103  windows_path="$new_path"
38104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38105    unix_path=`$CYGPATH -u "$windows_path"`
38106    new_path="$unix_path"
38107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38109    new_path="$unix_path"
38110  fi
38111
38112
38113  # Now try to locate executable using which
38114  new_path=`$WHICH "$new_path" 2> /dev/null`
38115
38116  if test "x$new_path" = x; then
38117    # Oops. Which didn't find the executable.
38118    # The splitting of arguments from the executable at a space might have been incorrect,
38119    # since paths with space are more likely in Windows. Give it another try with the whole
38120    # argument.
38121    path="$complete"
38122    arguments="EOL"
38123    new_path="$path"
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134
38135    new_path=`$WHICH "$new_path" 2> /dev/null`
38136    # bat and cmd files are not always considered executable in MSYS causing which
38137    # to not find them
38138    if test "x$new_path" = x \
38139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38141      new_path="$path"
38142
38143  windows_path="$new_path"
38144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38145    unix_path=`$CYGPATH -u "$windows_path"`
38146    new_path="$unix_path"
38147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38149    new_path="$unix_path"
38150  fi
38151
38152    fi
38153
38154    if test "x$new_path" = x; then
38155      # It's still not found. Now this is an unrecoverable error.
38156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38157$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38158      has_space=`$ECHO "$complete" | $GREP " "`
38159      if test "x$has_space" != x; then
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38162      fi
38163      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38164    fi
38165  fi
38166
38167  # Now new_path has a complete unix path to the binary
38168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38169    # Keep paths in /bin as-is, but remove trailing .exe if any
38170    new_path="${new_path/%.exe/}"
38171    # Do not save /bin paths to all_fixpath_prefixes!
38172  else
38173    # Not in mixed or Windows style, start by that.
38174    new_path=`cmd //c echo $new_path`
38175
38176  input_path="$new_path"
38177  # Check if we need to convert this using DOS-style short mode. If the path
38178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38179  # take no chances and rewrite it.
38180  # Note: m4 eats our [], so we need to use [ and ] instead.
38181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38182  if test "x$has_forbidden_chars" != x; then
38183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38185  fi
38186
38187    # Output is in $new_path
38188
38189  windows_path="$new_path"
38190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38191    unix_path=`$CYGPATH -u "$windows_path"`
38192    new_path="$unix_path"
38193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38195    new_path="$unix_path"
38196  fi
38197
38198    # remove trailing .exe if any
38199    new_path="${new_path/%.exe/}"
38200
38201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38203  fi
38204
38205    else
38206      # We're on a unix platform. Hooray! :)
38207      # First separate the path from the arguments. This will split at the first
38208      # space.
38209      complete="$STRIP"
38210      path="${complete%% *}"
38211      tmp="$complete EOL"
38212      arguments="${tmp#* }"
38213
38214      # Cannot rely on the command "which" here since it doesn't always work.
38215      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38216      if test -z "$is_absolute_path"; then
38217        # Path to executable is not absolute. Find it.
38218        IFS_save="$IFS"
38219        IFS=:
38220        for p in $PATH; do
38221          if test -f "$p/$path" && test -x "$p/$path"; then
38222            new_path="$p/$path"
38223            break
38224          fi
38225        done
38226        IFS="$IFS_save"
38227      else
38228        # This is an absolute path, we can use it without further modifications.
38229        new_path="$path"
38230      fi
38231
38232      if test "x$new_path" = x; then
38233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38234$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38235        has_space=`$ECHO "$complete" | $GREP " "`
38236        if test "x$has_space" != x; then
38237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38239        fi
38240        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38241      fi
38242    fi
38243
38244    # Now join together the path and the arguments once again
38245    if test "x$arguments" != xEOL; then
38246      new_complete="$new_path ${arguments% *}"
38247    else
38248      new_complete="$new_path"
38249    fi
38250
38251    if test "x$complete" != "x$new_complete"; then
38252      STRIP="$new_complete"
38253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38254$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38255    fi
38256  fi
38257
38258
38259
38260  # Publish this variable in the help.
38261
38262
38263  if [ -z "${NM+x}" ]; then
38264    # The variable is not set by user, try to locate tool using the code snippet
38265    if test -n "$ac_tool_prefix"; then
38266  for ac_prog in nm
38267  do
38268    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38269set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38271$as_echo_n "checking for $ac_word... " >&6; }
38272if ${ac_cv_prog_NM+:} false; then :
38273  $as_echo_n "(cached) " >&6
38274else
38275  if test -n "$NM"; then
38276  ac_cv_prog_NM="$NM" # Let the user override the test.
38277else
38278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38279for as_dir in $PATH
38280do
38281  IFS=$as_save_IFS
38282  test -z "$as_dir" && as_dir=.
38283    for ac_exec_ext in '' $ac_executable_extensions; do
38284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38285    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38287    break 2
38288  fi
38289done
38290  done
38291IFS=$as_save_IFS
38292
38293fi
38294fi
38295NM=$ac_cv_prog_NM
38296if test -n "$NM"; then
38297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38298$as_echo "$NM" >&6; }
38299else
38300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38301$as_echo "no" >&6; }
38302fi
38303
38304
38305    test -n "$NM" && break
38306  done
38307fi
38308if test -z "$NM"; then
38309  ac_ct_NM=$NM
38310  for ac_prog in nm
38311do
38312  # Extract the first word of "$ac_prog", so it can be a program name with args.
38313set dummy $ac_prog; ac_word=$2
38314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38315$as_echo_n "checking for $ac_word... " >&6; }
38316if ${ac_cv_prog_ac_ct_NM+:} false; then :
38317  $as_echo_n "(cached) " >&6
38318else
38319  if test -n "$ac_ct_NM"; then
38320  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38321else
38322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38323for as_dir in $PATH
38324do
38325  IFS=$as_save_IFS
38326  test -z "$as_dir" && as_dir=.
38327    for ac_exec_ext in '' $ac_executable_extensions; do
38328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38329    ac_cv_prog_ac_ct_NM="$ac_prog"
38330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38331    break 2
38332  fi
38333done
38334  done
38335IFS=$as_save_IFS
38336
38337fi
38338fi
38339ac_ct_NM=$ac_cv_prog_ac_ct_NM
38340if test -n "$ac_ct_NM"; then
38341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38342$as_echo "$ac_ct_NM" >&6; }
38343else
38344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38345$as_echo "no" >&6; }
38346fi
38347
38348
38349  test -n "$ac_ct_NM" && break
38350done
38351
38352  if test "x$ac_ct_NM" = x; then
38353    NM=""
38354  else
38355    case $cross_compiling:$ac_tool_warned in
38356yes:)
38357{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38358$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38359ac_tool_warned=yes ;;
38360esac
38361    NM=$ac_ct_NM
38362  fi
38363fi
38364
38365  else
38366    # The variable is set, but is it from the command line or the environment?
38367
38368    # Try to remove the string !NM! from our list.
38369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38371      # If it failed, the variable was not from the command line. Ignore it,
38372      # but warn the user (except for BASH, which is always set by the calling BASH).
38373      if test "xNM" != xBASH; then
38374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38375$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38376      fi
38377      # Try to locate tool using the code snippet
38378      if test -n "$ac_tool_prefix"; then
38379  for ac_prog in nm
38380  do
38381    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38382set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38384$as_echo_n "checking for $ac_word... " >&6; }
38385if ${ac_cv_prog_NM+:} false; then :
38386  $as_echo_n "(cached) " >&6
38387else
38388  if test -n "$NM"; then
38389  ac_cv_prog_NM="$NM" # Let the user override the test.
38390else
38391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38392for as_dir in $PATH
38393do
38394  IFS=$as_save_IFS
38395  test -z "$as_dir" && as_dir=.
38396    for ac_exec_ext in '' $ac_executable_extensions; do
38397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38398    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38400    break 2
38401  fi
38402done
38403  done
38404IFS=$as_save_IFS
38405
38406fi
38407fi
38408NM=$ac_cv_prog_NM
38409if test -n "$NM"; then
38410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38411$as_echo "$NM" >&6; }
38412else
38413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38414$as_echo "no" >&6; }
38415fi
38416
38417
38418    test -n "$NM" && break
38419  done
38420fi
38421if test -z "$NM"; then
38422  ac_ct_NM=$NM
38423  for ac_prog in nm
38424do
38425  # Extract the first word of "$ac_prog", so it can be a program name with args.
38426set dummy $ac_prog; ac_word=$2
38427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38428$as_echo_n "checking for $ac_word... " >&6; }
38429if ${ac_cv_prog_ac_ct_NM+:} false; then :
38430  $as_echo_n "(cached) " >&6
38431else
38432  if test -n "$ac_ct_NM"; then
38433  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38434else
38435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38436for as_dir in $PATH
38437do
38438  IFS=$as_save_IFS
38439  test -z "$as_dir" && as_dir=.
38440    for ac_exec_ext in '' $ac_executable_extensions; do
38441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38442    ac_cv_prog_ac_ct_NM="$ac_prog"
38443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38444    break 2
38445  fi
38446done
38447  done
38448IFS=$as_save_IFS
38449
38450fi
38451fi
38452ac_ct_NM=$ac_cv_prog_ac_ct_NM
38453if test -n "$ac_ct_NM"; then
38454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38455$as_echo "$ac_ct_NM" >&6; }
38456else
38457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38458$as_echo "no" >&6; }
38459fi
38460
38461
38462  test -n "$ac_ct_NM" && break
38463done
38464
38465  if test "x$ac_ct_NM" = x; then
38466    NM=""
38467  else
38468    case $cross_compiling:$ac_tool_warned in
38469yes:)
38470{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38471$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38472ac_tool_warned=yes ;;
38473esac
38474    NM=$ac_ct_NM
38475  fi
38476fi
38477
38478    else
38479      # If it succeeded, then it was overridden by the user. We will use it
38480      # for the tool.
38481
38482      # First remove it from the list of overridden variables, so we can test
38483      # for unknown variables in the end.
38484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38485
38486      # Check if we try to supply an empty value
38487      if test "x$NM" = x; then
38488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38489$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38491$as_echo_n "checking for NM... " >&6; }
38492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38493$as_echo "disabled" >&6; }
38494      else
38495        # Check if the provided tool contains a complete path.
38496        tool_specified="$NM"
38497        tool_basename="${tool_specified##*/}"
38498        if test "x$tool_basename" = "x$tool_specified"; then
38499          # A command without a complete path is provided, search $PATH.
38500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38501$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38502          # Extract the first word of "$tool_basename", so it can be a program name with args.
38503set dummy $tool_basename; ac_word=$2
38504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38505$as_echo_n "checking for $ac_word... " >&6; }
38506if ${ac_cv_path_NM+:} false; then :
38507  $as_echo_n "(cached) " >&6
38508else
38509  case $NM in
38510  [\\/]* | ?:[\\/]*)
38511  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38512  ;;
38513  *)
38514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38515for as_dir in $PATH
38516do
38517  IFS=$as_save_IFS
38518  test -z "$as_dir" && as_dir=.
38519    for ac_exec_ext in '' $ac_executable_extensions; do
38520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38521    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38523    break 2
38524  fi
38525done
38526  done
38527IFS=$as_save_IFS
38528
38529  ;;
38530esac
38531fi
38532NM=$ac_cv_path_NM
38533if test -n "$NM"; then
38534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38535$as_echo "$NM" >&6; }
38536else
38537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38538$as_echo "no" >&6; }
38539fi
38540
38541
38542          if test "x$NM" = x; then
38543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38544          fi
38545        else
38546          # Otherwise we believe it is a complete path. Use it as it is.
38547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38548$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38550$as_echo_n "checking for NM... " >&6; }
38551          if test ! -x "$tool_specified"; then
38552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38553$as_echo "not found" >&6; }
38554            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38555          fi
38556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38557$as_echo "$tool_specified" >&6; }
38558        fi
38559      fi
38560    fi
38561  fi
38562
38563
38564
38565  # Only process if variable expands to non-empty
38566
38567  if test "x$NM" != x; then
38568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38569
38570  # First separate the path from the arguments. This will split at the first
38571  # space.
38572  complete="$NM"
38573  path="${complete%% *}"
38574  tmp="$complete EOL"
38575  arguments="${tmp#* }"
38576
38577  # Input might be given as Windows format, start by converting to
38578  # unix format.
38579  new_path=`$CYGPATH -u "$path"`
38580
38581  # Now try to locate executable using which
38582  new_path=`$WHICH "$new_path" 2> /dev/null`
38583  # bat and cmd files are not always considered executable in cygwin causing which
38584  # to not find them
38585  if test "x$new_path" = x \
38586      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38587      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38588    new_path=`$CYGPATH -u "$path"`
38589  fi
38590  if test "x$new_path" = x; then
38591    # Oops. Which didn't find the executable.
38592    # The splitting of arguments from the executable at a space might have been incorrect,
38593    # since paths with space are more likely in Windows. Give it another try with the whole
38594    # argument.
38595    path="$complete"
38596    arguments="EOL"
38597    new_path=`$CYGPATH -u "$path"`
38598    new_path=`$WHICH "$new_path" 2> /dev/null`
38599    # bat and cmd files are not always considered executable in cygwin causing which
38600    # to not find them
38601    if test "x$new_path" = x \
38602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38604      new_path=`$CYGPATH -u "$path"`
38605    fi
38606    if test "x$new_path" = x; then
38607      # It's still not found. Now this is an unrecoverable error.
38608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38609$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38610      has_space=`$ECHO "$complete" | $GREP " "`
38611      if test "x$has_space" != x; then
38612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38614      fi
38615      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38616    fi
38617  fi
38618
38619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38622  # "foo.exe" is OK but "foo" is an error.
38623  #
38624  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38625  # It is also a way to make sure we got the proper file name for the real test later on.
38626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38627  if test "x$test_shortpath" = x; then
38628    # Short path failed, file does not exist as specified.
38629    # Try adding .exe or .cmd
38630    if test -f "${new_path}.exe"; then
38631      input_to_shortpath="${new_path}.exe"
38632    elif test -f "${new_path}.cmd"; then
38633      input_to_shortpath="${new_path}.cmd"
38634    else
38635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38636$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38637      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38638$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38639      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38640    fi
38641  else
38642    input_to_shortpath="$new_path"
38643  fi
38644
38645  # Call helper function which possibly converts this using DOS-style short mode.
38646  # If so, the updated path is stored in $new_path.
38647  new_path="$input_to_shortpath"
38648
38649  input_path="$input_to_shortpath"
38650  # Check if we need to convert this using DOS-style short mode. If the path
38651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38652  # take no chances and rewrite it.
38653  # Note: m4 eats our [], so we need to use [ and ] instead.
38654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38655  if test "x$has_forbidden_chars" != x; then
38656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38660      # Going to short mode and back again did indeed matter. Since short mode is
38661      # case insensitive, let's make it lowercase to improve readability.
38662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38663      # Now convert it back to Unix-style (cygpath)
38664      input_path=`$CYGPATH -u "$shortmode_path"`
38665      new_path="$input_path"
38666    fi
38667  fi
38668
38669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38670  if test "x$test_cygdrive_prefix" = x; then
38671    # As a simple fix, exclude /usr/bin since it's not a real path.
38672    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38674      # a path prefixed by /cygdrive for fixpath to work.
38675      new_path="$CYGWIN_ROOT_PATH$input_path"
38676    fi
38677  fi
38678
38679  # remove trailing .exe if any
38680  new_path="${new_path/%.exe/}"
38681
38682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38683
38684  # First separate the path from the arguments. This will split at the first
38685  # space.
38686  complete="$NM"
38687  path="${complete%% *}"
38688  tmp="$complete EOL"
38689  arguments="${tmp#* }"
38690
38691  # Input might be given as Windows format, start by converting to
38692  # unix format.
38693  new_path="$path"
38694
38695  windows_path="$new_path"
38696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38697    unix_path=`$CYGPATH -u "$windows_path"`
38698    new_path="$unix_path"
38699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38701    new_path="$unix_path"
38702  fi
38703
38704
38705  # Now try to locate executable using which
38706  new_path=`$WHICH "$new_path" 2> /dev/null`
38707
38708  if test "x$new_path" = x; then
38709    # Oops. Which didn't find the executable.
38710    # The splitting of arguments from the executable at a space might have been incorrect,
38711    # since paths with space are more likely in Windows. Give it another try with the whole
38712    # argument.
38713    path="$complete"
38714    arguments="EOL"
38715    new_path="$path"
38716
38717  windows_path="$new_path"
38718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38719    unix_path=`$CYGPATH -u "$windows_path"`
38720    new_path="$unix_path"
38721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38723    new_path="$unix_path"
38724  fi
38725
38726
38727    new_path=`$WHICH "$new_path" 2> /dev/null`
38728    # bat and cmd files are not always considered executable in MSYS causing which
38729    # to not find them
38730    if test "x$new_path" = x \
38731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38733      new_path="$path"
38734
38735  windows_path="$new_path"
38736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38737    unix_path=`$CYGPATH -u "$windows_path"`
38738    new_path="$unix_path"
38739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38741    new_path="$unix_path"
38742  fi
38743
38744    fi
38745
38746    if test "x$new_path" = x; then
38747      # It's still not found. Now this is an unrecoverable error.
38748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38749$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38750      has_space=`$ECHO "$complete" | $GREP " "`
38751      if test "x$has_space" != x; then
38752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38754      fi
38755      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38756    fi
38757  fi
38758
38759  # Now new_path has a complete unix path to the binary
38760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38761    # Keep paths in /bin as-is, but remove trailing .exe if any
38762    new_path="${new_path/%.exe/}"
38763    # Do not save /bin paths to all_fixpath_prefixes!
38764  else
38765    # Not in mixed or Windows style, start by that.
38766    new_path=`cmd //c echo $new_path`
38767
38768  input_path="$new_path"
38769  # Check if we need to convert this using DOS-style short mode. If the path
38770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38771  # take no chances and rewrite it.
38772  # Note: m4 eats our [], so we need to use [ and ] instead.
38773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38774  if test "x$has_forbidden_chars" != x; then
38775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38777  fi
38778
38779    # Output is in $new_path
38780
38781  windows_path="$new_path"
38782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38783    unix_path=`$CYGPATH -u "$windows_path"`
38784    new_path="$unix_path"
38785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38787    new_path="$unix_path"
38788  fi
38789
38790    # remove trailing .exe if any
38791    new_path="${new_path/%.exe/}"
38792
38793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38795  fi
38796
38797    else
38798      # We're on a unix platform. Hooray! :)
38799      # First separate the path from the arguments. This will split at the first
38800      # space.
38801      complete="$NM"
38802      path="${complete%% *}"
38803      tmp="$complete EOL"
38804      arguments="${tmp#* }"
38805
38806      # Cannot rely on the command "which" here since it doesn't always work.
38807      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38808      if test -z "$is_absolute_path"; then
38809        # Path to executable is not absolute. Find it.
38810        IFS_save="$IFS"
38811        IFS=:
38812        for p in $PATH; do
38813          if test -f "$p/$path" && test -x "$p/$path"; then
38814            new_path="$p/$path"
38815            break
38816          fi
38817        done
38818        IFS="$IFS_save"
38819      else
38820        # This is an absolute path, we can use it without further modifications.
38821        new_path="$path"
38822      fi
38823
38824      if test "x$new_path" = x; then
38825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38826$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38827        has_space=`$ECHO "$complete" | $GREP " "`
38828        if test "x$has_space" != x; then
38829          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38831        fi
38832        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38833      fi
38834    fi
38835
38836    # Now join together the path and the arguments once again
38837    if test "x$arguments" != xEOL; then
38838      new_complete="$new_path ${arguments% *}"
38839    else
38840      new_complete="$new_path"
38841    fi
38842
38843    if test "x$complete" != "x$new_complete"; then
38844      NM="$new_complete"
38845      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38846$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38847    fi
38848  fi
38849
38850    GNM="$NM"
38851
38852  fi
38853
38854  # objcopy is used for moving debug symbols to separate files when
38855  # full debug symbols are enabled.
38856  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38857
38858
38859  # Publish this variable in the help.
38860
38861
38862  if [ -z "${OBJCOPY+x}" ]; then
38863    # The variable is not set by user, try to locate tool using the code snippet
38864    if test -n "$ac_tool_prefix"; then
38865  for ac_prog in gobjcopy objcopy
38866  do
38867    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38870$as_echo_n "checking for $ac_word... " >&6; }
38871if ${ac_cv_prog_OBJCOPY+:} false; then :
38872  $as_echo_n "(cached) " >&6
38873else
38874  if test -n "$OBJCOPY"; then
38875  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38876else
38877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38878for as_dir in $PATH
38879do
38880  IFS=$as_save_IFS
38881  test -z "$as_dir" && as_dir=.
38882    for ac_exec_ext in '' $ac_executable_extensions; do
38883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38884    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38886    break 2
38887  fi
38888done
38889  done
38890IFS=$as_save_IFS
38891
38892fi
38893fi
38894OBJCOPY=$ac_cv_prog_OBJCOPY
38895if test -n "$OBJCOPY"; then
38896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38897$as_echo "$OBJCOPY" >&6; }
38898else
38899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38900$as_echo "no" >&6; }
38901fi
38902
38903
38904    test -n "$OBJCOPY" && break
38905  done
38906fi
38907if test -z "$OBJCOPY"; then
38908  ac_ct_OBJCOPY=$OBJCOPY
38909  for ac_prog in gobjcopy objcopy
38910do
38911  # Extract the first word of "$ac_prog", so it can be a program name with args.
38912set dummy $ac_prog; ac_word=$2
38913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38914$as_echo_n "checking for $ac_word... " >&6; }
38915if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38916  $as_echo_n "(cached) " >&6
38917else
38918  if test -n "$ac_ct_OBJCOPY"; then
38919  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38920else
38921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38922for as_dir in $PATH
38923do
38924  IFS=$as_save_IFS
38925  test -z "$as_dir" && as_dir=.
38926    for ac_exec_ext in '' $ac_executable_extensions; do
38927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38928    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38930    break 2
38931  fi
38932done
38933  done
38934IFS=$as_save_IFS
38935
38936fi
38937fi
38938ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38939if test -n "$ac_ct_OBJCOPY"; then
38940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38941$as_echo "$ac_ct_OBJCOPY" >&6; }
38942else
38943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38944$as_echo "no" >&6; }
38945fi
38946
38947
38948  test -n "$ac_ct_OBJCOPY" && break
38949done
38950
38951  if test "x$ac_ct_OBJCOPY" = x; then
38952    OBJCOPY=""
38953  else
38954    case $cross_compiling:$ac_tool_warned in
38955yes:)
38956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38958ac_tool_warned=yes ;;
38959esac
38960    OBJCOPY=$ac_ct_OBJCOPY
38961  fi
38962fi
38963
38964  else
38965    # The variable is set, but is it from the command line or the environment?
38966
38967    # Try to remove the string !OBJCOPY! from our list.
38968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38970      # If it failed, the variable was not from the command line. Ignore it,
38971      # but warn the user (except for BASH, which is always set by the calling BASH).
38972      if test "xOBJCOPY" != xBASH; then
38973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38974$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38975      fi
38976      # Try to locate tool using the code snippet
38977      if test -n "$ac_tool_prefix"; then
38978  for ac_prog in gobjcopy objcopy
38979  do
38980    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38981set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38983$as_echo_n "checking for $ac_word... " >&6; }
38984if ${ac_cv_prog_OBJCOPY+:} false; then :
38985  $as_echo_n "(cached) " >&6
38986else
38987  if test -n "$OBJCOPY"; then
38988  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38989else
38990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38991for as_dir in $PATH
38992do
38993  IFS=$as_save_IFS
38994  test -z "$as_dir" && as_dir=.
38995    for ac_exec_ext in '' $ac_executable_extensions; do
38996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38997    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38999    break 2
39000  fi
39001done
39002  done
39003IFS=$as_save_IFS
39004
39005fi
39006fi
39007OBJCOPY=$ac_cv_prog_OBJCOPY
39008if test -n "$OBJCOPY"; then
39009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39010$as_echo "$OBJCOPY" >&6; }
39011else
39012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39013$as_echo "no" >&6; }
39014fi
39015
39016
39017    test -n "$OBJCOPY" && break
39018  done
39019fi
39020if test -z "$OBJCOPY"; then
39021  ac_ct_OBJCOPY=$OBJCOPY
39022  for ac_prog in gobjcopy objcopy
39023do
39024  # Extract the first word of "$ac_prog", so it can be a program name with args.
39025set dummy $ac_prog; ac_word=$2
39026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39027$as_echo_n "checking for $ac_word... " >&6; }
39028if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39029  $as_echo_n "(cached) " >&6
39030else
39031  if test -n "$ac_ct_OBJCOPY"; then
39032  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39033else
39034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39035for as_dir in $PATH
39036do
39037  IFS=$as_save_IFS
39038  test -z "$as_dir" && as_dir=.
39039    for ac_exec_ext in '' $ac_executable_extensions; do
39040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39041    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39043    break 2
39044  fi
39045done
39046  done
39047IFS=$as_save_IFS
39048
39049fi
39050fi
39051ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39052if test -n "$ac_ct_OBJCOPY"; then
39053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39054$as_echo "$ac_ct_OBJCOPY" >&6; }
39055else
39056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39057$as_echo "no" >&6; }
39058fi
39059
39060
39061  test -n "$ac_ct_OBJCOPY" && break
39062done
39063
39064  if test "x$ac_ct_OBJCOPY" = x; then
39065    OBJCOPY=""
39066  else
39067    case $cross_compiling:$ac_tool_warned in
39068yes:)
39069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39071ac_tool_warned=yes ;;
39072esac
39073    OBJCOPY=$ac_ct_OBJCOPY
39074  fi
39075fi
39076
39077    else
39078      # If it succeeded, then it was overridden by the user. We will use it
39079      # for the tool.
39080
39081      # First remove it from the list of overridden variables, so we can test
39082      # for unknown variables in the end.
39083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39084
39085      # Check if we try to supply an empty value
39086      if test "x$OBJCOPY" = x; then
39087        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
39088$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
39089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39090$as_echo_n "checking for OBJCOPY... " >&6; }
39091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39092$as_echo "disabled" >&6; }
39093      else
39094        # Check if the provided tool contains a complete path.
39095        tool_specified="$OBJCOPY"
39096        tool_basename="${tool_specified##*/}"
39097        if test "x$tool_basename" = "x$tool_specified"; then
39098          # A command without a complete path is provided, search $PATH.
39099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
39100$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
39101          # Extract the first word of "$tool_basename", so it can be a program name with args.
39102set dummy $tool_basename; ac_word=$2
39103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39104$as_echo_n "checking for $ac_word... " >&6; }
39105if ${ac_cv_path_OBJCOPY+:} false; then :
39106  $as_echo_n "(cached) " >&6
39107else
39108  case $OBJCOPY in
39109  [\\/]* | ?:[\\/]*)
39110  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
39111  ;;
39112  *)
39113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39114for as_dir in $PATH
39115do
39116  IFS=$as_save_IFS
39117  test -z "$as_dir" && as_dir=.
39118    for ac_exec_ext in '' $ac_executable_extensions; do
39119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39120    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
39121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39122    break 2
39123  fi
39124done
39125  done
39126IFS=$as_save_IFS
39127
39128  ;;
39129esac
39130fi
39131OBJCOPY=$ac_cv_path_OBJCOPY
39132if test -n "$OBJCOPY"; then
39133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39134$as_echo "$OBJCOPY" >&6; }
39135else
39136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39137$as_echo "no" >&6; }
39138fi
39139
39140
39141          if test "x$OBJCOPY" = x; then
39142            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39143          fi
39144        else
39145          # Otherwise we believe it is a complete path. Use it as it is.
39146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
39147$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
39148          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39149$as_echo_n "checking for OBJCOPY... " >&6; }
39150          if test ! -x "$tool_specified"; then
39151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39152$as_echo "not found" >&6; }
39153            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
39154          fi
39155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39156$as_echo "$tool_specified" >&6; }
39157        fi
39158      fi
39159    fi
39160  fi
39161
39162
39163    # Only call fixup if objcopy was found.
39164    if test -n "$OBJCOPY"; then
39165
39166  # Only process if variable expands to non-empty
39167
39168  if test "x$OBJCOPY" != x; then
39169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170
39171  # First separate the path from the arguments. This will split at the first
39172  # space.
39173  complete="$OBJCOPY"
39174  path="${complete%% *}"
39175  tmp="$complete EOL"
39176  arguments="${tmp#* }"
39177
39178  # Input might be given as Windows format, start by converting to
39179  # unix format.
39180  new_path=`$CYGPATH -u "$path"`
39181
39182  # Now try to locate executable using which
39183  new_path=`$WHICH "$new_path" 2> /dev/null`
39184  # bat and cmd files are not always considered executable in cygwin causing which
39185  # to not find them
39186  if test "x$new_path" = x \
39187      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39188      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39189    new_path=`$CYGPATH -u "$path"`
39190  fi
39191  if test "x$new_path" = x; then
39192    # Oops. Which didn't find the executable.
39193    # The splitting of arguments from the executable at a space might have been incorrect,
39194    # since paths with space are more likely in Windows. Give it another try with the whole
39195    # argument.
39196    path="$complete"
39197    arguments="EOL"
39198    new_path=`$CYGPATH -u "$path"`
39199    new_path=`$WHICH "$new_path" 2> /dev/null`
39200    # bat and cmd files are not always considered executable in cygwin causing which
39201    # to not find them
39202    if test "x$new_path" = x \
39203        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39204        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39205      new_path=`$CYGPATH -u "$path"`
39206    fi
39207    if test "x$new_path" = x; then
39208      # It's still not found. Now this is an unrecoverable error.
39209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39210$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39211      has_space=`$ECHO "$complete" | $GREP " "`
39212      if test "x$has_space" != x; then
39213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39215      fi
39216      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39217    fi
39218  fi
39219
39220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39223  # "foo.exe" is OK but "foo" is an error.
39224  #
39225  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39226  # It is also a way to make sure we got the proper file name for the real test later on.
39227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39228  if test "x$test_shortpath" = x; then
39229    # Short path failed, file does not exist as specified.
39230    # Try adding .exe or .cmd
39231    if test -f "${new_path}.exe"; then
39232      input_to_shortpath="${new_path}.exe"
39233    elif test -f "${new_path}.cmd"; then
39234      input_to_shortpath="${new_path}.cmd"
39235    else
39236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39237$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39238      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39239$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39240      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39241    fi
39242  else
39243    input_to_shortpath="$new_path"
39244  fi
39245
39246  # Call helper function which possibly converts this using DOS-style short mode.
39247  # If so, the updated path is stored in $new_path.
39248  new_path="$input_to_shortpath"
39249
39250  input_path="$input_to_shortpath"
39251  # Check if we need to convert this using DOS-style short mode. If the path
39252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39253  # take no chances and rewrite it.
39254  # Note: m4 eats our [], so we need to use [ and ] instead.
39255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39256  if test "x$has_forbidden_chars" != x; then
39257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39261      # Going to short mode and back again did indeed matter. Since short mode is
39262      # case insensitive, let's make it lowercase to improve readability.
39263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39264      # Now convert it back to Unix-style (cygpath)
39265      input_path=`$CYGPATH -u "$shortmode_path"`
39266      new_path="$input_path"
39267    fi
39268  fi
39269
39270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39271  if test "x$test_cygdrive_prefix" = x; then
39272    # As a simple fix, exclude /usr/bin since it's not a real path.
39273    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39275      # a path prefixed by /cygdrive for fixpath to work.
39276      new_path="$CYGWIN_ROOT_PATH$input_path"
39277    fi
39278  fi
39279
39280  # remove trailing .exe if any
39281  new_path="${new_path/%.exe/}"
39282
39283    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39284
39285  # First separate the path from the arguments. This will split at the first
39286  # space.
39287  complete="$OBJCOPY"
39288  path="${complete%% *}"
39289  tmp="$complete EOL"
39290  arguments="${tmp#* }"
39291
39292  # Input might be given as Windows format, start by converting to
39293  # unix format.
39294  new_path="$path"
39295
39296  windows_path="$new_path"
39297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39298    unix_path=`$CYGPATH -u "$windows_path"`
39299    new_path="$unix_path"
39300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39302    new_path="$unix_path"
39303  fi
39304
39305
39306  # Now try to locate executable using which
39307  new_path=`$WHICH "$new_path" 2> /dev/null`
39308
39309  if test "x$new_path" = x; then
39310    # Oops. Which didn't find the executable.
39311    # The splitting of arguments from the executable at a space might have been incorrect,
39312    # since paths with space are more likely in Windows. Give it another try with the whole
39313    # argument.
39314    path="$complete"
39315    arguments="EOL"
39316    new_path="$path"
39317
39318  windows_path="$new_path"
39319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39320    unix_path=`$CYGPATH -u "$windows_path"`
39321    new_path="$unix_path"
39322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39324    new_path="$unix_path"
39325  fi
39326
39327
39328    new_path=`$WHICH "$new_path" 2> /dev/null`
39329    # bat and cmd files are not always considered executable in MSYS causing which
39330    # to not find them
39331    if test "x$new_path" = x \
39332        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39333        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39334      new_path="$path"
39335
39336  windows_path="$new_path"
39337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39338    unix_path=`$CYGPATH -u "$windows_path"`
39339    new_path="$unix_path"
39340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39342    new_path="$unix_path"
39343  fi
39344
39345    fi
39346
39347    if test "x$new_path" = x; then
39348      # It's still not found. Now this is an unrecoverable error.
39349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39350$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39351      has_space=`$ECHO "$complete" | $GREP " "`
39352      if test "x$has_space" != x; then
39353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39355      fi
39356      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39357    fi
39358  fi
39359
39360  # Now new_path has a complete unix path to the binary
39361  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39362    # Keep paths in /bin as-is, but remove trailing .exe if any
39363    new_path="${new_path/%.exe/}"
39364    # Do not save /bin paths to all_fixpath_prefixes!
39365  else
39366    # Not in mixed or Windows style, start by that.
39367    new_path=`cmd //c echo $new_path`
39368
39369  input_path="$new_path"
39370  # Check if we need to convert this using DOS-style short mode. If the path
39371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39372  # take no chances and rewrite it.
39373  # Note: m4 eats our [], so we need to use [ and ] instead.
39374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39375  if test "x$has_forbidden_chars" != x; then
39376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39378  fi
39379
39380    # Output is in $new_path
39381
39382  windows_path="$new_path"
39383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39384    unix_path=`$CYGPATH -u "$windows_path"`
39385    new_path="$unix_path"
39386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39388    new_path="$unix_path"
39389  fi
39390
39391    # remove trailing .exe if any
39392    new_path="${new_path/%.exe/}"
39393
39394    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39395    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39396  fi
39397
39398    else
39399      # We're on a unix platform. Hooray! :)
39400      # First separate the path from the arguments. This will split at the first
39401      # space.
39402      complete="$OBJCOPY"
39403      path="${complete%% *}"
39404      tmp="$complete EOL"
39405      arguments="${tmp#* }"
39406
39407      # Cannot rely on the command "which" here since it doesn't always work.
39408      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39409      if test -z "$is_absolute_path"; then
39410        # Path to executable is not absolute. Find it.
39411        IFS_save="$IFS"
39412        IFS=:
39413        for p in $PATH; do
39414          if test -f "$p/$path" && test -x "$p/$path"; then
39415            new_path="$p/$path"
39416            break
39417          fi
39418        done
39419        IFS="$IFS_save"
39420      else
39421        # This is an absolute path, we can use it without further modifications.
39422        new_path="$path"
39423      fi
39424
39425      if test "x$new_path" = x; then
39426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39427$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39428        has_space=`$ECHO "$complete" | $GREP " "`
39429        if test "x$has_space" != x; then
39430          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39431$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39432        fi
39433        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39434      fi
39435    fi
39436
39437    # Now join together the path and the arguments once again
39438    if test "x$arguments" != xEOL; then
39439      new_complete="$new_path ${arguments% *}"
39440    else
39441      new_complete="$new_path"
39442    fi
39443
39444    if test "x$complete" != "x$new_complete"; then
39445      OBJCOPY="$new_complete"
39446      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39447$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39448    fi
39449  fi
39450
39451      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
39452        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
39453        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
39454        # - version number is last blank separate word on first line
39455        # - version number formats that have been seen:
39456        #   - <major>.<minor>
39457        #   - <major>.<minor>.<micro>
39458        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
39459        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
39460         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
39461              -e 's/.* //' \
39462              -e '/^[01]\./b bad' \
39463              -e '/^2\./{' \
39464              -e '  s/^2\.//' \
39465              -e '  /^[0-9]$/b bad' \
39466              -e '  /^[0-9]\./b bad' \
39467              -e '  /^1[0-9]$/b bad' \
39468              -e '  /^1[0-9]\./b bad' \
39469              -e '  /^20\./b bad' \
39470              -e '  /^21\.0$/b bad' \
39471              -e '  /^21\.0\./b bad' \
39472              -e '}' \
39473              -e ':good' \
39474              -e 's/.*/VALID_VERSION/p' \
39475              -e 'q' \
39476              -e ':bad' \
39477              -e 's/.*/BAD_VERSION/p' \
39478              -e 'q'`
39479        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
39480          OBJCOPY=
39481          { $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
39482$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
39483          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
39484$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
39485          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
39486$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
39487          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
39488$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
39489          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
39490$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
39491        fi
39492      fi
39493    fi
39494  fi
39495
39496
39497
39498  # Publish this variable in the help.
39499
39500
39501  if [ -z "${OBJDUMP+x}" ]; then
39502    # The variable is not set by user, try to locate tool using the code snippet
39503    if test -n "$ac_tool_prefix"; then
39504  for ac_prog in gobjdump objdump
39505  do
39506    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39507set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39509$as_echo_n "checking for $ac_word... " >&6; }
39510if ${ac_cv_prog_OBJDUMP+:} false; then :
39511  $as_echo_n "(cached) " >&6
39512else
39513  if test -n "$OBJDUMP"; then
39514  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39515else
39516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39517for as_dir in $PATH
39518do
39519  IFS=$as_save_IFS
39520  test -z "$as_dir" && as_dir=.
39521    for ac_exec_ext in '' $ac_executable_extensions; do
39522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39523    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39525    break 2
39526  fi
39527done
39528  done
39529IFS=$as_save_IFS
39530
39531fi
39532fi
39533OBJDUMP=$ac_cv_prog_OBJDUMP
39534if test -n "$OBJDUMP"; then
39535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39536$as_echo "$OBJDUMP" >&6; }
39537else
39538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39539$as_echo "no" >&6; }
39540fi
39541
39542
39543    test -n "$OBJDUMP" && break
39544  done
39545fi
39546if test -z "$OBJDUMP"; then
39547  ac_ct_OBJDUMP=$OBJDUMP
39548  for ac_prog in gobjdump objdump
39549do
39550  # Extract the first word of "$ac_prog", so it can be a program name with args.
39551set dummy $ac_prog; ac_word=$2
39552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39553$as_echo_n "checking for $ac_word... " >&6; }
39554if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39555  $as_echo_n "(cached) " >&6
39556else
39557  if test -n "$ac_ct_OBJDUMP"; then
39558  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39559else
39560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39561for as_dir in $PATH
39562do
39563  IFS=$as_save_IFS
39564  test -z "$as_dir" && as_dir=.
39565    for ac_exec_ext in '' $ac_executable_extensions; do
39566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39567    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39569    break 2
39570  fi
39571done
39572  done
39573IFS=$as_save_IFS
39574
39575fi
39576fi
39577ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39578if test -n "$ac_ct_OBJDUMP"; then
39579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39580$as_echo "$ac_ct_OBJDUMP" >&6; }
39581else
39582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39583$as_echo "no" >&6; }
39584fi
39585
39586
39587  test -n "$ac_ct_OBJDUMP" && break
39588done
39589
39590  if test "x$ac_ct_OBJDUMP" = x; then
39591    OBJDUMP=""
39592  else
39593    case $cross_compiling:$ac_tool_warned in
39594yes:)
39595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39597ac_tool_warned=yes ;;
39598esac
39599    OBJDUMP=$ac_ct_OBJDUMP
39600  fi
39601fi
39602
39603  else
39604    # The variable is set, but is it from the command line or the environment?
39605
39606    # Try to remove the string !OBJDUMP! from our list.
39607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39609      # If it failed, the variable was not from the command line. Ignore it,
39610      # but warn the user (except for BASH, which is always set by the calling BASH).
39611      if test "xOBJDUMP" != xBASH; then
39612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39613$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39614      fi
39615      # Try to locate tool using the code snippet
39616      if test -n "$ac_tool_prefix"; then
39617  for ac_prog in gobjdump objdump
39618  do
39619    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39620set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39622$as_echo_n "checking for $ac_word... " >&6; }
39623if ${ac_cv_prog_OBJDUMP+:} false; then :
39624  $as_echo_n "(cached) " >&6
39625else
39626  if test -n "$OBJDUMP"; then
39627  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39628else
39629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39630for as_dir in $PATH
39631do
39632  IFS=$as_save_IFS
39633  test -z "$as_dir" && as_dir=.
39634    for ac_exec_ext in '' $ac_executable_extensions; do
39635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39636    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39638    break 2
39639  fi
39640done
39641  done
39642IFS=$as_save_IFS
39643
39644fi
39645fi
39646OBJDUMP=$ac_cv_prog_OBJDUMP
39647if test -n "$OBJDUMP"; then
39648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39649$as_echo "$OBJDUMP" >&6; }
39650else
39651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39652$as_echo "no" >&6; }
39653fi
39654
39655
39656    test -n "$OBJDUMP" && break
39657  done
39658fi
39659if test -z "$OBJDUMP"; then
39660  ac_ct_OBJDUMP=$OBJDUMP
39661  for ac_prog in gobjdump objdump
39662do
39663  # Extract the first word of "$ac_prog", so it can be a program name with args.
39664set dummy $ac_prog; ac_word=$2
39665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39666$as_echo_n "checking for $ac_word... " >&6; }
39667if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39668  $as_echo_n "(cached) " >&6
39669else
39670  if test -n "$ac_ct_OBJDUMP"; then
39671  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39672else
39673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39674for as_dir in $PATH
39675do
39676  IFS=$as_save_IFS
39677  test -z "$as_dir" && as_dir=.
39678    for ac_exec_ext in '' $ac_executable_extensions; do
39679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39680    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39682    break 2
39683  fi
39684done
39685  done
39686IFS=$as_save_IFS
39687
39688fi
39689fi
39690ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39691if test -n "$ac_ct_OBJDUMP"; then
39692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39693$as_echo "$ac_ct_OBJDUMP" >&6; }
39694else
39695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39696$as_echo "no" >&6; }
39697fi
39698
39699
39700  test -n "$ac_ct_OBJDUMP" && break
39701done
39702
39703  if test "x$ac_ct_OBJDUMP" = x; then
39704    OBJDUMP=""
39705  else
39706    case $cross_compiling:$ac_tool_warned in
39707yes:)
39708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39710ac_tool_warned=yes ;;
39711esac
39712    OBJDUMP=$ac_ct_OBJDUMP
39713  fi
39714fi
39715
39716    else
39717      # If it succeeded, then it was overridden by the user. We will use it
39718      # for the tool.
39719
39720      # First remove it from the list of overridden variables, so we can test
39721      # for unknown variables in the end.
39722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39723
39724      # Check if we try to supply an empty value
39725      if test "x$OBJDUMP" = x; then
39726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
39727$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
39728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39729$as_echo_n "checking for OBJDUMP... " >&6; }
39730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39731$as_echo "disabled" >&6; }
39732      else
39733        # Check if the provided tool contains a complete path.
39734        tool_specified="$OBJDUMP"
39735        tool_basename="${tool_specified##*/}"
39736        if test "x$tool_basename" = "x$tool_specified"; then
39737          # A command without a complete path is provided, search $PATH.
39738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39739$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39740          # Extract the first word of "$tool_basename", so it can be a program name with args.
39741set dummy $tool_basename; ac_word=$2
39742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39743$as_echo_n "checking for $ac_word... " >&6; }
39744if ${ac_cv_path_OBJDUMP+:} false; then :
39745  $as_echo_n "(cached) " >&6
39746else
39747  case $OBJDUMP in
39748  [\\/]* | ?:[\\/]*)
39749  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39750  ;;
39751  *)
39752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39753for as_dir in $PATH
39754do
39755  IFS=$as_save_IFS
39756  test -z "$as_dir" && as_dir=.
39757    for ac_exec_ext in '' $ac_executable_extensions; do
39758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39759    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39761    break 2
39762  fi
39763done
39764  done
39765IFS=$as_save_IFS
39766
39767  ;;
39768esac
39769fi
39770OBJDUMP=$ac_cv_path_OBJDUMP
39771if test -n "$OBJDUMP"; then
39772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39773$as_echo "$OBJDUMP" >&6; }
39774else
39775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39776$as_echo "no" >&6; }
39777fi
39778
39779
39780          if test "x$OBJDUMP" = x; then
39781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39782          fi
39783        else
39784          # Otherwise we believe it is a complete path. Use it as it is.
39785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39786$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39788$as_echo_n "checking for OBJDUMP... " >&6; }
39789          if test ! -x "$tool_specified"; then
39790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39791$as_echo "not found" >&6; }
39792            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39793          fi
39794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39795$as_echo "$tool_specified" >&6; }
39796        fi
39797      fi
39798    fi
39799  fi
39800
39801
39802  if test "x$OBJDUMP" != x; then
39803    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39804    # bails if argument is missing.
39805
39806  # Only process if variable expands to non-empty
39807
39808  if test "x$OBJDUMP" != x; then
39809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39810
39811  # First separate the path from the arguments. This will split at the first
39812  # space.
39813  complete="$OBJDUMP"
39814  path="${complete%% *}"
39815  tmp="$complete EOL"
39816  arguments="${tmp#* }"
39817
39818  # Input might be given as Windows format, start by converting to
39819  # unix format.
39820  new_path=`$CYGPATH -u "$path"`
39821
39822  # Now try to locate executable using which
39823  new_path=`$WHICH "$new_path" 2> /dev/null`
39824  # bat and cmd files are not always considered executable in cygwin causing which
39825  # to not find them
39826  if test "x$new_path" = x \
39827      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39828      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39829    new_path=`$CYGPATH -u "$path"`
39830  fi
39831  if test "x$new_path" = x; then
39832    # Oops. Which didn't find the executable.
39833    # The splitting of arguments from the executable at a space might have been incorrect,
39834    # since paths with space are more likely in Windows. Give it another try with the whole
39835    # argument.
39836    path="$complete"
39837    arguments="EOL"
39838    new_path=`$CYGPATH -u "$path"`
39839    new_path=`$WHICH "$new_path" 2> /dev/null`
39840    # bat and cmd files are not always considered executable in cygwin causing which
39841    # to not find them
39842    if test "x$new_path" = x \
39843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39845      new_path=`$CYGPATH -u "$path"`
39846    fi
39847    if test "x$new_path" = x; then
39848      # It's still not found. Now this is an unrecoverable error.
39849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39850$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39851      has_space=`$ECHO "$complete" | $GREP " "`
39852      if test "x$has_space" != x; then
39853        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39854$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39855      fi
39856      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39857    fi
39858  fi
39859
39860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39863  # "foo.exe" is OK but "foo" is an error.
39864  #
39865  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39866  # It is also a way to make sure we got the proper file name for the real test later on.
39867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39868  if test "x$test_shortpath" = x; then
39869    # Short path failed, file does not exist as specified.
39870    # Try adding .exe or .cmd
39871    if test -f "${new_path}.exe"; then
39872      input_to_shortpath="${new_path}.exe"
39873    elif test -f "${new_path}.cmd"; then
39874      input_to_shortpath="${new_path}.cmd"
39875    else
39876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39877$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39878      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39879$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39880      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39881    fi
39882  else
39883    input_to_shortpath="$new_path"
39884  fi
39885
39886  # Call helper function which possibly converts this using DOS-style short mode.
39887  # If so, the updated path is stored in $new_path.
39888  new_path="$input_to_shortpath"
39889
39890  input_path="$input_to_shortpath"
39891  # Check if we need to convert this using DOS-style short mode. If the path
39892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39893  # take no chances and rewrite it.
39894  # Note: m4 eats our [], so we need to use [ and ] instead.
39895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39896  if test "x$has_forbidden_chars" != x; then
39897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39901      # Going to short mode and back again did indeed matter. Since short mode is
39902      # case insensitive, let's make it lowercase to improve readability.
39903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39904      # Now convert it back to Unix-style (cygpath)
39905      input_path=`$CYGPATH -u "$shortmode_path"`
39906      new_path="$input_path"
39907    fi
39908  fi
39909
39910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39911  if test "x$test_cygdrive_prefix" = x; then
39912    # As a simple fix, exclude /usr/bin since it's not a real path.
39913    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39915      # a path prefixed by /cygdrive for fixpath to work.
39916      new_path="$CYGWIN_ROOT_PATH$input_path"
39917    fi
39918  fi
39919
39920  # remove trailing .exe if any
39921  new_path="${new_path/%.exe/}"
39922
39923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924
39925  # First separate the path from the arguments. This will split at the first
39926  # space.
39927  complete="$OBJDUMP"
39928  path="${complete%% *}"
39929  tmp="$complete EOL"
39930  arguments="${tmp#* }"
39931
39932  # Input might be given as Windows format, start by converting to
39933  # unix format.
39934  new_path="$path"
39935
39936  windows_path="$new_path"
39937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39938    unix_path=`$CYGPATH -u "$windows_path"`
39939    new_path="$unix_path"
39940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39942    new_path="$unix_path"
39943  fi
39944
39945
39946  # Now try to locate executable using which
39947  new_path=`$WHICH "$new_path" 2> /dev/null`
39948
39949  if test "x$new_path" = x; then
39950    # Oops. Which didn't find the executable.
39951    # The splitting of arguments from the executable at a space might have been incorrect,
39952    # since paths with space are more likely in Windows. Give it another try with the whole
39953    # argument.
39954    path="$complete"
39955    arguments="EOL"
39956    new_path="$path"
39957
39958  windows_path="$new_path"
39959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39960    unix_path=`$CYGPATH -u "$windows_path"`
39961    new_path="$unix_path"
39962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39964    new_path="$unix_path"
39965  fi
39966
39967
39968    new_path=`$WHICH "$new_path" 2> /dev/null`
39969    # bat and cmd files are not always considered executable in MSYS causing which
39970    # to not find them
39971    if test "x$new_path" = x \
39972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39974      new_path="$path"
39975
39976  windows_path="$new_path"
39977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978    unix_path=`$CYGPATH -u "$windows_path"`
39979    new_path="$unix_path"
39980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982    new_path="$unix_path"
39983  fi
39984
39985    fi
39986
39987    if test "x$new_path" = x; then
39988      # It's still not found. Now this is an unrecoverable error.
39989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39990$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39991      has_space=`$ECHO "$complete" | $GREP " "`
39992      if test "x$has_space" != x; then
39993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39995      fi
39996      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39997    fi
39998  fi
39999
40000  # Now new_path has a complete unix path to the binary
40001  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40002    # Keep paths in /bin as-is, but remove trailing .exe if any
40003    new_path="${new_path/%.exe/}"
40004    # Do not save /bin paths to all_fixpath_prefixes!
40005  else
40006    # Not in mixed or Windows style, start by that.
40007    new_path=`cmd //c echo $new_path`
40008
40009  input_path="$new_path"
40010  # Check if we need to convert this using DOS-style short mode. If the path
40011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40012  # take no chances and rewrite it.
40013  # Note: m4 eats our [], so we need to use [ and ] instead.
40014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40015  if test "x$has_forbidden_chars" != x; then
40016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40018  fi
40019
40020    # Output is in $new_path
40021
40022  windows_path="$new_path"
40023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40024    unix_path=`$CYGPATH -u "$windows_path"`
40025    new_path="$unix_path"
40026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40028    new_path="$unix_path"
40029  fi
40030
40031    # remove trailing .exe if any
40032    new_path="${new_path/%.exe/}"
40033
40034    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40035    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40036  fi
40037
40038    else
40039      # We're on a unix platform. Hooray! :)
40040      # First separate the path from the arguments. This will split at the first
40041      # space.
40042      complete="$OBJDUMP"
40043      path="${complete%% *}"
40044      tmp="$complete EOL"
40045      arguments="${tmp#* }"
40046
40047      # Cannot rely on the command "which" here since it doesn't always work.
40048      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40049      if test -z "$is_absolute_path"; then
40050        # Path to executable is not absolute. Find it.
40051        IFS_save="$IFS"
40052        IFS=:
40053        for p in $PATH; do
40054          if test -f "$p/$path" && test -x "$p/$path"; then
40055            new_path="$p/$path"
40056            break
40057          fi
40058        done
40059        IFS="$IFS_save"
40060      else
40061        # This is an absolute path, we can use it without further modifications.
40062        new_path="$path"
40063      fi
40064
40065      if test "x$new_path" = x; then
40066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40067$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40068        has_space=`$ECHO "$complete" | $GREP " "`
40069        if test "x$has_space" != x; then
40070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40072        fi
40073        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40074      fi
40075    fi
40076
40077    # Now join together the path and the arguments once again
40078    if test "x$arguments" != xEOL; then
40079      new_complete="$new_path ${arguments% *}"
40080    else
40081      new_complete="$new_path"
40082    fi
40083
40084    if test "x$complete" != "x$new_complete"; then
40085      OBJDUMP="$new_complete"
40086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
40087$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
40088    fi
40089  fi
40090
40091  fi
40092
40093
40094  # Restore old path.
40095  PATH="$OLD_PATH"
40096
40097  # Restore the flags to the user specified values.
40098  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
40099  CFLAGS="$ORG_CFLAGS"
40100  CXXFLAGS="$ORG_CXXFLAGS"
40101
40102
40103# Finally do some processing after the detection phase
40104
40105  if test "x$COMPILE_TYPE" = "xcross"; then
40106    # Now we need to find a C/C++ compiler that can build executables for the
40107    # build platform. We can't use the AC_PROG_CC macro, since it can only be
40108    # used once. Also, we need to do this without adding a tools dir to the
40109    # path, otherwise we might pick up cross-compilers which don't use standard
40110    # naming.
40111
40112    # FIXME: we should list the discovered compilers as an exclude pattern!
40113    # If we do that, we can do this detection before POST_DETECTION, and still
40114    # find the build compilers in the tools dir, if needed.
40115
40116
40117  # Publish this variable in the help.
40118
40119
40120  if [ -z "${BUILD_CC+x}" ]; then
40121    # The variable is not set by user, try to locate tool using the code snippet
40122    for ac_prog in cl cc gcc
40123do
40124  # Extract the first word of "$ac_prog", so it can be a program name with args.
40125set dummy $ac_prog; ac_word=$2
40126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40127$as_echo_n "checking for $ac_word... " >&6; }
40128if ${ac_cv_path_BUILD_CC+:} false; then :
40129  $as_echo_n "(cached) " >&6
40130else
40131  case $BUILD_CC in
40132  [\\/]* | ?:[\\/]*)
40133  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40134  ;;
40135  *)
40136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40137for as_dir in $PATH
40138do
40139  IFS=$as_save_IFS
40140  test -z "$as_dir" && as_dir=.
40141    for ac_exec_ext in '' $ac_executable_extensions; do
40142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40143    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40145    break 2
40146  fi
40147done
40148  done
40149IFS=$as_save_IFS
40150
40151  ;;
40152esac
40153fi
40154BUILD_CC=$ac_cv_path_BUILD_CC
40155if test -n "$BUILD_CC"; then
40156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40157$as_echo "$BUILD_CC" >&6; }
40158else
40159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40160$as_echo "no" >&6; }
40161fi
40162
40163
40164  test -n "$BUILD_CC" && break
40165done
40166
40167  else
40168    # The variable is set, but is it from the command line or the environment?
40169
40170    # Try to remove the string !BUILD_CC! from our list.
40171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
40172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40173      # If it failed, the variable was not from the command line. Ignore it,
40174      # but warn the user (except for BASH, which is always set by the calling BASH).
40175      if test "xBUILD_CC" != xBASH; then
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
40177$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
40178      fi
40179      # Try to locate tool using the code snippet
40180      for ac_prog in cl cc gcc
40181do
40182  # Extract the first word of "$ac_prog", so it can be a program name with args.
40183set dummy $ac_prog; ac_word=$2
40184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40185$as_echo_n "checking for $ac_word... " >&6; }
40186if ${ac_cv_path_BUILD_CC+:} false; then :
40187  $as_echo_n "(cached) " >&6
40188else
40189  case $BUILD_CC in
40190  [\\/]* | ?:[\\/]*)
40191  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40192  ;;
40193  *)
40194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40195for as_dir in $PATH
40196do
40197  IFS=$as_save_IFS
40198  test -z "$as_dir" && as_dir=.
40199    for ac_exec_ext in '' $ac_executable_extensions; do
40200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40201    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40203    break 2
40204  fi
40205done
40206  done
40207IFS=$as_save_IFS
40208
40209  ;;
40210esac
40211fi
40212BUILD_CC=$ac_cv_path_BUILD_CC
40213if test -n "$BUILD_CC"; then
40214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40215$as_echo "$BUILD_CC" >&6; }
40216else
40217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40218$as_echo "no" >&6; }
40219fi
40220
40221
40222  test -n "$BUILD_CC" && break
40223done
40224
40225    else
40226      # If it succeeded, then it was overridden by the user. We will use it
40227      # for the tool.
40228
40229      # First remove it from the list of overridden variables, so we can test
40230      # for unknown variables in the end.
40231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40232
40233      # Check if we try to supply an empty value
40234      if test "x$BUILD_CC" = x; then
40235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
40236$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
40237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40238$as_echo_n "checking for BUILD_CC... " >&6; }
40239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40240$as_echo "disabled" >&6; }
40241      else
40242        # Check if the provided tool contains a complete path.
40243        tool_specified="$BUILD_CC"
40244        tool_basename="${tool_specified##*/}"
40245        if test "x$tool_basename" = "x$tool_specified"; then
40246          # A command without a complete path is provided, search $PATH.
40247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
40248$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
40249          # Extract the first word of "$tool_basename", so it can be a program name with args.
40250set dummy $tool_basename; ac_word=$2
40251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40252$as_echo_n "checking for $ac_word... " >&6; }
40253if ${ac_cv_path_BUILD_CC+:} false; then :
40254  $as_echo_n "(cached) " >&6
40255else
40256  case $BUILD_CC in
40257  [\\/]* | ?:[\\/]*)
40258  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
40259  ;;
40260  *)
40261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40262for as_dir in $PATH
40263do
40264  IFS=$as_save_IFS
40265  test -z "$as_dir" && as_dir=.
40266    for ac_exec_ext in '' $ac_executable_extensions; do
40267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40268    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
40269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40270    break 2
40271  fi
40272done
40273  done
40274IFS=$as_save_IFS
40275
40276  ;;
40277esac
40278fi
40279BUILD_CC=$ac_cv_path_BUILD_CC
40280if test -n "$BUILD_CC"; then
40281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
40282$as_echo "$BUILD_CC" >&6; }
40283else
40284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40285$as_echo "no" >&6; }
40286fi
40287
40288
40289          if test "x$BUILD_CC" = x; then
40290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40291          fi
40292        else
40293          # Otherwise we believe it is a complete path. Use it as it is.
40294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
40295$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
40296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
40297$as_echo_n "checking for BUILD_CC... " >&6; }
40298          if test ! -x "$tool_specified"; then
40299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40300$as_echo "not found" >&6; }
40301            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
40302          fi
40303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40304$as_echo "$tool_specified" >&6; }
40305        fi
40306      fi
40307    fi
40308  fi
40309
40310
40311
40312  # Only process if variable expands to non-empty
40313
40314  if test "x$BUILD_CC" != x; then
40315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40316
40317  # First separate the path from the arguments. This will split at the first
40318  # space.
40319  complete="$BUILD_CC"
40320  path="${complete%% *}"
40321  tmp="$complete EOL"
40322  arguments="${tmp#* }"
40323
40324  # Input might be given as Windows format, start by converting to
40325  # unix format.
40326  new_path=`$CYGPATH -u "$path"`
40327
40328  # Now try to locate executable using which
40329  new_path=`$WHICH "$new_path" 2> /dev/null`
40330  # bat and cmd files are not always considered executable in cygwin causing which
40331  # to not find them
40332  if test "x$new_path" = x \
40333      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40334      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40335    new_path=`$CYGPATH -u "$path"`
40336  fi
40337  if test "x$new_path" = x; then
40338    # Oops. Which didn't find the executable.
40339    # The splitting of arguments from the executable at a space might have been incorrect,
40340    # since paths with space are more likely in Windows. Give it another try with the whole
40341    # argument.
40342    path="$complete"
40343    arguments="EOL"
40344    new_path=`$CYGPATH -u "$path"`
40345    new_path=`$WHICH "$new_path" 2> /dev/null`
40346    # bat and cmd files are not always considered executable in cygwin causing which
40347    # to not find them
40348    if test "x$new_path" = x \
40349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40351      new_path=`$CYGPATH -u "$path"`
40352    fi
40353    if test "x$new_path" = x; then
40354      # It's still not found. Now this is an unrecoverable error.
40355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40356$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40357      has_space=`$ECHO "$complete" | $GREP " "`
40358      if test "x$has_space" != x; then
40359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40361      fi
40362      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40363    fi
40364  fi
40365
40366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40369  # "foo.exe" is OK but "foo" is an error.
40370  #
40371  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40372  # It is also a way to make sure we got the proper file name for the real test later on.
40373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40374  if test "x$test_shortpath" = x; then
40375    # Short path failed, file does not exist as specified.
40376    # Try adding .exe or .cmd
40377    if test -f "${new_path}.exe"; then
40378      input_to_shortpath="${new_path}.exe"
40379    elif test -f "${new_path}.cmd"; then
40380      input_to_shortpath="${new_path}.cmd"
40381    else
40382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
40383$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
40384      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40385$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40386      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40387    fi
40388  else
40389    input_to_shortpath="$new_path"
40390  fi
40391
40392  # Call helper function which possibly converts this using DOS-style short mode.
40393  # If so, the updated path is stored in $new_path.
40394  new_path="$input_to_shortpath"
40395
40396  input_path="$input_to_shortpath"
40397  # Check if we need to convert this using DOS-style short mode. If the path
40398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40399  # take no chances and rewrite it.
40400  # Note: m4 eats our [], so we need to use [ and ] instead.
40401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40402  if test "x$has_forbidden_chars" != x; then
40403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40407      # Going to short mode and back again did indeed matter. Since short mode is
40408      # case insensitive, let's make it lowercase to improve readability.
40409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40410      # Now convert it back to Unix-style (cygpath)
40411      input_path=`$CYGPATH -u "$shortmode_path"`
40412      new_path="$input_path"
40413    fi
40414  fi
40415
40416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40417  if test "x$test_cygdrive_prefix" = x; then
40418    # As a simple fix, exclude /usr/bin since it's not a real path.
40419    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40421      # a path prefixed by /cygdrive for fixpath to work.
40422      new_path="$CYGWIN_ROOT_PATH$input_path"
40423    fi
40424  fi
40425
40426  # remove trailing .exe if any
40427  new_path="${new_path/%.exe/}"
40428
40429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40430
40431  # First separate the path from the arguments. This will split at the first
40432  # space.
40433  complete="$BUILD_CC"
40434  path="${complete%% *}"
40435  tmp="$complete EOL"
40436  arguments="${tmp#* }"
40437
40438  # Input might be given as Windows format, start by converting to
40439  # unix format.
40440  new_path="$path"
40441
40442  windows_path="$new_path"
40443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40444    unix_path=`$CYGPATH -u "$windows_path"`
40445    new_path="$unix_path"
40446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40448    new_path="$unix_path"
40449  fi
40450
40451
40452  # Now try to locate executable using which
40453  new_path=`$WHICH "$new_path" 2> /dev/null`
40454
40455  if test "x$new_path" = x; then
40456    # Oops. Which didn't find the executable.
40457    # The splitting of arguments from the executable at a space might have been incorrect,
40458    # since paths with space are more likely in Windows. Give it another try with the whole
40459    # argument.
40460    path="$complete"
40461    arguments="EOL"
40462    new_path="$path"
40463
40464  windows_path="$new_path"
40465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40466    unix_path=`$CYGPATH -u "$windows_path"`
40467    new_path="$unix_path"
40468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40470    new_path="$unix_path"
40471  fi
40472
40473
40474    new_path=`$WHICH "$new_path" 2> /dev/null`
40475    # bat and cmd files are not always considered executable in MSYS causing which
40476    # to not find them
40477    if test "x$new_path" = x \
40478        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40479        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40480      new_path="$path"
40481
40482  windows_path="$new_path"
40483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40484    unix_path=`$CYGPATH -u "$windows_path"`
40485    new_path="$unix_path"
40486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40488    new_path="$unix_path"
40489  fi
40490
40491    fi
40492
40493    if test "x$new_path" = x; then
40494      # It's still not found. Now this is an unrecoverable error.
40495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40496$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40497      has_space=`$ECHO "$complete" | $GREP " "`
40498      if test "x$has_space" != x; then
40499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40501      fi
40502      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40503    fi
40504  fi
40505
40506  # Now new_path has a complete unix path to the binary
40507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40508    # Keep paths in /bin as-is, but remove trailing .exe if any
40509    new_path="${new_path/%.exe/}"
40510    # Do not save /bin paths to all_fixpath_prefixes!
40511  else
40512    # Not in mixed or Windows style, start by that.
40513    new_path=`cmd //c echo $new_path`
40514
40515  input_path="$new_path"
40516  # Check if we need to convert this using DOS-style short mode. If the path
40517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40518  # take no chances and rewrite it.
40519  # Note: m4 eats our [], so we need to use [ and ] instead.
40520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40521  if test "x$has_forbidden_chars" != x; then
40522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40524  fi
40525
40526    # Output is in $new_path
40527
40528  windows_path="$new_path"
40529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40530    unix_path=`$CYGPATH -u "$windows_path"`
40531    new_path="$unix_path"
40532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40534    new_path="$unix_path"
40535  fi
40536
40537    # remove trailing .exe if any
40538    new_path="${new_path/%.exe/}"
40539
40540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40542  fi
40543
40544    else
40545      # We're on a unix platform. Hooray! :)
40546      # First separate the path from the arguments. This will split at the first
40547      # space.
40548      complete="$BUILD_CC"
40549      path="${complete%% *}"
40550      tmp="$complete EOL"
40551      arguments="${tmp#* }"
40552
40553      # Cannot rely on the command "which" here since it doesn't always work.
40554      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40555      if test -z "$is_absolute_path"; then
40556        # Path to executable is not absolute. Find it.
40557        IFS_save="$IFS"
40558        IFS=:
40559        for p in $PATH; do
40560          if test -f "$p/$path" && test -x "$p/$path"; then
40561            new_path="$p/$path"
40562            break
40563          fi
40564        done
40565        IFS="$IFS_save"
40566      else
40567        # This is an absolute path, we can use it without further modifications.
40568        new_path="$path"
40569      fi
40570
40571      if test "x$new_path" = x; then
40572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40573$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40574        has_space=`$ECHO "$complete" | $GREP " "`
40575        if test "x$has_space" != x; then
40576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40578        fi
40579        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40580      fi
40581    fi
40582
40583    # Now join together the path and the arguments once again
40584    if test "x$arguments" != xEOL; then
40585      new_complete="$new_path ${arguments% *}"
40586    else
40587      new_complete="$new_path"
40588    fi
40589
40590    if test "x$complete" != "x$new_complete"; then
40591      BUILD_CC="$new_complete"
40592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40593$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40594    fi
40595  fi
40596
40597
40598
40599  # Publish this variable in the help.
40600
40601
40602  if [ -z "${BUILD_CXX+x}" ]; then
40603    # The variable is not set by user, try to locate tool using the code snippet
40604    for ac_prog in cl CC g++
40605do
40606  # Extract the first word of "$ac_prog", so it can be a program name with args.
40607set dummy $ac_prog; ac_word=$2
40608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40609$as_echo_n "checking for $ac_word... " >&6; }
40610if ${ac_cv_path_BUILD_CXX+:} false; then :
40611  $as_echo_n "(cached) " >&6
40612else
40613  case $BUILD_CXX in
40614  [\\/]* | ?:[\\/]*)
40615  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40616  ;;
40617  *)
40618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40619for as_dir in $PATH
40620do
40621  IFS=$as_save_IFS
40622  test -z "$as_dir" && as_dir=.
40623    for ac_exec_ext in '' $ac_executable_extensions; do
40624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40625    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40627    break 2
40628  fi
40629done
40630  done
40631IFS=$as_save_IFS
40632
40633  ;;
40634esac
40635fi
40636BUILD_CXX=$ac_cv_path_BUILD_CXX
40637if test -n "$BUILD_CXX"; then
40638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40639$as_echo "$BUILD_CXX" >&6; }
40640else
40641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40642$as_echo "no" >&6; }
40643fi
40644
40645
40646  test -n "$BUILD_CXX" && break
40647done
40648
40649  else
40650    # The variable is set, but is it from the command line or the environment?
40651
40652    # Try to remove the string !BUILD_CXX! from our list.
40653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40655      # If it failed, the variable was not from the command line. Ignore it,
40656      # but warn the user (except for BASH, which is always set by the calling BASH).
40657      if test "xBUILD_CXX" != xBASH; then
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40659$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40660      fi
40661      # Try to locate tool using the code snippet
40662      for ac_prog in cl CC g++
40663do
40664  # Extract the first word of "$ac_prog", so it can be a program name with args.
40665set dummy $ac_prog; ac_word=$2
40666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40667$as_echo_n "checking for $ac_word... " >&6; }
40668if ${ac_cv_path_BUILD_CXX+:} false; then :
40669  $as_echo_n "(cached) " >&6
40670else
40671  case $BUILD_CXX in
40672  [\\/]* | ?:[\\/]*)
40673  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40674  ;;
40675  *)
40676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40677for as_dir in $PATH
40678do
40679  IFS=$as_save_IFS
40680  test -z "$as_dir" && as_dir=.
40681    for ac_exec_ext in '' $ac_executable_extensions; do
40682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40683    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40685    break 2
40686  fi
40687done
40688  done
40689IFS=$as_save_IFS
40690
40691  ;;
40692esac
40693fi
40694BUILD_CXX=$ac_cv_path_BUILD_CXX
40695if test -n "$BUILD_CXX"; then
40696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40697$as_echo "$BUILD_CXX" >&6; }
40698else
40699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40700$as_echo "no" >&6; }
40701fi
40702
40703
40704  test -n "$BUILD_CXX" && break
40705done
40706
40707    else
40708      # If it succeeded, then it was overridden by the user. We will use it
40709      # for the tool.
40710
40711      # First remove it from the list of overridden variables, so we can test
40712      # for unknown variables in the end.
40713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40714
40715      # Check if we try to supply an empty value
40716      if test "x$BUILD_CXX" = x; then
40717        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
40718$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
40719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40720$as_echo_n "checking for BUILD_CXX... " >&6; }
40721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40722$as_echo "disabled" >&6; }
40723      else
40724        # Check if the provided tool contains a complete path.
40725        tool_specified="$BUILD_CXX"
40726        tool_basename="${tool_specified##*/}"
40727        if test "x$tool_basename" = "x$tool_specified"; then
40728          # A command without a complete path is provided, search $PATH.
40729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40730$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40731          # Extract the first word of "$tool_basename", so it can be a program name with args.
40732set dummy $tool_basename; ac_word=$2
40733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40734$as_echo_n "checking for $ac_word... " >&6; }
40735if ${ac_cv_path_BUILD_CXX+:} false; then :
40736  $as_echo_n "(cached) " >&6
40737else
40738  case $BUILD_CXX in
40739  [\\/]* | ?:[\\/]*)
40740  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40741  ;;
40742  *)
40743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40744for as_dir in $PATH
40745do
40746  IFS=$as_save_IFS
40747  test -z "$as_dir" && as_dir=.
40748    for ac_exec_ext in '' $ac_executable_extensions; do
40749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40750    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40752    break 2
40753  fi
40754done
40755  done
40756IFS=$as_save_IFS
40757
40758  ;;
40759esac
40760fi
40761BUILD_CXX=$ac_cv_path_BUILD_CXX
40762if test -n "$BUILD_CXX"; then
40763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40764$as_echo "$BUILD_CXX" >&6; }
40765else
40766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40767$as_echo "no" >&6; }
40768fi
40769
40770
40771          if test "x$BUILD_CXX" = x; then
40772            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40773          fi
40774        else
40775          # Otherwise we believe it is a complete path. Use it as it is.
40776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40777$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40779$as_echo_n "checking for BUILD_CXX... " >&6; }
40780          if test ! -x "$tool_specified"; then
40781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40782$as_echo "not found" >&6; }
40783            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40784          fi
40785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40786$as_echo "$tool_specified" >&6; }
40787        fi
40788      fi
40789    fi
40790  fi
40791
40792
40793
40794  # Only process if variable expands to non-empty
40795
40796  if test "x$BUILD_CXX" != x; then
40797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40798
40799  # First separate the path from the arguments. This will split at the first
40800  # space.
40801  complete="$BUILD_CXX"
40802  path="${complete%% *}"
40803  tmp="$complete EOL"
40804  arguments="${tmp#* }"
40805
40806  # Input might be given as Windows format, start by converting to
40807  # unix format.
40808  new_path=`$CYGPATH -u "$path"`
40809
40810  # Now try to locate executable using which
40811  new_path=`$WHICH "$new_path" 2> /dev/null`
40812  # bat and cmd files are not always considered executable in cygwin causing which
40813  # to not find them
40814  if test "x$new_path" = x \
40815      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40816      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40817    new_path=`$CYGPATH -u "$path"`
40818  fi
40819  if test "x$new_path" = x; then
40820    # Oops. Which didn't find the executable.
40821    # The splitting of arguments from the executable at a space might have been incorrect,
40822    # since paths with space are more likely in Windows. Give it another try with the whole
40823    # argument.
40824    path="$complete"
40825    arguments="EOL"
40826    new_path=`$CYGPATH -u "$path"`
40827    new_path=`$WHICH "$new_path" 2> /dev/null`
40828    # bat and cmd files are not always considered executable in cygwin causing which
40829    # to not find them
40830    if test "x$new_path" = x \
40831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40833      new_path=`$CYGPATH -u "$path"`
40834    fi
40835    if test "x$new_path" = x; then
40836      # It's still not found. Now this is an unrecoverable error.
40837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40838$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40839      has_space=`$ECHO "$complete" | $GREP " "`
40840      if test "x$has_space" != x; then
40841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40843      fi
40844      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40845    fi
40846  fi
40847
40848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40851  # "foo.exe" is OK but "foo" is an error.
40852  #
40853  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40854  # It is also a way to make sure we got the proper file name for the real test later on.
40855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40856  if test "x$test_shortpath" = x; then
40857    # Short path failed, file does not exist as specified.
40858    # Try adding .exe or .cmd
40859    if test -f "${new_path}.exe"; then
40860      input_to_shortpath="${new_path}.exe"
40861    elif test -f "${new_path}.cmd"; then
40862      input_to_shortpath="${new_path}.cmd"
40863    else
40864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40865$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40868      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40869    fi
40870  else
40871    input_to_shortpath="$new_path"
40872  fi
40873
40874  # Call helper function which possibly converts this using DOS-style short mode.
40875  # If so, the updated path is stored in $new_path.
40876  new_path="$input_to_shortpath"
40877
40878  input_path="$input_to_shortpath"
40879  # Check if we need to convert this using DOS-style short mode. If the path
40880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40881  # take no chances and rewrite it.
40882  # Note: m4 eats our [], so we need to use [ and ] instead.
40883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40884  if test "x$has_forbidden_chars" != x; then
40885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40889      # Going to short mode and back again did indeed matter. Since short mode is
40890      # case insensitive, let's make it lowercase to improve readability.
40891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40892      # Now convert it back to Unix-style (cygpath)
40893      input_path=`$CYGPATH -u "$shortmode_path"`
40894      new_path="$input_path"
40895    fi
40896  fi
40897
40898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40899  if test "x$test_cygdrive_prefix" = x; then
40900    # As a simple fix, exclude /usr/bin since it's not a real path.
40901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40903      # a path prefixed by /cygdrive for fixpath to work.
40904      new_path="$CYGWIN_ROOT_PATH$input_path"
40905    fi
40906  fi
40907
40908  # remove trailing .exe if any
40909  new_path="${new_path/%.exe/}"
40910
40911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40912
40913  # First separate the path from the arguments. This will split at the first
40914  # space.
40915  complete="$BUILD_CXX"
40916  path="${complete%% *}"
40917  tmp="$complete EOL"
40918  arguments="${tmp#* }"
40919
40920  # Input might be given as Windows format, start by converting to
40921  # unix format.
40922  new_path="$path"
40923
40924  windows_path="$new_path"
40925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40926    unix_path=`$CYGPATH -u "$windows_path"`
40927    new_path="$unix_path"
40928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40930    new_path="$unix_path"
40931  fi
40932
40933
40934  # Now try to locate executable using which
40935  new_path=`$WHICH "$new_path" 2> /dev/null`
40936
40937  if test "x$new_path" = x; then
40938    # Oops. Which didn't find the executable.
40939    # The splitting of arguments from the executable at a space might have been incorrect,
40940    # since paths with space are more likely in Windows. Give it another try with the whole
40941    # argument.
40942    path="$complete"
40943    arguments="EOL"
40944    new_path="$path"
40945
40946  windows_path="$new_path"
40947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40948    unix_path=`$CYGPATH -u "$windows_path"`
40949    new_path="$unix_path"
40950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40952    new_path="$unix_path"
40953  fi
40954
40955
40956    new_path=`$WHICH "$new_path" 2> /dev/null`
40957    # bat and cmd files are not always considered executable in MSYS causing which
40958    # to not find them
40959    if test "x$new_path" = x \
40960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40962      new_path="$path"
40963
40964  windows_path="$new_path"
40965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40966    unix_path=`$CYGPATH -u "$windows_path"`
40967    new_path="$unix_path"
40968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40970    new_path="$unix_path"
40971  fi
40972
40973    fi
40974
40975    if test "x$new_path" = x; then
40976      # It's still not found. Now this is an unrecoverable error.
40977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40978$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40979      has_space=`$ECHO "$complete" | $GREP " "`
40980      if test "x$has_space" != x; then
40981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40983      fi
40984      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40985    fi
40986  fi
40987
40988  # Now new_path has a complete unix path to the binary
40989  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40990    # Keep paths in /bin as-is, but remove trailing .exe if any
40991    new_path="${new_path/%.exe/}"
40992    # Do not save /bin paths to all_fixpath_prefixes!
40993  else
40994    # Not in mixed or Windows style, start by that.
40995    new_path=`cmd //c echo $new_path`
40996
40997  input_path="$new_path"
40998  # Check if we need to convert this using DOS-style short mode. If the path
40999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41000  # take no chances and rewrite it.
41001  # Note: m4 eats our [], so we need to use [ and ] instead.
41002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41003  if test "x$has_forbidden_chars" != x; then
41004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41006  fi
41007
41008    # Output is in $new_path
41009
41010  windows_path="$new_path"
41011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41012    unix_path=`$CYGPATH -u "$windows_path"`
41013    new_path="$unix_path"
41014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41016    new_path="$unix_path"
41017  fi
41018
41019    # remove trailing .exe if any
41020    new_path="${new_path/%.exe/}"
41021
41022    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41023    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41024  fi
41025
41026    else
41027      # We're on a unix platform. Hooray! :)
41028      # First separate the path from the arguments. This will split at the first
41029      # space.
41030      complete="$BUILD_CXX"
41031      path="${complete%% *}"
41032      tmp="$complete EOL"
41033      arguments="${tmp#* }"
41034
41035      # Cannot rely on the command "which" here since it doesn't always work.
41036      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41037      if test -z "$is_absolute_path"; then
41038        # Path to executable is not absolute. Find it.
41039        IFS_save="$IFS"
41040        IFS=:
41041        for p in $PATH; do
41042          if test -f "$p/$path" && test -x "$p/$path"; then
41043            new_path="$p/$path"
41044            break
41045          fi
41046        done
41047        IFS="$IFS_save"
41048      else
41049        # This is an absolute path, we can use it without further modifications.
41050        new_path="$path"
41051      fi
41052
41053      if test "x$new_path" = x; then
41054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
41055$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
41056        has_space=`$ECHO "$complete" | $GREP " "`
41057        if test "x$has_space" != x; then
41058          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41059$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41060        fi
41061        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
41062      fi
41063    fi
41064
41065    # Now join together the path and the arguments once again
41066    if test "x$arguments" != xEOL; then
41067      new_complete="$new_path ${arguments% *}"
41068    else
41069      new_complete="$new_path"
41070    fi
41071
41072    if test "x$complete" != "x$new_complete"; then
41073      BUILD_CXX="$new_complete"
41074      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
41075$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
41076    fi
41077  fi
41078
41079
41080
41081  # Publish this variable in the help.
41082
41083
41084  if [ -z "${BUILD_LD+x}" ]; then
41085    # The variable is not set by user, try to locate tool using the code snippet
41086    for ac_prog in ld
41087do
41088  # Extract the first word of "$ac_prog", so it can be a program name with args.
41089set dummy $ac_prog; ac_word=$2
41090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41091$as_echo_n "checking for $ac_word... " >&6; }
41092if ${ac_cv_path_BUILD_LD+:} false; then :
41093  $as_echo_n "(cached) " >&6
41094else
41095  case $BUILD_LD in
41096  [\\/]* | ?:[\\/]*)
41097  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
41098  ;;
41099  *)
41100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41101for as_dir in $PATH
41102do
41103  IFS=$as_save_IFS
41104  test -z "$as_dir" && as_dir=.
41105    for ac_exec_ext in '' $ac_executable_extensions; do
41106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41107    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
41108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41109    break 2
41110  fi
41111done
41112  done
41113IFS=$as_save_IFS
41114
41115  ;;
41116esac
41117fi
41118BUILD_LD=$ac_cv_path_BUILD_LD
41119if test -n "$BUILD_LD"; then
41120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
41121$as_echo "$BUILD_LD" >&6; }
41122else
41123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41124$as_echo "no" >&6; }
41125fi
41126
41127
41128  test -n "$BUILD_LD" && break
41129done
41130
41131  else
41132    # The variable is set, but is it from the command line or the environment?
41133
41134    # Try to remove the string !BUILD_LD! from our list.
41135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
41136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41137      # If it failed, the variable was not from the command line. Ignore it,
41138      # but warn the user (except for BASH, which is always set by the calling BASH).
41139      if test "xBUILD_LD" != xBASH; then
41140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
41141$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
41142      fi
41143      # Try to locate tool using the code snippet
41144      for ac_prog in ld
41145do
41146  # Extract the first word of "$ac_prog", so it can be a program name with args.
41147set dummy $ac_prog; ac_word=$2
41148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41149$as_echo_n "checking for $ac_word... " >&6; }
41150if ${ac_cv_path_BUILD_LD+:} false; then :
41151  $as_echo_n "(cached) " >&6
41152else
41153  case $BUILD_LD in
41154  [\\/]* | ?:[\\/]*)
41155  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
41156  ;;
41157  *)
41158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41159for as_dir in $PATH
41160do
41161  IFS=$as_save_IFS
41162  test -z "$as_dir" && as_dir=.
41163    for ac_exec_ext in '' $ac_executable_extensions; do
41164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41165    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
41166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41167    break 2
41168  fi
41169done
41170  done
41171IFS=$as_save_IFS
41172
41173  ;;
41174esac
41175fi
41176BUILD_LD=$ac_cv_path_BUILD_LD
41177if test -n "$BUILD_LD"; then
41178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
41179$as_echo "$BUILD_LD" >&6; }
41180else
41181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41182$as_echo "no" >&6; }
41183fi
41184
41185
41186  test -n "$BUILD_LD" && break
41187done
41188
41189    else
41190      # If it succeeded, then it was overridden by the user. We will use it
41191      # for the tool.
41192
41193      # First remove it from the list of overridden variables, so we can test
41194      # for unknown variables in the end.
41195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41196
41197      # Check if we try to supply an empty value
41198      if test "x$BUILD_LD" = x; then
41199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_LD= (no value)" >&5
41200$as_echo "$as_me: Setting user supplied tool BUILD_LD= (no value)" >&6;}
41201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
41202$as_echo_n "checking for BUILD_LD... " >&6; }
41203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41204$as_echo "disabled" >&6; }
41205      else
41206        # Check if the provided tool contains a complete path.
41207        tool_specified="$BUILD_LD"
41208        tool_basename="${tool_specified##*/}"
41209        if test "x$tool_basename" = "x$tool_specified"; then
41210          # A command without a complete path is provided, search $PATH.
41211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
41212$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
41213          # Extract the first word of "$tool_basename", so it can be a program name with args.
41214set dummy $tool_basename; ac_word=$2
41215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41216$as_echo_n "checking for $ac_word... " >&6; }
41217if ${ac_cv_path_BUILD_LD+:} false; then :
41218  $as_echo_n "(cached) " >&6
41219else
41220  case $BUILD_LD in
41221  [\\/]* | ?:[\\/]*)
41222  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
41223  ;;
41224  *)
41225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41226for as_dir in $PATH
41227do
41228  IFS=$as_save_IFS
41229  test -z "$as_dir" && as_dir=.
41230    for ac_exec_ext in '' $ac_executable_extensions; do
41231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41232    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
41233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41234    break 2
41235  fi
41236done
41237  done
41238IFS=$as_save_IFS
41239
41240  ;;
41241esac
41242fi
41243BUILD_LD=$ac_cv_path_BUILD_LD
41244if test -n "$BUILD_LD"; then
41245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
41246$as_echo "$BUILD_LD" >&6; }
41247else
41248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41249$as_echo "no" >&6; }
41250fi
41251
41252
41253          if test "x$BUILD_LD" = x; then
41254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41255          fi
41256        else
41257          # Otherwise we believe it is a complete path. Use it as it is.
41258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
41259$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
41260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
41261$as_echo_n "checking for BUILD_LD... " >&6; }
41262          if test ! -x "$tool_specified"; then
41263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41264$as_echo "not found" >&6; }
41265            as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
41266          fi
41267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41268$as_echo "$tool_specified" >&6; }
41269        fi
41270      fi
41271    fi
41272  fi
41273
41274
41275
41276  # Only process if variable expands to non-empty
41277
41278  if test "x$BUILD_LD" != x; then
41279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41280
41281  # First separate the path from the arguments. This will split at the first
41282  # space.
41283  complete="$BUILD_LD"
41284  path="${complete%% *}"
41285  tmp="$complete EOL"
41286  arguments="${tmp#* }"
41287
41288  # Input might be given as Windows format, start by converting to
41289  # unix format.
41290  new_path=`$CYGPATH -u "$path"`
41291
41292  # Now try to locate executable using which
41293  new_path=`$WHICH "$new_path" 2> /dev/null`
41294  # bat and cmd files are not always considered executable in cygwin causing which
41295  # to not find them
41296  if test "x$new_path" = x \
41297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41299    new_path=`$CYGPATH -u "$path"`
41300  fi
41301  if test "x$new_path" = x; then
41302    # Oops. Which didn't find the executable.
41303    # The splitting of arguments from the executable at a space might have been incorrect,
41304    # since paths with space are more likely in Windows. Give it another try with the whole
41305    # argument.
41306    path="$complete"
41307    arguments="EOL"
41308    new_path=`$CYGPATH -u "$path"`
41309    new_path=`$WHICH "$new_path" 2> /dev/null`
41310    # bat and cmd files are not always considered executable in cygwin causing which
41311    # to not find them
41312    if test "x$new_path" = x \
41313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41315      new_path=`$CYGPATH -u "$path"`
41316    fi
41317    if test "x$new_path" = x; then
41318      # It's still not found. Now this is an unrecoverable error.
41319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41320$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41321      has_space=`$ECHO "$complete" | $GREP " "`
41322      if test "x$has_space" != x; then
41323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41325      fi
41326      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41327    fi
41328  fi
41329
41330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41333  # "foo.exe" is OK but "foo" is an error.
41334  #
41335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41336  # It is also a way to make sure we got the proper file name for the real test later on.
41337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41338  if test "x$test_shortpath" = x; then
41339    # Short path failed, file does not exist as specified.
41340    # Try adding .exe or .cmd
41341    if test -f "${new_path}.exe"; then
41342      input_to_shortpath="${new_path}.exe"
41343    elif test -f "${new_path}.cmd"; then
41344      input_to_shortpath="${new_path}.cmd"
41345    else
41346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
41347$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
41348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41350      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41351    fi
41352  else
41353    input_to_shortpath="$new_path"
41354  fi
41355
41356  # Call helper function which possibly converts this using DOS-style short mode.
41357  # If so, the updated path is stored in $new_path.
41358  new_path="$input_to_shortpath"
41359
41360  input_path="$input_to_shortpath"
41361  # Check if we need to convert this using DOS-style short mode. If the path
41362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41363  # take no chances and rewrite it.
41364  # Note: m4 eats our [], so we need to use [ and ] instead.
41365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41366  if test "x$has_forbidden_chars" != x; then
41367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41371      # Going to short mode and back again did indeed matter. Since short mode is
41372      # case insensitive, let's make it lowercase to improve readability.
41373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41374      # Now convert it back to Unix-style (cygpath)
41375      input_path=`$CYGPATH -u "$shortmode_path"`
41376      new_path="$input_path"
41377    fi
41378  fi
41379
41380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41381  if test "x$test_cygdrive_prefix" = x; then
41382    # As a simple fix, exclude /usr/bin since it's not a real path.
41383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41385      # a path prefixed by /cygdrive for fixpath to work.
41386      new_path="$CYGWIN_ROOT_PATH$input_path"
41387    fi
41388  fi
41389
41390  # remove trailing .exe if any
41391  new_path="${new_path/%.exe/}"
41392
41393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41394
41395  # First separate the path from the arguments. This will split at the first
41396  # space.
41397  complete="$BUILD_LD"
41398  path="${complete%% *}"
41399  tmp="$complete EOL"
41400  arguments="${tmp#* }"
41401
41402  # Input might be given as Windows format, start by converting to
41403  # unix format.
41404  new_path="$path"
41405
41406  windows_path="$new_path"
41407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41408    unix_path=`$CYGPATH -u "$windows_path"`
41409    new_path="$unix_path"
41410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41412    new_path="$unix_path"
41413  fi
41414
41415
41416  # Now try to locate executable using which
41417  new_path=`$WHICH "$new_path" 2> /dev/null`
41418
41419  if test "x$new_path" = x; then
41420    # Oops. Which didn't find the executable.
41421    # The splitting of arguments from the executable at a space might have been incorrect,
41422    # since paths with space are more likely in Windows. Give it another try with the whole
41423    # argument.
41424    path="$complete"
41425    arguments="EOL"
41426    new_path="$path"
41427
41428  windows_path="$new_path"
41429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41430    unix_path=`$CYGPATH -u "$windows_path"`
41431    new_path="$unix_path"
41432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41434    new_path="$unix_path"
41435  fi
41436
41437
41438    new_path=`$WHICH "$new_path" 2> /dev/null`
41439    # bat and cmd files are not always considered executable in MSYS causing which
41440    # to not find them
41441    if test "x$new_path" = x \
41442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41444      new_path="$path"
41445
41446  windows_path="$new_path"
41447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41448    unix_path=`$CYGPATH -u "$windows_path"`
41449    new_path="$unix_path"
41450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41452    new_path="$unix_path"
41453  fi
41454
41455    fi
41456
41457    if test "x$new_path" = x; then
41458      # It's still not found. Now this is an unrecoverable error.
41459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41460$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41461      has_space=`$ECHO "$complete" | $GREP " "`
41462      if test "x$has_space" != x; then
41463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41465      fi
41466      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41467    fi
41468  fi
41469
41470  # Now new_path has a complete unix path to the binary
41471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41472    # Keep paths in /bin as-is, but remove trailing .exe if any
41473    new_path="${new_path/%.exe/}"
41474    # Do not save /bin paths to all_fixpath_prefixes!
41475  else
41476    # Not in mixed or Windows style, start by that.
41477    new_path=`cmd //c echo $new_path`
41478
41479  input_path="$new_path"
41480  # Check if we need to convert this using DOS-style short mode. If the path
41481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41482  # take no chances and rewrite it.
41483  # Note: m4 eats our [], so we need to use [ and ] instead.
41484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41485  if test "x$has_forbidden_chars" != x; then
41486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41488  fi
41489
41490    # Output is in $new_path
41491
41492  windows_path="$new_path"
41493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41494    unix_path=`$CYGPATH -u "$windows_path"`
41495    new_path="$unix_path"
41496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41498    new_path="$unix_path"
41499  fi
41500
41501    # remove trailing .exe if any
41502    new_path="${new_path/%.exe/}"
41503
41504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41506  fi
41507
41508    else
41509      # We're on a unix platform. Hooray! :)
41510      # First separate the path from the arguments. This will split at the first
41511      # space.
41512      complete="$BUILD_LD"
41513      path="${complete%% *}"
41514      tmp="$complete EOL"
41515      arguments="${tmp#* }"
41516
41517      # Cannot rely on the command "which" here since it doesn't always work.
41518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41519      if test -z "$is_absolute_path"; then
41520        # Path to executable is not absolute. Find it.
41521        IFS_save="$IFS"
41522        IFS=:
41523        for p in $PATH; do
41524          if test -f "$p/$path" && test -x "$p/$path"; then
41525            new_path="$p/$path"
41526            break
41527          fi
41528        done
41529        IFS="$IFS_save"
41530      else
41531        # This is an absolute path, we can use it without further modifications.
41532        new_path="$path"
41533      fi
41534
41535      if test "x$new_path" = x; then
41536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41537$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41538        has_space=`$ECHO "$complete" | $GREP " "`
41539        if test "x$has_space" != x; then
41540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41542        fi
41543        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41544      fi
41545    fi
41546
41547    # Now join together the path and the arguments once again
41548    if test "x$arguments" != xEOL; then
41549      new_complete="$new_path ${arguments% *}"
41550    else
41551      new_complete="$new_path"
41552    fi
41553
41554    if test "x$complete" != "x$new_complete"; then
41555      BUILD_LD="$new_complete"
41556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
41557$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
41558    fi
41559  fi
41560
41561    BUILD_SYSROOT_CFLAGS=""
41562    BUILD_SYSROOT_LDFLAGS=""
41563  else
41564    # If we are not cross compiling, use the normal target compilers for
41565    # building the build platform executables.
41566    BUILD_CC="$CC"
41567    BUILD_CXX="$CXX"
41568    BUILD_LD="$LD"
41569    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
41570    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
41571  fi
41572
41573
41574
41575
41576
41577
41578
41579
41580  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41581    # For hotspot, we need these in Windows mixed path,
41582    # so rewrite them all. Need added .exe suffix.
41583    HOTSPOT_CXX="$CXX.exe"
41584    HOTSPOT_LD="$LD.exe"
41585    HOTSPOT_MT="$MT.exe"
41586    HOTSPOT_RC="$RC.exe"
41587
41588  unix_path="$HOTSPOT_CXX"
41589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41590    windows_path=`$CYGPATH -m "$unix_path"`
41591    HOTSPOT_CXX="$windows_path"
41592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41593    windows_path=`cmd //c echo $unix_path`
41594    HOTSPOT_CXX="$windows_path"
41595  fi
41596
41597
41598  unix_path="$HOTSPOT_LD"
41599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41600    windows_path=`$CYGPATH -m "$unix_path"`
41601    HOTSPOT_LD="$windows_path"
41602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41603    windows_path=`cmd //c echo $unix_path`
41604    HOTSPOT_LD="$windows_path"
41605  fi
41606
41607
41608  unix_path="$HOTSPOT_MT"
41609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41610    windows_path=`$CYGPATH -m "$unix_path"`
41611    HOTSPOT_MT="$windows_path"
41612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41613    windows_path=`cmd //c echo $unix_path`
41614    HOTSPOT_MT="$windows_path"
41615  fi
41616
41617
41618  unix_path="$HOTSPOT_RC"
41619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41620    windows_path=`$CYGPATH -m "$unix_path"`
41621    HOTSPOT_RC="$windows_path"
41622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41623    windows_path=`cmd //c echo $unix_path`
41624    HOTSPOT_RC="$windows_path"
41625  fi
41626
41627
41628
41629  else
41630    HOTSPOT_CXX="$CXX"
41631    HOTSPOT_LD="$LD"
41632  fi
41633
41634
41635
41636  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41637    USE_CLANG=true
41638  fi
41639
41640
41641
41642
41643
41644  # The package path is used only on macosx?
41645  # FIXME: clean this up, and/or move it elsewhere.
41646  PACKAGE_PATH=/opt/local
41647
41648
41649  # Check for extra potential brokenness.
41650  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41651    # On Windows, double-check that we got the right compiler.
41652    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41653    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41654    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41655      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41656        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
41657      fi
41658    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41659      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41660        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41661      fi
41662    fi
41663  fi
41664
41665  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41666    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41667    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41668    # This is later checked when setting flags.
41669
41670    # "-Og" suppported for GCC 4.8 and later
41671    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41672
41673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41674$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41675  supports=yes
41676
41677  saved_cflags="$CFLAGS"
41678  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41679  ac_ext=c
41680ac_cpp='$CPP $CPPFLAGS'
41681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41683ac_compiler_gnu=$ac_cv_c_compiler_gnu
41684
41685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41686/* end confdefs.h.  */
41687int i;
41688_ACEOF
41689if ac_fn_c_try_compile "$LINENO"; then :
41690
41691else
41692  supports=no
41693fi
41694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41695  ac_ext=cpp
41696ac_cpp='$CXXCPP $CPPFLAGS'
41697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41700
41701  CFLAGS="$saved_cflags"
41702
41703  saved_cxxflags="$CXXFLAGS"
41704  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41705  ac_ext=cpp
41706ac_cpp='$CXXCPP $CPPFLAGS'
41707ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41708ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41709ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41710
41711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41712/* end confdefs.h.  */
41713int i;
41714_ACEOF
41715if ac_fn_cxx_try_compile "$LINENO"; then :
41716
41717else
41718  supports=no
41719fi
41720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41721  ac_ext=cpp
41722ac_cpp='$CXXCPP $CPPFLAGS'
41723ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41724ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41725ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41726
41727  CXXFLAGS="$saved_cxxflags"
41728
41729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41730$as_echo "$supports" >&6; }
41731  if test "x$supports" = "xyes" ; then
41732    HAS_CFLAG_OPTIMIZE_DEBUG=true
41733  else
41734    HAS_CFLAG_OPTIMIZE_DEBUG=false
41735  fi
41736
41737
41738    # "-z relro" supported in GNU binutils 2.17 and later
41739    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41740
41741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41742$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41743  supports=yes
41744
41745  saved_ldflags="$LDFLAGS"
41746  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41747  ac_ext=c
41748ac_cpp='$CPP $CPPFLAGS'
41749ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41750ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41751ac_compiler_gnu=$ac_cv_c_compiler_gnu
41752
41753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41754/* end confdefs.h.  */
41755
41756int
41757main ()
41758{
41759
41760  ;
41761  return 0;
41762}
41763_ACEOF
41764if ac_fn_c_try_link "$LINENO"; then :
41765
41766else
41767  supports=no
41768fi
41769rm -f core conftest.err conftest.$ac_objext \
41770    conftest$ac_exeext conftest.$ac_ext
41771  ac_ext=cpp
41772ac_cpp='$CXXCPP $CPPFLAGS'
41773ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41774ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41775ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41776
41777  LDFLAGS="$saved_ldflags"
41778
41779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41780$as_echo "$supports" >&6; }
41781  if test "x$supports" = "xyes" ; then
41782    HAS_LINKER_RELRO=true
41783  else
41784    HAS_LINKER_RELRO=false
41785  fi
41786
41787
41788    # "-z now" supported in GNU binutils 2.11 and later
41789    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41790
41791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41792$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41793  supports=yes
41794
41795  saved_ldflags="$LDFLAGS"
41796  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41797  ac_ext=c
41798ac_cpp='$CPP $CPPFLAGS'
41799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41801ac_compiler_gnu=$ac_cv_c_compiler_gnu
41802
41803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41804/* end confdefs.h.  */
41805
41806int
41807main ()
41808{
41809
41810  ;
41811  return 0;
41812}
41813_ACEOF
41814if ac_fn_c_try_link "$LINENO"; then :
41815
41816else
41817  supports=no
41818fi
41819rm -f core conftest.err conftest.$ac_objext \
41820    conftest$ac_exeext conftest.$ac_ext
41821  ac_ext=cpp
41822ac_cpp='$CXXCPP $CPPFLAGS'
41823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41826
41827  LDFLAGS="$saved_ldflags"
41828
41829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41830$as_echo "$supports" >&6; }
41831  if test "x$supports" = "xyes" ; then
41832    HAS_LINKER_NOW=true
41833  else
41834    HAS_LINKER_NOW=false
41835  fi
41836
41837  fi
41838
41839  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41840  # in executable.'
41841  USING_BROKEN_SUSE_LD=no
41842  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41844$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41845    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41846    $ECHO "int main() { }" > main.c
41847    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41849$as_echo "no" >&6; }
41850      USING_BROKEN_SUSE_LD=no
41851    else
41852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41853$as_echo "yes" >&6; }
41854      USING_BROKEN_SUSE_LD=yes
41855    fi
41856    rm -rf version-script.map main.c a.out
41857  fi
41858
41859
41860
41861# Setup the JTReg Regression Test Harness.
41862
41863
41864# Check whether --with-jtreg was given.
41865if test "${with_jtreg+set}" = set; then :
41866  withval=$with_jtreg;
41867else
41868  with_jtreg=no
41869fi
41870
41871
41872  if test "x$with_jtreg" = xno; then
41873    # jtreg disabled
41874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41875$as_echo_n "checking for jtreg... " >&6; }
41876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41877$as_echo "no" >&6; }
41878  else
41879    if test "x$with_jtreg" != xyes; then
41880      # with path specified.
41881      JT_HOME="$with_jtreg"
41882    fi
41883
41884    if test "x$JT_HOME" != x; then
41885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41886$as_echo_n "checking for jtreg... " >&6; }
41887
41888      # use JT_HOME enviroment var.
41889
41890  # Only process if variable expands to non-empty
41891
41892  if test "x$JT_HOME" != x; then
41893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41894
41895  # Input might be given as Windows format, start by converting to
41896  # unix format.
41897  path="$JT_HOME"
41898  new_path=`$CYGPATH -u "$path"`
41899
41900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41903  # "foo.exe" is OK but "foo" is an error.
41904  #
41905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41906  # It is also a way to make sure we got the proper file name for the real test later on.
41907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41908  if test "x$test_shortpath" = x; then
41909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41910$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41911    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41912  fi
41913
41914  # Call helper function which possibly converts this using DOS-style short mode.
41915  # If so, the updated path is stored in $new_path.
41916
41917  input_path="$new_path"
41918  # Check if we need to convert this using DOS-style short mode. If the path
41919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41920  # take no chances and rewrite it.
41921  # Note: m4 eats our [], so we need to use [ and ] instead.
41922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41923  if test "x$has_forbidden_chars" != x; then
41924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41928      # Going to short mode and back again did indeed matter. Since short mode is
41929      # case insensitive, let's make it lowercase to improve readability.
41930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41931      # Now convert it back to Unix-style (cygpath)
41932      input_path=`$CYGPATH -u "$shortmode_path"`
41933      new_path="$input_path"
41934    fi
41935  fi
41936
41937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41938  if test "x$test_cygdrive_prefix" = x; then
41939    # As a simple fix, exclude /usr/bin since it's not a real path.
41940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41942      # a path prefixed by /cygdrive for fixpath to work.
41943      new_path="$CYGWIN_ROOT_PATH$input_path"
41944    fi
41945  fi
41946
41947
41948  if test "x$path" != "x$new_path"; then
41949    JT_HOME="$new_path"
41950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41951$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41952  fi
41953
41954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41955
41956  path="$JT_HOME"
41957  has_colon=`$ECHO $path | $GREP ^.:`
41958  new_path="$path"
41959  if test "x$has_colon" = x; then
41960    # Not in mixed or Windows style, start by that.
41961    new_path=`cmd //c echo $path`
41962  fi
41963
41964
41965  input_path="$new_path"
41966  # Check if we need to convert this using DOS-style short mode. If the path
41967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41968  # take no chances and rewrite it.
41969  # Note: m4 eats our [], so we need to use [ and ] instead.
41970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41971  if test "x$has_forbidden_chars" != x; then
41972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41974  fi
41975
41976
41977  windows_path="$new_path"
41978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41979    unix_path=`$CYGPATH -u "$windows_path"`
41980    new_path="$unix_path"
41981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41983    new_path="$unix_path"
41984  fi
41985
41986  if test "x$path" != "x$new_path"; then
41987    JT_HOME="$new_path"
41988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41989$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41990  fi
41991
41992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41994
41995    else
41996      # We're on a unix platform. Hooray! :)
41997      path="$JT_HOME"
41998      has_space=`$ECHO "$path" | $GREP " "`
41999      if test "x$has_space" != x; then
42000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
42001$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
42002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42003      fi
42004
42005      # Use eval to expand a potential ~
42006      eval path="$path"
42007      if test ! -f "$path" && test ! -d "$path"; then
42008        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
42009      fi
42010
42011      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
42012    fi
42013  fi
42014
42015
42016      # jtreg win32 script works for everybody
42017      JTREGEXE="$JT_HOME/bin/jtreg"
42018
42019      if test ! -f "$JTREGEXE"; then
42020        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
42021      fi
42022
42023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
42024$as_echo "$JTREGEXE" >&6; }
42025    else
42026      # try to find jtreg on path
42027
42028
42029
42030  # Publish this variable in the help.
42031
42032
42033  if [ -z "${JTREGEXE+x}" ]; then
42034    # The variable is not set by user, try to locate tool using the code snippet
42035    for ac_prog in jtreg
42036do
42037  # Extract the first word of "$ac_prog", so it can be a program name with args.
42038set dummy $ac_prog; ac_word=$2
42039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42040$as_echo_n "checking for $ac_word... " >&6; }
42041if ${ac_cv_path_JTREGEXE+:} false; then :
42042  $as_echo_n "(cached) " >&6
42043else
42044  case $JTREGEXE in
42045  [\\/]* | ?:[\\/]*)
42046  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
42047  ;;
42048  *)
42049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42050for as_dir in $PATH
42051do
42052  IFS=$as_save_IFS
42053  test -z "$as_dir" && as_dir=.
42054    for ac_exec_ext in '' $ac_executable_extensions; do
42055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42056    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
42057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42058    break 2
42059  fi
42060done
42061  done
42062IFS=$as_save_IFS
42063
42064  ;;
42065esac
42066fi
42067JTREGEXE=$ac_cv_path_JTREGEXE
42068if test -n "$JTREGEXE"; then
42069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
42070$as_echo "$JTREGEXE" >&6; }
42071else
42072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42073$as_echo "no" >&6; }
42074fi
42075
42076
42077  test -n "$JTREGEXE" && break
42078done
42079
42080  else
42081    # The variable is set, but is it from the command line or the environment?
42082
42083    # Try to remove the string !JTREGEXE! from our list.
42084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
42085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42086      # If it failed, the variable was not from the command line. Ignore it,
42087      # but warn the user (except for BASH, which is always set by the calling BASH).
42088      if test "xJTREGEXE" != xBASH; then
42089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
42090$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
42091      fi
42092      # Try to locate tool using the code snippet
42093      for ac_prog in jtreg
42094do
42095  # Extract the first word of "$ac_prog", so it can be a program name with args.
42096set dummy $ac_prog; ac_word=$2
42097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42098$as_echo_n "checking for $ac_word... " >&6; }
42099if ${ac_cv_path_JTREGEXE+:} false; then :
42100  $as_echo_n "(cached) " >&6
42101else
42102  case $JTREGEXE in
42103  [\\/]* | ?:[\\/]*)
42104  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
42105  ;;
42106  *)
42107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42108for as_dir in $PATH
42109do
42110  IFS=$as_save_IFS
42111  test -z "$as_dir" && as_dir=.
42112    for ac_exec_ext in '' $ac_executable_extensions; do
42113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42114    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
42115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42116    break 2
42117  fi
42118done
42119  done
42120IFS=$as_save_IFS
42121
42122  ;;
42123esac
42124fi
42125JTREGEXE=$ac_cv_path_JTREGEXE
42126if test -n "$JTREGEXE"; then
42127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
42128$as_echo "$JTREGEXE" >&6; }
42129else
42130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42131$as_echo "no" >&6; }
42132fi
42133
42134
42135  test -n "$JTREGEXE" && break
42136done
42137
42138    else
42139      # If it succeeded, then it was overridden by the user. We will use it
42140      # for the tool.
42141
42142      # First remove it from the list of overridden variables, so we can test
42143      # for unknown variables in the end.
42144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42145
42146      # Check if we try to supply an empty value
42147      if test "x$JTREGEXE" = x; then
42148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
42149$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
42150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
42151$as_echo_n "checking for JTREGEXE... " >&6; }
42152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42153$as_echo "disabled" >&6; }
42154      else
42155        # Check if the provided tool contains a complete path.
42156        tool_specified="$JTREGEXE"
42157        tool_basename="${tool_specified##*/}"
42158        if test "x$tool_basename" = "x$tool_specified"; then
42159          # A command without a complete path is provided, search $PATH.
42160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
42161$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
42162          # Extract the first word of "$tool_basename", so it can be a program name with args.
42163set dummy $tool_basename; ac_word=$2
42164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42165$as_echo_n "checking for $ac_word... " >&6; }
42166if ${ac_cv_path_JTREGEXE+:} false; then :
42167  $as_echo_n "(cached) " >&6
42168else
42169  case $JTREGEXE in
42170  [\\/]* | ?:[\\/]*)
42171  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
42172  ;;
42173  *)
42174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42175for as_dir in $PATH
42176do
42177  IFS=$as_save_IFS
42178  test -z "$as_dir" && as_dir=.
42179    for ac_exec_ext in '' $ac_executable_extensions; do
42180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42181    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
42182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42183    break 2
42184  fi
42185done
42186  done
42187IFS=$as_save_IFS
42188
42189  ;;
42190esac
42191fi
42192JTREGEXE=$ac_cv_path_JTREGEXE
42193if test -n "$JTREGEXE"; then
42194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
42195$as_echo "$JTREGEXE" >&6; }
42196else
42197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42198$as_echo "no" >&6; }
42199fi
42200
42201
42202          if test "x$JTREGEXE" = x; then
42203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42204          fi
42205        else
42206          # Otherwise we believe it is a complete path. Use it as it is.
42207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
42208$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
42209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
42210$as_echo_n "checking for JTREGEXE... " >&6; }
42211          if test ! -x "$tool_specified"; then
42212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42213$as_echo "not found" >&6; }
42214            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
42215          fi
42216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42217$as_echo "$tool_specified" >&6; }
42218        fi
42219      fi
42220    fi
42221  fi
42222
42223
42224
42225  if test "x$JTREGEXE" = x; then
42226    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
42227  fi
42228
42229
42230      JT_HOME="`$DIRNAME $JTREGEXE`"
42231    fi
42232  fi
42233
42234
42235
42236
42237
42238
42239  # Option used to tell the compiler whether to create 32- or 64-bit executables
42240  if test "x$TOOLCHAIN_TYPE" = xxlc; then
42241    COMPILER_TARGET_BITS_FLAG="-q"
42242  else
42243    COMPILER_TARGET_BITS_FLAG="-m"
42244  fi
42245
42246
42247  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
42248  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42249    ARFLAGS="-r"
42250  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42251    ARFLAGS="-X64"
42252  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
42253    # lib.exe is used as AR to create static libraries.
42254    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
42255  else
42256    ARFLAGS=""
42257  fi
42258
42259
42260  ## Setup strip.
42261  # FIXME: should this really be per platform, or should it be per toolchain type?
42262  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
42263  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
42264  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42265    STRIPFLAGS="-g"
42266  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
42267    STRIPFLAGS="-x"
42268  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
42269    STRIPFLAGS="-S"
42270  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42271    STRIPFLAGS="-X32_64"
42272  fi
42273
42274
42275
42276  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42277    CC_OUT_OPTION=-Fo
42278    EXE_OUT_OPTION=-out:
42279    LD_OUT_OPTION=-out:
42280    AR_OUT_OPTION=-out:
42281  else
42282    # The option used to specify the target .o,.a or .so file.
42283    # When compiling, how to specify the to be created object file.
42284    CC_OUT_OPTION='-o$(SPACE)'
42285    # When linking, how to specify the to be created executable.
42286    EXE_OUT_OPTION='-o$(SPACE)'
42287    # When linking, how to specify the to be created dynamically linkable library.
42288    LD_OUT_OPTION='-o$(SPACE)'
42289    # When archiving, how to specify the to be create static archive for object files.
42290    AR_OUT_OPTION='rcs$(SPACE)'
42291  fi
42292
42293
42294
42295
42296
42297  # On Windows, we need to set RC flags.
42298  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42299    RC_FLAGS="-nologo -l0x409"
42300    if test "x$VARIANT" = xOPT; then
42301      RC_FLAGS="$RC_FLAGS -DNDEBUG"
42302    fi
42303
42304    # The version variables used to create RC_FLAGS may be overridden
42305    # in a custom configure script, or possibly the command line.
42306    # Let those variables be expanded at make time in spec.gmk.
42307    # The \$ are escaped to the shell, and the $(...) variables
42308    # are evaluated by make.
42309    RC_FLAGS="$RC_FLAGS \
42310        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
42311        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
42312        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
42313        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
42314        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
42315        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
42316        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
42317  fi
42318
42319
42320  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42321    # silence copyright notice and other headers.
42322    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
42323  fi
42324
42325
42326# FIXME: Currently we must test this after toolchain but before flags. Fix!
42327
42328# Now we can test some aspects on the target using configure macros.
42329
42330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
42331$as_echo_n "checking for ANSI C header files... " >&6; }
42332if ${ac_cv_header_stdc+:} false; then :
42333  $as_echo_n "(cached) " >&6
42334else
42335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42336/* end confdefs.h.  */
42337#include <stdlib.h>
42338#include <stdarg.h>
42339#include <string.h>
42340#include <float.h>
42341
42342int
42343main ()
42344{
42345
42346  ;
42347  return 0;
42348}
42349_ACEOF
42350if ac_fn_cxx_try_compile "$LINENO"; then :
42351  ac_cv_header_stdc=yes
42352else
42353  ac_cv_header_stdc=no
42354fi
42355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42356
42357if test $ac_cv_header_stdc = yes; then
42358  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
42359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42360/* end confdefs.h.  */
42361#include <string.h>
42362
42363_ACEOF
42364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42365  $EGREP "memchr" >/dev/null 2>&1; then :
42366
42367else
42368  ac_cv_header_stdc=no
42369fi
42370rm -f conftest*
42371
42372fi
42373
42374if test $ac_cv_header_stdc = yes; then
42375  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
42376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42377/* end confdefs.h.  */
42378#include <stdlib.h>
42379
42380_ACEOF
42381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42382  $EGREP "free" >/dev/null 2>&1; then :
42383
42384else
42385  ac_cv_header_stdc=no
42386fi
42387rm -f conftest*
42388
42389fi
42390
42391if test $ac_cv_header_stdc = yes; then
42392  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
42393  if test "$cross_compiling" = yes; then :
42394  :
42395else
42396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42397/* end confdefs.h.  */
42398#include <ctype.h>
42399#include <stdlib.h>
42400#if ((' ' & 0x0FF) == 0x020)
42401# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
42402# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
42403#else
42404# define ISLOWER(c) \
42405		   (('a' <= (c) && (c) <= 'i') \
42406		     || ('j' <= (c) && (c) <= 'r') \
42407		     || ('s' <= (c) && (c) <= 'z'))
42408# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
42409#endif
42410
42411#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
42412int
42413main ()
42414{
42415  int i;
42416  for (i = 0; i < 256; i++)
42417    if (XOR (islower (i), ISLOWER (i))
42418	|| toupper (i) != TOUPPER (i))
42419      return 2;
42420  return 0;
42421}
42422_ACEOF
42423if ac_fn_cxx_try_run "$LINENO"; then :
42424
42425else
42426  ac_cv_header_stdc=no
42427fi
42428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42429  conftest.$ac_objext conftest.beam conftest.$ac_ext
42430fi
42431
42432fi
42433fi
42434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
42435$as_echo "$ac_cv_header_stdc" >&6; }
42436if test $ac_cv_header_stdc = yes; then
42437
42438$as_echo "#define STDC_HEADERS 1" >>confdefs.h
42439
42440fi
42441
42442# On IRIX 5.3, sys/types and inttypes.h are conflicting.
42443for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
42444		  inttypes.h stdint.h unistd.h
42445do :
42446  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42447ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
42448"
42449if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42450  cat >>confdefs.h <<_ACEOF
42451#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42452_ACEOF
42453
42454fi
42455
42456done
42457
42458
42459
42460  ###############################################################################
42461  #
42462  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
42463  # (The JVM can use 32 or 64 bit Java pointers but that decision
42464  # is made at runtime.)
42465  #
42466
42467  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
42468    # Always specify -m flag on Solaris
42469    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
42470
42471  # When we add flags to the "official" CFLAGS etc, we need to
42472  # keep track of these additions in ADDED_CFLAGS etc. These
42473  # will later be checked to make sure only controlled additions
42474  # have been made to CFLAGS etc.
42475  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42476  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42477  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42478
42479  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42480  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42481  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42482
42483  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42484  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42485  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42486
42487  elif test "x$COMPILE_TYPE" = xreduced; then
42488    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
42489      # Specify -m if running reduced on unix platforms
42490
42491  # When we add flags to the "official" CFLAGS etc, we need to
42492  # keep track of these additions in ADDED_CFLAGS etc. These
42493  # will later be checked to make sure only controlled additions
42494  # have been made to CFLAGS etc.
42495  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42496  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42497  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42498
42499  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42500  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42501  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42502
42503  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42504  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42505  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42506
42507    fi
42508  fi
42509
42510  # Make compilation sanity check
42511  for ac_header in stdio.h
42512do :
42513  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
42514if test "x$ac_cv_header_stdio_h" = xyes; then :
42515  cat >>confdefs.h <<_ACEOF
42516#define HAVE_STDIO_H 1
42517_ACEOF
42518
42519else
42520
42521    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42522$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42523    if test "x$COMPILE_TYPE" = xreduced; then
42524
42525  # Print a helpful message on how to acquire the necessary build dependency.
42526  # reduced is the help tag: freetype, cups, alsa etc
42527  MISSING_DEPENDENCY=reduced
42528
42529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42530    cygwin_help $MISSING_DEPENDENCY
42531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42532    msys_help $MISSING_DEPENDENCY
42533  else
42534    PKGHANDLER_COMMAND=
42535
42536    case $PKGHANDLER in
42537      apt-get)
42538        apt_help     $MISSING_DEPENDENCY ;;
42539      yum)
42540        yum_help     $MISSING_DEPENDENCY ;;
42541      port)
42542        port_help    $MISSING_DEPENDENCY ;;
42543      pkgutil)
42544        pkgutil_help $MISSING_DEPENDENCY ;;
42545      pkgadd)
42546        pkgadd_help  $MISSING_DEPENDENCY ;;
42547    esac
42548
42549    if test "x$PKGHANDLER_COMMAND" != x; then
42550      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42551    fi
42552  fi
42553
42554      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42555$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42556    elif test "x$COMPILE_TYPE" = xcross; then
42557      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42558$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42559    fi
42560    as_fn_error $? "Cannot continue." "$LINENO" 5
42561
42562fi
42563
42564done
42565
42566
42567  # The cast to long int works around a bug in the HP C Compiler
42568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42570# This bug is HP SR number 8606223364.
42571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42572$as_echo_n "checking size of int *... " >&6; }
42573if ${ac_cv_sizeof_int_p+:} false; then :
42574  $as_echo_n "(cached) " >&6
42575else
42576  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42577
42578else
42579  if test "$ac_cv_type_int_p" = yes; then
42580     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42582as_fn_error 77 "cannot compute sizeof (int *)
42583See \`config.log' for more details" "$LINENO" 5; }
42584   else
42585     ac_cv_sizeof_int_p=0
42586   fi
42587fi
42588
42589fi
42590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42591$as_echo "$ac_cv_sizeof_int_p" >&6; }
42592
42593
42594
42595cat >>confdefs.h <<_ACEOF
42596#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42597_ACEOF
42598
42599
42600
42601  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42602  if test "x$ac_cv_sizeof_int_p" = x; then
42603    # The test failed, lets stick to the assumed value.
42604    { $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
42605$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42606  else
42607    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42608
42609    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42610      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42611      # Let's try to implicitely set the compilers target architecture and retry the test
42612      { $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
42613$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;}
42614      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
42615$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
42616
42617  # When we add flags to the "official" CFLAGS etc, we need to
42618  # keep track of these additions in ADDED_CFLAGS etc. These
42619  # will later be checked to make sure only controlled additions
42620  # have been made to CFLAGS etc.
42621  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42622  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42623  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42624
42625  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42626  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42627  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42628
42629  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42630  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42631  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42632
42633
42634      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42635      unset ac_cv_sizeof_int_p
42636      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42637      cat >>confdefs.h <<_ACEOF
42638#undef SIZEOF_INT_P
42639_ACEOF
42640
42641      # The cast to long int works around a bug in the HP C Compiler
42642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42644# This bug is HP SR number 8606223364.
42645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42646$as_echo_n "checking size of int *... " >&6; }
42647if ${ac_cv_sizeof_int_p+:} false; then :
42648  $as_echo_n "(cached) " >&6
42649else
42650  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42651
42652else
42653  if test "$ac_cv_type_int_p" = yes; then
42654     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42656as_fn_error 77 "cannot compute sizeof (int *)
42657See \`config.log' for more details" "$LINENO" 5; }
42658   else
42659     ac_cv_sizeof_int_p=0
42660   fi
42661fi
42662
42663fi
42664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42665$as_echo "$ac_cv_sizeof_int_p" >&6; }
42666
42667
42668
42669cat >>confdefs.h <<_ACEOF
42670#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42671_ACEOF
42672
42673
42674
42675      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42676
42677      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42678        { $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
42679$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;}
42680        if test "x$COMPILE_TYPE" = xreduced; then
42681
42682  # Print a helpful message on how to acquire the necessary build dependency.
42683  # reduced is the help tag: freetype, cups, alsa etc
42684  MISSING_DEPENDENCY=reduced
42685
42686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42687    cygwin_help $MISSING_DEPENDENCY
42688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42689    msys_help $MISSING_DEPENDENCY
42690  else
42691    PKGHANDLER_COMMAND=
42692
42693    case $PKGHANDLER in
42694      apt-get)
42695        apt_help     $MISSING_DEPENDENCY ;;
42696      yum)
42697        yum_help     $MISSING_DEPENDENCY ;;
42698      port)
42699        port_help    $MISSING_DEPENDENCY ;;
42700      pkgutil)
42701        pkgutil_help $MISSING_DEPENDENCY ;;
42702      pkgadd)
42703        pkgadd_help  $MISSING_DEPENDENCY ;;
42704    esac
42705
42706    if test "x$PKGHANDLER_COMMAND" != x; then
42707      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42708    fi
42709  fi
42710
42711          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
42712$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
42713        elif test "x$COMPILE_TYPE" = xcross; then
42714          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42715$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42716        fi
42717        as_fn_error $? "Cannot continue." "$LINENO" 5
42718      fi
42719    fi
42720  fi
42721
42722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42723$as_echo_n "checking for target address size... " >&6; }
42724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42725$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42726
42727
42728  ###############################################################################
42729  #
42730  # Is the target little of big endian?
42731  #
42732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42733$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42734if ${ac_cv_c_bigendian+:} false; then :
42735  $as_echo_n "(cached) " >&6
42736else
42737  ac_cv_c_bigendian=unknown
42738    # See if we're dealing with a universal compiler.
42739    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42740/* end confdefs.h.  */
42741#ifndef __APPLE_CC__
42742	       not a universal capable compiler
42743	     #endif
42744	     typedef int dummy;
42745
42746_ACEOF
42747if ac_fn_cxx_try_compile "$LINENO"; then :
42748
42749	# Check for potential -arch flags.  It is not universal unless
42750	# there are at least two -arch flags with different values.
42751	ac_arch=
42752	ac_prev=
42753	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42754	 if test -n "$ac_prev"; then
42755	   case $ac_word in
42756	     i?86 | x86_64 | ppc | ppc64)
42757	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42758		 ac_arch=$ac_word
42759	       else
42760		 ac_cv_c_bigendian=universal
42761		 break
42762	       fi
42763	       ;;
42764	   esac
42765	   ac_prev=
42766	 elif test "x$ac_word" = "x-arch"; then
42767	   ac_prev=arch
42768	 fi
42769       done
42770fi
42771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42772    if test $ac_cv_c_bigendian = unknown; then
42773      # See if sys/param.h defines the BYTE_ORDER macro.
42774      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42775/* end confdefs.h.  */
42776#include <sys/types.h>
42777	     #include <sys/param.h>
42778
42779int
42780main ()
42781{
42782#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42783		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42784		     && LITTLE_ENDIAN)
42785	      bogus endian macros
42786	     #endif
42787
42788  ;
42789  return 0;
42790}
42791_ACEOF
42792if ac_fn_cxx_try_compile "$LINENO"; then :
42793  # It does; now see whether it defined to BIG_ENDIAN or not.
42794	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42795/* end confdefs.h.  */
42796#include <sys/types.h>
42797		#include <sys/param.h>
42798
42799int
42800main ()
42801{
42802#if BYTE_ORDER != BIG_ENDIAN
42803		 not big endian
42804		#endif
42805
42806  ;
42807  return 0;
42808}
42809_ACEOF
42810if ac_fn_cxx_try_compile "$LINENO"; then :
42811  ac_cv_c_bigendian=yes
42812else
42813  ac_cv_c_bigendian=no
42814fi
42815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42816fi
42817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42818    fi
42819    if test $ac_cv_c_bigendian = unknown; then
42820      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42821      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42822/* end confdefs.h.  */
42823#include <limits.h>
42824
42825int
42826main ()
42827{
42828#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42829	      bogus endian macros
42830	     #endif
42831
42832  ;
42833  return 0;
42834}
42835_ACEOF
42836if ac_fn_cxx_try_compile "$LINENO"; then :
42837  # It does; now see whether it defined to _BIG_ENDIAN or not.
42838	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42839/* end confdefs.h.  */
42840#include <limits.h>
42841
42842int
42843main ()
42844{
42845#ifndef _BIG_ENDIAN
42846		 not big endian
42847		#endif
42848
42849  ;
42850  return 0;
42851}
42852_ACEOF
42853if ac_fn_cxx_try_compile "$LINENO"; then :
42854  ac_cv_c_bigendian=yes
42855else
42856  ac_cv_c_bigendian=no
42857fi
42858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42859fi
42860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42861    fi
42862    if test $ac_cv_c_bigendian = unknown; then
42863      # Compile a test program.
42864      if test "$cross_compiling" = yes; then :
42865  # Try to guess by grepping values from an object file.
42866	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42867/* end confdefs.h.  */
42868short int ascii_mm[] =
42869		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42870		short int ascii_ii[] =
42871		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42872		int use_ascii (int i) {
42873		  return ascii_mm[i] + ascii_ii[i];
42874		}
42875		short int ebcdic_ii[] =
42876		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42877		short int ebcdic_mm[] =
42878		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42879		int use_ebcdic (int i) {
42880		  return ebcdic_mm[i] + ebcdic_ii[i];
42881		}
42882		extern int foo;
42883
42884int
42885main ()
42886{
42887return use_ascii (foo) == use_ebcdic (foo);
42888  ;
42889  return 0;
42890}
42891_ACEOF
42892if ac_fn_cxx_try_compile "$LINENO"; then :
42893  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42894	      ac_cv_c_bigendian=yes
42895	    fi
42896	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42897	      if test "$ac_cv_c_bigendian" = unknown; then
42898		ac_cv_c_bigendian=no
42899	      else
42900		# finding both strings is unlikely to happen, but who knows?
42901		ac_cv_c_bigendian=unknown
42902	      fi
42903	    fi
42904fi
42905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42906else
42907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42908/* end confdefs.h.  */
42909$ac_includes_default
42910int
42911main ()
42912{
42913
42914	     /* Are we little or big endian?  From Harbison&Steele.  */
42915	     union
42916	     {
42917	       long int l;
42918	       char c[sizeof (long int)];
42919	     } u;
42920	     u.l = 1;
42921	     return u.c[sizeof (long int) - 1] == 1;
42922
42923  ;
42924  return 0;
42925}
42926_ACEOF
42927if ac_fn_cxx_try_run "$LINENO"; then :
42928  ac_cv_c_bigendian=no
42929else
42930  ac_cv_c_bigendian=yes
42931fi
42932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42933  conftest.$ac_objext conftest.beam conftest.$ac_ext
42934fi
42935
42936    fi
42937fi
42938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42939$as_echo "$ac_cv_c_bigendian" >&6; }
42940 case $ac_cv_c_bigendian in #(
42941   yes)
42942     ENDIAN="big";; #(
42943   no)
42944     ENDIAN="little" ;; #(
42945   universal)
42946     ENDIAN="universal_endianness"
42947     ;; #(
42948   *)
42949     ENDIAN="unknown" ;;
42950 esac
42951
42952
42953  if test "x$ENDIAN" = xuniversal_endianness; then
42954    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42955  fi
42956  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42957    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
42958  fi
42959
42960
42961# Configure flags for the tools
42962
42963  ###############################################################################
42964  #
42965  # How to compile shared libraries.
42966  #
42967
42968  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42969    PICFLAG="-fPIC"
42970    C_FLAG_REORDER=''
42971    CXX_FLAG_REORDER=''
42972
42973    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42974      # Linking is different on MacOSX
42975      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42976      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42977      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42978      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42979      SET_SHARED_LIBRARY_MAPFILE=''
42980    else
42981      # Default works for linux, might work on other platforms as well.
42982      SHARED_LIBRARY_FLAGS='-shared'
42983      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42984      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42985      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42986      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42987    fi
42988  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42989    PICFLAG=''
42990    C_FLAG_REORDER=''
42991    CXX_FLAG_REORDER=''
42992
42993    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42994      # Linking is different on MacOSX
42995      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42996      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42997      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42998      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42999      SET_SHARED_LIBRARY_MAPFILE=''
43000    else
43001      # Default works for linux, might work on other platforms as well.
43002      SHARED_LIBRARY_FLAGS='-shared'
43003      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
43004      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
43005      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
43006      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
43007    fi
43008  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43009    PICFLAG="-KPIC"
43010    C_FLAG_REORDER='-xF'
43011    CXX_FLAG_REORDER='-xF'
43012    SHARED_LIBRARY_FLAGS="-G"
43013    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
43014    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
43015    SET_SHARED_LIBRARY_NAME=''
43016    SET_SHARED_LIBRARY_MAPFILE='-M$1'
43017  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43018    PICFLAG="-qpic=large"
43019    C_FLAG_REORDER=''
43020    CXX_FLAG_REORDER=''
43021    SHARED_LIBRARY_FLAGS="-qmkshrobj"
43022    SET_EXECUTABLE_ORIGIN=""
43023    SET_SHARED_LIBRARY_ORIGIN=''
43024    SET_SHARED_LIBRARY_NAME=''
43025    SET_SHARED_LIBRARY_MAPFILE=''
43026  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43027    PICFLAG=""
43028    C_FLAG_REORDER=''
43029    CXX_FLAG_REORDER=''
43030    SHARED_LIBRARY_FLAGS="-LD"
43031    SET_EXECUTABLE_ORIGIN=''
43032    SET_SHARED_LIBRARY_ORIGIN=''
43033    SET_SHARED_LIBRARY_NAME=''
43034    SET_SHARED_LIBRARY_MAPFILE=''
43035  fi
43036
43037
43038
43039
43040
43041
43042
43043
43044  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43045    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
43046    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
43047    CFLAGS_JDKLIB_EXTRA='-xstrconst'
43048  fi
43049  # The (cross) compiler is now configured, we can now test capabilities
43050  # of the target platform.
43051
43052
43053
43054  ###############################################################################
43055  #
43056  # Setup the opt flags for different compilers
43057  # and different operating systems.
43058  #
43059
43060  # FIXME: this was indirectly the old default, but just inherited.
43061  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43062  #   C_FLAG_DEPS="-MMD -MF"
43063  # fi
43064
43065  # Generate make dependency files
43066  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43067    C_FLAG_DEPS="-MMD -MF"
43068  elif test "x$TOOLCHAIN_TYPE" = xclang; then
43069    C_FLAG_DEPS="-MMD -MF"
43070  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43071    C_FLAG_DEPS="-xMMD -xMF"
43072  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43073    C_FLAG_DEPS="-qmakedep=gcc -MF"
43074  fi
43075  CXX_FLAG_DEPS="$C_FLAG_DEPS"
43076
43077
43078
43079  # Debug symbols
43080  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43081    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
43082      # reduce from default "-g2" option to save space
43083      CFLAGS_DEBUG_SYMBOLS="-g1"
43084      CXXFLAGS_DEBUG_SYMBOLS="-g1"
43085    else
43086      CFLAGS_DEBUG_SYMBOLS="-g"
43087      CXXFLAGS_DEBUG_SYMBOLS="-g"
43088    fi
43089  elif test "x$TOOLCHAIN_TYPE" = xclang; then
43090    CFLAGS_DEBUG_SYMBOLS="-g"
43091    CXXFLAGS_DEBUG_SYMBOLS="-g"
43092  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43093    CFLAGS_DEBUG_SYMBOLS="-g -xs"
43094    # FIXME: likely a bug, this disables debug symbols rather than enables them
43095    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
43096  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43097    CFLAGS_DEBUG_SYMBOLS="-g"
43098    CXXFLAGS_DEBUG_SYMBOLS="-g"
43099  fi
43100
43101
43102
43103  # bounds, memory and behavior checking options
43104  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43105    case $DEBUG_LEVEL in
43106    release )
43107      # no adjustment
43108      ;;
43109    fastdebug )
43110      # no adjustment
43111      ;;
43112    slowdebug )
43113      # Add runtime stack smashing and undefined behavior checks.
43114      # Not all versions of gcc support -fstack-protector
43115      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
43116
43117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
43118$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
43119  supports=yes
43120
43121  saved_cflags="$CFLAGS"
43122  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
43123  ac_ext=c
43124ac_cpp='$CPP $CPPFLAGS'
43125ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43126ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43127ac_compiler_gnu=$ac_cv_c_compiler_gnu
43128
43129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43130/* end confdefs.h.  */
43131int i;
43132_ACEOF
43133if ac_fn_c_try_compile "$LINENO"; then :
43134
43135else
43136  supports=no
43137fi
43138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43139  ac_ext=cpp
43140ac_cpp='$CXXCPP $CPPFLAGS'
43141ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43142ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43143ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43144
43145  CFLAGS="$saved_cflags"
43146
43147  saved_cxxflags="$CXXFLAGS"
43148  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
43149  ac_ext=cpp
43150ac_cpp='$CXXCPP $CPPFLAGS'
43151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43154
43155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43156/* end confdefs.h.  */
43157int i;
43158_ACEOF
43159if ac_fn_cxx_try_compile "$LINENO"; then :
43160
43161else
43162  supports=no
43163fi
43164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43165  ac_ext=cpp
43166ac_cpp='$CXXCPP $CPPFLAGS'
43167ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43168ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43169ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43170
43171  CXXFLAGS="$saved_cxxflags"
43172
43173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43174$as_echo "$supports" >&6; }
43175  if test "x$supports" = "xyes" ; then
43176    :
43177  else
43178    STACK_PROTECTOR_CFLAG=""
43179  fi
43180
43181
43182      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
43183      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
43184      ;;
43185    esac
43186  fi
43187
43188  # Optimization levels
43189  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43190    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
43191
43192    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
43193      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
43194      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
43195      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
43196      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
43197      C_O_FLAG_DEBUG="-xregs=no%frameptr"
43198      C_O_FLAG_NONE="-xregs=no%frameptr"
43199      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
43200      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
43201      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
43202      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
43203      CXX_O_FLAG_NONE="-xregs=no%frameptr"
43204      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43205        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
43206        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
43207      fi
43208    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43209      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
43210      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
43211      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
43212      C_O_FLAG_DEBUG=""
43213      C_O_FLAG_NONE=""
43214      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
43215      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
43216      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
43217      C_O_FLAG_DEBUG=""
43218      CXX_O_FLAG_NONE=""
43219    fi
43220  else
43221    # The remaining toolchains share opt flags between CC and CXX;
43222    # setup for C and duplicate afterwards.
43223    if test "x$TOOLCHAIN_TYPE" = xgcc; then
43224      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43225        # On MacOSX we optimize for size, something
43226        # we should do for all platforms?
43227        C_O_FLAG_HIGHEST="-Os"
43228        C_O_FLAG_HI="-Os"
43229        C_O_FLAG_NORM="-Os"
43230      else
43231        C_O_FLAG_HIGHEST="-O3"
43232        C_O_FLAG_HI="-O3"
43233        C_O_FLAG_NORM="-O2"
43234      fi
43235      C_O_FLAG_DEBUG="-O0"
43236      C_O_FLAG_NONE="-O0"
43237    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43238      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43239        # On MacOSX we optimize for size, something
43240        # we should do for all platforms?
43241        C_O_FLAG_HIGHEST="-Os"
43242        C_O_FLAG_HI="-Os"
43243        C_O_FLAG_NORM="-Os"
43244      else
43245        C_O_FLAG_HIGHEST="-O3"
43246        C_O_FLAG_HI="-O3"
43247        C_O_FLAG_NORM="-O2"
43248      fi
43249      C_O_FLAG_DEBUG="-O0"
43250      C_O_FLAG_NONE="-O0"
43251    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43252      C_O_FLAG_HIGHEST="-O3"
43253      C_O_FLAG_HI="-O3 -qstrict"
43254      C_O_FLAG_NORM="-O2"
43255      C_O_FLAG_DEBUG="-qnoopt"
43256      C_O_FLAG_NONE="-qnoop"
43257    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43258      C_O_FLAG_HIGHEST="-O2"
43259      C_O_FLAG_HI="-O1"
43260      C_O_FLAG_NORM="-O1"
43261      C_O_FLAG_DEBUG="-Od"
43262      C_O_FLAG_NONE="-Od"
43263    fi
43264    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
43265    CXX_O_FLAG_HI="$C_O_FLAG_HI"
43266    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
43267    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
43268    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
43269  fi
43270
43271  # Adjust optimization flags according to debug level.
43272  case $DEBUG_LEVEL in
43273    release )
43274      # no adjustment
43275      ;;
43276    fastdebug )
43277      # Not quite so much optimization
43278      C_O_FLAG_HI="$C_O_FLAG_NORM"
43279      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
43280      ;;
43281    slowdebug )
43282      # Disable optimization
43283      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
43284      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
43285      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
43286      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
43287      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
43288      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
43289      ;;
43290  esac
43291
43292
43293
43294
43295
43296
43297
43298
43299
43300
43301
43302
43303
43304  # Special extras...
43305  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43306    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
43307      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43308      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
43309    fi
43310    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43311    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
43312  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43313    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43314    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
43315  fi
43316
43317  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
43318  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
43319  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
43320
43321  ###############################################################################
43322  #
43323  # Now setup the CFLAGS and LDFLAGS for the JDK build.
43324  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
43325  #
43326
43327  # Setup compiler/platform specific flags into
43328  #    CFLAGS_JDK    - C Compiler flags
43329  #    CXXFLAGS_JDK  - C++ Compiler flags
43330  #    COMMON_CCXXFLAGS_JDK - common to C and C++
43331  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43332    if test "x$OPENJDK_TARGET_CPU" = xx86; then
43333      # Force compatibility with i586 on 32 bit intel platforms.
43334      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
43335    fi
43336    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
43337        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
43338    case $OPENJDK_TARGET_CPU_ARCH in
43339      arm )
43340        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43341        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43342        ;;
43343      ppc )
43344        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
43345        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43346        ;;
43347      * )
43348        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
43349        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
43350        ;;
43351    esac
43352  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43353    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
43354    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
43355      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
43356    fi
43357
43358    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
43359    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
43360  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43361    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43362    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
43363  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43364    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
43365        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
43366        -DWIN32_LEAN_AND_MEAN \
43367        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
43368        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
43369        -DWIN32 -DIAL"
43370    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43371      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
43372    else
43373      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
43374    fi
43375    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
43376    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
43377    # studio.
43378    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
43379      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43380          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
43381    fi
43382  fi
43383
43384  ###############################################################################
43385
43386  # Adjust flags according to debug level.
43387  case $DEBUG_LEVEL in
43388    fastdebug | slowdebug )
43389      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
43390      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
43391      JAVAC_FLAGS="$JAVAC_FLAGS -g"
43392      ;;
43393    release )
43394      ;;
43395    * )
43396      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43397      ;;
43398  esac
43399
43400  # Setup LP64
43401  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
43402
43403  # Set some common defines. These works for all compilers, but assume
43404  # -D is universally accepted.
43405
43406  # Setup endianness
43407  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
43408    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
43409    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
43410    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
43411    #   Note: -Dmacro         is the same as    #define macro 1
43412    #         -Dmacro=        is the same as    #define macro
43413    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43414      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
43415    else
43416      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
43417    fi
43418  else
43419    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
43420    # are defined in the system?
43421    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43422      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
43423    else
43424      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
43425    fi
43426  fi
43427
43428  # Setup target OS define. Use OS target name but in upper case.
43429  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
43430  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
43431
43432  # Setup target CPU
43433  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
43434
43435  # Setup debug/release defines
43436  if test "x$DEBUG_LEVEL" = xrelease; then
43437    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
43438    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43439      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
43440    fi
43441  else
43442    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
43443  fi
43444
43445  # Setup release name
43446  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
43447
43448
43449  # Set some additional per-OS defines.
43450  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43451    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
43452  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43453    # FIXME: PPC64 should not be here.
43454    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
43455  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
43456    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
43457  fi
43458
43459  # Additional macosx handling
43460  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43461    # Setting these parameters makes it an error to link to macosx APIs that are
43462    # newer than the given OS version and makes the linked binaries compatible
43463    # even if built on a newer version of the OS.
43464    # The expected format is X.Y.Z
43465    MACOSX_VERSION_MIN=10.7.0
43466
43467
43468    # The macro takes the version with no dots, ex: 1070
43469    # Let the flags variables get resolved in make for easier override on make
43470    # command line.
43471    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43472    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43473  fi
43474
43475  # Setup some hard coded includes
43476  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43477      -I${JDK_TOPDIR}/src/java.base/share/native/include \
43478      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43479      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
43480
43481  # The shared libraries are compiled using the picflag.
43482  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43483  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43484
43485  # Executable flags
43486  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43487  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43488
43489
43490
43491
43492
43493
43494  # Flags for compiling test libraries
43495  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43496  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43497
43498  # Flags for compiling test executables
43499  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43500  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43501
43502
43503
43504
43505
43506
43507  # Setup LDFLAGS et al.
43508  #
43509
43510  # Now this is odd. The JDK native libraries have to link against libjvm.so
43511  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
43512  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
43513  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
43514  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
43515  # libraries will link to whatever is in memory. Yuck.
43516  #
43517  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
43518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43519    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
43520    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43521      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
43522    fi
43523    # TODO: make -debug optional "--disable-full-debug-symbols"
43524    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
43525  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43526    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43527    # We have previously set HAS_GNU_HASH if this is the case
43528    if test -n "$HAS_GNU_HASH"; then
43529      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
43530    fi
43531    if test "x$OPENJDK_TARGET_OS" = xlinux; then
43532      # And since we now know that the linker is gnu, then add -z defs, to forbid
43533      # undefined symbols in object files.
43534      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
43535      case $DEBUG_LEVEL in
43536        release )
43537          # tell linker to optimize libraries.
43538          # Should this be supplied to the OSS linker as well?
43539          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
43540          ;;
43541        slowdebug )
43542          if test "x$HAS_LINKER_NOW" = "xtrue"; then
43543            # do relocations at load
43544            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
43545            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
43546          fi
43547          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43548            # mark relocations read only
43549            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43550            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43551          fi
43552          ;;
43553        fastdebug )
43554          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43555            # mark relocations read only
43556            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43557            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43558          fi
43559          ;;
43560        * )
43561          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43562          ;;
43563        esac
43564    fi
43565  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43566    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43567    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43568  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43569    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
43570  fi
43571
43572  # Customize LDFLAGS for executables
43573
43574  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43575
43576  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43577    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43578      LDFLAGS_STACK_SIZE=1048576
43579    else
43580      LDFLAGS_STACK_SIZE=327680
43581    fi
43582    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43583  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43584    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43585  fi
43586
43587  # Customize LDFLAGS for libs
43588  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43589
43590  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43591    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43592    JDKLIB_LIBS=""
43593  else
43594    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43595        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43596
43597    # On some platforms (mac) the linker warns about non existing -L dirs.
43598    # Add server first if available. Linking aginst client does not always produce the same results.
43599    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43600    # Default to server for other variants.
43601    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43602      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43603    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43604      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43605    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43606      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43607    else
43608      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43609    fi
43610
43611    JDKLIB_LIBS="-ljava -ljvm"
43612    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43613      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
43614    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
43615      JDKLIB_LIBS="$JDKLIB_LIBS -liconv"
43616    fi
43617  fi
43618
43619
43620
43621
43622
43623
43624
43625  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
43626  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
43627
43628
43629
43630
43631
43632  # Some Zero and Shark settings.
43633  # ZERO_ARCHFLAG tells the compiler which mode to build for
43634  case "${OPENJDK_TARGET_CPU}" in
43635    s390)
43636      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43637      ;;
43638    *)
43639      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43640  esac
43641
43642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43643$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43644  supports=yes
43645
43646  saved_cflags="$CFLAGS"
43647  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43648  ac_ext=c
43649ac_cpp='$CPP $CPPFLAGS'
43650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43652ac_compiler_gnu=$ac_cv_c_compiler_gnu
43653
43654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43655/* end confdefs.h.  */
43656int i;
43657_ACEOF
43658if ac_fn_c_try_compile "$LINENO"; then :
43659
43660else
43661  supports=no
43662fi
43663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43664  ac_ext=cpp
43665ac_cpp='$CXXCPP $CPPFLAGS'
43666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43669
43670  CFLAGS="$saved_cflags"
43671
43672  saved_cxxflags="$CXXFLAGS"
43673  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43674  ac_ext=cpp
43675ac_cpp='$CXXCPP $CPPFLAGS'
43676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43679
43680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43681/* end confdefs.h.  */
43682int i;
43683_ACEOF
43684if ac_fn_cxx_try_compile "$LINENO"; then :
43685
43686else
43687  supports=no
43688fi
43689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43690  ac_ext=cpp
43691ac_cpp='$CXXCPP $CPPFLAGS'
43692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43695
43696  CXXFLAGS="$saved_cxxflags"
43697
43698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43699$as_echo "$supports" >&6; }
43700  if test "x$supports" = "xyes" ; then
43701    :
43702  else
43703    ZERO_ARCHFLAG=""
43704  fi
43705
43706
43707
43708  # Check that the compiler supports -mX (or -qX on AIX) flags
43709  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43710
43711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43712$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43713  supports=yes
43714
43715  saved_cflags="$CFLAGS"
43716  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43717  ac_ext=c
43718ac_cpp='$CPP $CPPFLAGS'
43719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43721ac_compiler_gnu=$ac_cv_c_compiler_gnu
43722
43723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43724/* end confdefs.h.  */
43725int i;
43726_ACEOF
43727if ac_fn_c_try_compile "$LINENO"; then :
43728
43729else
43730  supports=no
43731fi
43732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43733  ac_ext=cpp
43734ac_cpp='$CXXCPP $CPPFLAGS'
43735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43738
43739  CFLAGS="$saved_cflags"
43740
43741  saved_cxxflags="$CXXFLAGS"
43742  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43743  ac_ext=cpp
43744ac_cpp='$CXXCPP $CPPFLAGS'
43745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43748
43749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43750/* end confdefs.h.  */
43751int i;
43752_ACEOF
43753if ac_fn_cxx_try_compile "$LINENO"; then :
43754
43755else
43756  supports=no
43757fi
43758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43759  ac_ext=cpp
43760ac_cpp='$CXXCPP $CPPFLAGS'
43761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43764
43765  CXXFLAGS="$saved_cxxflags"
43766
43767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43768$as_echo "$supports" >&6; }
43769  if test "x$supports" = "xyes" ; then
43770    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43771  else
43772    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43773  fi
43774
43775
43776
43777  # Check whether --enable-warnings-as-errors was given.
43778if test "${enable_warnings_as_errors+set}" = set; then :
43779  enableval=$enable_warnings_as_errors;
43780fi
43781
43782
43783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
43784$as_echo_n "checking if native warnings are errors... " >&6; }
43785  if test "x$enable_warnings_as_errors" = "xyes"; then
43786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
43787$as_echo "yes (explicitely set)" >&6; }
43788    WARNINGS_AS_ERRORS=true
43789  elif test "x$enable_warnings_as_errors" = "xno"; then
43790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43791$as_echo "no" >&6; }
43792    WARNINGS_AS_ERRORS=false
43793  elif test "x$enable_warnings_as_errors" = "x"; then
43794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
43795$as_echo "yes (default)" >&6; }
43796    WARNINGS_AS_ERRORS=true
43797  else
43798    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
43799  fi
43800
43801
43802  case "${TOOLCHAIN_TYPE}" in
43803    microsoft)
43804      DISABLE_WARNING_PREFIX="-wd"
43805      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43806      ;;
43807    solstudio)
43808      DISABLE_WARNING_PREFIX="-erroff="
43809      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43810      ;;
43811    gcc)
43812      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
43813
43814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
43815$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
43816  supports=yes
43817
43818  saved_cflags="$CFLAGS"
43819  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
43820  ac_ext=c
43821ac_cpp='$CPP $CPPFLAGS'
43822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43824ac_compiler_gnu=$ac_cv_c_compiler_gnu
43825
43826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43827/* end confdefs.h.  */
43828int i;
43829_ACEOF
43830if ac_fn_c_try_compile "$LINENO"; then :
43831
43832else
43833  supports=no
43834fi
43835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43836  ac_ext=cpp
43837ac_cpp='$CXXCPP $CPPFLAGS'
43838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43841
43842  CFLAGS="$saved_cflags"
43843
43844  saved_cxxflags="$CXXFLAGS"
43845  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
43846  ac_ext=cpp
43847ac_cpp='$CXXCPP $CPPFLAGS'
43848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43851
43852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43853/* end confdefs.h.  */
43854int i;
43855_ACEOF
43856if ac_fn_cxx_try_compile "$LINENO"; then :
43857
43858else
43859  supports=no
43860fi
43861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43862  ac_ext=cpp
43863ac_cpp='$CXXCPP $CPPFLAGS'
43864ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43865ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43866ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43867
43868  CXXFLAGS="$saved_cxxflags"
43869
43870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43871$as_echo "$supports" >&6; }
43872  if test "x$supports" = "xyes" ; then
43873    GCC_CAN_DISABLE_WARNINGS=true
43874  else
43875    GCC_CAN_DISABLE_WARNINGS=false
43876
43877  fi
43878
43879      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43880        DISABLE_WARNING_PREFIX="-Wno-"
43881      else
43882        DISABLE_WARNING_PREFIX=
43883      fi
43884      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43885      ;;
43886    clang)
43887      DISABLE_WARNING_PREFIX="-Wno-"
43888      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43889      ;;
43890  esac
43891
43892
43893
43894
43895# Setup debug symbols (need objcopy from the toolchain for that)
43896
43897  #
43898  # ENABLE_DEBUG_SYMBOLS
43899  # This must be done after the toolchain is setup, since we're looking at objcopy.
43900  #
43901  # Check whether --enable-debug-symbols was given.
43902if test "${enable_debug_symbols+set}" = set; then :
43903  enableval=$enable_debug_symbols;
43904fi
43905
43906
43907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43908$as_echo_n "checking if we should generate debug symbols... " >&6; }
43909
43910  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43911    # explicit enabling of enable-debug-symbols and can't find objcopy
43912    #   this is an error
43913    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43914  fi
43915
43916  if test "x$enable_debug_symbols" = "xyes"; then
43917    ENABLE_DEBUG_SYMBOLS=true
43918  elif test "x$enable_debug_symbols" = "xno"; then
43919    ENABLE_DEBUG_SYMBOLS=false
43920  else
43921    # Default is on if objcopy is found
43922    if test "x$OBJCOPY" != x; then
43923      ENABLE_DEBUG_SYMBOLS=true
43924    # MacOS X and Windows don't use objcopy but default is on for those OSes
43925    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43926      ENABLE_DEBUG_SYMBOLS=true
43927    else
43928      ENABLE_DEBUG_SYMBOLS=false
43929    fi
43930  fi
43931
43932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43933$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43934
43935  #
43936  # ZIP_DEBUGINFO_FILES
43937  #
43938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43939$as_echo_n "checking if we should zip debug-info files... " >&6; }
43940  # Check whether --enable-zip-debug-info was given.
43941if test "${enable_zip_debug_info+set}" = set; then :
43942  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43943else
43944  enable_zip_debug_info="yes"
43945fi
43946
43947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43948$as_echo "${enable_zip_debug_info}" >&6; }
43949
43950  if test "x${enable_zip_debug_info}" = "xno"; then
43951    ZIP_DEBUGINFO_FILES=false
43952  else
43953    ZIP_DEBUGINFO_FILES=true
43954  fi
43955
43956
43957
43958
43959
43960  # Check whether --enable-native-coverage was given.
43961if test "${enable_native_coverage+set}" = set; then :
43962  enableval=$enable_native_coverage;
43963fi
43964
43965  GCOV_ENABLED="false"
43966  if test "x$enable_native_coverage" = "xyes"; then
43967    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43968      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43969$as_echo_n "checking if native coverage is enabled... " >&6; }
43970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43971$as_echo "yes" >&6; }
43972      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43973      GCOV_LDFLAGS="-fprofile-arcs"
43974      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43975      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43976      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43977      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43978      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43979      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43980      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43981      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43982      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43983      GCOV_ENABLED="true"
43984    else
43985      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43986    fi
43987  elif test "x$enable_native_coverage" = "xno"; then
43988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43989$as_echo_n "checking if native coverage is enabled... " >&6; }
43990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43991$as_echo "no" >&6; }
43992  elif test "x$enable_native_coverage" != "x"; then
43993    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43994  fi
43995
43996
43997
43998
43999###############################################################################
44000#
44001# Check dependencies for external and internal libraries.
44002#
44003###############################################################################
44004
44005# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
44006
44007  # When using cygwin or msys, we need a wrapper binary that renames
44008  # /cygdrive/c/ arguments into c:/ arguments and peeks into
44009  # @files and rewrites these too! This wrapper binary is
44010  # called fixpath.
44011  FIXPATH=
44012  if test "x$OPENJDK_BUILD_OS" = xwindows; then
44013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
44014$as_echo_n "checking if fixpath can be created... " >&6; }
44015    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
44016    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
44017    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
44018    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
44019      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
44020      FIXPATH="$FIXPATH_BIN -c"
44021    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
44022      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
44023      # @ was chosen as separator to minimize risk of other tools messing around with it
44024      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
44025          | tr ' ' '\n' | grep '^/./' | sort | uniq`
44026      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
44027      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
44028    fi
44029    FIXPATH_SRC_W="$FIXPATH_SRC"
44030    FIXPATH_BIN_W="$FIXPATH_BIN"
44031
44032  unix_path="$FIXPATH_SRC_W"
44033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44034    windows_path=`$CYGPATH -m "$unix_path"`
44035    FIXPATH_SRC_W="$windows_path"
44036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44037    windows_path=`cmd //c echo $unix_path`
44038    FIXPATH_SRC_W="$windows_path"
44039  fi
44040
44041
44042  unix_path="$FIXPATH_BIN_W"
44043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44044    windows_path=`$CYGPATH -m "$unix_path"`
44045    FIXPATH_BIN_W="$windows_path"
44046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44047    windows_path=`cmd //c echo $unix_path`
44048    FIXPATH_BIN_W="$windows_path"
44049  fi
44050
44051    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
44052    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
44053    cd $FIXPATH_DIR
44054    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
44055    cd $CURDIR
44056
44057    if test ! -x $FIXPATH_BIN; then
44058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44059$as_echo "no" >&6; }
44060      cat $FIXPATH_DIR/fixpath1.log
44061      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
44062    fi
44063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44064$as_echo "yes" >&6; }
44065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
44066$as_echo_n "checking if fixpath.exe works... " >&6; }
44067    cd $FIXPATH_DIR
44068    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
44069        > $FIXPATH_DIR/fixpath2.log 2>&1
44070    cd $CURDIR
44071    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
44072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44073$as_echo "no" >&6; }
44074      cat $FIXPATH_DIR/fixpath2.log
44075      as_fn_error $? "fixpath did not work!" "$LINENO" 5
44076    fi
44077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44078$as_echo "yes" >&6; }
44079  fi
44080
44081
44082
44083
44084
44085  # Check if X11 is needed
44086  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
44087    # No X11 support on windows or macosx
44088    NEEDS_LIB_X11=false
44089  else
44090    if test "x$SUPPORT_HEADFUL" = xno; then
44091      # No X11 support if building headless-only
44092      NEEDS_LIB_X11=false
44093    else
44094      # All other instances need X11
44095      NEEDS_LIB_X11=true
44096    fi
44097  fi
44098
44099  # Check if cups is needed
44100  if test "x$OPENJDK_TARGET_OS" = xwindows; then
44101    # Windows have a separate print system
44102    NEEDS_LIB_CUPS=false
44103  else
44104    NEEDS_LIB_CUPS=true
44105  fi
44106
44107  # Check if freetype is needed
44108  if test "x$OPENJDK" = "xtrue"; then
44109    NEEDS_LIB_FREETYPE=true
44110  else
44111    NEEDS_LIB_FREETYPE=false
44112  fi
44113
44114  # Check if alsa is needed
44115  if test "x$OPENJDK_TARGET_OS" = xlinux; then
44116    NEEDS_LIB_ALSA=true
44117  else
44118    NEEDS_LIB_ALSA=false
44119  fi
44120
44121  # Check if ffi is needed
44122  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
44123    NEEDS_LIB_FFI=true
44124  else
44125    NEEDS_LIB_FFI=false
44126  fi
44127
44128
44129  # statically link libstdc++ before C++ ABI is stablized on Linux unless
44130  # dynamic build is configured on command line.
44131
44132# Check whether --with-stdc++lib was given.
44133if test "${with_stdc__lib+set}" = set; then :
44134  withval=$with_stdc__lib;
44135        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
44136                && test "x$with_stdc__lib" != xdefault; then
44137          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
44138        fi
44139
44140else
44141  with_stdc__lib=default
44142
44143fi
44144
44145
44146  if test "x$OPENJDK_TARGET_OS" = xlinux; then
44147    # Test if -lstdc++ works.
44148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
44149$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
44150    ac_ext=cpp
44151ac_cpp='$CXXCPP $CPPFLAGS'
44152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44155
44156    OLD_CXXFLAGS="$CXXFLAGS"
44157    CXXFLAGS="$CXXFLAGS -lstdc++"
44158    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44159/* end confdefs.h.  */
44160
44161int
44162main ()
44163{
44164return 0;
44165  ;
44166  return 0;
44167}
44168_ACEOF
44169if ac_fn_cxx_try_link "$LINENO"; then :
44170  has_dynamic_libstdcxx=yes
44171else
44172  has_dynamic_libstdcxx=no
44173fi
44174rm -f core conftest.err conftest.$ac_objext \
44175    conftest$ac_exeext conftest.$ac_ext
44176    CXXFLAGS="$OLD_CXXFLAGS"
44177    ac_ext=cpp
44178ac_cpp='$CXXCPP $CPPFLAGS'
44179ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44180ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44181ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44182
44183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
44184$as_echo "$has_dynamic_libstdcxx" >&6; }
44185
44186    # Test if stdc++ can be linked statically.
44187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
44188$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
44189    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
44190    ac_ext=cpp
44191ac_cpp='$CXXCPP $CPPFLAGS'
44192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44195
44196    OLD_LIBS="$LIBS"
44197    OLD_CXX="$CXX"
44198    LIBS="$STATIC_STDCXX_FLAGS"
44199    CXX="$CC"
44200    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44201/* end confdefs.h.  */
44202
44203int
44204main ()
44205{
44206return 0;
44207  ;
44208  return 0;
44209}
44210_ACEOF
44211if ac_fn_cxx_try_link "$LINENO"; then :
44212  has_static_libstdcxx=yes
44213else
44214  has_static_libstdcxx=no
44215fi
44216rm -f core conftest.err conftest.$ac_objext \
44217    conftest$ac_exeext conftest.$ac_ext
44218    LIBS="$OLD_LIBS"
44219    CXX="$OLD_CXX"
44220    ac_ext=cpp
44221ac_cpp='$CXXCPP $CPPFLAGS'
44222ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44223ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44224ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44225
44226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
44227$as_echo "$has_static_libstdcxx" >&6; }
44228
44229    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
44230      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
44231    fi
44232
44233    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
44234      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
44235    fi
44236
44237    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
44238      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
44239    fi
44240
44241    # If dynamic was requested, it's available since it would fail above otherwise.
44242    # If dynamic wasn't requested, go with static unless it isn't available.
44243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
44244$as_echo_n "checking how to link with libstdc++... " >&6; }
44245    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
44246      LIBCXX="$LIBCXX -lstdc++"
44247      LDCXX="$CXX"
44248      STATIC_CXX_SETTING="STATIC_CXX=false"
44249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
44250$as_echo "dynamic" >&6; }
44251    else
44252      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
44253      LDCXX="$CC"
44254      STATIC_CXX_SETTING="STATIC_CXX=true"
44255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
44256$as_echo "static" >&6; }
44257    fi
44258  fi
44259
44260
44261  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
44262  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
44263    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
44264  fi
44265
44266  # TODO better (platform agnostic) test
44267  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
44268    LIBCXX="-lstdc++"
44269  fi
44270
44271
44272  # Setup Windows runtime dlls
44273  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
44274
44275
44276# Check whether --with-msvcr-dll was given.
44277if test "${with_msvcr_dll+set}" = set; then :
44278  withval=$with_msvcr_dll;
44279fi
44280
44281
44282  if test "x$with_msvcr_dll" != x; then
44283    # If given explicitely by user, do not probe. If not present, fail directly.
44284
44285  DLL_NAME="$MSVCR_NAME"
44286  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
44287  METHOD="--with-msvcr-dll"
44288  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44289    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44290$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44291
44292    # Need to check if the found msvcr is correct architecture
44293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44294$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44295    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44297      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44298      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44299      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44300        CORRECT_MSVCR_ARCH="PE32 executable"
44301      else
44302        CORRECT_MSVCR_ARCH="PE32+ executable"
44303      fi
44304    else
44305      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44306        CORRECT_MSVCR_ARCH=386
44307      else
44308        CORRECT_MSVCR_ARCH=x86-64
44309      fi
44310    fi
44311    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44313$as_echo "ok" >&6; }
44314      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44315
44316  # Only process if variable expands to non-empty
44317
44318  if test "x$MSVC_DLL" != x; then
44319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44320
44321  # Input might be given as Windows format, start by converting to
44322  # unix format.
44323  path="$MSVC_DLL"
44324  new_path=`$CYGPATH -u "$path"`
44325
44326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44329  # "foo.exe" is OK but "foo" is an error.
44330  #
44331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44332  # It is also a way to make sure we got the proper file name for the real test later on.
44333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44334  if test "x$test_shortpath" = x; then
44335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44336$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44337    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44338  fi
44339
44340  # Call helper function which possibly converts this using DOS-style short mode.
44341  # If so, the updated path is stored in $new_path.
44342
44343  input_path="$new_path"
44344  # Check if we need to convert this using DOS-style short mode. If the path
44345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44346  # take no chances and rewrite it.
44347  # Note: m4 eats our [], so we need to use [ and ] instead.
44348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44349  if test "x$has_forbidden_chars" != x; then
44350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44354      # Going to short mode and back again did indeed matter. Since short mode is
44355      # case insensitive, let's make it lowercase to improve readability.
44356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44357      # Now convert it back to Unix-style (cygpath)
44358      input_path=`$CYGPATH -u "$shortmode_path"`
44359      new_path="$input_path"
44360    fi
44361  fi
44362
44363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44364  if test "x$test_cygdrive_prefix" = x; then
44365    # As a simple fix, exclude /usr/bin since it's not a real path.
44366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44368      # a path prefixed by /cygdrive for fixpath to work.
44369      new_path="$CYGWIN_ROOT_PATH$input_path"
44370    fi
44371  fi
44372
44373
44374  if test "x$path" != "x$new_path"; then
44375    MSVC_DLL="$new_path"
44376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44377$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44378  fi
44379
44380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44381
44382  path="$MSVC_DLL"
44383  has_colon=`$ECHO $path | $GREP ^.:`
44384  new_path="$path"
44385  if test "x$has_colon" = x; then
44386    # Not in mixed or Windows style, start by that.
44387    new_path=`cmd //c echo $path`
44388  fi
44389
44390
44391  input_path="$new_path"
44392  # Check if we need to convert this using DOS-style short mode. If the path
44393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44394  # take no chances and rewrite it.
44395  # Note: m4 eats our [], so we need to use [ and ] instead.
44396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44397  if test "x$has_forbidden_chars" != x; then
44398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44400  fi
44401
44402
44403  windows_path="$new_path"
44404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44405    unix_path=`$CYGPATH -u "$windows_path"`
44406    new_path="$unix_path"
44407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44409    new_path="$unix_path"
44410  fi
44411
44412  if test "x$path" != "x$new_path"; then
44413    MSVC_DLL="$new_path"
44414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44415$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44416  fi
44417
44418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44420
44421    else
44422      # We're on a unix platform. Hooray! :)
44423      path="$MSVC_DLL"
44424      has_space=`$ECHO "$path" | $GREP " "`
44425      if test "x$has_space" != x; then
44426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44427$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44429      fi
44430
44431      # Use eval to expand a potential ~
44432      eval path="$path"
44433      if test ! -f "$path" && test ! -d "$path"; then
44434        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44435      fi
44436
44437      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44438    fi
44439  fi
44440
44441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44442$as_echo_n "checking for $DLL_NAME... " >&6; }
44443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44444$as_echo "$MSVC_DLL" >&6; }
44445    else
44446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44447$as_echo "incorrect, ignoring" >&6; }
44448      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44449$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44450    fi
44451  fi
44452
44453    if test "x$MSVC_DLL" = x; then
44454      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
44455    fi
44456    MSVCR_DLL="$MSVC_DLL"
44457  elif test "x$DEVKIT_MSVCR_DLL" != x; then
44458
44459  DLL_NAME="$MSVCR_NAME"
44460  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
44461  METHOD="devkit"
44462  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44464$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44465
44466    # Need to check if the found msvcr is correct architecture
44467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44468$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44469    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44471      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44472      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44473      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44474        CORRECT_MSVCR_ARCH="PE32 executable"
44475      else
44476        CORRECT_MSVCR_ARCH="PE32+ executable"
44477      fi
44478    else
44479      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44480        CORRECT_MSVCR_ARCH=386
44481      else
44482        CORRECT_MSVCR_ARCH=x86-64
44483      fi
44484    fi
44485    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44487$as_echo "ok" >&6; }
44488      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44489
44490  # Only process if variable expands to non-empty
44491
44492  if test "x$MSVC_DLL" != x; then
44493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44494
44495  # Input might be given as Windows format, start by converting to
44496  # unix format.
44497  path="$MSVC_DLL"
44498  new_path=`$CYGPATH -u "$path"`
44499
44500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44503  # "foo.exe" is OK but "foo" is an error.
44504  #
44505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44506  # It is also a way to make sure we got the proper file name for the real test later on.
44507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44508  if test "x$test_shortpath" = x; then
44509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44510$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44511    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44512  fi
44513
44514  # Call helper function which possibly converts this using DOS-style short mode.
44515  # If so, the updated path is stored in $new_path.
44516
44517  input_path="$new_path"
44518  # Check if we need to convert this using DOS-style short mode. If the path
44519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44520  # take no chances and rewrite it.
44521  # Note: m4 eats our [], so we need to use [ and ] instead.
44522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44523  if test "x$has_forbidden_chars" != x; then
44524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44528      # Going to short mode and back again did indeed matter. Since short mode is
44529      # case insensitive, let's make it lowercase to improve readability.
44530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44531      # Now convert it back to Unix-style (cygpath)
44532      input_path=`$CYGPATH -u "$shortmode_path"`
44533      new_path="$input_path"
44534    fi
44535  fi
44536
44537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44538  if test "x$test_cygdrive_prefix" = x; then
44539    # As a simple fix, exclude /usr/bin since it's not a real path.
44540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44542      # a path prefixed by /cygdrive for fixpath to work.
44543      new_path="$CYGWIN_ROOT_PATH$input_path"
44544    fi
44545  fi
44546
44547
44548  if test "x$path" != "x$new_path"; then
44549    MSVC_DLL="$new_path"
44550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44551$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44552  fi
44553
44554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44555
44556  path="$MSVC_DLL"
44557  has_colon=`$ECHO $path | $GREP ^.:`
44558  new_path="$path"
44559  if test "x$has_colon" = x; then
44560    # Not in mixed or Windows style, start by that.
44561    new_path=`cmd //c echo $path`
44562  fi
44563
44564
44565  input_path="$new_path"
44566  # Check if we need to convert this using DOS-style short mode. If the path
44567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44568  # take no chances and rewrite it.
44569  # Note: m4 eats our [], so we need to use [ and ] instead.
44570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44571  if test "x$has_forbidden_chars" != x; then
44572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44574  fi
44575
44576
44577  windows_path="$new_path"
44578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44579    unix_path=`$CYGPATH -u "$windows_path"`
44580    new_path="$unix_path"
44581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44583    new_path="$unix_path"
44584  fi
44585
44586  if test "x$path" != "x$new_path"; then
44587    MSVC_DLL="$new_path"
44588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44589$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44590  fi
44591
44592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44594
44595    else
44596      # We're on a unix platform. Hooray! :)
44597      path="$MSVC_DLL"
44598      has_space=`$ECHO "$path" | $GREP " "`
44599      if test "x$has_space" != x; then
44600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44601$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44603      fi
44604
44605      # Use eval to expand a potential ~
44606      eval path="$path"
44607      if test ! -f "$path" && test ! -d "$path"; then
44608        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44609      fi
44610
44611      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44612    fi
44613  fi
44614
44615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44616$as_echo_n "checking for $DLL_NAME... " >&6; }
44617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44618$as_echo "$MSVC_DLL" >&6; }
44619    else
44620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44621$as_echo "incorrect, ignoring" >&6; }
44622      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44623$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44624    fi
44625  fi
44626
44627    if test "x$MSVC_DLL" = x; then
44628      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
44629    fi
44630    MSVCR_DLL="$MSVC_DLL"
44631  else
44632
44633  DLL_NAME="${MSVCR_NAME}"
44634  MSVC_DLL=
44635
44636  if test "x$MSVC_DLL" = x; then
44637    # Probe: Using well-known location from Visual Studio 10.0
44638    if test "x$VCINSTALLDIR" != x; then
44639      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
44640
44641  windows_path="$CYGWIN_VC_INSTALL_DIR"
44642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44643    unix_path=`$CYGPATH -u "$windows_path"`
44644    CYGWIN_VC_INSTALL_DIR="$unix_path"
44645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44647    CYGWIN_VC_INSTALL_DIR="$unix_path"
44648  fi
44649
44650      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44651        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44652      else
44653        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
44654      fi
44655      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
44656
44657  DLL_NAME="$DLL_NAME"
44658  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44659  METHOD="well-known location in VCINSTALLDIR"
44660  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44661    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44662$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44663
44664    # Need to check if the found msvcr is correct architecture
44665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44666$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44667    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44669      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44670      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44671      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44672        CORRECT_MSVCR_ARCH="PE32 executable"
44673      else
44674        CORRECT_MSVCR_ARCH="PE32+ executable"
44675      fi
44676    else
44677      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44678        CORRECT_MSVCR_ARCH=386
44679      else
44680        CORRECT_MSVCR_ARCH=x86-64
44681      fi
44682    fi
44683    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44685$as_echo "ok" >&6; }
44686      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44687
44688  # Only process if variable expands to non-empty
44689
44690  if test "x$MSVC_DLL" != x; then
44691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44692
44693  # Input might be given as Windows format, start by converting to
44694  # unix format.
44695  path="$MSVC_DLL"
44696  new_path=`$CYGPATH -u "$path"`
44697
44698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44701  # "foo.exe" is OK but "foo" is an error.
44702  #
44703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44704  # It is also a way to make sure we got the proper file name for the real test later on.
44705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44706  if test "x$test_shortpath" = x; then
44707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44708$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44709    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44710  fi
44711
44712  # Call helper function which possibly converts this using DOS-style short mode.
44713  # If so, the updated path is stored in $new_path.
44714
44715  input_path="$new_path"
44716  # Check if we need to convert this using DOS-style short mode. If the path
44717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44718  # take no chances and rewrite it.
44719  # Note: m4 eats our [], so we need to use [ and ] instead.
44720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44721  if test "x$has_forbidden_chars" != x; then
44722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44726      # Going to short mode and back again did indeed matter. Since short mode is
44727      # case insensitive, let's make it lowercase to improve readability.
44728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44729      # Now convert it back to Unix-style (cygpath)
44730      input_path=`$CYGPATH -u "$shortmode_path"`
44731      new_path="$input_path"
44732    fi
44733  fi
44734
44735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44736  if test "x$test_cygdrive_prefix" = x; then
44737    # As a simple fix, exclude /usr/bin since it's not a real path.
44738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44740      # a path prefixed by /cygdrive for fixpath to work.
44741      new_path="$CYGWIN_ROOT_PATH$input_path"
44742    fi
44743  fi
44744
44745
44746  if test "x$path" != "x$new_path"; then
44747    MSVC_DLL="$new_path"
44748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44749$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44750  fi
44751
44752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44753
44754  path="$MSVC_DLL"
44755  has_colon=`$ECHO $path | $GREP ^.:`
44756  new_path="$path"
44757  if test "x$has_colon" = x; then
44758    # Not in mixed or Windows style, start by that.
44759    new_path=`cmd //c echo $path`
44760  fi
44761
44762
44763  input_path="$new_path"
44764  # Check if we need to convert this using DOS-style short mode. If the path
44765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44766  # take no chances and rewrite it.
44767  # Note: m4 eats our [], so we need to use [ and ] instead.
44768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44769  if test "x$has_forbidden_chars" != x; then
44770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44772  fi
44773
44774
44775  windows_path="$new_path"
44776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44777    unix_path=`$CYGPATH -u "$windows_path"`
44778    new_path="$unix_path"
44779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44781    new_path="$unix_path"
44782  fi
44783
44784  if test "x$path" != "x$new_path"; then
44785    MSVC_DLL="$new_path"
44786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44787$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44788  fi
44789
44790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44792
44793    else
44794      # We're on a unix platform. Hooray! :)
44795      path="$MSVC_DLL"
44796      has_space=`$ECHO "$path" | $GREP " "`
44797      if test "x$has_space" != x; then
44798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44799$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44801      fi
44802
44803      # Use eval to expand a potential ~
44804      eval path="$path"
44805      if test ! -f "$path" && test ! -d "$path"; then
44806        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44807      fi
44808
44809      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44810    fi
44811  fi
44812
44813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44814$as_echo_n "checking for $DLL_NAME... " >&6; }
44815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44816$as_echo "$MSVC_DLL" >&6; }
44817    else
44818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44819$as_echo "incorrect, ignoring" >&6; }
44820      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44821$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44822    fi
44823  fi
44824
44825    fi
44826  fi
44827
44828  if test "x$MSVC_DLL" = x; then
44829    # Probe: Check in the Boot JDK directory.
44830    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
44831
44832  DLL_NAME="$DLL_NAME"
44833  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
44834  METHOD="well-known location in Boot JDK"
44835  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
44836    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
44837$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
44838
44839    # Need to check if the found msvcr is correct architecture
44840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
44841$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
44842    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
44843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44844      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
44845      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
44846      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44847        CORRECT_MSVCR_ARCH="PE32 executable"
44848      else
44849        CORRECT_MSVCR_ARCH="PE32+ executable"
44850      fi
44851    else
44852      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
44853        CORRECT_MSVCR_ARCH=386
44854      else
44855        CORRECT_MSVCR_ARCH=x86-64
44856      fi
44857    fi
44858    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
44859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
44860$as_echo "ok" >&6; }
44861      MSVC_DLL="$POSSIBLE_MSVC_DLL"
44862
44863  # Only process if variable expands to non-empty
44864
44865  if test "x$MSVC_DLL" != x; then
44866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44867
44868  # Input might be given as Windows format, start by converting to
44869  # unix format.
44870  path="$MSVC_DLL"
44871  new_path=`$CYGPATH -u "$path"`
44872
44873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44876  # "foo.exe" is OK but "foo" is an error.
44877  #
44878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44879  # It is also a way to make sure we got the proper file name for the real test later on.
44880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44881  if test "x$test_shortpath" = x; then
44882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44883$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44884    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
44885  fi
44886
44887  # Call helper function which possibly converts this using DOS-style short mode.
44888  # If so, the updated path is stored in $new_path.
44889
44890  input_path="$new_path"
44891  # Check if we need to convert this using DOS-style short mode. If the path
44892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44893  # take no chances and rewrite it.
44894  # Note: m4 eats our [], so we need to use [ and ] instead.
44895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44896  if test "x$has_forbidden_chars" != x; then
44897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44901      # Going to short mode and back again did indeed matter. Since short mode is
44902      # case insensitive, let's make it lowercase to improve readability.
44903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44904      # Now convert it back to Unix-style (cygpath)
44905      input_path=`$CYGPATH -u "$shortmode_path"`
44906      new_path="$input_path"
44907    fi
44908  fi
44909
44910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44911  if test "x$test_cygdrive_prefix" = x; then
44912    # As a simple fix, exclude /usr/bin since it's not a real path.
44913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44915      # a path prefixed by /cygdrive for fixpath to work.
44916      new_path="$CYGWIN_ROOT_PATH$input_path"
44917    fi
44918  fi
44919
44920
44921  if test "x$path" != "x$new_path"; then
44922    MSVC_DLL="$new_path"
44923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44924$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44925  fi
44926
44927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44928
44929  path="$MSVC_DLL"
44930  has_colon=`$ECHO $path | $GREP ^.:`
44931  new_path="$path"
44932  if test "x$has_colon" = x; then
44933    # Not in mixed or Windows style, start by that.
44934    new_path=`cmd //c echo $path`
44935  fi
44936
44937
44938  input_path="$new_path"
44939  # Check if we need to convert this using DOS-style short mode. If the path
44940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44941  # take no chances and rewrite it.
44942  # Note: m4 eats our [], so we need to use [ and ] instead.
44943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44944  if test "x$has_forbidden_chars" != x; then
44945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44947  fi
44948
44949
44950  windows_path="$new_path"
44951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44952    unix_path=`$CYGPATH -u "$windows_path"`
44953    new_path="$unix_path"
44954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44956    new_path="$unix_path"
44957  fi
44958
44959  if test "x$path" != "x$new_path"; then
44960    MSVC_DLL="$new_path"
44961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
44962$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
44963  fi
44964
44965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44967
44968    else
44969      # We're on a unix platform. Hooray! :)
44970      path="$MSVC_DLL"
44971      has_space=`$ECHO "$path" | $GREP " "`
44972      if test "x$has_space" != x; then
44973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
44974$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
44975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44976      fi
44977
44978      # Use eval to expand a potential ~
44979      eval path="$path"
44980      if test ! -f "$path" && test ! -d "$path"; then
44981        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
44982      fi
44983
44984      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
44985    fi
44986  fi
44987
44988      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
44989$as_echo_n "checking for $DLL_NAME... " >&6; }
44990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
44991$as_echo "$MSVC_DLL" >&6; }
44992    else
44993      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
44994$as_echo "incorrect, ignoring" >&6; }
44995      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
44996$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
44997    fi
44998  fi
44999
45000  fi
45001
45002  if test "x$MSVC_DLL" = x; then
45003    # Probe: Look in the Windows system32 directory
45004    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
45005
45006  windows_path="$CYGWIN_SYSTEMROOT"
45007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45008    unix_path=`$CYGPATH -u "$windows_path"`
45009    CYGWIN_SYSTEMROOT="$unix_path"
45010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45012    CYGWIN_SYSTEMROOT="$unix_path"
45013  fi
45014
45015    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
45016
45017  DLL_NAME="$DLL_NAME"
45018  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45019  METHOD="well-known location in SYSTEMROOT"
45020  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45021    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45022$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45023
45024    # Need to check if the found msvcr is correct architecture
45025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45026$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45027    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45029      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45030      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45031      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45032        CORRECT_MSVCR_ARCH="PE32 executable"
45033      else
45034        CORRECT_MSVCR_ARCH="PE32+ executable"
45035      fi
45036    else
45037      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45038        CORRECT_MSVCR_ARCH=386
45039      else
45040        CORRECT_MSVCR_ARCH=x86-64
45041      fi
45042    fi
45043    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45045$as_echo "ok" >&6; }
45046      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45047
45048  # Only process if variable expands to non-empty
45049
45050  if test "x$MSVC_DLL" != x; then
45051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45052
45053  # Input might be given as Windows format, start by converting to
45054  # unix format.
45055  path="$MSVC_DLL"
45056  new_path=`$CYGPATH -u "$path"`
45057
45058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45061  # "foo.exe" is OK but "foo" is an error.
45062  #
45063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45064  # It is also a way to make sure we got the proper file name for the real test later on.
45065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45066  if test "x$test_shortpath" = x; then
45067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45068$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45069    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45070  fi
45071
45072  # Call helper function which possibly converts this using DOS-style short mode.
45073  # If so, the updated path is stored in $new_path.
45074
45075  input_path="$new_path"
45076  # Check if we need to convert this using DOS-style short mode. If the path
45077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45078  # take no chances and rewrite it.
45079  # Note: m4 eats our [], so we need to use [ and ] instead.
45080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45081  if test "x$has_forbidden_chars" != x; then
45082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45086      # Going to short mode and back again did indeed matter. Since short mode is
45087      # case insensitive, let's make it lowercase to improve readability.
45088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45089      # Now convert it back to Unix-style (cygpath)
45090      input_path=`$CYGPATH -u "$shortmode_path"`
45091      new_path="$input_path"
45092    fi
45093  fi
45094
45095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45096  if test "x$test_cygdrive_prefix" = x; then
45097    # As a simple fix, exclude /usr/bin since it's not a real path.
45098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45100      # a path prefixed by /cygdrive for fixpath to work.
45101      new_path="$CYGWIN_ROOT_PATH$input_path"
45102    fi
45103  fi
45104
45105
45106  if test "x$path" != "x$new_path"; then
45107    MSVC_DLL="$new_path"
45108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45109$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45110  fi
45111
45112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45113
45114  path="$MSVC_DLL"
45115  has_colon=`$ECHO $path | $GREP ^.:`
45116  new_path="$path"
45117  if test "x$has_colon" = x; then
45118    # Not in mixed or Windows style, start by that.
45119    new_path=`cmd //c echo $path`
45120  fi
45121
45122
45123  input_path="$new_path"
45124  # Check if we need to convert this using DOS-style short mode. If the path
45125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45126  # take no chances and rewrite it.
45127  # Note: m4 eats our [], so we need to use [ and ] instead.
45128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45129  if test "x$has_forbidden_chars" != x; then
45130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45132  fi
45133
45134
45135  windows_path="$new_path"
45136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45137    unix_path=`$CYGPATH -u "$windows_path"`
45138    new_path="$unix_path"
45139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45141    new_path="$unix_path"
45142  fi
45143
45144  if test "x$path" != "x$new_path"; then
45145    MSVC_DLL="$new_path"
45146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45147$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45148  fi
45149
45150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45152
45153    else
45154      # We're on a unix platform. Hooray! :)
45155      path="$MSVC_DLL"
45156      has_space=`$ECHO "$path" | $GREP " "`
45157      if test "x$has_space" != x; then
45158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45159$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45161      fi
45162
45163      # Use eval to expand a potential ~
45164      eval path="$path"
45165      if test ! -f "$path" && test ! -d "$path"; then
45166        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45167      fi
45168
45169      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45170    fi
45171  fi
45172
45173      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45174$as_echo_n "checking for $DLL_NAME... " >&6; }
45175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45176$as_echo "$MSVC_DLL" >&6; }
45177    else
45178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45179$as_echo "incorrect, ignoring" >&6; }
45180      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45181$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45182    fi
45183  fi
45184
45185  fi
45186
45187  if test "x$MSVC_DLL" = x; then
45188    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
45189    if test "x$VS100COMNTOOLS" != x; then
45190      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
45191
45192  windows_path="$CYGWIN_VS_TOOLS_DIR"
45193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45194    unix_path=`$CYGPATH -u "$windows_path"`
45195    CYGWIN_VS_TOOLS_DIR="$unix_path"
45196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45198    CYGWIN_VS_TOOLS_DIR="$unix_path"
45199  fi
45200
45201      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45202        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
45203	    | $GREP -i /x64/ | $HEAD --lines 1`
45204      else
45205        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
45206	    | $GREP -i /x86/ | $HEAD --lines 1`
45207      fi
45208
45209  DLL_NAME="$DLL_NAME"
45210  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45211  METHOD="search of VS100COMNTOOLS"
45212  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45213    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45214$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45215
45216    # Need to check if the found msvcr is correct architecture
45217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45218$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45219    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45221      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45222      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45223      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45224        CORRECT_MSVCR_ARCH="PE32 executable"
45225      else
45226        CORRECT_MSVCR_ARCH="PE32+ executable"
45227      fi
45228    else
45229      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45230        CORRECT_MSVCR_ARCH=386
45231      else
45232        CORRECT_MSVCR_ARCH=x86-64
45233      fi
45234    fi
45235    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45236      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45237$as_echo "ok" >&6; }
45238      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45239
45240  # Only process if variable expands to non-empty
45241
45242  if test "x$MSVC_DLL" != x; then
45243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45244
45245  # Input might be given as Windows format, start by converting to
45246  # unix format.
45247  path="$MSVC_DLL"
45248  new_path=`$CYGPATH -u "$path"`
45249
45250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45253  # "foo.exe" is OK but "foo" is an error.
45254  #
45255  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45256  # It is also a way to make sure we got the proper file name for the real test later on.
45257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45258  if test "x$test_shortpath" = x; then
45259    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45260$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45261    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45262  fi
45263
45264  # Call helper function which possibly converts this using DOS-style short mode.
45265  # If so, the updated path is stored in $new_path.
45266
45267  input_path="$new_path"
45268  # Check if we need to convert this using DOS-style short mode. If the path
45269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45270  # take no chances and rewrite it.
45271  # Note: m4 eats our [], so we need to use [ and ] instead.
45272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45273  if test "x$has_forbidden_chars" != x; then
45274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45278      # Going to short mode and back again did indeed matter. Since short mode is
45279      # case insensitive, let's make it lowercase to improve readability.
45280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45281      # Now convert it back to Unix-style (cygpath)
45282      input_path=`$CYGPATH -u "$shortmode_path"`
45283      new_path="$input_path"
45284    fi
45285  fi
45286
45287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45288  if test "x$test_cygdrive_prefix" = x; then
45289    # As a simple fix, exclude /usr/bin since it's not a real path.
45290    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45292      # a path prefixed by /cygdrive for fixpath to work.
45293      new_path="$CYGWIN_ROOT_PATH$input_path"
45294    fi
45295  fi
45296
45297
45298  if test "x$path" != "x$new_path"; then
45299    MSVC_DLL="$new_path"
45300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45301$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45302  fi
45303
45304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45305
45306  path="$MSVC_DLL"
45307  has_colon=`$ECHO $path | $GREP ^.:`
45308  new_path="$path"
45309  if test "x$has_colon" = x; then
45310    # Not in mixed or Windows style, start by that.
45311    new_path=`cmd //c echo $path`
45312  fi
45313
45314
45315  input_path="$new_path"
45316  # Check if we need to convert this using DOS-style short mode. If the path
45317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45318  # take no chances and rewrite it.
45319  # Note: m4 eats our [], so we need to use [ and ] instead.
45320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45321  if test "x$has_forbidden_chars" != x; then
45322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45324  fi
45325
45326
45327  windows_path="$new_path"
45328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45329    unix_path=`$CYGPATH -u "$windows_path"`
45330    new_path="$unix_path"
45331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45333    new_path="$unix_path"
45334  fi
45335
45336  if test "x$path" != "x$new_path"; then
45337    MSVC_DLL="$new_path"
45338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45339$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45340  fi
45341
45342  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45343  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45344
45345    else
45346      # We're on a unix platform. Hooray! :)
45347      path="$MSVC_DLL"
45348      has_space=`$ECHO "$path" | $GREP " "`
45349      if test "x$has_space" != x; then
45350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45351$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45352        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45353      fi
45354
45355      # Use eval to expand a potential ~
45356      eval path="$path"
45357      if test ! -f "$path" && test ! -d "$path"; then
45358        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45359      fi
45360
45361      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45362    fi
45363  fi
45364
45365      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45366$as_echo_n "checking for $DLL_NAME... " >&6; }
45367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45368$as_echo "$MSVC_DLL" >&6; }
45369    else
45370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45371$as_echo "incorrect, ignoring" >&6; }
45372      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45373$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45374    fi
45375  fi
45376
45377    fi
45378  fi
45379
45380  if test "x$MSVC_DLL" = x; then
45381    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
45382    # (This was the original behaviour; kept since it might turn something up)
45383    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
45384      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45385        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45386	    | $GREP x64 | $HEAD --lines 1`
45387      else
45388        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45389	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
45390        if test "x$POSSIBLE_MSVC_DLL" = x; then
45391          # We're grasping at straws now...
45392          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
45393	      | $HEAD --lines 1`
45394        fi
45395      fi
45396
45397
45398  DLL_NAME="$DLL_NAME"
45399  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45400  METHOD="search of VCINSTALLDIR"
45401  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45402    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45403$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45404
45405    # Need to check if the found msvcr is correct architecture
45406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45407$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45408    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45410      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45411      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45412      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45413        CORRECT_MSVCR_ARCH="PE32 executable"
45414      else
45415        CORRECT_MSVCR_ARCH="PE32+ executable"
45416      fi
45417    else
45418      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45419        CORRECT_MSVCR_ARCH=386
45420      else
45421        CORRECT_MSVCR_ARCH=x86-64
45422      fi
45423    fi
45424    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45426$as_echo "ok" >&6; }
45427      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45428
45429  # Only process if variable expands to non-empty
45430
45431  if test "x$MSVC_DLL" != x; then
45432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45433
45434  # Input might be given as Windows format, start by converting to
45435  # unix format.
45436  path="$MSVC_DLL"
45437  new_path=`$CYGPATH -u "$path"`
45438
45439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45442  # "foo.exe" is OK but "foo" is an error.
45443  #
45444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45445  # It is also a way to make sure we got the proper file name for the real test later on.
45446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45447  if test "x$test_shortpath" = x; then
45448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45449$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45450    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45451  fi
45452
45453  # Call helper function which possibly converts this using DOS-style short mode.
45454  # If so, the updated path is stored in $new_path.
45455
45456  input_path="$new_path"
45457  # Check if we need to convert this using DOS-style short mode. If the path
45458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45459  # take no chances and rewrite it.
45460  # Note: m4 eats our [], so we need to use [ and ] instead.
45461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45462  if test "x$has_forbidden_chars" != x; then
45463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45467      # Going to short mode and back again did indeed matter. Since short mode is
45468      # case insensitive, let's make it lowercase to improve readability.
45469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45470      # Now convert it back to Unix-style (cygpath)
45471      input_path=`$CYGPATH -u "$shortmode_path"`
45472      new_path="$input_path"
45473    fi
45474  fi
45475
45476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45477  if test "x$test_cygdrive_prefix" = x; then
45478    # As a simple fix, exclude /usr/bin since it's not a real path.
45479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45481      # a path prefixed by /cygdrive for fixpath to work.
45482      new_path="$CYGWIN_ROOT_PATH$input_path"
45483    fi
45484  fi
45485
45486
45487  if test "x$path" != "x$new_path"; then
45488    MSVC_DLL="$new_path"
45489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45490$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45491  fi
45492
45493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45494
45495  path="$MSVC_DLL"
45496  has_colon=`$ECHO $path | $GREP ^.:`
45497  new_path="$path"
45498  if test "x$has_colon" = x; then
45499    # Not in mixed or Windows style, start by that.
45500    new_path=`cmd //c echo $path`
45501  fi
45502
45503
45504  input_path="$new_path"
45505  # Check if we need to convert this using DOS-style short mode. If the path
45506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45507  # take no chances and rewrite it.
45508  # Note: m4 eats our [], so we need to use [ and ] instead.
45509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45510  if test "x$has_forbidden_chars" != x; then
45511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45513  fi
45514
45515
45516  windows_path="$new_path"
45517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45518    unix_path=`$CYGPATH -u "$windows_path"`
45519    new_path="$unix_path"
45520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45522    new_path="$unix_path"
45523  fi
45524
45525  if test "x$path" != "x$new_path"; then
45526    MSVC_DLL="$new_path"
45527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45529  fi
45530
45531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45533
45534    else
45535      # We're on a unix platform. Hooray! :)
45536      path="$MSVC_DLL"
45537      has_space=`$ECHO "$path" | $GREP " "`
45538      if test "x$has_space" != x; then
45539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45540$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45542      fi
45543
45544      # Use eval to expand a potential ~
45545      eval path="$path"
45546      if test ! -f "$path" && test ! -d "$path"; then
45547        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45548      fi
45549
45550      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45551    fi
45552  fi
45553
45554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45555$as_echo_n "checking for $DLL_NAME... " >&6; }
45556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45557$as_echo "$MSVC_DLL" >&6; }
45558    else
45559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45560$as_echo "incorrect, ignoring" >&6; }
45561      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45562$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45563    fi
45564  fi
45565
45566    fi
45567  fi
45568
45569  if test "x$MSVC_DLL" = x; then
45570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45571$as_echo_n "checking for $DLL_NAME... " >&6; }
45572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45573$as_echo "no" >&6; }
45574    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
45575  fi
45576
45577    MSVCR_DLL="$MSVC_DLL"
45578  fi
45579
45580
45581
45582# Check whether --with-msvcp-dll was given.
45583if test "${with_msvcp_dll+set}" = set; then :
45584  withval=$with_msvcp_dll;
45585fi
45586
45587
45588  if test "x$MSVCP_NAME" != "x"; then
45589    if test "x$with_msvcp_dll" != x; then
45590      # If given explicitely by user, do not probe. If not present, fail directly.
45591
45592  DLL_NAME="$MSVCP_NAME"
45593  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
45594  METHOD="--with-msvcp-dll"
45595  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45596    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45597$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45598
45599    # Need to check if the found msvcr is correct architecture
45600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45601$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45602    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45604      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45605      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45606      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45607        CORRECT_MSVCR_ARCH="PE32 executable"
45608      else
45609        CORRECT_MSVCR_ARCH="PE32+ executable"
45610      fi
45611    else
45612      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45613        CORRECT_MSVCR_ARCH=386
45614      else
45615        CORRECT_MSVCR_ARCH=x86-64
45616      fi
45617    fi
45618    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45620$as_echo "ok" >&6; }
45621      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45622
45623  # Only process if variable expands to non-empty
45624
45625  if test "x$MSVC_DLL" != x; then
45626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45627
45628  # Input might be given as Windows format, start by converting to
45629  # unix format.
45630  path="$MSVC_DLL"
45631  new_path=`$CYGPATH -u "$path"`
45632
45633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45636  # "foo.exe" is OK but "foo" is an error.
45637  #
45638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45639  # It is also a way to make sure we got the proper file name for the real test later on.
45640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45641  if test "x$test_shortpath" = x; then
45642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45643$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45644    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45645  fi
45646
45647  # Call helper function which possibly converts this using DOS-style short mode.
45648  # If so, the updated path is stored in $new_path.
45649
45650  input_path="$new_path"
45651  # Check if we need to convert this using DOS-style short mode. If the path
45652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45653  # take no chances and rewrite it.
45654  # Note: m4 eats our [], so we need to use [ and ] instead.
45655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45656  if test "x$has_forbidden_chars" != x; then
45657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45661      # Going to short mode and back again did indeed matter. Since short mode is
45662      # case insensitive, let's make it lowercase to improve readability.
45663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45664      # Now convert it back to Unix-style (cygpath)
45665      input_path=`$CYGPATH -u "$shortmode_path"`
45666      new_path="$input_path"
45667    fi
45668  fi
45669
45670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45671  if test "x$test_cygdrive_prefix" = x; then
45672    # As a simple fix, exclude /usr/bin since it's not a real path.
45673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45675      # a path prefixed by /cygdrive for fixpath to work.
45676      new_path="$CYGWIN_ROOT_PATH$input_path"
45677    fi
45678  fi
45679
45680
45681  if test "x$path" != "x$new_path"; then
45682    MSVC_DLL="$new_path"
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45684$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45685  fi
45686
45687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45688
45689  path="$MSVC_DLL"
45690  has_colon=`$ECHO $path | $GREP ^.:`
45691  new_path="$path"
45692  if test "x$has_colon" = x; then
45693    # Not in mixed or Windows style, start by that.
45694    new_path=`cmd //c echo $path`
45695  fi
45696
45697
45698  input_path="$new_path"
45699  # Check if we need to convert this using DOS-style short mode. If the path
45700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45701  # take no chances and rewrite it.
45702  # Note: m4 eats our [], so we need to use [ and ] instead.
45703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45704  if test "x$has_forbidden_chars" != x; then
45705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45707  fi
45708
45709
45710  windows_path="$new_path"
45711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45712    unix_path=`$CYGPATH -u "$windows_path"`
45713    new_path="$unix_path"
45714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45716    new_path="$unix_path"
45717  fi
45718
45719  if test "x$path" != "x$new_path"; then
45720    MSVC_DLL="$new_path"
45721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45722$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45723  fi
45724
45725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45727
45728    else
45729      # We're on a unix platform. Hooray! :)
45730      path="$MSVC_DLL"
45731      has_space=`$ECHO "$path" | $GREP " "`
45732      if test "x$has_space" != x; then
45733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45734$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45736      fi
45737
45738      # Use eval to expand a potential ~
45739      eval path="$path"
45740      if test ! -f "$path" && test ! -d "$path"; then
45741        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45742      fi
45743
45744      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45745    fi
45746  fi
45747
45748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45749$as_echo_n "checking for $DLL_NAME... " >&6; }
45750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45751$as_echo "$MSVC_DLL" >&6; }
45752    else
45753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45754$as_echo "incorrect, ignoring" >&6; }
45755      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45756$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45757    fi
45758  fi
45759
45760      if test "x$MSVC_DLL" = x; then
45761        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
45762      fi
45763      MSVCP_DLL="$MSVC_DLL"
45764    elif test "x$DEVKIT_MSVCP_DLL" != x; then
45765
45766  DLL_NAME="$MSVCP_NAME"
45767  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
45768  METHOD="devkit"
45769  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45770    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45771$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45772
45773    # Need to check if the found msvcr is correct architecture
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45775$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45776    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45778      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45779      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45780      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45781        CORRECT_MSVCR_ARCH="PE32 executable"
45782      else
45783        CORRECT_MSVCR_ARCH="PE32+ executable"
45784      fi
45785    else
45786      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45787        CORRECT_MSVCR_ARCH=386
45788      else
45789        CORRECT_MSVCR_ARCH=x86-64
45790      fi
45791    fi
45792    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45794$as_echo "ok" >&6; }
45795      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45796
45797  # Only process if variable expands to non-empty
45798
45799  if test "x$MSVC_DLL" != x; then
45800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45801
45802  # Input might be given as Windows format, start by converting to
45803  # unix format.
45804  path="$MSVC_DLL"
45805  new_path=`$CYGPATH -u "$path"`
45806
45807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45810  # "foo.exe" is OK but "foo" is an error.
45811  #
45812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45813  # It is also a way to make sure we got the proper file name for the real test later on.
45814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45815  if test "x$test_shortpath" = x; then
45816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45817$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45818    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45819  fi
45820
45821  # Call helper function which possibly converts this using DOS-style short mode.
45822  # If so, the updated path is stored in $new_path.
45823
45824  input_path="$new_path"
45825  # Check if we need to convert this using DOS-style short mode. If the path
45826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45827  # take no chances and rewrite it.
45828  # Note: m4 eats our [], so we need to use [ and ] instead.
45829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45830  if test "x$has_forbidden_chars" != x; then
45831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45835      # Going to short mode and back again did indeed matter. Since short mode is
45836      # case insensitive, let's make it lowercase to improve readability.
45837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45838      # Now convert it back to Unix-style (cygpath)
45839      input_path=`$CYGPATH -u "$shortmode_path"`
45840      new_path="$input_path"
45841    fi
45842  fi
45843
45844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45845  if test "x$test_cygdrive_prefix" = x; then
45846    # As a simple fix, exclude /usr/bin since it's not a real path.
45847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45849      # a path prefixed by /cygdrive for fixpath to work.
45850      new_path="$CYGWIN_ROOT_PATH$input_path"
45851    fi
45852  fi
45853
45854
45855  if test "x$path" != "x$new_path"; then
45856    MSVC_DLL="$new_path"
45857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45858$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45859  fi
45860
45861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45862
45863  path="$MSVC_DLL"
45864  has_colon=`$ECHO $path | $GREP ^.:`
45865  new_path="$path"
45866  if test "x$has_colon" = x; then
45867    # Not in mixed or Windows style, start by that.
45868    new_path=`cmd //c echo $path`
45869  fi
45870
45871
45872  input_path="$new_path"
45873  # Check if we need to convert this using DOS-style short mode. If the path
45874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45875  # take no chances and rewrite it.
45876  # Note: m4 eats our [], so we need to use [ and ] instead.
45877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45878  if test "x$has_forbidden_chars" != x; then
45879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45881  fi
45882
45883
45884  windows_path="$new_path"
45885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45886    unix_path=`$CYGPATH -u "$windows_path"`
45887    new_path="$unix_path"
45888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45890    new_path="$unix_path"
45891  fi
45892
45893  if test "x$path" != "x$new_path"; then
45894    MSVC_DLL="$new_path"
45895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45896$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45897  fi
45898
45899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45901
45902    else
45903      # We're on a unix platform. Hooray! :)
45904      path="$MSVC_DLL"
45905      has_space=`$ECHO "$path" | $GREP " "`
45906      if test "x$has_space" != x; then
45907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45908$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45910      fi
45911
45912      # Use eval to expand a potential ~
45913      eval path="$path"
45914      if test ! -f "$path" && test ! -d "$path"; then
45915        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45916      fi
45917
45918      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45919    fi
45920  fi
45921
45922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45923$as_echo_n "checking for $DLL_NAME... " >&6; }
45924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45925$as_echo "$MSVC_DLL" >&6; }
45926    else
45927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45928$as_echo "incorrect, ignoring" >&6; }
45929      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45930$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45931    fi
45932  fi
45933
45934      if test "x$MSVC_DLL" = x; then
45935        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
45936      fi
45937      MSVCP_DLL="$MSVC_DLL"
45938    else
45939
45940  DLL_NAME="${MSVCP_NAME}"
45941  MSVC_DLL=
45942
45943  if test "x$MSVC_DLL" = x; then
45944    # Probe: Using well-known location from Visual Studio 10.0
45945    if test "x$VCINSTALLDIR" != x; then
45946      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
45947
45948  windows_path="$CYGWIN_VC_INSTALL_DIR"
45949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45950    unix_path=`$CYGPATH -u "$windows_path"`
45951    CYGWIN_VC_INSTALL_DIR="$unix_path"
45952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45954    CYGWIN_VC_INSTALL_DIR="$unix_path"
45955  fi
45956
45957      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45958        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45959      else
45960        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
45961      fi
45962      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
45963
45964  DLL_NAME="$DLL_NAME"
45965  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
45966  METHOD="well-known location in VCINSTALLDIR"
45967  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45969$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45970
45971    # Need to check if the found msvcr is correct architecture
45972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45973$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45974    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45976      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45977      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45978      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45979        CORRECT_MSVCR_ARCH="PE32 executable"
45980      else
45981        CORRECT_MSVCR_ARCH="PE32+ executable"
45982      fi
45983    else
45984      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45985        CORRECT_MSVCR_ARCH=386
45986      else
45987        CORRECT_MSVCR_ARCH=x86-64
45988      fi
45989    fi
45990    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45992$as_echo "ok" >&6; }
45993      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45994
45995  # Only process if variable expands to non-empty
45996
45997  if test "x$MSVC_DLL" != x; then
45998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45999
46000  # Input might be given as Windows format, start by converting to
46001  # unix format.
46002  path="$MSVC_DLL"
46003  new_path=`$CYGPATH -u "$path"`
46004
46005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46008  # "foo.exe" is OK but "foo" is an error.
46009  #
46010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46011  # It is also a way to make sure we got the proper file name for the real test later on.
46012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46013  if test "x$test_shortpath" = x; then
46014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46015$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46016    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46017  fi
46018
46019  # Call helper function which possibly converts this using DOS-style short mode.
46020  # If so, the updated path is stored in $new_path.
46021
46022  input_path="$new_path"
46023  # Check if we need to convert this using DOS-style short mode. If the path
46024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46025  # take no chances and rewrite it.
46026  # Note: m4 eats our [], so we need to use [ and ] instead.
46027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46028  if test "x$has_forbidden_chars" != x; then
46029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46033      # Going to short mode and back again did indeed matter. Since short mode is
46034      # case insensitive, let's make it lowercase to improve readability.
46035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46036      # Now convert it back to Unix-style (cygpath)
46037      input_path=`$CYGPATH -u "$shortmode_path"`
46038      new_path="$input_path"
46039    fi
46040  fi
46041
46042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46043  if test "x$test_cygdrive_prefix" = x; then
46044    # As a simple fix, exclude /usr/bin since it's not a real path.
46045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46047      # a path prefixed by /cygdrive for fixpath to work.
46048      new_path="$CYGWIN_ROOT_PATH$input_path"
46049    fi
46050  fi
46051
46052
46053  if test "x$path" != "x$new_path"; then
46054    MSVC_DLL="$new_path"
46055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46056$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46057  fi
46058
46059    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46060
46061  path="$MSVC_DLL"
46062  has_colon=`$ECHO $path | $GREP ^.:`
46063  new_path="$path"
46064  if test "x$has_colon" = x; then
46065    # Not in mixed or Windows style, start by that.
46066    new_path=`cmd //c echo $path`
46067  fi
46068
46069
46070  input_path="$new_path"
46071  # Check if we need to convert this using DOS-style short mode. If the path
46072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46073  # take no chances and rewrite it.
46074  # Note: m4 eats our [], so we need to use [ and ] instead.
46075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46076  if test "x$has_forbidden_chars" != x; then
46077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46079  fi
46080
46081
46082  windows_path="$new_path"
46083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46084    unix_path=`$CYGPATH -u "$windows_path"`
46085    new_path="$unix_path"
46086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46088    new_path="$unix_path"
46089  fi
46090
46091  if test "x$path" != "x$new_path"; then
46092    MSVC_DLL="$new_path"
46093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46094$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46095  fi
46096
46097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46099
46100    else
46101      # We're on a unix platform. Hooray! :)
46102      path="$MSVC_DLL"
46103      has_space=`$ECHO "$path" | $GREP " "`
46104      if test "x$has_space" != x; then
46105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46106$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46107        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46108      fi
46109
46110      # Use eval to expand a potential ~
46111      eval path="$path"
46112      if test ! -f "$path" && test ! -d "$path"; then
46113        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46114      fi
46115
46116      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46117    fi
46118  fi
46119
46120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46121$as_echo_n "checking for $DLL_NAME... " >&6; }
46122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46123$as_echo "$MSVC_DLL" >&6; }
46124    else
46125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46126$as_echo "incorrect, ignoring" >&6; }
46127      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46128$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46129    fi
46130  fi
46131
46132    fi
46133  fi
46134
46135  if test "x$MSVC_DLL" = x; then
46136    # Probe: Check in the Boot JDK directory.
46137    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46138
46139  DLL_NAME="$DLL_NAME"
46140  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46141  METHOD="well-known location in Boot JDK"
46142  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46143    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46144$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46145
46146    # Need to check if the found msvcr is correct architecture
46147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46148$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46149    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46151      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46152      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46153      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46154        CORRECT_MSVCR_ARCH="PE32 executable"
46155      else
46156        CORRECT_MSVCR_ARCH="PE32+ executable"
46157      fi
46158    else
46159      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46160        CORRECT_MSVCR_ARCH=386
46161      else
46162        CORRECT_MSVCR_ARCH=x86-64
46163      fi
46164    fi
46165    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46167$as_echo "ok" >&6; }
46168      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46169
46170  # Only process if variable expands to non-empty
46171
46172  if test "x$MSVC_DLL" != x; then
46173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174
46175  # Input might be given as Windows format, start by converting to
46176  # unix format.
46177  path="$MSVC_DLL"
46178  new_path=`$CYGPATH -u "$path"`
46179
46180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46183  # "foo.exe" is OK but "foo" is an error.
46184  #
46185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46186  # It is also a way to make sure we got the proper file name for the real test later on.
46187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46188  if test "x$test_shortpath" = x; then
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46190$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46191    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46192  fi
46193
46194  # Call helper function which possibly converts this using DOS-style short mode.
46195  # If so, the updated path is stored in $new_path.
46196
46197  input_path="$new_path"
46198  # Check if we need to convert this using DOS-style short mode. If the path
46199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46200  # take no chances and rewrite it.
46201  # Note: m4 eats our [], so we need to use [ and ] instead.
46202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46203  if test "x$has_forbidden_chars" != x; then
46204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46208      # Going to short mode and back again did indeed matter. Since short mode is
46209      # case insensitive, let's make it lowercase to improve readability.
46210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46211      # Now convert it back to Unix-style (cygpath)
46212      input_path=`$CYGPATH -u "$shortmode_path"`
46213      new_path="$input_path"
46214    fi
46215  fi
46216
46217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46218  if test "x$test_cygdrive_prefix" = x; then
46219    # As a simple fix, exclude /usr/bin since it's not a real path.
46220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46222      # a path prefixed by /cygdrive for fixpath to work.
46223      new_path="$CYGWIN_ROOT_PATH$input_path"
46224    fi
46225  fi
46226
46227
46228  if test "x$path" != "x$new_path"; then
46229    MSVC_DLL="$new_path"
46230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46231$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46232  fi
46233
46234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46235
46236  path="$MSVC_DLL"
46237  has_colon=`$ECHO $path | $GREP ^.:`
46238  new_path="$path"
46239  if test "x$has_colon" = x; then
46240    # Not in mixed or Windows style, start by that.
46241    new_path=`cmd //c echo $path`
46242  fi
46243
46244
46245  input_path="$new_path"
46246  # Check if we need to convert this using DOS-style short mode. If the path
46247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46248  # take no chances and rewrite it.
46249  # Note: m4 eats our [], so we need to use [ and ] instead.
46250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46251  if test "x$has_forbidden_chars" != x; then
46252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46254  fi
46255
46256
46257  windows_path="$new_path"
46258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46259    unix_path=`$CYGPATH -u "$windows_path"`
46260    new_path="$unix_path"
46261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46263    new_path="$unix_path"
46264  fi
46265
46266  if test "x$path" != "x$new_path"; then
46267    MSVC_DLL="$new_path"
46268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46269$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46270  fi
46271
46272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46274
46275    else
46276      # We're on a unix platform. Hooray! :)
46277      path="$MSVC_DLL"
46278      has_space=`$ECHO "$path" | $GREP " "`
46279      if test "x$has_space" != x; then
46280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46281$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46283      fi
46284
46285      # Use eval to expand a potential ~
46286      eval path="$path"
46287      if test ! -f "$path" && test ! -d "$path"; then
46288        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46289      fi
46290
46291      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46292    fi
46293  fi
46294
46295      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46296$as_echo_n "checking for $DLL_NAME... " >&6; }
46297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46298$as_echo "$MSVC_DLL" >&6; }
46299    else
46300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46301$as_echo "incorrect, ignoring" >&6; }
46302      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46303$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46304    fi
46305  fi
46306
46307  fi
46308
46309  if test "x$MSVC_DLL" = x; then
46310    # Probe: Look in the Windows system32 directory
46311    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46312
46313  windows_path="$CYGWIN_SYSTEMROOT"
46314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46315    unix_path=`$CYGPATH -u "$windows_path"`
46316    CYGWIN_SYSTEMROOT="$unix_path"
46317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46319    CYGWIN_SYSTEMROOT="$unix_path"
46320  fi
46321
46322    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46323
46324  DLL_NAME="$DLL_NAME"
46325  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46326  METHOD="well-known location in SYSTEMROOT"
46327  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46328    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46329$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46330
46331    # Need to check if the found msvcr is correct architecture
46332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46333$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46334    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46336      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46337      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46338      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46339        CORRECT_MSVCR_ARCH="PE32 executable"
46340      else
46341        CORRECT_MSVCR_ARCH="PE32+ executable"
46342      fi
46343    else
46344      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46345        CORRECT_MSVCR_ARCH=386
46346      else
46347        CORRECT_MSVCR_ARCH=x86-64
46348      fi
46349    fi
46350    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46352$as_echo "ok" >&6; }
46353      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46354
46355  # Only process if variable expands to non-empty
46356
46357  if test "x$MSVC_DLL" != x; then
46358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46359
46360  # Input might be given as Windows format, start by converting to
46361  # unix format.
46362  path="$MSVC_DLL"
46363  new_path=`$CYGPATH -u "$path"`
46364
46365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46368  # "foo.exe" is OK but "foo" is an error.
46369  #
46370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46371  # It is also a way to make sure we got the proper file name for the real test later on.
46372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46373  if test "x$test_shortpath" = x; then
46374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46375$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46376    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46377  fi
46378
46379  # Call helper function which possibly converts this using DOS-style short mode.
46380  # If so, the updated path is stored in $new_path.
46381
46382  input_path="$new_path"
46383  # Check if we need to convert this using DOS-style short mode. If the path
46384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46385  # take no chances and rewrite it.
46386  # Note: m4 eats our [], so we need to use [ and ] instead.
46387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46388  if test "x$has_forbidden_chars" != x; then
46389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46393      # Going to short mode and back again did indeed matter. Since short mode is
46394      # case insensitive, let's make it lowercase to improve readability.
46395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46396      # Now convert it back to Unix-style (cygpath)
46397      input_path=`$CYGPATH -u "$shortmode_path"`
46398      new_path="$input_path"
46399    fi
46400  fi
46401
46402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46403  if test "x$test_cygdrive_prefix" = x; then
46404    # As a simple fix, exclude /usr/bin since it's not a real path.
46405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46407      # a path prefixed by /cygdrive for fixpath to work.
46408      new_path="$CYGWIN_ROOT_PATH$input_path"
46409    fi
46410  fi
46411
46412
46413  if test "x$path" != "x$new_path"; then
46414    MSVC_DLL="$new_path"
46415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46416$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46417  fi
46418
46419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46420
46421  path="$MSVC_DLL"
46422  has_colon=`$ECHO $path | $GREP ^.:`
46423  new_path="$path"
46424  if test "x$has_colon" = x; then
46425    # Not in mixed or Windows style, start by that.
46426    new_path=`cmd //c echo $path`
46427  fi
46428
46429
46430  input_path="$new_path"
46431  # Check if we need to convert this using DOS-style short mode. If the path
46432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46433  # take no chances and rewrite it.
46434  # Note: m4 eats our [], so we need to use [ and ] instead.
46435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46436  if test "x$has_forbidden_chars" != x; then
46437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46439  fi
46440
46441
46442  windows_path="$new_path"
46443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46444    unix_path=`$CYGPATH -u "$windows_path"`
46445    new_path="$unix_path"
46446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46448    new_path="$unix_path"
46449  fi
46450
46451  if test "x$path" != "x$new_path"; then
46452    MSVC_DLL="$new_path"
46453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46454$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46455  fi
46456
46457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46459
46460    else
46461      # We're on a unix platform. Hooray! :)
46462      path="$MSVC_DLL"
46463      has_space=`$ECHO "$path" | $GREP " "`
46464      if test "x$has_space" != x; then
46465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46466$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46468      fi
46469
46470      # Use eval to expand a potential ~
46471      eval path="$path"
46472      if test ! -f "$path" && test ! -d "$path"; then
46473        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46474      fi
46475
46476      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46477    fi
46478  fi
46479
46480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46481$as_echo_n "checking for $DLL_NAME... " >&6; }
46482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46483$as_echo "$MSVC_DLL" >&6; }
46484    else
46485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46486$as_echo "incorrect, ignoring" >&6; }
46487      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46488$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46489    fi
46490  fi
46491
46492  fi
46493
46494  if test "x$MSVC_DLL" = x; then
46495    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46496    if test "x$VS100COMNTOOLS" != x; then
46497      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46498
46499  windows_path="$CYGWIN_VS_TOOLS_DIR"
46500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46501    unix_path=`$CYGPATH -u "$windows_path"`
46502    CYGWIN_VS_TOOLS_DIR="$unix_path"
46503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46505    CYGWIN_VS_TOOLS_DIR="$unix_path"
46506  fi
46507
46508      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46509        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46510	    | $GREP -i /x64/ | $HEAD --lines 1`
46511      else
46512        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46513	    | $GREP -i /x86/ | $HEAD --lines 1`
46514      fi
46515
46516  DLL_NAME="$DLL_NAME"
46517  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46518  METHOD="search of VS100COMNTOOLS"
46519  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46520    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46521$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46522
46523    # Need to check if the found msvcr is correct architecture
46524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46525$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46526    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46528      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46529      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46530      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46531        CORRECT_MSVCR_ARCH="PE32 executable"
46532      else
46533        CORRECT_MSVCR_ARCH="PE32+ executable"
46534      fi
46535    else
46536      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46537        CORRECT_MSVCR_ARCH=386
46538      else
46539        CORRECT_MSVCR_ARCH=x86-64
46540      fi
46541    fi
46542    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46544$as_echo "ok" >&6; }
46545      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46546
46547  # Only process if variable expands to non-empty
46548
46549  if test "x$MSVC_DLL" != x; then
46550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46551
46552  # Input might be given as Windows format, start by converting to
46553  # unix format.
46554  path="$MSVC_DLL"
46555  new_path=`$CYGPATH -u "$path"`
46556
46557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46560  # "foo.exe" is OK but "foo" is an error.
46561  #
46562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46563  # It is also a way to make sure we got the proper file name for the real test later on.
46564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46565  if test "x$test_shortpath" = x; then
46566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46567$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46568    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46569  fi
46570
46571  # Call helper function which possibly converts this using DOS-style short mode.
46572  # If so, the updated path is stored in $new_path.
46573
46574  input_path="$new_path"
46575  # Check if we need to convert this using DOS-style short mode. If the path
46576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46577  # take no chances and rewrite it.
46578  # Note: m4 eats our [], so we need to use [ and ] instead.
46579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46580  if test "x$has_forbidden_chars" != x; then
46581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46585      # Going to short mode and back again did indeed matter. Since short mode is
46586      # case insensitive, let's make it lowercase to improve readability.
46587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46588      # Now convert it back to Unix-style (cygpath)
46589      input_path=`$CYGPATH -u "$shortmode_path"`
46590      new_path="$input_path"
46591    fi
46592  fi
46593
46594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46595  if test "x$test_cygdrive_prefix" = x; then
46596    # As a simple fix, exclude /usr/bin since it's not a real path.
46597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46599      # a path prefixed by /cygdrive for fixpath to work.
46600      new_path="$CYGWIN_ROOT_PATH$input_path"
46601    fi
46602  fi
46603
46604
46605  if test "x$path" != "x$new_path"; then
46606    MSVC_DLL="$new_path"
46607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46608$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46609  fi
46610
46611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46612
46613  path="$MSVC_DLL"
46614  has_colon=`$ECHO $path | $GREP ^.:`
46615  new_path="$path"
46616  if test "x$has_colon" = x; then
46617    # Not in mixed or Windows style, start by that.
46618    new_path=`cmd //c echo $path`
46619  fi
46620
46621
46622  input_path="$new_path"
46623  # Check if we need to convert this using DOS-style short mode. If the path
46624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46625  # take no chances and rewrite it.
46626  # Note: m4 eats our [], so we need to use [ and ] instead.
46627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46628  if test "x$has_forbidden_chars" != x; then
46629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46631  fi
46632
46633
46634  windows_path="$new_path"
46635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46636    unix_path=`$CYGPATH -u "$windows_path"`
46637    new_path="$unix_path"
46638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46640    new_path="$unix_path"
46641  fi
46642
46643  if test "x$path" != "x$new_path"; then
46644    MSVC_DLL="$new_path"
46645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46646$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46647  fi
46648
46649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46651
46652    else
46653      # We're on a unix platform. Hooray! :)
46654      path="$MSVC_DLL"
46655      has_space=`$ECHO "$path" | $GREP " "`
46656      if test "x$has_space" != x; then
46657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46658$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46660      fi
46661
46662      # Use eval to expand a potential ~
46663      eval path="$path"
46664      if test ! -f "$path" && test ! -d "$path"; then
46665        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46666      fi
46667
46668      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46669    fi
46670  fi
46671
46672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46673$as_echo_n "checking for $DLL_NAME... " >&6; }
46674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46675$as_echo "$MSVC_DLL" >&6; }
46676    else
46677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46678$as_echo "incorrect, ignoring" >&6; }
46679      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46680$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46681    fi
46682  fi
46683
46684    fi
46685  fi
46686
46687  if test "x$MSVC_DLL" = x; then
46688    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46689    # (This was the original behaviour; kept since it might turn something up)
46690    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46691      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46692        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46693	    | $GREP x64 | $HEAD --lines 1`
46694      else
46695        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46696	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46697        if test "x$POSSIBLE_MSVC_DLL" = x; then
46698          # We're grasping at straws now...
46699          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46700	      | $HEAD --lines 1`
46701        fi
46702      fi
46703
46704
46705  DLL_NAME="$DLL_NAME"
46706  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46707  METHOD="search of VCINSTALLDIR"
46708  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46710$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46711
46712    # Need to check if the found msvcr is correct architecture
46713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46714$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46715    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46717      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46718      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46719      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46720        CORRECT_MSVCR_ARCH="PE32 executable"
46721      else
46722        CORRECT_MSVCR_ARCH="PE32+ executable"
46723      fi
46724    else
46725      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46726        CORRECT_MSVCR_ARCH=386
46727      else
46728        CORRECT_MSVCR_ARCH=x86-64
46729      fi
46730    fi
46731    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46733$as_echo "ok" >&6; }
46734      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46735
46736  # Only process if variable expands to non-empty
46737
46738  if test "x$MSVC_DLL" != x; then
46739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46740
46741  # Input might be given as Windows format, start by converting to
46742  # unix format.
46743  path="$MSVC_DLL"
46744  new_path=`$CYGPATH -u "$path"`
46745
46746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46749  # "foo.exe" is OK but "foo" is an error.
46750  #
46751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46752  # It is also a way to make sure we got the proper file name for the real test later on.
46753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46754  if test "x$test_shortpath" = x; then
46755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46756$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46757    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46758  fi
46759
46760  # Call helper function which possibly converts this using DOS-style short mode.
46761  # If so, the updated path is stored in $new_path.
46762
46763  input_path="$new_path"
46764  # Check if we need to convert this using DOS-style short mode. If the path
46765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46766  # take no chances and rewrite it.
46767  # Note: m4 eats our [], so we need to use [ and ] instead.
46768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46769  if test "x$has_forbidden_chars" != x; then
46770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46774      # Going to short mode and back again did indeed matter. Since short mode is
46775      # case insensitive, let's make it lowercase to improve readability.
46776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46777      # Now convert it back to Unix-style (cygpath)
46778      input_path=`$CYGPATH -u "$shortmode_path"`
46779      new_path="$input_path"
46780    fi
46781  fi
46782
46783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46784  if test "x$test_cygdrive_prefix" = x; then
46785    # As a simple fix, exclude /usr/bin since it's not a real path.
46786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46788      # a path prefixed by /cygdrive for fixpath to work.
46789      new_path="$CYGWIN_ROOT_PATH$input_path"
46790    fi
46791  fi
46792
46793
46794  if test "x$path" != "x$new_path"; then
46795    MSVC_DLL="$new_path"
46796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46797$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46798  fi
46799
46800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46801
46802  path="$MSVC_DLL"
46803  has_colon=`$ECHO $path | $GREP ^.:`
46804  new_path="$path"
46805  if test "x$has_colon" = x; then
46806    # Not in mixed or Windows style, start by that.
46807    new_path=`cmd //c echo $path`
46808  fi
46809
46810
46811  input_path="$new_path"
46812  # Check if we need to convert this using DOS-style short mode. If the path
46813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46814  # take no chances and rewrite it.
46815  # Note: m4 eats our [], so we need to use [ and ] instead.
46816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46817  if test "x$has_forbidden_chars" != x; then
46818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46820  fi
46821
46822
46823  windows_path="$new_path"
46824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46825    unix_path=`$CYGPATH -u "$windows_path"`
46826    new_path="$unix_path"
46827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46829    new_path="$unix_path"
46830  fi
46831
46832  if test "x$path" != "x$new_path"; then
46833    MSVC_DLL="$new_path"
46834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46835$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46836  fi
46837
46838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46840
46841    else
46842      # We're on a unix platform. Hooray! :)
46843      path="$MSVC_DLL"
46844      has_space=`$ECHO "$path" | $GREP " "`
46845      if test "x$has_space" != x; then
46846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46849      fi
46850
46851      # Use eval to expand a potential ~
46852      eval path="$path"
46853      if test ! -f "$path" && test ! -d "$path"; then
46854        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46855      fi
46856
46857      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46858    fi
46859  fi
46860
46861      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46862$as_echo_n "checking for $DLL_NAME... " >&6; }
46863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46864$as_echo "$MSVC_DLL" >&6; }
46865    else
46866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46867$as_echo "incorrect, ignoring" >&6; }
46868      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46869$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46870    fi
46871  fi
46872
46873    fi
46874  fi
46875
46876  if test "x$MSVC_DLL" = x; then
46877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46878$as_echo_n "checking for $DLL_NAME... " >&6; }
46879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46880$as_echo "no" >&6; }
46881    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46882  fi
46883
46884      MSVCP_DLL="$MSVC_DLL"
46885    fi
46886
46887  fi
46888
46889  fi
46890
46891
46892  if test "x$NEEDS_LIB_X11" = xfalse; then
46893    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
46894      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
46895$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
46896    fi
46897    X_CFLAGS=
46898    X_LIBS=
46899  else
46900
46901    if test "x${with_x}" = xno; then
46902      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
46903    fi
46904
46905    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
46906      # The user has specified a X11 base directory. Use it for includes and
46907      # libraries, unless explicitely overridden.
46908      if test "x$x_includes" = xNONE; then
46909        x_includes="${with_x}/include"
46910      fi
46911      if test "x$x_libraries" = xNONE; then
46912        x_libraries="${with_x}/lib"
46913      fi
46914    else
46915      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
46916      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
46917      # --x-libraries for the sysroot, if that seems to be correct.
46918      if test "x$SYSROOT" != "x"; then
46919        if test "x$x_includes" = xNONE; then
46920          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
46921            x_includes="$SYSROOT/usr/X11R6/include"
46922          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
46923            x_includes="$SYSROOT/usr/include"
46924          fi
46925        fi
46926        if test "x$x_libraries" = xNONE; then
46927          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
46928            x_libraries="$SYSROOT/usr/X11R6/lib"
46929          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46930            x_libraries="$SYSROOT/usr/lib64"
46931          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
46932            x_libraries="$SYSROOT/usr/lib"
46933          fi
46934        fi
46935      fi
46936    fi
46937
46938    # Now let autoconf do it's magic
46939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
46940$as_echo_n "checking for X... " >&6; }
46941
46942
46943# Check whether --with-x was given.
46944if test "${with_x+set}" = set; then :
46945  withval=$with_x;
46946fi
46947
46948# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
46949if test "x$with_x" = xno; then
46950  # The user explicitly disabled X.
46951  have_x=disabled
46952else
46953  case $x_includes,$x_libraries in #(
46954    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
46955    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
46956  $as_echo_n "(cached) " >&6
46957else
46958  # One or both of the vars are not set, and there is no cached value.
46959ac_x_includes=no ac_x_libraries=no
46960rm -f -r conftest.dir
46961if mkdir conftest.dir; then
46962  cd conftest.dir
46963  cat >Imakefile <<'_ACEOF'
46964incroot:
46965	@echo incroot='${INCROOT}'
46966usrlibdir:
46967	@echo usrlibdir='${USRLIBDIR}'
46968libdir:
46969	@echo libdir='${LIBDIR}'
46970_ACEOF
46971  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
46972    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
46973    for ac_var in incroot usrlibdir libdir; do
46974      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
46975    done
46976    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
46977    for ac_extension in a so sl dylib la dll; do
46978      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
46979	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
46980	ac_im_usrlibdir=$ac_im_libdir; break
46981      fi
46982    done
46983    # Screen out bogus values from the imake configuration.  They are
46984    # bogus both because they are the default anyway, and because
46985    # using them would break gcc on systems where it needs fixed includes.
46986    case $ac_im_incroot in
46987	/usr/include) ac_x_includes= ;;
46988	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
46989    esac
46990    case $ac_im_usrlibdir in
46991	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
46992	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
46993    esac
46994  fi
46995  cd ..
46996  rm -f -r conftest.dir
46997fi
46998
46999# Standard set of common directories for X headers.
47000# Check X11 before X11Rn because it is often a symlink to the current release.
47001ac_x_header_dirs='
47002/usr/X11/include
47003/usr/X11R7/include
47004/usr/X11R6/include
47005/usr/X11R5/include
47006/usr/X11R4/include
47007
47008/usr/include/X11
47009/usr/include/X11R7
47010/usr/include/X11R6
47011/usr/include/X11R5
47012/usr/include/X11R4
47013
47014/usr/local/X11/include
47015/usr/local/X11R7/include
47016/usr/local/X11R6/include
47017/usr/local/X11R5/include
47018/usr/local/X11R4/include
47019
47020/usr/local/include/X11
47021/usr/local/include/X11R7
47022/usr/local/include/X11R6
47023/usr/local/include/X11R5
47024/usr/local/include/X11R4
47025
47026/usr/X386/include
47027/usr/x386/include
47028/usr/XFree86/include/X11
47029
47030/usr/include
47031/usr/local/include
47032/usr/unsupported/include
47033/usr/athena/include
47034/usr/local/x11r5/include
47035/usr/lpp/Xamples/include
47036
47037/usr/openwin/include
47038/usr/openwin/share/include'
47039
47040if test "$ac_x_includes" = no; then
47041  # Guess where to find include files, by looking for Xlib.h.
47042  # First, try using that file with no special directory specified.
47043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47044/* end confdefs.h.  */
47045#include <X11/Xlib.h>
47046_ACEOF
47047if ac_fn_cxx_try_cpp "$LINENO"; then :
47048  # We can compile using X headers with no special include directory.
47049ac_x_includes=
47050else
47051  for ac_dir in $ac_x_header_dirs; do
47052  if test -r "$ac_dir/X11/Xlib.h"; then
47053    ac_x_includes=$ac_dir
47054    break
47055  fi
47056done
47057fi
47058rm -f conftest.err conftest.i conftest.$ac_ext
47059fi # $ac_x_includes = no
47060
47061if test "$ac_x_libraries" = no; then
47062  # Check for the libraries.
47063  # See if we find them without any special options.
47064  # Don't add to $LIBS permanently.
47065  ac_save_LIBS=$LIBS
47066  LIBS="-lX11 $LIBS"
47067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47068/* end confdefs.h.  */
47069#include <X11/Xlib.h>
47070int
47071main ()
47072{
47073XrmInitialize ()
47074  ;
47075  return 0;
47076}
47077_ACEOF
47078if ac_fn_cxx_try_link "$LINENO"; then :
47079  LIBS=$ac_save_LIBS
47080# We can link X programs with no special library path.
47081ac_x_libraries=
47082else
47083  LIBS=$ac_save_LIBS
47084for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
47085do
47086  # Don't even attempt the hair of trying to link an X program!
47087  for ac_extension in a so sl dylib la dll; do
47088    if test -r "$ac_dir/libX11.$ac_extension"; then
47089      ac_x_libraries=$ac_dir
47090      break 2
47091    fi
47092  done
47093done
47094fi
47095rm -f core conftest.err conftest.$ac_objext \
47096    conftest$ac_exeext conftest.$ac_ext
47097fi # $ac_x_libraries = no
47098
47099case $ac_x_includes,$ac_x_libraries in #(
47100  no,* | *,no | *\'*)
47101    # Didn't find X, or a directory has "'" in its name.
47102    ac_cv_have_x="have_x=no";; #(
47103  *)
47104    # Record where we found X for the cache.
47105    ac_cv_have_x="have_x=yes\
47106	ac_x_includes='$ac_x_includes'\
47107	ac_x_libraries='$ac_x_libraries'"
47108esac
47109fi
47110;; #(
47111    *) have_x=yes;;
47112  esac
47113  eval "$ac_cv_have_x"
47114fi # $with_x != no
47115
47116if test "$have_x" != yes; then
47117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
47118$as_echo "$have_x" >&6; }
47119  no_x=yes
47120else
47121  # If each of the values was on the command line, it overrides each guess.
47122  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
47123  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
47124  # Update the cache value to reflect the command line values.
47125  ac_cv_have_x="have_x=yes\
47126	ac_x_includes='$x_includes'\
47127	ac_x_libraries='$x_libraries'"
47128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
47129$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
47130fi
47131
47132    if test "$no_x" = yes; then
47133  # Not all programs may use this symbol, but it does not hurt to define it.
47134
47135$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
47136
47137  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
47138else
47139  if test -n "$x_includes"; then
47140    X_CFLAGS="$X_CFLAGS -I$x_includes"
47141  fi
47142
47143  # It would also be nice to do this for all -L options, not just this one.
47144  if test -n "$x_libraries"; then
47145    X_LIBS="$X_LIBS -L$x_libraries"
47146    # For Solaris; some versions of Sun CC require a space after -R and
47147    # others require no space.  Words are not sufficient . . . .
47148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
47149$as_echo_n "checking whether -R must be followed by a space... " >&6; }
47150    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
47151    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
47152    ac_cxx_werror_flag=yes
47153    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47154/* end confdefs.h.  */
47155
47156int
47157main ()
47158{
47159
47160  ;
47161  return 0;
47162}
47163_ACEOF
47164if ac_fn_cxx_try_link "$LINENO"; then :
47165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47166$as_echo "no" >&6; }
47167       X_LIBS="$X_LIBS -R$x_libraries"
47168else
47169  LIBS="$ac_xsave_LIBS -R $x_libraries"
47170       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47171/* end confdefs.h.  */
47172
47173int
47174main ()
47175{
47176
47177  ;
47178  return 0;
47179}
47180_ACEOF
47181if ac_fn_cxx_try_link "$LINENO"; then :
47182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47183$as_echo "yes" >&6; }
47184	  X_LIBS="$X_LIBS -R $x_libraries"
47185else
47186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
47187$as_echo "neither works" >&6; }
47188fi
47189rm -f core conftest.err conftest.$ac_objext \
47190    conftest$ac_exeext conftest.$ac_ext
47191fi
47192rm -f core conftest.err conftest.$ac_objext \
47193    conftest$ac_exeext conftest.$ac_ext
47194    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
47195    LIBS=$ac_xsave_LIBS
47196  fi
47197
47198  # Check for system-dependent libraries X programs must link with.
47199  # Do this before checking for the system-independent R6 libraries
47200  # (-lICE), since we may need -lsocket or whatever for X linking.
47201
47202  if test "$ISC" = yes; then
47203    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
47204  else
47205    # Martyn Johnson says this is needed for Ultrix, if the X
47206    # libraries were built with DECnet support.  And Karl Berry says
47207    # the Alpha needs dnet_stub (dnet does not exist).
47208    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
47209    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47210/* end confdefs.h.  */
47211
47212/* Override any GCC internal prototype to avoid an error.
47213   Use char because int might match the return type of a GCC
47214   builtin and then its argument prototype would still apply.  */
47215#ifdef __cplusplus
47216extern "C"
47217#endif
47218char XOpenDisplay ();
47219int
47220main ()
47221{
47222return XOpenDisplay ();
47223  ;
47224  return 0;
47225}
47226_ACEOF
47227if ac_fn_cxx_try_link "$LINENO"; then :
47228
47229else
47230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
47231$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
47232if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
47233  $as_echo_n "(cached) " >&6
47234else
47235  ac_check_lib_save_LIBS=$LIBS
47236LIBS="-ldnet  $LIBS"
47237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47238/* end confdefs.h.  */
47239
47240/* Override any GCC internal prototype to avoid an error.
47241   Use char because int might match the return type of a GCC
47242   builtin and then its argument prototype would still apply.  */
47243#ifdef __cplusplus
47244extern "C"
47245#endif
47246char dnet_ntoa ();
47247int
47248main ()
47249{
47250return dnet_ntoa ();
47251  ;
47252  return 0;
47253}
47254_ACEOF
47255if ac_fn_cxx_try_link "$LINENO"; then :
47256  ac_cv_lib_dnet_dnet_ntoa=yes
47257else
47258  ac_cv_lib_dnet_dnet_ntoa=no
47259fi
47260rm -f core conftest.err conftest.$ac_objext \
47261    conftest$ac_exeext conftest.$ac_ext
47262LIBS=$ac_check_lib_save_LIBS
47263fi
47264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
47265$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
47266if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
47267  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
47268fi
47269
47270    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
47271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
47272$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
47273if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
47274  $as_echo_n "(cached) " >&6
47275else
47276  ac_check_lib_save_LIBS=$LIBS
47277LIBS="-ldnet_stub  $LIBS"
47278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47279/* end confdefs.h.  */
47280
47281/* Override any GCC internal prototype to avoid an error.
47282   Use char because int might match the return type of a GCC
47283   builtin and then its argument prototype would still apply.  */
47284#ifdef __cplusplus
47285extern "C"
47286#endif
47287char dnet_ntoa ();
47288int
47289main ()
47290{
47291return dnet_ntoa ();
47292  ;
47293  return 0;
47294}
47295_ACEOF
47296if ac_fn_cxx_try_link "$LINENO"; then :
47297  ac_cv_lib_dnet_stub_dnet_ntoa=yes
47298else
47299  ac_cv_lib_dnet_stub_dnet_ntoa=no
47300fi
47301rm -f core conftest.err conftest.$ac_objext \
47302    conftest$ac_exeext conftest.$ac_ext
47303LIBS=$ac_check_lib_save_LIBS
47304fi
47305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
47306$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
47307if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
47308  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
47309fi
47310
47311    fi
47312fi
47313rm -f core conftest.err conftest.$ac_objext \
47314    conftest$ac_exeext conftest.$ac_ext
47315    LIBS="$ac_xsave_LIBS"
47316
47317    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
47318    # to get the SysV transport functions.
47319    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
47320    # needs -lnsl.
47321    # The nsl library prevents programs from opening the X display
47322    # on Irix 5.2, according to T.E. Dickey.
47323    # The functions gethostbyname, getservbyname, and inet_addr are
47324    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
47325    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
47326if test "x$ac_cv_func_gethostbyname" = xyes; then :
47327
47328fi
47329
47330    if test $ac_cv_func_gethostbyname = no; then
47331      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
47332$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
47333if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
47334  $as_echo_n "(cached) " >&6
47335else
47336  ac_check_lib_save_LIBS=$LIBS
47337LIBS="-lnsl  $LIBS"
47338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47339/* end confdefs.h.  */
47340
47341/* Override any GCC internal prototype to avoid an error.
47342   Use char because int might match the return type of a GCC
47343   builtin and then its argument prototype would still apply.  */
47344#ifdef __cplusplus
47345extern "C"
47346#endif
47347char gethostbyname ();
47348int
47349main ()
47350{
47351return gethostbyname ();
47352  ;
47353  return 0;
47354}
47355_ACEOF
47356if ac_fn_cxx_try_link "$LINENO"; then :
47357  ac_cv_lib_nsl_gethostbyname=yes
47358else
47359  ac_cv_lib_nsl_gethostbyname=no
47360fi
47361rm -f core conftest.err conftest.$ac_objext \
47362    conftest$ac_exeext conftest.$ac_ext
47363LIBS=$ac_check_lib_save_LIBS
47364fi
47365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
47366$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
47367if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
47368  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
47369fi
47370
47371      if test $ac_cv_lib_nsl_gethostbyname = no; then
47372	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
47373$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
47374if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
47375  $as_echo_n "(cached) " >&6
47376else
47377  ac_check_lib_save_LIBS=$LIBS
47378LIBS="-lbsd  $LIBS"
47379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47380/* end confdefs.h.  */
47381
47382/* Override any GCC internal prototype to avoid an error.
47383   Use char because int might match the return type of a GCC
47384   builtin and then its argument prototype would still apply.  */
47385#ifdef __cplusplus
47386extern "C"
47387#endif
47388char gethostbyname ();
47389int
47390main ()
47391{
47392return gethostbyname ();
47393  ;
47394  return 0;
47395}
47396_ACEOF
47397if ac_fn_cxx_try_link "$LINENO"; then :
47398  ac_cv_lib_bsd_gethostbyname=yes
47399else
47400  ac_cv_lib_bsd_gethostbyname=no
47401fi
47402rm -f core conftest.err conftest.$ac_objext \
47403    conftest$ac_exeext conftest.$ac_ext
47404LIBS=$ac_check_lib_save_LIBS
47405fi
47406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
47407$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
47408if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
47409  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
47410fi
47411
47412      fi
47413    fi
47414
47415    # lieder@skyler.mavd.honeywell.com says without -lsocket,
47416    # socket/setsockopt and other routines are undefined under SCO ODT
47417    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
47418    # on later versions), says Simon Leinen: it contains gethostby*
47419    # variants that don't use the name server (or something).  -lsocket
47420    # must be given before -lnsl if both are needed.  We assume that
47421    # if connect needs -lnsl, so does gethostbyname.
47422    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
47423if test "x$ac_cv_func_connect" = xyes; then :
47424
47425fi
47426
47427    if test $ac_cv_func_connect = no; then
47428      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
47429$as_echo_n "checking for connect in -lsocket... " >&6; }
47430if ${ac_cv_lib_socket_connect+:} false; then :
47431  $as_echo_n "(cached) " >&6
47432else
47433  ac_check_lib_save_LIBS=$LIBS
47434LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
47435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47436/* end confdefs.h.  */
47437
47438/* Override any GCC internal prototype to avoid an error.
47439   Use char because int might match the return type of a GCC
47440   builtin and then its argument prototype would still apply.  */
47441#ifdef __cplusplus
47442extern "C"
47443#endif
47444char connect ();
47445int
47446main ()
47447{
47448return connect ();
47449  ;
47450  return 0;
47451}
47452_ACEOF
47453if ac_fn_cxx_try_link "$LINENO"; then :
47454  ac_cv_lib_socket_connect=yes
47455else
47456  ac_cv_lib_socket_connect=no
47457fi
47458rm -f core conftest.err conftest.$ac_objext \
47459    conftest$ac_exeext conftest.$ac_ext
47460LIBS=$ac_check_lib_save_LIBS
47461fi
47462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
47463$as_echo "$ac_cv_lib_socket_connect" >&6; }
47464if test "x$ac_cv_lib_socket_connect" = xyes; then :
47465  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
47466fi
47467
47468    fi
47469
47470    # Guillermo Gomez says -lposix is necessary on A/UX.
47471    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
47472if test "x$ac_cv_func_remove" = xyes; then :
47473
47474fi
47475
47476    if test $ac_cv_func_remove = no; then
47477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
47478$as_echo_n "checking for remove in -lposix... " >&6; }
47479if ${ac_cv_lib_posix_remove+:} false; then :
47480  $as_echo_n "(cached) " >&6
47481else
47482  ac_check_lib_save_LIBS=$LIBS
47483LIBS="-lposix  $LIBS"
47484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47485/* end confdefs.h.  */
47486
47487/* Override any GCC internal prototype to avoid an error.
47488   Use char because int might match the return type of a GCC
47489   builtin and then its argument prototype would still apply.  */
47490#ifdef __cplusplus
47491extern "C"
47492#endif
47493char remove ();
47494int
47495main ()
47496{
47497return remove ();
47498  ;
47499  return 0;
47500}
47501_ACEOF
47502if ac_fn_cxx_try_link "$LINENO"; then :
47503  ac_cv_lib_posix_remove=yes
47504else
47505  ac_cv_lib_posix_remove=no
47506fi
47507rm -f core conftest.err conftest.$ac_objext \
47508    conftest$ac_exeext conftest.$ac_ext
47509LIBS=$ac_check_lib_save_LIBS
47510fi
47511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
47512$as_echo "$ac_cv_lib_posix_remove" >&6; }
47513if test "x$ac_cv_lib_posix_remove" = xyes; then :
47514  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
47515fi
47516
47517    fi
47518
47519    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
47520    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
47521if test "x$ac_cv_func_shmat" = xyes; then :
47522
47523fi
47524
47525    if test $ac_cv_func_shmat = no; then
47526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
47527$as_echo_n "checking for shmat in -lipc... " >&6; }
47528if ${ac_cv_lib_ipc_shmat+:} false; then :
47529  $as_echo_n "(cached) " >&6
47530else
47531  ac_check_lib_save_LIBS=$LIBS
47532LIBS="-lipc  $LIBS"
47533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47534/* end confdefs.h.  */
47535
47536/* Override any GCC internal prototype to avoid an error.
47537   Use char because int might match the return type of a GCC
47538   builtin and then its argument prototype would still apply.  */
47539#ifdef __cplusplus
47540extern "C"
47541#endif
47542char shmat ();
47543int
47544main ()
47545{
47546return shmat ();
47547  ;
47548  return 0;
47549}
47550_ACEOF
47551if ac_fn_cxx_try_link "$LINENO"; then :
47552  ac_cv_lib_ipc_shmat=yes
47553else
47554  ac_cv_lib_ipc_shmat=no
47555fi
47556rm -f core conftest.err conftest.$ac_objext \
47557    conftest$ac_exeext conftest.$ac_ext
47558LIBS=$ac_check_lib_save_LIBS
47559fi
47560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
47561$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
47562if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
47563  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
47564fi
47565
47566    fi
47567  fi
47568
47569  # Check for libraries that X11R6 Xt/Xaw programs need.
47570  ac_save_LDFLAGS=$LDFLAGS
47571  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
47572  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
47573  # check for ICE first), but we must link in the order -lSM -lICE or
47574  # we get undefined symbols.  So assume we have SM if we have ICE.
47575  # These have to be linked with before -lX11, unlike the other
47576  # libraries we check for below, so use a different variable.
47577  # John Interrante, Karl Berry
47578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
47579$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
47580if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
47581  $as_echo_n "(cached) " >&6
47582else
47583  ac_check_lib_save_LIBS=$LIBS
47584LIBS="-lICE $X_EXTRA_LIBS $LIBS"
47585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47586/* end confdefs.h.  */
47587
47588/* Override any GCC internal prototype to avoid an error.
47589   Use char because int might match the return type of a GCC
47590   builtin and then its argument prototype would still apply.  */
47591#ifdef __cplusplus
47592extern "C"
47593#endif
47594char IceConnectionNumber ();
47595int
47596main ()
47597{
47598return IceConnectionNumber ();
47599  ;
47600  return 0;
47601}
47602_ACEOF
47603if ac_fn_cxx_try_link "$LINENO"; then :
47604  ac_cv_lib_ICE_IceConnectionNumber=yes
47605else
47606  ac_cv_lib_ICE_IceConnectionNumber=no
47607fi
47608rm -f core conftest.err conftest.$ac_objext \
47609    conftest$ac_exeext conftest.$ac_ext
47610LIBS=$ac_check_lib_save_LIBS
47611fi
47612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
47613$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
47614if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
47615  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
47616fi
47617
47618  LDFLAGS=$ac_save_LDFLAGS
47619
47620fi
47621
47622
47623    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
47624    # this doesn't make sense so we remove it.
47625    if test "x$COMPILE_TYPE" = xcross; then
47626      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
47627    fi
47628
47629    if test "x$no_x" = xyes; then
47630
47631  # Print a helpful message on how to acquire the necessary build dependency.
47632  # x11 is the help tag: freetype, cups, alsa etc
47633  MISSING_DEPENDENCY=x11
47634
47635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47636    cygwin_help $MISSING_DEPENDENCY
47637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47638    msys_help $MISSING_DEPENDENCY
47639  else
47640    PKGHANDLER_COMMAND=
47641
47642    case $PKGHANDLER in
47643      apt-get)
47644        apt_help     $MISSING_DEPENDENCY ;;
47645      yum)
47646        yum_help     $MISSING_DEPENDENCY ;;
47647      port)
47648        port_help    $MISSING_DEPENDENCY ;;
47649      pkgutil)
47650        pkgutil_help $MISSING_DEPENDENCY ;;
47651      pkgadd)
47652        pkgadd_help  $MISSING_DEPENDENCY ;;
47653    esac
47654
47655    if test "x$PKGHANDLER_COMMAND" != x; then
47656      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47657    fi
47658  fi
47659
47660      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
47661    fi
47662
47663    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47664      OPENWIN_HOME="/usr/openwin"
47665      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
47666      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47667          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
47668          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
47669          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
47670    fi
47671
47672    ac_ext=c
47673ac_cpp='$CPP $CPPFLAGS'
47674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47676ac_compiler_gnu=$ac_cv_c_compiler_gnu
47677
47678    OLD_CFLAGS="$CFLAGS"
47679    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
47680
47681    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
47682    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
47683do :
47684  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47685ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
47686          # include <X11/Xlib.h>
47687          # include <X11/Xutil.h>
47688
47689
47690"
47691if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47692  cat >>confdefs.h <<_ACEOF
47693#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47694_ACEOF
47695 X11_HEADERS_OK=yes
47696else
47697  X11_HEADERS_OK=no; break
47698fi
47699
47700done
47701
47702
47703    if test "x$X11_HEADERS_OK" = xno; then
47704
47705  # Print a helpful message on how to acquire the necessary build dependency.
47706  # x11 is the help tag: freetype, cups, alsa etc
47707  MISSING_DEPENDENCY=x11
47708
47709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47710    cygwin_help $MISSING_DEPENDENCY
47711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47712    msys_help $MISSING_DEPENDENCY
47713  else
47714    PKGHANDLER_COMMAND=
47715
47716    case $PKGHANDLER in
47717      apt-get)
47718        apt_help     $MISSING_DEPENDENCY ;;
47719      yum)
47720        yum_help     $MISSING_DEPENDENCY ;;
47721      port)
47722        port_help    $MISSING_DEPENDENCY ;;
47723      pkgutil)
47724        pkgutil_help $MISSING_DEPENDENCY ;;
47725      pkgadd)
47726        pkgadd_help  $MISSING_DEPENDENCY ;;
47727    esac
47728
47729    if test "x$PKGHANDLER_COMMAND" != x; then
47730      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47731    fi
47732  fi
47733
47734      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
47735    fi
47736
47737    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
47738    # defined in libawt_xawt.
47739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
47740$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
47741    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47742/* end confdefs.h.  */
47743#include <X11/extensions/Xrender.h>
47744int
47745main ()
47746{
47747XLinearGradient x;
47748  ;
47749  return 0;
47750}
47751_ACEOF
47752if ac_fn_c_try_compile "$LINENO"; then :
47753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47754$as_echo "yes" >&6; }
47755else
47756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47757$as_echo "no" >&6; }
47758         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
47759fi
47760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47761
47762    CFLAGS="$OLD_CFLAGS"
47763    ac_ext=cpp
47764ac_cpp='$CXXCPP $CPPFLAGS'
47765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47768
47769  fi # NEEDS_LIB_X11
47770
47771
47772
47773
47774
47775
47776# Check whether --with-cups was given.
47777if test "${with_cups+set}" = set; then :
47778  withval=$with_cups;
47779fi
47780
47781
47782# Check whether --with-cups-include was given.
47783if test "${with_cups_include+set}" = set; then :
47784  withval=$with_cups_include;
47785fi
47786
47787
47788  if test "x$NEEDS_LIB_CUPS" = xfalse; then
47789    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
47790        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
47791      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
47792$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
47793    fi
47794    CUPS_CFLAGS=
47795  else
47796    CUPS_FOUND=no
47797
47798    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
47799      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
47800    fi
47801
47802    if test "x${with_cups}" != x; then
47803      CUPS_CFLAGS="-I${with_cups}/include"
47804      CUPS_FOUND=yes
47805    fi
47806    if test "x${with_cups_include}" != x; then
47807      CUPS_CFLAGS="-I${with_cups_include}"
47808      CUPS_FOUND=yes
47809    fi
47810    if test "x$CUPS_FOUND" = xno; then
47811      # Are the cups headers installed in the default /usr/include location?
47812      for ac_header in cups/cups.h cups/ppd.h
47813do :
47814  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47815ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
47816if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47817  cat >>confdefs.h <<_ACEOF
47818#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47819_ACEOF
47820
47821          CUPS_FOUND=yes
47822          CUPS_CFLAGS=
47823          DEFAULT_CUPS=yes
47824
47825fi
47826
47827done
47828
47829    fi
47830    if test "x$CUPS_FOUND" = xno; then
47831      # Getting nervous now? Lets poke around for standard Solaris third-party
47832      # package installation locations.
47833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
47834$as_echo_n "checking for cups headers... " >&6; }
47835      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
47836        # An SFW package seems to be installed!
47837        CUPS_FOUND=yes
47838        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
47839      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
47840        # A CSW package seems to be installed!
47841        CUPS_FOUND=yes
47842        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
47843      fi
47844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
47845$as_echo "$CUPS_FOUND" >&6; }
47846    fi
47847    if test "x$CUPS_FOUND" = xno; then
47848
47849  # Print a helpful message on how to acquire the necessary build dependency.
47850  # cups is the help tag: freetype, cups, alsa etc
47851  MISSING_DEPENDENCY=cups
47852
47853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47854    cygwin_help $MISSING_DEPENDENCY
47855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47856    msys_help $MISSING_DEPENDENCY
47857  else
47858    PKGHANDLER_COMMAND=
47859
47860    case $PKGHANDLER in
47861      apt-get)
47862        apt_help     $MISSING_DEPENDENCY ;;
47863      yum)
47864        yum_help     $MISSING_DEPENDENCY ;;
47865      port)
47866        port_help    $MISSING_DEPENDENCY ;;
47867      pkgutil)
47868        pkgutil_help $MISSING_DEPENDENCY ;;
47869      pkgadd)
47870        pkgadd_help  $MISSING_DEPENDENCY ;;
47871    esac
47872
47873    if test "x$PKGHANDLER_COMMAND" != x; then
47874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47875    fi
47876  fi
47877
47878      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
47879    fi
47880  fi
47881
47882
47883
47884
47885
47886# Check whether --with-freetype was given.
47887if test "${with_freetype+set}" = set; then :
47888  withval=$with_freetype;
47889fi
47890
47891
47892# Check whether --with-freetype-include was given.
47893if test "${with_freetype_include+set}" = set; then :
47894  withval=$with_freetype_include;
47895fi
47896
47897
47898# Check whether --with-freetype-lib was given.
47899if test "${with_freetype_lib+set}" = set; then :
47900  withval=$with_freetype_lib;
47901fi
47902
47903
47904# Check whether --with-freetype-src was given.
47905if test "${with_freetype_src+set}" = set; then :
47906  withval=$with_freetype_src;
47907fi
47908
47909  # Check whether --enable-freetype-bundling was given.
47910if test "${enable_freetype_bundling+set}" = set; then :
47911  enableval=$enable_freetype_bundling;
47912fi
47913
47914
47915  # Need to specify explicitly since it needs to be overridden on some versions of macosx
47916  FREETYPE_BASE_NAME=freetype
47917  FREETYPE_CFLAGS=
47918  FREETYPE_LIBS=
47919  FREETYPE_BUNDLE_LIB_PATH=
47920
47921  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
47922    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
47923        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
47924        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
47925        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
47926      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
47927$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
47928    fi
47929    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
47930      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
47931$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
47932    fi
47933  else
47934    # freetype is needed to build; go get it!
47935
47936    BUNDLE_FREETYPE="$enable_freetype_bundling"
47937
47938    if  test "x$with_freetype_src" != x; then
47939      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47940        # Try to build freetype if --with-freetype-src was given on Windows
47941
47942  FREETYPE_SRC_PATH="$with_freetype_src"
47943  BUILD_FREETYPE=yes
47944
47945  # Check if the freetype sources are acessible..
47946  if ! test -d $FREETYPE_SRC_PATH; then
47947    { $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
47948$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
47949    BUILD_FREETYPE=no
47950  fi
47951  # ..and contain a vc2010 project file
47952  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
47953  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
47954    { $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
47955$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
47956    BUILD_FREETYPE=no
47957  fi
47958  # Now check if configure found a version of 'msbuild.exe'
47959  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
47960    { $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
47961$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;}
47962    BUILD_FREETYPE=no
47963  fi
47964
47965  # Ready to go..
47966  if test "x$BUILD_FREETYPE" = xyes; then
47967    # msbuild requires trailing slashes for output directories
47968    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
47969    freetype_lib_path_unix="$freetype_lib_path"
47970    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
47971
47972  unix_path="$vcxproj_path"
47973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47974    windows_path=`$CYGPATH -m "$unix_path"`
47975    vcxproj_path="$windows_path"
47976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47977    windows_path=`cmd //c echo $unix_path`
47978    vcxproj_path="$windows_path"
47979  fi
47980
47981
47982  unix_path="$freetype_lib_path"
47983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47984    windows_path=`$CYGPATH -m "$unix_path"`
47985    freetype_lib_path="$windows_path"
47986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47987    windows_path=`cmd //c echo $unix_path`
47988    freetype_lib_path="$windows_path"
47989  fi
47990
47991
47992  unix_path="$freetype_obj_path"
47993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47994    windows_path=`$CYGPATH -m "$unix_path"`
47995    freetype_obj_path="$windows_path"
47996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47997    windows_path=`cmd //c echo $unix_path`
47998    freetype_obj_path="$windows_path"
47999  fi
48000
48001    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48002      freetype_platform=x64
48003    else
48004      freetype_platform=win32
48005    fi
48006
48007    # The original freetype project file is for VS 2010 (i.e. 'v100'),
48008    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
48009    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
48010    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
48011    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
48012$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
48013
48014    # First we try to build the freetype.dll
48015    $ECHO -e "@echo off\n"\
48016        "$MSBUILD $vcxproj_path "\
48017        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
48018        "/p:Configuration=\"Release Multithreaded\" "\
48019        "/p:Platform=$freetype_platform "\
48020        "/p:ConfigurationType=DynamicLibrary "\
48021        "/p:TargetName=freetype "\
48022        "/p:OutDir=\"$freetype_lib_path\" "\
48023        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
48024    cmd /c freetype.bat
48025
48026    if test -s "$freetype_lib_path_unix/freetype.dll"; then
48027      # If that succeeds we also build freetype.lib
48028      $ECHO -e "@echo off\n"\
48029          "$MSBUILD $vcxproj_path "\
48030          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
48031          "/p:Configuration=\"Release Multithreaded\" "\
48032          "/p:Platform=$freetype_platform "\
48033          "/p:ConfigurationType=StaticLibrary "\
48034          "/p:TargetName=freetype "\
48035          "/p:OutDir=\"$freetype_lib_path\" "\
48036          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
48037      cmd /c freetype.bat
48038
48039      if test -s "$freetype_lib_path_unix/freetype.lib"; then
48040        # Once we build both, lib and dll, set freetype lib and include path appropriately
48041        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
48042        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
48043        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
48044$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
48045      else
48046        BUILD_FREETYPE=no
48047      fi
48048    else
48049      BUILD_FREETYPE=no
48050    fi
48051  fi
48052
48053        if test "x$BUILD_FREETYPE" = xyes; then
48054          # Okay, we built it. Check that it works.
48055
48056  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48057  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48058  METHOD="--with-freetype-src"
48059
48060  # Let's start with an optimistic view of the world :-)
48061  FOUND_FREETYPE=yes
48062
48063  # First look for the canonical freetype main include file ft2build.h.
48064  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48065    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48066    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48067    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48068      # Fail.
48069      FOUND_FREETYPE=no
48070    fi
48071  fi
48072
48073  if test "x$FOUND_FREETYPE" = xyes; then
48074    # Include file found, let's continue the sanity check.
48075    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48076$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48077
48078    # Reset to default value
48079    FREETYPE_BASE_NAME=freetype
48080    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48081    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48082      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48084        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48085        # for the .6 version explicitly.
48086        FREETYPE_BASE_NAME=freetype.6
48087        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48088        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48089$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48090      else
48091        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48092$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48093        FOUND_FREETYPE=no
48094      fi
48095    else
48096      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48097        # On Windows, we will need both .lib and .dll file.
48098        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48099          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48100$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48101          FOUND_FREETYPE=no
48102        fi
48103      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48104          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48105        # Found lib in isa dir, use that instead.
48106        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48107        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48108$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48109      fi
48110    fi
48111  fi
48112
48113  if test "x$FOUND_FREETYPE" = xyes; then
48114
48115  # Only process if variable expands to non-empty
48116
48117  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48119
48120  # Input might be given as Windows format, start by converting to
48121  # unix format.
48122  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48123  new_path=`$CYGPATH -u "$path"`
48124
48125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48128  # "foo.exe" is OK but "foo" is an error.
48129  #
48130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48131  # It is also a way to make sure we got the proper file name for the real test later on.
48132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48133  if test "x$test_shortpath" = x; then
48134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48136    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48137  fi
48138
48139  # Call helper function which possibly converts this using DOS-style short mode.
48140  # If so, the updated path is stored in $new_path.
48141
48142  input_path="$new_path"
48143  # Check if we need to convert this using DOS-style short mode. If the path
48144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48145  # take no chances and rewrite it.
48146  # Note: m4 eats our [], so we need to use [ and ] instead.
48147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48148  if test "x$has_forbidden_chars" != x; then
48149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48153      # Going to short mode and back again did indeed matter. Since short mode is
48154      # case insensitive, let's make it lowercase to improve readability.
48155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48156      # Now convert it back to Unix-style (cygpath)
48157      input_path=`$CYGPATH -u "$shortmode_path"`
48158      new_path="$input_path"
48159    fi
48160  fi
48161
48162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48163  if test "x$test_cygdrive_prefix" = x; then
48164    # As a simple fix, exclude /usr/bin since it's not a real path.
48165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48167      # a path prefixed by /cygdrive for fixpath to work.
48168      new_path="$CYGWIN_ROOT_PATH$input_path"
48169    fi
48170  fi
48171
48172
48173  if test "x$path" != "x$new_path"; then
48174    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48176$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48177  fi
48178
48179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48180
48181  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48182  has_colon=`$ECHO $path | $GREP ^.:`
48183  new_path="$path"
48184  if test "x$has_colon" = x; then
48185    # Not in mixed or Windows style, start by that.
48186    new_path=`cmd //c echo $path`
48187  fi
48188
48189
48190  input_path="$new_path"
48191  # Check if we need to convert this using DOS-style short mode. If the path
48192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48193  # take no chances and rewrite it.
48194  # Note: m4 eats our [], so we need to use [ and ] instead.
48195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48196  if test "x$has_forbidden_chars" != x; then
48197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48199  fi
48200
48201
48202  windows_path="$new_path"
48203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48204    unix_path=`$CYGPATH -u "$windows_path"`
48205    new_path="$unix_path"
48206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48208    new_path="$unix_path"
48209  fi
48210
48211  if test "x$path" != "x$new_path"; then
48212    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48215  fi
48216
48217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48219
48220    else
48221      # We're on a unix platform. Hooray! :)
48222      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48223      has_space=`$ECHO "$path" | $GREP " "`
48224      if test "x$has_space" != x; then
48225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48228      fi
48229
48230      # Use eval to expand a potential ~
48231      eval path="$path"
48232      if test ! -f "$path" && test ! -d "$path"; then
48233        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48234      fi
48235
48236      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48237    fi
48238  fi
48239
48240
48241  # Only process if variable expands to non-empty
48242
48243  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48245
48246  # Input might be given as Windows format, start by converting to
48247  # unix format.
48248  path="$POTENTIAL_FREETYPE_LIB_PATH"
48249  new_path=`$CYGPATH -u "$path"`
48250
48251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48254  # "foo.exe" is OK but "foo" is an error.
48255  #
48256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48257  # It is also a way to make sure we got the proper file name for the real test later on.
48258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48259  if test "x$test_shortpath" = x; then
48260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48262    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48263  fi
48264
48265  # Call helper function which possibly converts this using DOS-style short mode.
48266  # If so, the updated path is stored in $new_path.
48267
48268  input_path="$new_path"
48269  # Check if we need to convert this using DOS-style short mode. If the path
48270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48271  # take no chances and rewrite it.
48272  # Note: m4 eats our [], so we need to use [ and ] instead.
48273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48274  if test "x$has_forbidden_chars" != x; then
48275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48279      # Going to short mode and back again did indeed matter. Since short mode is
48280      # case insensitive, let's make it lowercase to improve readability.
48281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48282      # Now convert it back to Unix-style (cygpath)
48283      input_path=`$CYGPATH -u "$shortmode_path"`
48284      new_path="$input_path"
48285    fi
48286  fi
48287
48288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48289  if test "x$test_cygdrive_prefix" = x; then
48290    # As a simple fix, exclude /usr/bin since it's not a real path.
48291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48293      # a path prefixed by /cygdrive for fixpath to work.
48294      new_path="$CYGWIN_ROOT_PATH$input_path"
48295    fi
48296  fi
48297
48298
48299  if test "x$path" != "x$new_path"; then
48300    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48303  fi
48304
48305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48306
48307  path="$POTENTIAL_FREETYPE_LIB_PATH"
48308  has_colon=`$ECHO $path | $GREP ^.:`
48309  new_path="$path"
48310  if test "x$has_colon" = x; then
48311    # Not in mixed or Windows style, start by that.
48312    new_path=`cmd //c echo $path`
48313  fi
48314
48315
48316  input_path="$new_path"
48317  # Check if we need to convert this using DOS-style short mode. If the path
48318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48319  # take no chances and rewrite it.
48320  # Note: m4 eats our [], so we need to use [ and ] instead.
48321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48322  if test "x$has_forbidden_chars" != x; then
48323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48325  fi
48326
48327
48328  windows_path="$new_path"
48329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48330    unix_path=`$CYGPATH -u "$windows_path"`
48331    new_path="$unix_path"
48332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48334    new_path="$unix_path"
48335  fi
48336
48337  if test "x$path" != "x$new_path"; then
48338    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48341  fi
48342
48343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48345
48346    else
48347      # We're on a unix platform. Hooray! :)
48348      path="$POTENTIAL_FREETYPE_LIB_PATH"
48349      has_space=`$ECHO "$path" | $GREP " "`
48350      if test "x$has_space" != x; then
48351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48352$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48354      fi
48355
48356      # Use eval to expand a potential ~
48357      eval path="$path"
48358      if test ! -f "$path" && test ! -d "$path"; then
48359        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48360      fi
48361
48362      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48363    fi
48364  fi
48365
48366
48367    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48369$as_echo_n "checking for freetype includes... " >&6; }
48370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48371$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48372    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48374$as_echo_n "checking for freetype libraries... " >&6; }
48375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48376$as_echo "$FREETYPE_LIB_PATH" >&6; }
48377  fi
48378
48379          if test "x$FOUND_FREETYPE" != xyes; then
48380            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
48381          fi
48382        else
48383          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
48384$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
48385          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
48386        fi
48387      else
48388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
48389$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
48390      fi
48391    fi
48392
48393    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
48394      # User has specified settings
48395
48396      if test "x$BUNDLE_FREETYPE" = x; then
48397        # If not specified, default is to bundle freetype
48398        BUNDLE_FREETYPE=yes
48399      fi
48400
48401      if test "x$with_freetype" != x; then
48402        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
48403        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
48404      fi
48405
48406      # Allow --with-freetype-lib and --with-freetype-include to override
48407      if test "x$with_freetype_include" != x; then
48408        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
48409      fi
48410      if test "x$with_freetype_lib" != x; then
48411        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
48412      fi
48413
48414      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48415        # Okay, we got it. Check that it works.
48416
48417  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48418  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48419  METHOD="--with-freetype"
48420
48421  # Let's start with an optimistic view of the world :-)
48422  FOUND_FREETYPE=yes
48423
48424  # First look for the canonical freetype main include file ft2build.h.
48425  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48426    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48427    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48428    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48429      # Fail.
48430      FOUND_FREETYPE=no
48431    fi
48432  fi
48433
48434  if test "x$FOUND_FREETYPE" = xyes; then
48435    # Include file found, let's continue the sanity check.
48436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48437$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48438
48439    # Reset to default value
48440    FREETYPE_BASE_NAME=freetype
48441    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48442    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48443      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48444          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48445        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48446        # for the .6 version explicitly.
48447        FREETYPE_BASE_NAME=freetype.6
48448        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48449        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48450$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48451      else
48452        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48453$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48454        FOUND_FREETYPE=no
48455      fi
48456    else
48457      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48458        # On Windows, we will need both .lib and .dll file.
48459        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48460          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48461$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48462          FOUND_FREETYPE=no
48463        fi
48464      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48466        # Found lib in isa dir, use that instead.
48467        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48468        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48469$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48470      fi
48471    fi
48472  fi
48473
48474  if test "x$FOUND_FREETYPE" = xyes; then
48475
48476  # Only process if variable expands to non-empty
48477
48478  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48480
48481  # Input might be given as Windows format, start by converting to
48482  # unix format.
48483  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48484  new_path=`$CYGPATH -u "$path"`
48485
48486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48489  # "foo.exe" is OK but "foo" is an error.
48490  #
48491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48492  # It is also a way to make sure we got the proper file name for the real test later on.
48493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48494  if test "x$test_shortpath" = x; then
48495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48497    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48498  fi
48499
48500  # Call helper function which possibly converts this using DOS-style short mode.
48501  # If so, the updated path is stored in $new_path.
48502
48503  input_path="$new_path"
48504  # Check if we need to convert this using DOS-style short mode. If the path
48505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48506  # take no chances and rewrite it.
48507  # Note: m4 eats our [], so we need to use [ and ] instead.
48508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48509  if test "x$has_forbidden_chars" != x; then
48510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48514      # Going to short mode and back again did indeed matter. Since short mode is
48515      # case insensitive, let's make it lowercase to improve readability.
48516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48517      # Now convert it back to Unix-style (cygpath)
48518      input_path=`$CYGPATH -u "$shortmode_path"`
48519      new_path="$input_path"
48520    fi
48521  fi
48522
48523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48524  if test "x$test_cygdrive_prefix" = x; then
48525    # As a simple fix, exclude /usr/bin since it's not a real path.
48526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48528      # a path prefixed by /cygdrive for fixpath to work.
48529      new_path="$CYGWIN_ROOT_PATH$input_path"
48530    fi
48531  fi
48532
48533
48534  if test "x$path" != "x$new_path"; then
48535    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48537$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48538  fi
48539
48540    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48541
48542  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48543  has_colon=`$ECHO $path | $GREP ^.:`
48544  new_path="$path"
48545  if test "x$has_colon" = x; then
48546    # Not in mixed or Windows style, start by that.
48547    new_path=`cmd //c echo $path`
48548  fi
48549
48550
48551  input_path="$new_path"
48552  # Check if we need to convert this using DOS-style short mode. If the path
48553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48554  # take no chances and rewrite it.
48555  # Note: m4 eats our [], so we need to use [ and ] instead.
48556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48557  if test "x$has_forbidden_chars" != x; then
48558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48560  fi
48561
48562
48563  windows_path="$new_path"
48564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48565    unix_path=`$CYGPATH -u "$windows_path"`
48566    new_path="$unix_path"
48567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48569    new_path="$unix_path"
48570  fi
48571
48572  if test "x$path" != "x$new_path"; then
48573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48576  fi
48577
48578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48580
48581    else
48582      # We're on a unix platform. Hooray! :)
48583      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48584      has_space=`$ECHO "$path" | $GREP " "`
48585      if test "x$has_space" != x; then
48586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48587$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48588        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48589      fi
48590
48591      # Use eval to expand a potential ~
48592      eval path="$path"
48593      if test ! -f "$path" && test ! -d "$path"; then
48594        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48595      fi
48596
48597      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48598    fi
48599  fi
48600
48601
48602  # Only process if variable expands to non-empty
48603
48604  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48606
48607  # Input might be given as Windows format, start by converting to
48608  # unix format.
48609  path="$POTENTIAL_FREETYPE_LIB_PATH"
48610  new_path=`$CYGPATH -u "$path"`
48611
48612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48615  # "foo.exe" is OK but "foo" is an error.
48616  #
48617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48618  # It is also a way to make sure we got the proper file name for the real test later on.
48619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48620  if test "x$test_shortpath" = x; then
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48624  fi
48625
48626  # Call helper function which possibly converts this using DOS-style short mode.
48627  # If so, the updated path is stored in $new_path.
48628
48629  input_path="$new_path"
48630  # Check if we need to convert this using DOS-style short mode. If the path
48631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48632  # take no chances and rewrite it.
48633  # Note: m4 eats our [], so we need to use [ and ] instead.
48634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48635  if test "x$has_forbidden_chars" != x; then
48636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48640      # Going to short mode and back again did indeed matter. Since short mode is
48641      # case insensitive, let's make it lowercase to improve readability.
48642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48643      # Now convert it back to Unix-style (cygpath)
48644      input_path=`$CYGPATH -u "$shortmode_path"`
48645      new_path="$input_path"
48646    fi
48647  fi
48648
48649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48650  if test "x$test_cygdrive_prefix" = x; then
48651    # As a simple fix, exclude /usr/bin since it's not a real path.
48652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48654      # a path prefixed by /cygdrive for fixpath to work.
48655      new_path="$CYGWIN_ROOT_PATH$input_path"
48656    fi
48657  fi
48658
48659
48660  if test "x$path" != "x$new_path"; then
48661    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48664  fi
48665
48666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48667
48668  path="$POTENTIAL_FREETYPE_LIB_PATH"
48669  has_colon=`$ECHO $path | $GREP ^.:`
48670  new_path="$path"
48671  if test "x$has_colon" = x; then
48672    # Not in mixed or Windows style, start by that.
48673    new_path=`cmd //c echo $path`
48674  fi
48675
48676
48677  input_path="$new_path"
48678  # Check if we need to convert this using DOS-style short mode. If the path
48679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48680  # take no chances and rewrite it.
48681  # Note: m4 eats our [], so we need to use [ and ] instead.
48682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48683  if test "x$has_forbidden_chars" != x; then
48684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48686  fi
48687
48688
48689  windows_path="$new_path"
48690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48691    unix_path=`$CYGPATH -u "$windows_path"`
48692    new_path="$unix_path"
48693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48695    new_path="$unix_path"
48696  fi
48697
48698  if test "x$path" != "x$new_path"; then
48699    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48702  fi
48703
48704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48706
48707    else
48708      # We're on a unix platform. Hooray! :)
48709      path="$POTENTIAL_FREETYPE_LIB_PATH"
48710      has_space=`$ECHO "$path" | $GREP " "`
48711      if test "x$has_space" != x; then
48712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48715      fi
48716
48717      # Use eval to expand a potential ~
48718      eval path="$path"
48719      if test ! -f "$path" && test ! -d "$path"; then
48720        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48721      fi
48722
48723      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48724    fi
48725  fi
48726
48727
48728    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48730$as_echo_n "checking for freetype includes... " >&6; }
48731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48732$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48733    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48735$as_echo_n "checking for freetype libraries... " >&6; }
48736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48737$as_echo "$FREETYPE_LIB_PATH" >&6; }
48738  fi
48739
48740        if test "x$FOUND_FREETYPE" != xyes; then
48741          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
48742        fi
48743      else
48744        # User specified only one of lib or include. This is an error.
48745        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
48746          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
48747$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
48748          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48749        else
48750          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
48751$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
48752          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
48753        fi
48754      fi
48755    else
48756      # User did not specify settings, but we need freetype. Try to locate it.
48757
48758      if test "x$BUNDLE_FREETYPE" = x; then
48759        # If not specified, default is to bundle freetype only on windows
48760        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48761          BUNDLE_FREETYPE=yes
48762        else
48763          BUNDLE_FREETYPE=no
48764        fi
48765      fi
48766
48767      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
48768      if test "x$SYSROOT" = x; then
48769        if test "x$FOUND_FREETYPE" != xyes; then
48770          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
48771          if test "x$PKG_CONFIG" != x; then
48772
48773pkg_failed=no
48774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
48775$as_echo_n "checking for FREETYPE... " >&6; }
48776
48777if test -n "$FREETYPE_CFLAGS"; then
48778    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
48779 elif test -n "$PKG_CONFIG"; then
48780    if test -n "$PKG_CONFIG" && \
48781    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48782  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48783  ac_status=$?
48784  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48785  test $ac_status = 0; }; then
48786  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
48787else
48788  pkg_failed=yes
48789fi
48790 else
48791    pkg_failed=untried
48792fi
48793if test -n "$FREETYPE_LIBS"; then
48794    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
48795 elif test -n "$PKG_CONFIG"; then
48796    if test -n "$PKG_CONFIG" && \
48797    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
48798  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
48799  ac_status=$?
48800  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48801  test $ac_status = 0; }; then
48802  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
48803else
48804  pkg_failed=yes
48805fi
48806 else
48807    pkg_failed=untried
48808fi
48809
48810
48811
48812if test $pkg_failed = yes; then
48813
48814if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48815        _pkg_short_errors_supported=yes
48816else
48817        _pkg_short_errors_supported=no
48818fi
48819        if test $_pkg_short_errors_supported = yes; then
48820	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
48821        else
48822	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
48823        fi
48824	# Put the nasty error message in config.log where it belongs
48825	echo "$FREETYPE_PKG_ERRORS" >&5
48826
48827	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48828$as_echo "no" >&6; }
48829                FOUND_FREETYPE=no
48830elif test $pkg_failed = untried; then
48831	FOUND_FREETYPE=no
48832else
48833	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
48834	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
48835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48836$as_echo "yes" >&6; }
48837	FOUND_FREETYPE=yes
48838fi
48839            if test "x$FOUND_FREETYPE" = xyes; then
48840              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
48841              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
48842              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
48843              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48844                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
48845              fi
48846              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
48847              if test "x$BUNDLE_FREETYPE" = xyes; then
48848                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
48849$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
48850                FOUND_FREETYPE=no
48851              else
48852                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
48853$as_echo_n "checking for freetype... " >&6; }
48854                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
48855$as_echo "yes (using pkg-config)" >&6; }
48856              fi
48857            fi
48858          fi
48859        fi
48860      fi
48861
48862      if test "x$FOUND_FREETYPE" != xyes; then
48863        # Check in well-known locations
48864        if test "x$OPENJDK_TARGET_OS" = xwindows; then
48865          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
48866
48867  windows_path="$FREETYPE_BASE_DIR"
48868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48869    unix_path=`$CYGPATH -u "$windows_path"`
48870    FREETYPE_BASE_DIR="$unix_path"
48871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48873    FREETYPE_BASE_DIR="$unix_path"
48874  fi
48875
48876
48877  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48878  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
48879  METHOD="well-known location"
48880
48881  # Let's start with an optimistic view of the world :-)
48882  FOUND_FREETYPE=yes
48883
48884  # First look for the canonical freetype main include file ft2build.h.
48885  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48886    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48887    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48888    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48889      # Fail.
48890      FOUND_FREETYPE=no
48891    fi
48892  fi
48893
48894  if test "x$FOUND_FREETYPE" = xyes; then
48895    # Include file found, let's continue the sanity check.
48896    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48897$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48898
48899    # Reset to default value
48900    FREETYPE_BASE_NAME=freetype
48901    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48902    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48903      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48904          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48905        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48906        # for the .6 version explicitly.
48907        FREETYPE_BASE_NAME=freetype.6
48908        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48909        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48910$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48911      else
48912        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48913$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48914        FOUND_FREETYPE=no
48915      fi
48916    else
48917      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48918        # On Windows, we will need both .lib and .dll file.
48919        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48920          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48921$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48922          FOUND_FREETYPE=no
48923        fi
48924      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48925          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48926        # Found lib in isa dir, use that instead.
48927        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48928        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48929$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48930      fi
48931    fi
48932  fi
48933
48934  if test "x$FOUND_FREETYPE" = xyes; then
48935
48936  # Only process if variable expands to non-empty
48937
48938  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48940
48941  # Input might be given as Windows format, start by converting to
48942  # unix format.
48943  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48944  new_path=`$CYGPATH -u "$path"`
48945
48946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48949  # "foo.exe" is OK but "foo" is an error.
48950  #
48951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48952  # It is also a way to make sure we got the proper file name for the real test later on.
48953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48954  if test "x$test_shortpath" = x; then
48955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48957    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48958  fi
48959
48960  # Call helper function which possibly converts this using DOS-style short mode.
48961  # If so, the updated path is stored in $new_path.
48962
48963  input_path="$new_path"
48964  # Check if we need to convert this using DOS-style short mode. If the path
48965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48966  # take no chances and rewrite it.
48967  # Note: m4 eats our [], so we need to use [ and ] instead.
48968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48969  if test "x$has_forbidden_chars" != x; then
48970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48974      # Going to short mode and back again did indeed matter. Since short mode is
48975      # case insensitive, let's make it lowercase to improve readability.
48976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48977      # Now convert it back to Unix-style (cygpath)
48978      input_path=`$CYGPATH -u "$shortmode_path"`
48979      new_path="$input_path"
48980    fi
48981  fi
48982
48983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48984  if test "x$test_cygdrive_prefix" = x; then
48985    # As a simple fix, exclude /usr/bin since it's not a real path.
48986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48988      # a path prefixed by /cygdrive for fixpath to work.
48989      new_path="$CYGWIN_ROOT_PATH$input_path"
48990    fi
48991  fi
48992
48993
48994  if test "x$path" != "x$new_path"; then
48995    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48998  fi
48999
49000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49001
49002  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49003  has_colon=`$ECHO $path | $GREP ^.:`
49004  new_path="$path"
49005  if test "x$has_colon" = x; then
49006    # Not in mixed or Windows style, start by that.
49007    new_path=`cmd //c echo $path`
49008  fi
49009
49010
49011  input_path="$new_path"
49012  # Check if we need to convert this using DOS-style short mode. If the path
49013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49014  # take no chances and rewrite it.
49015  # Note: m4 eats our [], so we need to use [ and ] instead.
49016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49017  if test "x$has_forbidden_chars" != x; then
49018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49020  fi
49021
49022
49023  windows_path="$new_path"
49024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49025    unix_path=`$CYGPATH -u "$windows_path"`
49026    new_path="$unix_path"
49027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49029    new_path="$unix_path"
49030  fi
49031
49032  if test "x$path" != "x$new_path"; then
49033    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49035$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49036  fi
49037
49038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49040
49041    else
49042      # We're on a unix platform. Hooray! :)
49043      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49044      has_space=`$ECHO "$path" | $GREP " "`
49045      if test "x$has_space" != x; then
49046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49049      fi
49050
49051      # Use eval to expand a potential ~
49052      eval path="$path"
49053      if test ! -f "$path" && test ! -d "$path"; then
49054        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49055      fi
49056
49057      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49058    fi
49059  fi
49060
49061
49062  # Only process if variable expands to non-empty
49063
49064  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49066
49067  # Input might be given as Windows format, start by converting to
49068  # unix format.
49069  path="$POTENTIAL_FREETYPE_LIB_PATH"
49070  new_path=`$CYGPATH -u "$path"`
49071
49072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49075  # "foo.exe" is OK but "foo" is an error.
49076  #
49077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49078  # It is also a way to make sure we got the proper file name for the real test later on.
49079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49080  if test "x$test_shortpath" = x; then
49081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49084  fi
49085
49086  # Call helper function which possibly converts this using DOS-style short mode.
49087  # If so, the updated path is stored in $new_path.
49088
49089  input_path="$new_path"
49090  # Check if we need to convert this using DOS-style short mode. If the path
49091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49092  # take no chances and rewrite it.
49093  # Note: m4 eats our [], so we need to use [ and ] instead.
49094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49095  if test "x$has_forbidden_chars" != x; then
49096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49100      # Going to short mode and back again did indeed matter. Since short mode is
49101      # case insensitive, let's make it lowercase to improve readability.
49102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49103      # Now convert it back to Unix-style (cygpath)
49104      input_path=`$CYGPATH -u "$shortmode_path"`
49105      new_path="$input_path"
49106    fi
49107  fi
49108
49109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49110  if test "x$test_cygdrive_prefix" = x; then
49111    # As a simple fix, exclude /usr/bin since it's not a real path.
49112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49114      # a path prefixed by /cygdrive for fixpath to work.
49115      new_path="$CYGWIN_ROOT_PATH$input_path"
49116    fi
49117  fi
49118
49119
49120  if test "x$path" != "x$new_path"; then
49121    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49124  fi
49125
49126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49127
49128  path="$POTENTIAL_FREETYPE_LIB_PATH"
49129  has_colon=`$ECHO $path | $GREP ^.:`
49130  new_path="$path"
49131  if test "x$has_colon" = x; then
49132    # Not in mixed or Windows style, start by that.
49133    new_path=`cmd //c echo $path`
49134  fi
49135
49136
49137  input_path="$new_path"
49138  # Check if we need to convert this using DOS-style short mode. If the path
49139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49140  # take no chances and rewrite it.
49141  # Note: m4 eats our [], so we need to use [ and ] instead.
49142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49143  if test "x$has_forbidden_chars" != x; then
49144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49146  fi
49147
49148
49149  windows_path="$new_path"
49150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49151    unix_path=`$CYGPATH -u "$windows_path"`
49152    new_path="$unix_path"
49153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49155    new_path="$unix_path"
49156  fi
49157
49158  if test "x$path" != "x$new_path"; then
49159    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49162  fi
49163
49164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49166
49167    else
49168      # We're on a unix platform. Hooray! :)
49169      path="$POTENTIAL_FREETYPE_LIB_PATH"
49170      has_space=`$ECHO "$path" | $GREP " "`
49171      if test "x$has_space" != x; then
49172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49175      fi
49176
49177      # Use eval to expand a potential ~
49178      eval path="$path"
49179      if test ! -f "$path" && test ! -d "$path"; then
49180        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49181      fi
49182
49183      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49184    fi
49185  fi
49186
49187
49188    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49190$as_echo_n "checking for freetype includes... " >&6; }
49191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49192$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49193    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49195$as_echo_n "checking for freetype libraries... " >&6; }
49196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49197$as_echo "$FREETYPE_LIB_PATH" >&6; }
49198  fi
49199
49200          if test "x$FOUND_FREETYPE" != xyes; then
49201            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
49202
49203  windows_path="$FREETYPE_BASE_DIR"
49204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49205    unix_path=`$CYGPATH -u "$windows_path"`
49206    FREETYPE_BASE_DIR="$unix_path"
49207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49209    FREETYPE_BASE_DIR="$unix_path"
49210  fi
49211
49212
49213  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49214  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49215  METHOD="well-known location"
49216
49217  # Let's start with an optimistic view of the world :-)
49218  FOUND_FREETYPE=yes
49219
49220  # First look for the canonical freetype main include file ft2build.h.
49221  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49222    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49223    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49224    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49225      # Fail.
49226      FOUND_FREETYPE=no
49227    fi
49228  fi
49229
49230  if test "x$FOUND_FREETYPE" = xyes; then
49231    # Include file found, let's continue the sanity check.
49232    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49233$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49234
49235    # Reset to default value
49236    FREETYPE_BASE_NAME=freetype
49237    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49238    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49239      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49240          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49241        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49242        # for the .6 version explicitly.
49243        FREETYPE_BASE_NAME=freetype.6
49244        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49245        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49246$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49247      else
49248        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49249$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49250        FOUND_FREETYPE=no
49251      fi
49252    else
49253      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49254        # On Windows, we will need both .lib and .dll file.
49255        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49256          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49257$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49258          FOUND_FREETYPE=no
49259        fi
49260      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49261          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49262        # Found lib in isa dir, use that instead.
49263        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49264        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49265$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49266      fi
49267    fi
49268  fi
49269
49270  if test "x$FOUND_FREETYPE" = xyes; then
49271
49272  # Only process if variable expands to non-empty
49273
49274  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49276
49277  # Input might be given as Windows format, start by converting to
49278  # unix format.
49279  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49280  new_path=`$CYGPATH -u "$path"`
49281
49282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49285  # "foo.exe" is OK but "foo" is an error.
49286  #
49287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49288  # It is also a way to make sure we got the proper file name for the real test later on.
49289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49290  if test "x$test_shortpath" = x; then
49291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49293    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49294  fi
49295
49296  # Call helper function which possibly converts this using DOS-style short mode.
49297  # If so, the updated path is stored in $new_path.
49298
49299  input_path="$new_path"
49300  # Check if we need to convert this using DOS-style short mode. If the path
49301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49302  # take no chances and rewrite it.
49303  # Note: m4 eats our [], so we need to use [ and ] instead.
49304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49305  if test "x$has_forbidden_chars" != x; then
49306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49310      # Going to short mode and back again did indeed matter. Since short mode is
49311      # case insensitive, let's make it lowercase to improve readability.
49312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49313      # Now convert it back to Unix-style (cygpath)
49314      input_path=`$CYGPATH -u "$shortmode_path"`
49315      new_path="$input_path"
49316    fi
49317  fi
49318
49319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49320  if test "x$test_cygdrive_prefix" = x; then
49321    # As a simple fix, exclude /usr/bin since it's not a real path.
49322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49324      # a path prefixed by /cygdrive for fixpath to work.
49325      new_path="$CYGWIN_ROOT_PATH$input_path"
49326    fi
49327  fi
49328
49329
49330  if test "x$path" != "x$new_path"; then
49331    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49334  fi
49335
49336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49337
49338  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49339  has_colon=`$ECHO $path | $GREP ^.:`
49340  new_path="$path"
49341  if test "x$has_colon" = x; then
49342    # Not in mixed or Windows style, start by that.
49343    new_path=`cmd //c echo $path`
49344  fi
49345
49346
49347  input_path="$new_path"
49348  # Check if we need to convert this using DOS-style short mode. If the path
49349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49350  # take no chances and rewrite it.
49351  # Note: m4 eats our [], so we need to use [ and ] instead.
49352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49353  if test "x$has_forbidden_chars" != x; then
49354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49356  fi
49357
49358
49359  windows_path="$new_path"
49360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49361    unix_path=`$CYGPATH -u "$windows_path"`
49362    new_path="$unix_path"
49363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49365    new_path="$unix_path"
49366  fi
49367
49368  if test "x$path" != "x$new_path"; then
49369    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49372  fi
49373
49374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49376
49377    else
49378      # We're on a unix platform. Hooray! :)
49379      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49380      has_space=`$ECHO "$path" | $GREP " "`
49381      if test "x$has_space" != x; then
49382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49385      fi
49386
49387      # Use eval to expand a potential ~
49388      eval path="$path"
49389      if test ! -f "$path" && test ! -d "$path"; then
49390        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49391      fi
49392
49393      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49394    fi
49395  fi
49396
49397
49398  # Only process if variable expands to non-empty
49399
49400  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49402
49403  # Input might be given as Windows format, start by converting to
49404  # unix format.
49405  path="$POTENTIAL_FREETYPE_LIB_PATH"
49406  new_path=`$CYGPATH -u "$path"`
49407
49408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49411  # "foo.exe" is OK but "foo" is an error.
49412  #
49413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49414  # It is also a way to make sure we got the proper file name for the real test later on.
49415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49416  if test "x$test_shortpath" = x; then
49417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49419    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49420  fi
49421
49422  # Call helper function which possibly converts this using DOS-style short mode.
49423  # If so, the updated path is stored in $new_path.
49424
49425  input_path="$new_path"
49426  # Check if we need to convert this using DOS-style short mode. If the path
49427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49428  # take no chances and rewrite it.
49429  # Note: m4 eats our [], so we need to use [ and ] instead.
49430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49431  if test "x$has_forbidden_chars" != x; then
49432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49436      # Going to short mode and back again did indeed matter. Since short mode is
49437      # case insensitive, let's make it lowercase to improve readability.
49438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49439      # Now convert it back to Unix-style (cygpath)
49440      input_path=`$CYGPATH -u "$shortmode_path"`
49441      new_path="$input_path"
49442    fi
49443  fi
49444
49445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49446  if test "x$test_cygdrive_prefix" = x; then
49447    # As a simple fix, exclude /usr/bin since it's not a real path.
49448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49450      # a path prefixed by /cygdrive for fixpath to work.
49451      new_path="$CYGWIN_ROOT_PATH$input_path"
49452    fi
49453  fi
49454
49455
49456  if test "x$path" != "x$new_path"; then
49457    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49460  fi
49461
49462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49463
49464  path="$POTENTIAL_FREETYPE_LIB_PATH"
49465  has_colon=`$ECHO $path | $GREP ^.:`
49466  new_path="$path"
49467  if test "x$has_colon" = x; then
49468    # Not in mixed or Windows style, start by that.
49469    new_path=`cmd //c echo $path`
49470  fi
49471
49472
49473  input_path="$new_path"
49474  # Check if we need to convert this using DOS-style short mode. If the path
49475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49476  # take no chances and rewrite it.
49477  # Note: m4 eats our [], so we need to use [ and ] instead.
49478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49479  if test "x$has_forbidden_chars" != x; then
49480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49482  fi
49483
49484
49485  windows_path="$new_path"
49486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49487    unix_path=`$CYGPATH -u "$windows_path"`
49488    new_path="$unix_path"
49489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49491    new_path="$unix_path"
49492  fi
49493
49494  if test "x$path" != "x$new_path"; then
49495    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49498  fi
49499
49500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49502
49503    else
49504      # We're on a unix platform. Hooray! :)
49505      path="$POTENTIAL_FREETYPE_LIB_PATH"
49506      has_space=`$ECHO "$path" | $GREP " "`
49507      if test "x$has_space" != x; then
49508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49511      fi
49512
49513      # Use eval to expand a potential ~
49514      eval path="$path"
49515      if test ! -f "$path" && test ! -d "$path"; then
49516        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49517      fi
49518
49519      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49520    fi
49521  fi
49522
49523
49524    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49526$as_echo_n "checking for freetype includes... " >&6; }
49527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49528$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49529    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49531$as_echo_n "checking for freetype libraries... " >&6; }
49532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49533$as_echo "$FREETYPE_LIB_PATH" >&6; }
49534  fi
49535
49536          fi
49537        else
49538          FREETYPE_BASE_DIR="$SYSROOT/usr"
49539
49540  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49541  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49542  METHOD="well-known location"
49543
49544  # Let's start with an optimistic view of the world :-)
49545  FOUND_FREETYPE=yes
49546
49547  # First look for the canonical freetype main include file ft2build.h.
49548  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49549    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49550    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49551    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49552      # Fail.
49553      FOUND_FREETYPE=no
49554    fi
49555  fi
49556
49557  if test "x$FOUND_FREETYPE" = xyes; then
49558    # Include file found, let's continue the sanity check.
49559    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49560$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49561
49562    # Reset to default value
49563    FREETYPE_BASE_NAME=freetype
49564    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49565    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49566      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49567          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49568        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49569        # for the .6 version explicitly.
49570        FREETYPE_BASE_NAME=freetype.6
49571        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49572        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49573$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49574      else
49575        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49576$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49577        FOUND_FREETYPE=no
49578      fi
49579    else
49580      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49581        # On Windows, we will need both .lib and .dll file.
49582        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49583          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49584$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49585          FOUND_FREETYPE=no
49586        fi
49587      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49588          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49589        # Found lib in isa dir, use that instead.
49590        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49591        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49592$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49593      fi
49594    fi
49595  fi
49596
49597  if test "x$FOUND_FREETYPE" = xyes; then
49598
49599  # Only process if variable expands to non-empty
49600
49601  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49603
49604  # Input might be given as Windows format, start by converting to
49605  # unix format.
49606  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49607  new_path=`$CYGPATH -u "$path"`
49608
49609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49612  # "foo.exe" is OK but "foo" is an error.
49613  #
49614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49615  # It is also a way to make sure we got the proper file name for the real test later on.
49616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49617  if test "x$test_shortpath" = x; then
49618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49620    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49621  fi
49622
49623  # Call helper function which possibly converts this using DOS-style short mode.
49624  # If so, the updated path is stored in $new_path.
49625
49626  input_path="$new_path"
49627  # Check if we need to convert this using DOS-style short mode. If the path
49628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49629  # take no chances and rewrite it.
49630  # Note: m4 eats our [], so we need to use [ and ] instead.
49631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49632  if test "x$has_forbidden_chars" != x; then
49633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49637      # Going to short mode and back again did indeed matter. Since short mode is
49638      # case insensitive, let's make it lowercase to improve readability.
49639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49640      # Now convert it back to Unix-style (cygpath)
49641      input_path=`$CYGPATH -u "$shortmode_path"`
49642      new_path="$input_path"
49643    fi
49644  fi
49645
49646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49647  if test "x$test_cygdrive_prefix" = x; then
49648    # As a simple fix, exclude /usr/bin since it's not a real path.
49649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49651      # a path prefixed by /cygdrive for fixpath to work.
49652      new_path="$CYGWIN_ROOT_PATH$input_path"
49653    fi
49654  fi
49655
49656
49657  if test "x$path" != "x$new_path"; then
49658    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49661  fi
49662
49663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49664
49665  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49666  has_colon=`$ECHO $path | $GREP ^.:`
49667  new_path="$path"
49668  if test "x$has_colon" = x; then
49669    # Not in mixed or Windows style, start by that.
49670    new_path=`cmd //c echo $path`
49671  fi
49672
49673
49674  input_path="$new_path"
49675  # Check if we need to convert this using DOS-style short mode. If the path
49676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49677  # take no chances and rewrite it.
49678  # Note: m4 eats our [], so we need to use [ and ] instead.
49679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49680  if test "x$has_forbidden_chars" != x; then
49681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49683  fi
49684
49685
49686  windows_path="$new_path"
49687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49688    unix_path=`$CYGPATH -u "$windows_path"`
49689    new_path="$unix_path"
49690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49692    new_path="$unix_path"
49693  fi
49694
49695  if test "x$path" != "x$new_path"; then
49696    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49699  fi
49700
49701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49703
49704    else
49705      # We're on a unix platform. Hooray! :)
49706      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49707      has_space=`$ECHO "$path" | $GREP " "`
49708      if test "x$has_space" != x; then
49709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49710$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49712      fi
49713
49714      # Use eval to expand a potential ~
49715      eval path="$path"
49716      if test ! -f "$path" && test ! -d "$path"; then
49717        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49718      fi
49719
49720      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49721    fi
49722  fi
49723
49724
49725  # Only process if variable expands to non-empty
49726
49727  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49729
49730  # Input might be given as Windows format, start by converting to
49731  # unix format.
49732  path="$POTENTIAL_FREETYPE_LIB_PATH"
49733  new_path=`$CYGPATH -u "$path"`
49734
49735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49738  # "foo.exe" is OK but "foo" is an error.
49739  #
49740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49741  # It is also a way to make sure we got the proper file name for the real test later on.
49742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49743  if test "x$test_shortpath" = x; then
49744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49746    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49747  fi
49748
49749  # Call helper function which possibly converts this using DOS-style short mode.
49750  # If so, the updated path is stored in $new_path.
49751
49752  input_path="$new_path"
49753  # Check if we need to convert this using DOS-style short mode. If the path
49754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49755  # take no chances and rewrite it.
49756  # Note: m4 eats our [], so we need to use [ and ] instead.
49757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49758  if test "x$has_forbidden_chars" != x; then
49759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49763      # Going to short mode and back again did indeed matter. Since short mode is
49764      # case insensitive, let's make it lowercase to improve readability.
49765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49766      # Now convert it back to Unix-style (cygpath)
49767      input_path=`$CYGPATH -u "$shortmode_path"`
49768      new_path="$input_path"
49769    fi
49770  fi
49771
49772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49773  if test "x$test_cygdrive_prefix" = x; then
49774    # As a simple fix, exclude /usr/bin since it's not a real path.
49775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49777      # a path prefixed by /cygdrive for fixpath to work.
49778      new_path="$CYGWIN_ROOT_PATH$input_path"
49779    fi
49780  fi
49781
49782
49783  if test "x$path" != "x$new_path"; then
49784    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49787  fi
49788
49789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49790
49791  path="$POTENTIAL_FREETYPE_LIB_PATH"
49792  has_colon=`$ECHO $path | $GREP ^.:`
49793  new_path="$path"
49794  if test "x$has_colon" = x; then
49795    # Not in mixed or Windows style, start by that.
49796    new_path=`cmd //c echo $path`
49797  fi
49798
49799
49800  input_path="$new_path"
49801  # Check if we need to convert this using DOS-style short mode. If the path
49802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49803  # take no chances and rewrite it.
49804  # Note: m4 eats our [], so we need to use [ and ] instead.
49805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49806  if test "x$has_forbidden_chars" != x; then
49807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49809  fi
49810
49811
49812  windows_path="$new_path"
49813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49814    unix_path=`$CYGPATH -u "$windows_path"`
49815    new_path="$unix_path"
49816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49818    new_path="$unix_path"
49819  fi
49820
49821  if test "x$path" != "x$new_path"; then
49822    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49825  fi
49826
49827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49829
49830    else
49831      # We're on a unix platform. Hooray! :)
49832      path="$POTENTIAL_FREETYPE_LIB_PATH"
49833      has_space=`$ECHO "$path" | $GREP " "`
49834      if test "x$has_space" != x; then
49835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49838      fi
49839
49840      # Use eval to expand a potential ~
49841      eval path="$path"
49842      if test ! -f "$path" && test ! -d "$path"; then
49843        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49844      fi
49845
49846      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49847    fi
49848  fi
49849
49850
49851    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49853$as_echo_n "checking for freetype includes... " >&6; }
49854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49855$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49856    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49858$as_echo_n "checking for freetype libraries... " >&6; }
49859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49860$as_echo "$FREETYPE_LIB_PATH" >&6; }
49861  fi
49862
49863
49864          if test "x$FOUND_FREETYPE" != xyes; then
49865            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
49866
49867  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
49868  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
49869  METHOD="well-known location"
49870
49871  # Let's start with an optimistic view of the world :-)
49872  FOUND_FREETYPE=yes
49873
49874  # First look for the canonical freetype main include file ft2build.h.
49875  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49876    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49877    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49878    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49879      # Fail.
49880      FOUND_FREETYPE=no
49881    fi
49882  fi
49883
49884  if test "x$FOUND_FREETYPE" = xyes; then
49885    # Include file found, let's continue the sanity check.
49886    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49887$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49888
49889    # Reset to default value
49890    FREETYPE_BASE_NAME=freetype
49891    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49892    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49893      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49894          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49895        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49896        # for the .6 version explicitly.
49897        FREETYPE_BASE_NAME=freetype.6
49898        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49899        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49900$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49901      else
49902        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49903$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49904        FOUND_FREETYPE=no
49905      fi
49906    else
49907      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49908        # On Windows, we will need both .lib and .dll file.
49909        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49910          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49911$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49912          FOUND_FREETYPE=no
49913        fi
49914      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49915          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49916        # Found lib in isa dir, use that instead.
49917        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49918        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49919$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49920      fi
49921    fi
49922  fi
49923
49924  if test "x$FOUND_FREETYPE" = xyes; then
49925
49926  # Only process if variable expands to non-empty
49927
49928  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49930
49931  # Input might be given as Windows format, start by converting to
49932  # unix format.
49933  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49934  new_path=`$CYGPATH -u "$path"`
49935
49936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49939  # "foo.exe" is OK but "foo" is an error.
49940  #
49941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49942  # It is also a way to make sure we got the proper file name for the real test later on.
49943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49944  if test "x$test_shortpath" = x; then
49945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49946$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49947    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49948  fi
49949
49950  # Call helper function which possibly converts this using DOS-style short mode.
49951  # If so, the updated path is stored in $new_path.
49952
49953  input_path="$new_path"
49954  # Check if we need to convert this using DOS-style short mode. If the path
49955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49956  # take no chances and rewrite it.
49957  # Note: m4 eats our [], so we need to use [ and ] instead.
49958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49959  if test "x$has_forbidden_chars" != x; then
49960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49964      # Going to short mode and back again did indeed matter. Since short mode is
49965      # case insensitive, let's make it lowercase to improve readability.
49966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49967      # Now convert it back to Unix-style (cygpath)
49968      input_path=`$CYGPATH -u "$shortmode_path"`
49969      new_path="$input_path"
49970    fi
49971  fi
49972
49973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49974  if test "x$test_cygdrive_prefix" = x; then
49975    # As a simple fix, exclude /usr/bin since it's not a real path.
49976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49978      # a path prefixed by /cygdrive for fixpath to work.
49979      new_path="$CYGWIN_ROOT_PATH$input_path"
49980    fi
49981  fi
49982
49983
49984  if test "x$path" != "x$new_path"; then
49985    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49987$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49988  fi
49989
49990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49991
49992  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49993  has_colon=`$ECHO $path | $GREP ^.:`
49994  new_path="$path"
49995  if test "x$has_colon" = x; then
49996    # Not in mixed or Windows style, start by that.
49997    new_path=`cmd //c echo $path`
49998  fi
49999
50000
50001  input_path="$new_path"
50002  # Check if we need to convert this using DOS-style short mode. If the path
50003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50004  # take no chances and rewrite it.
50005  # Note: m4 eats our [], so we need to use [ and ] instead.
50006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50007  if test "x$has_forbidden_chars" != x; then
50008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50010  fi
50011
50012
50013  windows_path="$new_path"
50014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50015    unix_path=`$CYGPATH -u "$windows_path"`
50016    new_path="$unix_path"
50017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50019    new_path="$unix_path"
50020  fi
50021
50022  if test "x$path" != "x$new_path"; then
50023    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50025$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50026  fi
50027
50028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50030
50031    else
50032      # We're on a unix platform. Hooray! :)
50033      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50034      has_space=`$ECHO "$path" | $GREP " "`
50035      if test "x$has_space" != x; then
50036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50039      fi
50040
50041      # Use eval to expand a potential ~
50042      eval path="$path"
50043      if test ! -f "$path" && test ! -d "$path"; then
50044        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50045      fi
50046
50047      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50048    fi
50049  fi
50050
50051
50052  # Only process if variable expands to non-empty
50053
50054  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50056
50057  # Input might be given as Windows format, start by converting to
50058  # unix format.
50059  path="$POTENTIAL_FREETYPE_LIB_PATH"
50060  new_path=`$CYGPATH -u "$path"`
50061
50062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50065  # "foo.exe" is OK but "foo" is an error.
50066  #
50067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50068  # It is also a way to make sure we got the proper file name for the real test later on.
50069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50070  if test "x$test_shortpath" = x; then
50071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50073    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50074  fi
50075
50076  # Call helper function which possibly converts this using DOS-style short mode.
50077  # If so, the updated path is stored in $new_path.
50078
50079  input_path="$new_path"
50080  # Check if we need to convert this using DOS-style short mode. If the path
50081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50082  # take no chances and rewrite it.
50083  # Note: m4 eats our [], so we need to use [ and ] instead.
50084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50085  if test "x$has_forbidden_chars" != x; then
50086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50090      # Going to short mode and back again did indeed matter. Since short mode is
50091      # case insensitive, let's make it lowercase to improve readability.
50092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50093      # Now convert it back to Unix-style (cygpath)
50094      input_path=`$CYGPATH -u "$shortmode_path"`
50095      new_path="$input_path"
50096    fi
50097  fi
50098
50099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50100  if test "x$test_cygdrive_prefix" = x; then
50101    # As a simple fix, exclude /usr/bin since it's not a real path.
50102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50104      # a path prefixed by /cygdrive for fixpath to work.
50105      new_path="$CYGWIN_ROOT_PATH$input_path"
50106    fi
50107  fi
50108
50109
50110  if test "x$path" != "x$new_path"; then
50111    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50114  fi
50115
50116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50117
50118  path="$POTENTIAL_FREETYPE_LIB_PATH"
50119  has_colon=`$ECHO $path | $GREP ^.:`
50120  new_path="$path"
50121  if test "x$has_colon" = x; then
50122    # Not in mixed or Windows style, start by that.
50123    new_path=`cmd //c echo $path`
50124  fi
50125
50126
50127  input_path="$new_path"
50128  # Check if we need to convert this using DOS-style short mode. If the path
50129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50130  # take no chances and rewrite it.
50131  # Note: m4 eats our [], so we need to use [ and ] instead.
50132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50133  if test "x$has_forbidden_chars" != x; then
50134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50136  fi
50137
50138
50139  windows_path="$new_path"
50140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50141    unix_path=`$CYGPATH -u "$windows_path"`
50142    new_path="$unix_path"
50143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50145    new_path="$unix_path"
50146  fi
50147
50148  if test "x$path" != "x$new_path"; then
50149    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50152  fi
50153
50154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50156
50157    else
50158      # We're on a unix platform. Hooray! :)
50159      path="$POTENTIAL_FREETYPE_LIB_PATH"
50160      has_space=`$ECHO "$path" | $GREP " "`
50161      if test "x$has_space" != x; then
50162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50163$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50165      fi
50166
50167      # Use eval to expand a potential ~
50168      eval path="$path"
50169      if test ! -f "$path" && test ! -d "$path"; then
50170        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50171      fi
50172
50173      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50174    fi
50175  fi
50176
50177
50178    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50180$as_echo_n "checking for freetype includes... " >&6; }
50181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50182$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50183    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50185$as_echo_n "checking for freetype libraries... " >&6; }
50186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50187$as_echo "$FREETYPE_LIB_PATH" >&6; }
50188  fi
50189
50190          fi
50191
50192          if test "x$FOUND_FREETYPE" != xyes; then
50193            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
50194
50195  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50196  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50197  METHOD="well-known location"
50198
50199  # Let's start with an optimistic view of the world :-)
50200  FOUND_FREETYPE=yes
50201
50202  # First look for the canonical freetype main include file ft2build.h.
50203  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50204    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50205    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50206    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50207      # Fail.
50208      FOUND_FREETYPE=no
50209    fi
50210  fi
50211
50212  if test "x$FOUND_FREETYPE" = xyes; then
50213    # Include file found, let's continue the sanity check.
50214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50215$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50216
50217    # Reset to default value
50218    FREETYPE_BASE_NAME=freetype
50219    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50220    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50221      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50222          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50223        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50224        # for the .6 version explicitly.
50225        FREETYPE_BASE_NAME=freetype.6
50226        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50227        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50228$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50229      else
50230        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50232        FOUND_FREETYPE=no
50233      fi
50234    else
50235      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50236        # On Windows, we will need both .lib and .dll file.
50237        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50238          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50239$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50240          FOUND_FREETYPE=no
50241        fi
50242      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50243          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50244        # Found lib in isa dir, use that instead.
50245        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50246        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50247$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50248      fi
50249    fi
50250  fi
50251
50252  if test "x$FOUND_FREETYPE" = xyes; then
50253
50254  # Only process if variable expands to non-empty
50255
50256  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50258
50259  # Input might be given as Windows format, start by converting to
50260  # unix format.
50261  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50262  new_path=`$CYGPATH -u "$path"`
50263
50264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50267  # "foo.exe" is OK but "foo" is an error.
50268  #
50269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50270  # It is also a way to make sure we got the proper file name for the real test later on.
50271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50272  if test "x$test_shortpath" = x; then
50273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50275    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50276  fi
50277
50278  # Call helper function which possibly converts this using DOS-style short mode.
50279  # If so, the updated path is stored in $new_path.
50280
50281  input_path="$new_path"
50282  # Check if we need to convert this using DOS-style short mode. If the path
50283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50284  # take no chances and rewrite it.
50285  # Note: m4 eats our [], so we need to use [ and ] instead.
50286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50287  if test "x$has_forbidden_chars" != x; then
50288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50292      # Going to short mode and back again did indeed matter. Since short mode is
50293      # case insensitive, let's make it lowercase to improve readability.
50294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50295      # Now convert it back to Unix-style (cygpath)
50296      input_path=`$CYGPATH -u "$shortmode_path"`
50297      new_path="$input_path"
50298    fi
50299  fi
50300
50301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50302  if test "x$test_cygdrive_prefix" = x; then
50303    # As a simple fix, exclude /usr/bin since it's not a real path.
50304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50306      # a path prefixed by /cygdrive for fixpath to work.
50307      new_path="$CYGWIN_ROOT_PATH$input_path"
50308    fi
50309  fi
50310
50311
50312  if test "x$path" != "x$new_path"; then
50313    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50316  fi
50317
50318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50319
50320  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50321  has_colon=`$ECHO $path | $GREP ^.:`
50322  new_path="$path"
50323  if test "x$has_colon" = x; then
50324    # Not in mixed or Windows style, start by that.
50325    new_path=`cmd //c echo $path`
50326  fi
50327
50328
50329  input_path="$new_path"
50330  # Check if we need to convert this using DOS-style short mode. If the path
50331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50332  # take no chances and rewrite it.
50333  # Note: m4 eats our [], so we need to use [ and ] instead.
50334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50335  if test "x$has_forbidden_chars" != x; then
50336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50338  fi
50339
50340
50341  windows_path="$new_path"
50342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50343    unix_path=`$CYGPATH -u "$windows_path"`
50344    new_path="$unix_path"
50345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50347    new_path="$unix_path"
50348  fi
50349
50350  if test "x$path" != "x$new_path"; then
50351    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50354  fi
50355
50356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50358
50359    else
50360      # We're on a unix platform. Hooray! :)
50361      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50362      has_space=`$ECHO "$path" | $GREP " "`
50363      if test "x$has_space" != x; then
50364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50365$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50366        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50367      fi
50368
50369      # Use eval to expand a potential ~
50370      eval path="$path"
50371      if test ! -f "$path" && test ! -d "$path"; then
50372        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50373      fi
50374
50375      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50376    fi
50377  fi
50378
50379
50380  # Only process if variable expands to non-empty
50381
50382  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50384
50385  # Input might be given as Windows format, start by converting to
50386  # unix format.
50387  path="$POTENTIAL_FREETYPE_LIB_PATH"
50388  new_path=`$CYGPATH -u "$path"`
50389
50390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50393  # "foo.exe" is OK but "foo" is an error.
50394  #
50395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50396  # It is also a way to make sure we got the proper file name for the real test later on.
50397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50398  if test "x$test_shortpath" = x; then
50399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50401    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50402  fi
50403
50404  # Call helper function which possibly converts this using DOS-style short mode.
50405  # If so, the updated path is stored in $new_path.
50406
50407  input_path="$new_path"
50408  # Check if we need to convert this using DOS-style short mode. If the path
50409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50410  # take no chances and rewrite it.
50411  # Note: m4 eats our [], so we need to use [ and ] instead.
50412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50413  if test "x$has_forbidden_chars" != x; then
50414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50418      # Going to short mode and back again did indeed matter. Since short mode is
50419      # case insensitive, let's make it lowercase to improve readability.
50420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50421      # Now convert it back to Unix-style (cygpath)
50422      input_path=`$CYGPATH -u "$shortmode_path"`
50423      new_path="$input_path"
50424    fi
50425  fi
50426
50427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50428  if test "x$test_cygdrive_prefix" = x; then
50429    # As a simple fix, exclude /usr/bin since it's not a real path.
50430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50432      # a path prefixed by /cygdrive for fixpath to work.
50433      new_path="$CYGWIN_ROOT_PATH$input_path"
50434    fi
50435  fi
50436
50437
50438  if test "x$path" != "x$new_path"; then
50439    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50441$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50442  fi
50443
50444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50445
50446  path="$POTENTIAL_FREETYPE_LIB_PATH"
50447  has_colon=`$ECHO $path | $GREP ^.:`
50448  new_path="$path"
50449  if test "x$has_colon" = x; then
50450    # Not in mixed or Windows style, start by that.
50451    new_path=`cmd //c echo $path`
50452  fi
50453
50454
50455  input_path="$new_path"
50456  # Check if we need to convert this using DOS-style short mode. If the path
50457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50458  # take no chances and rewrite it.
50459  # Note: m4 eats our [], so we need to use [ and ] instead.
50460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50461  if test "x$has_forbidden_chars" != x; then
50462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50464  fi
50465
50466
50467  windows_path="$new_path"
50468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50469    unix_path=`$CYGPATH -u "$windows_path"`
50470    new_path="$unix_path"
50471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50473    new_path="$unix_path"
50474  fi
50475
50476  if test "x$path" != "x$new_path"; then
50477    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50479$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50480  fi
50481
50482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50484
50485    else
50486      # We're on a unix platform. Hooray! :)
50487      path="$POTENTIAL_FREETYPE_LIB_PATH"
50488      has_space=`$ECHO "$path" | $GREP " "`
50489      if test "x$has_space" != x; then
50490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50493      fi
50494
50495      # Use eval to expand a potential ~
50496      eval path="$path"
50497      if test ! -f "$path" && test ! -d "$path"; then
50498        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50499      fi
50500
50501      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50502    fi
50503  fi
50504
50505
50506    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50508$as_echo_n "checking for freetype includes... " >&6; }
50509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50510$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50511    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50513$as_echo_n "checking for freetype libraries... " >&6; }
50514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50515$as_echo "$FREETYPE_LIB_PATH" >&6; }
50516  fi
50517
50518          fi
50519
50520          if test "x$FOUND_FREETYPE" != xyes; then
50521            FREETYPE_BASE_DIR="$SYSROOT/usr"
50522            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50523
50524  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50525  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
50526  METHOD="well-known location"
50527
50528  # Let's start with an optimistic view of the world :-)
50529  FOUND_FREETYPE=yes
50530
50531  # First look for the canonical freetype main include file ft2build.h.
50532  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50533    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50534    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50535    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50536      # Fail.
50537      FOUND_FREETYPE=no
50538    fi
50539  fi
50540
50541  if test "x$FOUND_FREETYPE" = xyes; then
50542    # Include file found, let's continue the sanity check.
50543    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50544$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50545
50546    # Reset to default value
50547    FREETYPE_BASE_NAME=freetype
50548    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50549    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50550      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50551          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50552        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50553        # for the .6 version explicitly.
50554        FREETYPE_BASE_NAME=freetype.6
50555        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50556        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50557$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50558      else
50559        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50560$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50561        FOUND_FREETYPE=no
50562      fi
50563    else
50564      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50565        # On Windows, we will need both .lib and .dll file.
50566        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50567          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50568$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50569          FOUND_FREETYPE=no
50570        fi
50571      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50572          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50573        # Found lib in isa dir, use that instead.
50574        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50575        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50576$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50577      fi
50578    fi
50579  fi
50580
50581  if test "x$FOUND_FREETYPE" = xyes; then
50582
50583  # Only process if variable expands to non-empty
50584
50585  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50587
50588  # Input might be given as Windows format, start by converting to
50589  # unix format.
50590  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50591  new_path=`$CYGPATH -u "$path"`
50592
50593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50596  # "foo.exe" is OK but "foo" is an error.
50597  #
50598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50599  # It is also a way to make sure we got the proper file name for the real test later on.
50600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50601  if test "x$test_shortpath" = x; then
50602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50604    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50605  fi
50606
50607  # Call helper function which possibly converts this using DOS-style short mode.
50608  # If so, the updated path is stored in $new_path.
50609
50610  input_path="$new_path"
50611  # Check if we need to convert this using DOS-style short mode. If the path
50612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50613  # take no chances and rewrite it.
50614  # Note: m4 eats our [], so we need to use [ and ] instead.
50615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50616  if test "x$has_forbidden_chars" != x; then
50617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50621      # Going to short mode and back again did indeed matter. Since short mode is
50622      # case insensitive, let's make it lowercase to improve readability.
50623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50624      # Now convert it back to Unix-style (cygpath)
50625      input_path=`$CYGPATH -u "$shortmode_path"`
50626      new_path="$input_path"
50627    fi
50628  fi
50629
50630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50631  if test "x$test_cygdrive_prefix" = x; then
50632    # As a simple fix, exclude /usr/bin since it's not a real path.
50633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50635      # a path prefixed by /cygdrive for fixpath to work.
50636      new_path="$CYGWIN_ROOT_PATH$input_path"
50637    fi
50638  fi
50639
50640
50641  if test "x$path" != "x$new_path"; then
50642    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50645  fi
50646
50647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50648
50649  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50650  has_colon=`$ECHO $path | $GREP ^.:`
50651  new_path="$path"
50652  if test "x$has_colon" = x; then
50653    # Not in mixed or Windows style, start by that.
50654    new_path=`cmd //c echo $path`
50655  fi
50656
50657
50658  input_path="$new_path"
50659  # Check if we need to convert this using DOS-style short mode. If the path
50660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50661  # take no chances and rewrite it.
50662  # Note: m4 eats our [], so we need to use [ and ] instead.
50663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50664  if test "x$has_forbidden_chars" != x; then
50665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50667  fi
50668
50669
50670  windows_path="$new_path"
50671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50672    unix_path=`$CYGPATH -u "$windows_path"`
50673    new_path="$unix_path"
50674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50676    new_path="$unix_path"
50677  fi
50678
50679  if test "x$path" != "x$new_path"; then
50680    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50683  fi
50684
50685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50687
50688    else
50689      # We're on a unix platform. Hooray! :)
50690      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50691      has_space=`$ECHO "$path" | $GREP " "`
50692      if test "x$has_space" != x; then
50693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50696      fi
50697
50698      # Use eval to expand a potential ~
50699      eval path="$path"
50700      if test ! -f "$path" && test ! -d "$path"; then
50701        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50702      fi
50703
50704      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50705    fi
50706  fi
50707
50708
50709  # Only process if variable expands to non-empty
50710
50711  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50713
50714  # Input might be given as Windows format, start by converting to
50715  # unix format.
50716  path="$POTENTIAL_FREETYPE_LIB_PATH"
50717  new_path=`$CYGPATH -u "$path"`
50718
50719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50722  # "foo.exe" is OK but "foo" is an error.
50723  #
50724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50725  # It is also a way to make sure we got the proper file name for the real test later on.
50726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50727  if test "x$test_shortpath" = x; then
50728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50730    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50731  fi
50732
50733  # Call helper function which possibly converts this using DOS-style short mode.
50734  # If so, the updated path is stored in $new_path.
50735
50736  input_path="$new_path"
50737  # Check if we need to convert this using DOS-style short mode. If the path
50738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50739  # take no chances and rewrite it.
50740  # Note: m4 eats our [], so we need to use [ and ] instead.
50741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50742  if test "x$has_forbidden_chars" != x; then
50743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50747      # Going to short mode and back again did indeed matter. Since short mode is
50748      # case insensitive, let's make it lowercase to improve readability.
50749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50750      # Now convert it back to Unix-style (cygpath)
50751      input_path=`$CYGPATH -u "$shortmode_path"`
50752      new_path="$input_path"
50753    fi
50754  fi
50755
50756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50757  if test "x$test_cygdrive_prefix" = x; then
50758    # As a simple fix, exclude /usr/bin since it's not a real path.
50759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50761      # a path prefixed by /cygdrive for fixpath to work.
50762      new_path="$CYGWIN_ROOT_PATH$input_path"
50763    fi
50764  fi
50765
50766
50767  if test "x$path" != "x$new_path"; then
50768    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50771  fi
50772
50773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50774
50775  path="$POTENTIAL_FREETYPE_LIB_PATH"
50776  has_colon=`$ECHO $path | $GREP ^.:`
50777  new_path="$path"
50778  if test "x$has_colon" = x; then
50779    # Not in mixed or Windows style, start by that.
50780    new_path=`cmd //c echo $path`
50781  fi
50782
50783
50784  input_path="$new_path"
50785  # Check if we need to convert this using DOS-style short mode. If the path
50786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50787  # take no chances and rewrite it.
50788  # Note: m4 eats our [], so we need to use [ and ] instead.
50789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50790  if test "x$has_forbidden_chars" != x; then
50791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50793  fi
50794
50795
50796  windows_path="$new_path"
50797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50798    unix_path=`$CYGPATH -u "$windows_path"`
50799    new_path="$unix_path"
50800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50802    new_path="$unix_path"
50803  fi
50804
50805  if test "x$path" != "x$new_path"; then
50806    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50809  fi
50810
50811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50813
50814    else
50815      # We're on a unix platform. Hooray! :)
50816      path="$POTENTIAL_FREETYPE_LIB_PATH"
50817      has_space=`$ECHO "$path" | $GREP " "`
50818      if test "x$has_space" != x; then
50819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50822      fi
50823
50824      # Use eval to expand a potential ~
50825      eval path="$path"
50826      if test ! -f "$path" && test ! -d "$path"; then
50827        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50828      fi
50829
50830      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50831    fi
50832  fi
50833
50834
50835    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50837$as_echo_n "checking for freetype includes... " >&6; }
50838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50839$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50840    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50842$as_echo_n "checking for freetype libraries... " >&6; }
50843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50844$as_echo "$FREETYPE_LIB_PATH" >&6; }
50845  fi
50846
50847            else
50848
50849  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50850  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
50851  METHOD="well-known location"
50852
50853  # Let's start with an optimistic view of the world :-)
50854  FOUND_FREETYPE=yes
50855
50856  # First look for the canonical freetype main include file ft2build.h.
50857  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50858    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50859    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50860    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50861      # Fail.
50862      FOUND_FREETYPE=no
50863    fi
50864  fi
50865
50866  if test "x$FOUND_FREETYPE" = xyes; then
50867    # Include file found, let's continue the sanity check.
50868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50869$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50870
50871    # Reset to default value
50872    FREETYPE_BASE_NAME=freetype
50873    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50874    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50875      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50876          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50877        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50878        # for the .6 version explicitly.
50879        FREETYPE_BASE_NAME=freetype.6
50880        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50881        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50882$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50883      else
50884        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50885$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50886        FOUND_FREETYPE=no
50887      fi
50888    else
50889      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50890        # On Windows, we will need both .lib and .dll file.
50891        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50892          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50893$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50894          FOUND_FREETYPE=no
50895        fi
50896      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50897          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50898        # Found lib in isa dir, use that instead.
50899        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50900        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50901$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50902      fi
50903    fi
50904  fi
50905
50906  if test "x$FOUND_FREETYPE" = xyes; then
50907
50908  # Only process if variable expands to non-empty
50909
50910  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50912
50913  # Input might be given as Windows format, start by converting to
50914  # unix format.
50915  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50916  new_path=`$CYGPATH -u "$path"`
50917
50918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50921  # "foo.exe" is OK but "foo" is an error.
50922  #
50923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50924  # It is also a way to make sure we got the proper file name for the real test later on.
50925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50926  if test "x$test_shortpath" = x; then
50927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50928$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50929    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50930  fi
50931
50932  # Call helper function which possibly converts this using DOS-style short mode.
50933  # If so, the updated path is stored in $new_path.
50934
50935  input_path="$new_path"
50936  # Check if we need to convert this using DOS-style short mode. If the path
50937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50938  # take no chances and rewrite it.
50939  # Note: m4 eats our [], so we need to use [ and ] instead.
50940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50941  if test "x$has_forbidden_chars" != x; then
50942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50946      # Going to short mode and back again did indeed matter. Since short mode is
50947      # case insensitive, let's make it lowercase to improve readability.
50948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50949      # Now convert it back to Unix-style (cygpath)
50950      input_path=`$CYGPATH -u "$shortmode_path"`
50951      new_path="$input_path"
50952    fi
50953  fi
50954
50955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50956  if test "x$test_cygdrive_prefix" = x; then
50957    # As a simple fix, exclude /usr/bin since it's not a real path.
50958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50960      # a path prefixed by /cygdrive for fixpath to work.
50961      new_path="$CYGWIN_ROOT_PATH$input_path"
50962    fi
50963  fi
50964
50965
50966  if test "x$path" != "x$new_path"; then
50967    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50970  fi
50971
50972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50973
50974  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50975  has_colon=`$ECHO $path | $GREP ^.:`
50976  new_path="$path"
50977  if test "x$has_colon" = x; then
50978    # Not in mixed or Windows style, start by that.
50979    new_path=`cmd //c echo $path`
50980  fi
50981
50982
50983  input_path="$new_path"
50984  # Check if we need to convert this using DOS-style short mode. If the path
50985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50986  # take no chances and rewrite it.
50987  # Note: m4 eats our [], so we need to use [ and ] instead.
50988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50989  if test "x$has_forbidden_chars" != x; then
50990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50992  fi
50993
50994
50995  windows_path="$new_path"
50996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50997    unix_path=`$CYGPATH -u "$windows_path"`
50998    new_path="$unix_path"
50999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51001    new_path="$unix_path"
51002  fi
51003
51004  if test "x$path" != "x$new_path"; then
51005    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51008  fi
51009
51010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51012
51013    else
51014      # We're on a unix platform. Hooray! :)
51015      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51016      has_space=`$ECHO "$path" | $GREP " "`
51017      if test "x$has_space" != x; then
51018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51021      fi
51022
51023      # Use eval to expand a potential ~
51024      eval path="$path"
51025      if test ! -f "$path" && test ! -d "$path"; then
51026        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51027      fi
51028
51029      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51030    fi
51031  fi
51032
51033
51034  # Only process if variable expands to non-empty
51035
51036  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51038
51039  # Input might be given as Windows format, start by converting to
51040  # unix format.
51041  path="$POTENTIAL_FREETYPE_LIB_PATH"
51042  new_path=`$CYGPATH -u "$path"`
51043
51044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51047  # "foo.exe" is OK but "foo" is an error.
51048  #
51049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51050  # It is also a way to make sure we got the proper file name for the real test later on.
51051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51052  if test "x$test_shortpath" = x; then
51053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51055    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51056  fi
51057
51058  # Call helper function which possibly converts this using DOS-style short mode.
51059  # If so, the updated path is stored in $new_path.
51060
51061  input_path="$new_path"
51062  # Check if we need to convert this using DOS-style short mode. If the path
51063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51064  # take no chances and rewrite it.
51065  # Note: m4 eats our [], so we need to use [ and ] instead.
51066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51067  if test "x$has_forbidden_chars" != x; then
51068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51072      # Going to short mode and back again did indeed matter. Since short mode is
51073      # case insensitive, let's make it lowercase to improve readability.
51074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51075      # Now convert it back to Unix-style (cygpath)
51076      input_path=`$CYGPATH -u "$shortmode_path"`
51077      new_path="$input_path"
51078    fi
51079  fi
51080
51081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51082  if test "x$test_cygdrive_prefix" = x; then
51083    # As a simple fix, exclude /usr/bin since it's not a real path.
51084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51086      # a path prefixed by /cygdrive for fixpath to work.
51087      new_path="$CYGWIN_ROOT_PATH$input_path"
51088    fi
51089  fi
51090
51091
51092  if test "x$path" != "x$new_path"; then
51093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51096  fi
51097
51098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51099
51100  path="$POTENTIAL_FREETYPE_LIB_PATH"
51101  has_colon=`$ECHO $path | $GREP ^.:`
51102  new_path="$path"
51103  if test "x$has_colon" = x; then
51104    # Not in mixed or Windows style, start by that.
51105    new_path=`cmd //c echo $path`
51106  fi
51107
51108
51109  input_path="$new_path"
51110  # Check if we need to convert this using DOS-style short mode. If the path
51111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51112  # take no chances and rewrite it.
51113  # Note: m4 eats our [], so we need to use [ and ] instead.
51114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51115  if test "x$has_forbidden_chars" != x; then
51116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51118  fi
51119
51120
51121  windows_path="$new_path"
51122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51123    unix_path=`$CYGPATH -u "$windows_path"`
51124    new_path="$unix_path"
51125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51127    new_path="$unix_path"
51128  fi
51129
51130  if test "x$path" != "x$new_path"; then
51131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51134  fi
51135
51136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51138
51139    else
51140      # We're on a unix platform. Hooray! :)
51141      path="$POTENTIAL_FREETYPE_LIB_PATH"
51142      has_space=`$ECHO "$path" | $GREP " "`
51143      if test "x$has_space" != x; then
51144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51145$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51147      fi
51148
51149      # Use eval to expand a potential ~
51150      eval path="$path"
51151      if test ! -f "$path" && test ! -d "$path"; then
51152        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51153      fi
51154
51155      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51156    fi
51157  fi
51158
51159
51160    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51162$as_echo_n "checking for freetype includes... " >&6; }
51163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51164$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51165    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51167$as_echo_n "checking for freetype libraries... " >&6; }
51168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51169$as_echo "$FREETYPE_LIB_PATH" >&6; }
51170  fi
51171
51172              if test "x$FOUND_FREETYPE" != xyes; then
51173
51174  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51175  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
51176  METHOD="well-known location"
51177
51178  # Let's start with an optimistic view of the world :-)
51179  FOUND_FREETYPE=yes
51180
51181  # First look for the canonical freetype main include file ft2build.h.
51182  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51183    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51184    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51185    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51186      # Fail.
51187      FOUND_FREETYPE=no
51188    fi
51189  fi
51190
51191  if test "x$FOUND_FREETYPE" = xyes; then
51192    # Include file found, let's continue the sanity check.
51193    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51194$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51195
51196    # Reset to default value
51197    FREETYPE_BASE_NAME=freetype
51198    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51199    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51200      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51201          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51202        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51203        # for the .6 version explicitly.
51204        FREETYPE_BASE_NAME=freetype.6
51205        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51206        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51207$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51208      else
51209        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51210$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51211        FOUND_FREETYPE=no
51212      fi
51213    else
51214      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51215        # On Windows, we will need both .lib and .dll file.
51216        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51217          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51218$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51219          FOUND_FREETYPE=no
51220        fi
51221      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51222          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51223        # Found lib in isa dir, use that instead.
51224        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51225        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51226$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51227      fi
51228    fi
51229  fi
51230
51231  if test "x$FOUND_FREETYPE" = xyes; then
51232
51233  # Only process if variable expands to non-empty
51234
51235  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51237
51238  # Input might be given as Windows format, start by converting to
51239  # unix format.
51240  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51241  new_path=`$CYGPATH -u "$path"`
51242
51243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51246  # "foo.exe" is OK but "foo" is an error.
51247  #
51248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51249  # It is also a way to make sure we got the proper file name for the real test later on.
51250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51251  if test "x$test_shortpath" = x; then
51252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51254    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51255  fi
51256
51257  # Call helper function which possibly converts this using DOS-style short mode.
51258  # If so, the updated path is stored in $new_path.
51259
51260  input_path="$new_path"
51261  # Check if we need to convert this using DOS-style short mode. If the path
51262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51263  # take no chances and rewrite it.
51264  # Note: m4 eats our [], so we need to use [ and ] instead.
51265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51266  if test "x$has_forbidden_chars" != x; then
51267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51271      # Going to short mode and back again did indeed matter. Since short mode is
51272      # case insensitive, let's make it lowercase to improve readability.
51273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51274      # Now convert it back to Unix-style (cygpath)
51275      input_path=`$CYGPATH -u "$shortmode_path"`
51276      new_path="$input_path"
51277    fi
51278  fi
51279
51280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51281  if test "x$test_cygdrive_prefix" = x; then
51282    # As a simple fix, exclude /usr/bin since it's not a real path.
51283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51285      # a path prefixed by /cygdrive for fixpath to work.
51286      new_path="$CYGWIN_ROOT_PATH$input_path"
51287    fi
51288  fi
51289
51290
51291  if test "x$path" != "x$new_path"; then
51292    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51295  fi
51296
51297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51298
51299  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51300  has_colon=`$ECHO $path | $GREP ^.:`
51301  new_path="$path"
51302  if test "x$has_colon" = x; then
51303    # Not in mixed or Windows style, start by that.
51304    new_path=`cmd //c echo $path`
51305  fi
51306
51307
51308  input_path="$new_path"
51309  # Check if we need to convert this using DOS-style short mode. If the path
51310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51311  # take no chances and rewrite it.
51312  # Note: m4 eats our [], so we need to use [ and ] instead.
51313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51314  if test "x$has_forbidden_chars" != x; then
51315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51317  fi
51318
51319
51320  windows_path="$new_path"
51321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51322    unix_path=`$CYGPATH -u "$windows_path"`
51323    new_path="$unix_path"
51324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51326    new_path="$unix_path"
51327  fi
51328
51329  if test "x$path" != "x$new_path"; then
51330    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51333  fi
51334
51335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51337
51338    else
51339      # We're on a unix platform. Hooray! :)
51340      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51341      has_space=`$ECHO "$path" | $GREP " "`
51342      if test "x$has_space" != x; then
51343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51346      fi
51347
51348      # Use eval to expand a potential ~
51349      eval path="$path"
51350      if test ! -f "$path" && test ! -d "$path"; then
51351        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51352      fi
51353
51354      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51355    fi
51356  fi
51357
51358
51359  # Only process if variable expands to non-empty
51360
51361  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51363
51364  # Input might be given as Windows format, start by converting to
51365  # unix format.
51366  path="$POTENTIAL_FREETYPE_LIB_PATH"
51367  new_path=`$CYGPATH -u "$path"`
51368
51369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51372  # "foo.exe" is OK but "foo" is an error.
51373  #
51374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51375  # It is also a way to make sure we got the proper file name for the real test later on.
51376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51377  if test "x$test_shortpath" = x; then
51378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51380    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51381  fi
51382
51383  # Call helper function which possibly converts this using DOS-style short mode.
51384  # If so, the updated path is stored in $new_path.
51385
51386  input_path="$new_path"
51387  # Check if we need to convert this using DOS-style short mode. If the path
51388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51389  # take no chances and rewrite it.
51390  # Note: m4 eats our [], so we need to use [ and ] instead.
51391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51392  if test "x$has_forbidden_chars" != x; then
51393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51397      # Going to short mode and back again did indeed matter. Since short mode is
51398      # case insensitive, let's make it lowercase to improve readability.
51399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51400      # Now convert it back to Unix-style (cygpath)
51401      input_path=`$CYGPATH -u "$shortmode_path"`
51402      new_path="$input_path"
51403    fi
51404  fi
51405
51406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51407  if test "x$test_cygdrive_prefix" = x; then
51408    # As a simple fix, exclude /usr/bin since it's not a real path.
51409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51411      # a path prefixed by /cygdrive for fixpath to work.
51412      new_path="$CYGWIN_ROOT_PATH$input_path"
51413    fi
51414  fi
51415
51416
51417  if test "x$path" != "x$new_path"; then
51418    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51421  fi
51422
51423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51424
51425  path="$POTENTIAL_FREETYPE_LIB_PATH"
51426  has_colon=`$ECHO $path | $GREP ^.:`
51427  new_path="$path"
51428  if test "x$has_colon" = x; then
51429    # Not in mixed or Windows style, start by that.
51430    new_path=`cmd //c echo $path`
51431  fi
51432
51433
51434  input_path="$new_path"
51435  # Check if we need to convert this using DOS-style short mode. If the path
51436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51437  # take no chances and rewrite it.
51438  # Note: m4 eats our [], so we need to use [ and ] instead.
51439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51440  if test "x$has_forbidden_chars" != x; then
51441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51443  fi
51444
51445
51446  windows_path="$new_path"
51447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51448    unix_path=`$CYGPATH -u "$windows_path"`
51449    new_path="$unix_path"
51450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51452    new_path="$unix_path"
51453  fi
51454
51455  if test "x$path" != "x$new_path"; then
51456    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51459  fi
51460
51461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51463
51464    else
51465      # We're on a unix platform. Hooray! :)
51466      path="$POTENTIAL_FREETYPE_LIB_PATH"
51467      has_space=`$ECHO "$path" | $GREP " "`
51468      if test "x$has_space" != x; then
51469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51472      fi
51473
51474      # Use eval to expand a potential ~
51475      eval path="$path"
51476      if test ! -f "$path" && test ! -d "$path"; then
51477        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51478      fi
51479
51480      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51481    fi
51482  fi
51483
51484
51485    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51487$as_echo_n "checking for freetype includes... " >&6; }
51488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51489$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51490    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51492$as_echo_n "checking for freetype libraries... " >&6; }
51493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51494$as_echo "$FREETYPE_LIB_PATH" >&6; }
51495  fi
51496
51497              fi
51498            fi
51499          fi
51500        fi
51501      fi # end check in well-known locations
51502
51503      if test "x$FOUND_FREETYPE" != xyes; then
51504
51505  # Print a helpful message on how to acquire the necessary build dependency.
51506  # freetype is the help tag: freetype, cups, alsa etc
51507  MISSING_DEPENDENCY=freetype
51508
51509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51510    cygwin_help $MISSING_DEPENDENCY
51511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51512    msys_help $MISSING_DEPENDENCY
51513  else
51514    PKGHANDLER_COMMAND=
51515
51516    case $PKGHANDLER in
51517      apt-get)
51518        apt_help     $MISSING_DEPENDENCY ;;
51519      yum)
51520        yum_help     $MISSING_DEPENDENCY ;;
51521      port)
51522        port_help    $MISSING_DEPENDENCY ;;
51523      pkgutil)
51524        pkgutil_help $MISSING_DEPENDENCY ;;
51525      pkgadd)
51526        pkgadd_help  $MISSING_DEPENDENCY ;;
51527    esac
51528
51529    if test "x$PKGHANDLER_COMMAND" != x; then
51530      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51531    fi
51532  fi
51533
51534        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
51535      fi
51536    fi # end user specified settings
51537
51538    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
51539    if test "x$FREETYPE_CFLAGS" = x; then
51540
51541  # Only process if variable expands to non-empty
51542
51543  if test "x$FREETYPE_INCLUDE_PATH" != x; then
51544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51545
51546  # Input might be given as Windows format, start by converting to
51547  # unix format.
51548  path="$FREETYPE_INCLUDE_PATH"
51549  new_path=`$CYGPATH -u "$path"`
51550
51551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51554  # "foo.exe" is OK but "foo" is an error.
51555  #
51556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51557  # It is also a way to make sure we got the proper file name for the real test later on.
51558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51559  if test "x$test_shortpath" = x; then
51560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51561$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51562    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
51563  fi
51564
51565  # Call helper function which possibly converts this using DOS-style short mode.
51566  # If so, the updated path is stored in $new_path.
51567
51568  input_path="$new_path"
51569  # Check if we need to convert this using DOS-style short mode. If the path
51570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51571  # take no chances and rewrite it.
51572  # Note: m4 eats our [], so we need to use [ and ] instead.
51573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51574  if test "x$has_forbidden_chars" != x; then
51575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51579      # Going to short mode and back again did indeed matter. Since short mode is
51580      # case insensitive, let's make it lowercase to improve readability.
51581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51582      # Now convert it back to Unix-style (cygpath)
51583      input_path=`$CYGPATH -u "$shortmode_path"`
51584      new_path="$input_path"
51585    fi
51586  fi
51587
51588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51589  if test "x$test_cygdrive_prefix" = x; then
51590    # As a simple fix, exclude /usr/bin since it's not a real path.
51591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51593      # a path prefixed by /cygdrive for fixpath to work.
51594      new_path="$CYGWIN_ROOT_PATH$input_path"
51595    fi
51596  fi
51597
51598
51599  if test "x$path" != "x$new_path"; then
51600    FREETYPE_INCLUDE_PATH="$new_path"
51601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51602$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51603  fi
51604
51605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51606
51607  path="$FREETYPE_INCLUDE_PATH"
51608  has_colon=`$ECHO $path | $GREP ^.:`
51609  new_path="$path"
51610  if test "x$has_colon" = x; then
51611    # Not in mixed or Windows style, start by that.
51612    new_path=`cmd //c echo $path`
51613  fi
51614
51615
51616  input_path="$new_path"
51617  # Check if we need to convert this using DOS-style short mode. If the path
51618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51619  # take no chances and rewrite it.
51620  # Note: m4 eats our [], so we need to use [ and ] instead.
51621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51622  if test "x$has_forbidden_chars" != x; then
51623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51625  fi
51626
51627
51628  windows_path="$new_path"
51629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51630    unix_path=`$CYGPATH -u "$windows_path"`
51631    new_path="$unix_path"
51632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51634    new_path="$unix_path"
51635  fi
51636
51637  if test "x$path" != "x$new_path"; then
51638    FREETYPE_INCLUDE_PATH="$new_path"
51639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51640$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51641  fi
51642
51643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51645
51646    else
51647      # We're on a unix platform. Hooray! :)
51648      path="$FREETYPE_INCLUDE_PATH"
51649      has_space=`$ECHO "$path" | $GREP " "`
51650      if test "x$has_space" != x; then
51651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51652$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51654      fi
51655
51656      # Use eval to expand a potential ~
51657      eval path="$path"
51658      if test ! -f "$path" && test ! -d "$path"; then
51659        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51660      fi
51661
51662      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51663    fi
51664  fi
51665
51666      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
51667        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
51668      else
51669        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
51670      fi
51671    fi
51672
51673    if test "x$FREETYPE_LIBS" = x; then
51674
51675  # Only process if variable expands to non-empty
51676
51677  if test "x$FREETYPE_LIB_PATH" != x; then
51678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51679
51680  # Input might be given as Windows format, start by converting to
51681  # unix format.
51682  path="$FREETYPE_LIB_PATH"
51683  new_path=`$CYGPATH -u "$path"`
51684
51685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51688  # "foo.exe" is OK but "foo" is an error.
51689  #
51690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51691  # It is also a way to make sure we got the proper file name for the real test later on.
51692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51693  if test "x$test_shortpath" = x; then
51694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51695$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51696    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
51697  fi
51698
51699  # Call helper function which possibly converts this using DOS-style short mode.
51700  # If so, the updated path is stored in $new_path.
51701
51702  input_path="$new_path"
51703  # Check if we need to convert this using DOS-style short mode. If the path
51704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51705  # take no chances and rewrite it.
51706  # Note: m4 eats our [], so we need to use [ and ] instead.
51707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51708  if test "x$has_forbidden_chars" != x; then
51709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51713      # Going to short mode and back again did indeed matter. Since short mode is
51714      # case insensitive, let's make it lowercase to improve readability.
51715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51716      # Now convert it back to Unix-style (cygpath)
51717      input_path=`$CYGPATH -u "$shortmode_path"`
51718      new_path="$input_path"
51719    fi
51720  fi
51721
51722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51723  if test "x$test_cygdrive_prefix" = x; then
51724    # As a simple fix, exclude /usr/bin since it's not a real path.
51725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51727      # a path prefixed by /cygdrive for fixpath to work.
51728      new_path="$CYGWIN_ROOT_PATH$input_path"
51729    fi
51730  fi
51731
51732
51733  if test "x$path" != "x$new_path"; then
51734    FREETYPE_LIB_PATH="$new_path"
51735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51736$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51737  fi
51738
51739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51740
51741  path="$FREETYPE_LIB_PATH"
51742  has_colon=`$ECHO $path | $GREP ^.:`
51743  new_path="$path"
51744  if test "x$has_colon" = x; then
51745    # Not in mixed or Windows style, start by that.
51746    new_path=`cmd //c echo $path`
51747  fi
51748
51749
51750  input_path="$new_path"
51751  # Check if we need to convert this using DOS-style short mode. If the path
51752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51753  # take no chances and rewrite it.
51754  # Note: m4 eats our [], so we need to use [ and ] instead.
51755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51756  if test "x$has_forbidden_chars" != x; then
51757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51759  fi
51760
51761
51762  windows_path="$new_path"
51763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51764    unix_path=`$CYGPATH -u "$windows_path"`
51765    new_path="$unix_path"
51766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51768    new_path="$unix_path"
51769  fi
51770
51771  if test "x$path" != "x$new_path"; then
51772    FREETYPE_LIB_PATH="$new_path"
51773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
51774$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51775  fi
51776
51777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51779
51780    else
51781      # We're on a unix platform. Hooray! :)
51782      path="$FREETYPE_LIB_PATH"
51783      has_space=`$ECHO "$path" | $GREP " "`
51784      if test "x$has_space" != x; then
51785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51786$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51788      fi
51789
51790      # Use eval to expand a potential ~
51791      eval path="$path"
51792      if test ! -f "$path" && test ! -d "$path"; then
51793        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51794      fi
51795
51796      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51797    fi
51798  fi
51799
51800      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51801        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
51802      else
51803        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
51804      fi
51805    fi
51806
51807    # Try to compile it
51808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
51809$as_echo_n "checking if we can compile and link with freetype... " >&6; }
51810    ac_ext=cpp
51811ac_cpp='$CXXCPP $CPPFLAGS'
51812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51815
51816    PREV_CXXCFLAGS="$CXXFLAGS"
51817    PREV_LIBS="$LIBS"
51818    PREV_CXX="$CXX"
51819    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
51820    LIBS="$LIBS $FREETYPE_LIBS"
51821    CXX="$FIXPATH $CXX"
51822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51823/* end confdefs.h.  */
51824
51825          #include<ft2build.h>
51826          #include FT_FREETYPE_H
51827          int main () {
51828            FT_Init_FreeType(NULL);
51829            return 0;
51830          }
51831
51832_ACEOF
51833if ac_fn_cxx_try_link "$LINENO"; then :
51834
51835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51836$as_echo "yes" >&6; }
51837
51838else
51839
51840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51841$as_echo "no" >&6; }
51842          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
51843$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
51844          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
51845$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
51846
51847
51848  # Print a helpful message on how to acquire the necessary build dependency.
51849  # freetype is the help tag: freetype, cups, alsa etc
51850  MISSING_DEPENDENCY=freetype
51851
51852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51853    cygwin_help $MISSING_DEPENDENCY
51854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51855    msys_help $MISSING_DEPENDENCY
51856  else
51857    PKGHANDLER_COMMAND=
51858
51859    case $PKGHANDLER in
51860      apt-get)
51861        apt_help     $MISSING_DEPENDENCY ;;
51862      yum)
51863        yum_help     $MISSING_DEPENDENCY ;;
51864      port)
51865        port_help    $MISSING_DEPENDENCY ;;
51866      pkgutil)
51867        pkgutil_help $MISSING_DEPENDENCY ;;
51868      pkgadd)
51869        pkgadd_help  $MISSING_DEPENDENCY ;;
51870    esac
51871
51872    if test "x$PKGHANDLER_COMMAND" != x; then
51873      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51874    fi
51875  fi
51876
51877
51878          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
51879
51880
51881fi
51882rm -f core conftest.err conftest.$ac_objext \
51883    conftest$ac_exeext conftest.$ac_ext
51884    CXXCFLAGS="$PREV_CXXFLAGS"
51885    LIBS="$PREV_LIBS"
51886    CXX="$PREV_CXX"
51887    ac_ext=cpp
51888ac_cpp='$CXXCPP $CPPFLAGS'
51889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51892
51893
51894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
51895$as_echo_n "checking if we should bundle freetype... " >&6; }
51896    if test "x$BUNDLE_FREETYPE" = xyes; then
51897      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
51898    fi
51899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
51900$as_echo "$BUNDLE_FREETYPE" >&6; }
51901
51902  fi # end freetype needed
51903
51904
51905
51906
51907
51908
51909
51910# Check whether --with-alsa was given.
51911if test "${with_alsa+set}" = set; then :
51912  withval=$with_alsa;
51913fi
51914
51915
51916# Check whether --with-alsa-include was given.
51917if test "${with_alsa_include+set}" = set; then :
51918  withval=$with_alsa_include;
51919fi
51920
51921
51922# Check whether --with-alsa-lib was given.
51923if test "${with_alsa_lib+set}" = set; then :
51924  withval=$with_alsa_lib;
51925fi
51926
51927
51928  if test "x$NEEDS_LIB_ALSA" = xfalse; then
51929    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
51930        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
51931        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
51932      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
51933$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
51934    fi
51935    ALSA_CFLAGS=
51936    ALSA_LIBS=
51937  else
51938    ALSA_FOUND=no
51939
51940    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
51941      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
51942    fi
51943
51944    if test "x${with_alsa}" != x; then
51945      ALSA_LIBS="-L${with_alsa}/lib -lasound"
51946      ALSA_CFLAGS="-I${with_alsa}/include"
51947      ALSA_FOUND=yes
51948    fi
51949    if test "x${with_alsa_include}" != x; then
51950      ALSA_CFLAGS="-I${with_alsa_include}"
51951      ALSA_FOUND=yes
51952    fi
51953    if test "x${with_alsa_lib}" != x; then
51954      ALSA_LIBS="-L${with_alsa_lib} -lasound"
51955      ALSA_FOUND=yes
51956    fi
51957    # Do not try pkg-config if we have a sysroot set.
51958    if test "x$SYSROOT" = x; then
51959      if test "x$ALSA_FOUND" = xno; then
51960
51961pkg_failed=no
51962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
51963$as_echo_n "checking for ALSA... " >&6; }
51964
51965if test -n "$ALSA_CFLAGS"; then
51966    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
51967 elif test -n "$PKG_CONFIG"; then
51968    if test -n "$PKG_CONFIG" && \
51969    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51970  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51971  ac_status=$?
51972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51973  test $ac_status = 0; }; then
51974  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
51975else
51976  pkg_failed=yes
51977fi
51978 else
51979    pkg_failed=untried
51980fi
51981if test -n "$ALSA_LIBS"; then
51982    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
51983 elif test -n "$PKG_CONFIG"; then
51984    if test -n "$PKG_CONFIG" && \
51985    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
51986  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
51987  ac_status=$?
51988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51989  test $ac_status = 0; }; then
51990  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
51991else
51992  pkg_failed=yes
51993fi
51994 else
51995    pkg_failed=untried
51996fi
51997
51998
51999
52000if test $pkg_failed = yes; then
52001
52002if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52003        _pkg_short_errors_supported=yes
52004else
52005        _pkg_short_errors_supported=no
52006fi
52007        if test $_pkg_short_errors_supported = yes; then
52008	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
52009        else
52010	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
52011        fi
52012	# Put the nasty error message in config.log where it belongs
52013	echo "$ALSA_PKG_ERRORS" >&5
52014
52015	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52016$as_echo "no" >&6; }
52017                ALSA_FOUND=no
52018elif test $pkg_failed = untried; then
52019	ALSA_FOUND=no
52020else
52021	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
52022	ALSA_LIBS=$pkg_cv_ALSA_LIBS
52023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52024$as_echo "yes" >&6; }
52025	ALSA_FOUND=yes
52026fi
52027      fi
52028    fi
52029    if test "x$ALSA_FOUND" = xno; then
52030      for ac_header in alsa/asoundlib.h
52031do :
52032  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
52033if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
52034  cat >>confdefs.h <<_ACEOF
52035#define HAVE_ALSA_ASOUNDLIB_H 1
52036_ACEOF
52037
52038            ALSA_FOUND=yes
52039            ALSA_CFLAGS=-Iignoreme
52040            ALSA_LIBS=-lasound
52041            DEFAULT_ALSA=yes
52042
52043else
52044  ALSA_FOUND=no
52045
52046fi
52047
52048done
52049
52050    fi
52051    if test "x$ALSA_FOUND" = xno; then
52052
52053  # Print a helpful message on how to acquire the necessary build dependency.
52054  # alsa is the help tag: freetype, cups, alsa etc
52055  MISSING_DEPENDENCY=alsa
52056
52057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52058    cygwin_help $MISSING_DEPENDENCY
52059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52060    msys_help $MISSING_DEPENDENCY
52061  else
52062    PKGHANDLER_COMMAND=
52063
52064    case $PKGHANDLER in
52065      apt-get)
52066        apt_help     $MISSING_DEPENDENCY ;;
52067      yum)
52068        yum_help     $MISSING_DEPENDENCY ;;
52069      port)
52070        port_help    $MISSING_DEPENDENCY ;;
52071      pkgutil)
52072        pkgutil_help $MISSING_DEPENDENCY ;;
52073      pkgadd)
52074        pkgadd_help  $MISSING_DEPENDENCY ;;
52075    esac
52076
52077    if test "x$PKGHANDLER_COMMAND" != x; then
52078      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52079    fi
52080  fi
52081
52082      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
52083    fi
52084  fi
52085
52086
52087
52088
52089
52090
52091# Check whether --with-libffi was given.
52092if test "${with_libffi+set}" = set; then :
52093  withval=$with_libffi;
52094fi
52095
52096
52097# Check whether --with-libffi-include was given.
52098if test "${with_libffi_include+set}" = set; then :
52099  withval=$with_libffi_include;
52100fi
52101
52102
52103# Check whether --with-libffi-lib was given.
52104if test "${with_libffi_lib+set}" = set; then :
52105  withval=$with_libffi_lib;
52106fi
52107
52108
52109  if test "x$NEEDS_LIB_FFI" = xfalse; then
52110    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
52111        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
52112        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
52113      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
52114$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
52115    fi
52116    LIBFFI_CFLAGS=
52117    LIBFFI_LIBS=
52118  else
52119    LIBFFI_FOUND=no
52120
52121    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
52122      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
52123    fi
52124
52125    if test "x${with_libffi}" != x; then
52126      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
52127      LIBFFI_CFLAGS="-I${with_libffi}/include"
52128      LIBFFI_FOUND=yes
52129    fi
52130    if test "x${with_libffi_include}" != x; then
52131      LIBFFI_CFLAGS="-I${with_libffi_include}"
52132      LIBFFI_FOUND=yes
52133    fi
52134    if test "x${with_libffi_lib}" != x; then
52135      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
52136      LIBFFI_FOUND=yes
52137    fi
52138    # Do not try pkg-config if we have a sysroot set.
52139    if test "x$SYSROOT" = x; then
52140      if test "x$LIBFFI_FOUND" = xno; then
52141        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
52142
52143pkg_failed=no
52144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
52145$as_echo_n "checking for LIBFFI... " >&6; }
52146
52147if test -n "$LIBFFI_CFLAGS"; then
52148    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
52149 elif test -n "$PKG_CONFIG"; then
52150    if test -n "$PKG_CONFIG" && \
52151    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
52152  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
52153  ac_status=$?
52154  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52155  test $ac_status = 0; }; then
52156  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
52157else
52158  pkg_failed=yes
52159fi
52160 else
52161    pkg_failed=untried
52162fi
52163if test -n "$LIBFFI_LIBS"; then
52164    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
52165 elif test -n "$PKG_CONFIG"; then
52166    if test -n "$PKG_CONFIG" && \
52167    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
52168  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
52169  ac_status=$?
52170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52171  test $ac_status = 0; }; then
52172  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
52173else
52174  pkg_failed=yes
52175fi
52176 else
52177    pkg_failed=untried
52178fi
52179
52180
52181
52182if test $pkg_failed = yes; then
52183
52184if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52185        _pkg_short_errors_supported=yes
52186else
52187        _pkg_short_errors_supported=no
52188fi
52189        if test $_pkg_short_errors_supported = yes; then
52190	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
52191        else
52192	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
52193        fi
52194	# Put the nasty error message in config.log where it belongs
52195	echo "$LIBFFI_PKG_ERRORS" >&5
52196
52197	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52198$as_echo "no" >&6; }
52199                LIBFFI_FOUND=no
52200elif test $pkg_failed = untried; then
52201	LIBFFI_FOUND=no
52202else
52203	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
52204	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
52205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52206$as_echo "yes" >&6; }
52207	LIBFFI_FOUND=yes
52208fi
52209      fi
52210    fi
52211    if test "x$LIBFFI_FOUND" = xno; then
52212      for ac_header in ffi.h
52213do :
52214  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
52215if test "x$ac_cv_header_ffi_h" = xyes; then :
52216  cat >>confdefs.h <<_ACEOF
52217#define HAVE_FFI_H 1
52218_ACEOF
52219
52220            LIBFFI_FOUND=yes
52221            LIBFFI_CFLAGS=
52222            LIBFFI_LIBS=-lffi
52223
52224else
52225  LIBFFI_FOUND=no
52226
52227fi
52228
52229done
52230
52231    fi
52232    if test "x$LIBFFI_FOUND" = xno; then
52233
52234  # Print a helpful message on how to acquire the necessary build dependency.
52235  # ffi is the help tag: freetype, cups, alsa etc
52236  MISSING_DEPENDENCY=ffi
52237
52238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52239    cygwin_help $MISSING_DEPENDENCY
52240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52241    msys_help $MISSING_DEPENDENCY
52242  else
52243    PKGHANDLER_COMMAND=
52244
52245    case $PKGHANDLER in
52246      apt-get)
52247        apt_help     $MISSING_DEPENDENCY ;;
52248      yum)
52249        yum_help     $MISSING_DEPENDENCY ;;
52250      port)
52251        port_help    $MISSING_DEPENDENCY ;;
52252      pkgutil)
52253        pkgutil_help $MISSING_DEPENDENCY ;;
52254      pkgadd)
52255        pkgadd_help  $MISSING_DEPENDENCY ;;
52256    esac
52257
52258    if test "x$PKGHANDLER_COMMAND" != x; then
52259      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52260    fi
52261  fi
52262
52263      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
52264    fi
52265
52266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
52267$as_echo_n "checking if libffi works... " >&6; }
52268    ac_ext=c
52269ac_cpp='$CPP $CPPFLAGS'
52270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52272ac_compiler_gnu=$ac_cv_c_compiler_gnu
52273
52274    OLD_CFLAGS="$CFLAGS"
52275    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
52276    OLD_LIBS="$LIBS"
52277    LIBS="$LIBS $LIBFFI_LIBS"
52278    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52279/* end confdefs.h.  */
52280#include <ffi.h>
52281int
52282main ()
52283{
52284
52285          ffi_call(NULL, NULL, NULL, NULL);
52286          return 0;
52287
52288  ;
52289  return 0;
52290}
52291_ACEOF
52292if ac_fn_c_try_link "$LINENO"; then :
52293  LIBFFI_WORKS=yes
52294else
52295  LIBFFI_WORKS=no
52296
52297fi
52298rm -f core conftest.err conftest.$ac_objext \
52299    conftest$ac_exeext conftest.$ac_ext
52300    CFLAGS="$OLD_CFLAGS"
52301    LIBS="$OLD_LIBS"
52302    ac_ext=cpp
52303ac_cpp='$CXXCPP $CPPFLAGS'
52304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52307
52308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
52309$as_echo "$LIBFFI_WORKS" >&6; }
52310
52311    if test "x$LIBFFI_WORKS" = xno; then
52312
52313  # Print a helpful message on how to acquire the necessary build dependency.
52314  # ffi is the help tag: freetype, cups, alsa etc
52315  MISSING_DEPENDENCY=ffi
52316
52317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52318    cygwin_help $MISSING_DEPENDENCY
52319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52320    msys_help $MISSING_DEPENDENCY
52321  else
52322    PKGHANDLER_COMMAND=
52323
52324    case $PKGHANDLER in
52325      apt-get)
52326        apt_help     $MISSING_DEPENDENCY ;;
52327      yum)
52328        yum_help     $MISSING_DEPENDENCY ;;
52329      port)
52330        port_help    $MISSING_DEPENDENCY ;;
52331      pkgutil)
52332        pkgutil_help $MISSING_DEPENDENCY ;;
52333      pkgadd)
52334        pkgadd_help  $MISSING_DEPENDENCY ;;
52335    esac
52336
52337    if test "x$PKGHANDLER_COMMAND" != x; then
52338      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52339    fi
52340  fi
52341
52342      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
52343    fi
52344  fi
52345
52346
52347
52348
52349
52350  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
52351    # Extract the first word of "llvm-config", so it can be a program name with args.
52352set dummy llvm-config; ac_word=$2
52353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52354$as_echo_n "checking for $ac_word... " >&6; }
52355if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
52356  $as_echo_n "(cached) " >&6
52357else
52358  if test -n "$LLVM_CONFIG"; then
52359  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
52360else
52361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52362for as_dir in $PATH
52363do
52364  IFS=$as_save_IFS
52365  test -z "$as_dir" && as_dir=.
52366    for ac_exec_ext in '' $ac_executable_extensions; do
52367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52368    ac_cv_prog_LLVM_CONFIG="llvm-config"
52369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52370    break 2
52371  fi
52372done
52373  done
52374IFS=$as_save_IFS
52375
52376fi
52377fi
52378LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
52379if test -n "$LLVM_CONFIG"; then
52380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
52381$as_echo "$LLVM_CONFIG" >&6; }
52382else
52383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52384$as_echo "no" >&6; }
52385fi
52386
52387
52388
52389    if test "x$LLVM_CONFIG" != xllvm-config; then
52390      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
52391    fi
52392
52393    llvm_components="jit mcjit engine nativecodegen native"
52394    unset LLVM_CFLAGS
52395    for flag in $("$LLVM_CONFIG" --cxxflags); do
52396      if echo "${flag}" | grep -q '^-[ID]'; then
52397        if test "${flag}" != "-D_DEBUG" ; then
52398          if test "${LLVM_CFLAGS}" != "" ; then
52399            LLVM_CFLAGS="${LLVM_CFLAGS} "
52400          fi
52401          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
52402        fi
52403      fi
52404    done
52405    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
52406    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
52407
52408    unset LLVM_LDFLAGS
52409    for flag in $("${LLVM_CONFIG}" --ldflags); do
52410      if echo "${flag}" | grep -q '^-L'; then
52411        if test "${LLVM_LDFLAGS}" != ""; then
52412          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
52413        fi
52414        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
52415      fi
52416    done
52417
52418    unset LLVM_LIBS
52419    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
52420      if echo "${flag}" | grep -q '^-l'; then
52421        if test "${LLVM_LIBS}" != ""; then
52422          LLVM_LIBS="${LLVM_LIBS} "
52423        fi
52424        LLVM_LIBS="${LLVM_LIBS}${flag}"
52425      fi
52426    done
52427
52428
52429
52430
52431  fi
52432
52433
52434
52435# Check whether --with-libjpeg was given.
52436if test "${with_libjpeg+set}" = set; then :
52437  withval=$with_libjpeg;
52438fi
52439
52440
52441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
52442$as_echo_n "checking for which libjpeg to use... " >&6; }
52443  # default is bundled
52444  DEFAULT_LIBJPEG=bundled
52445  # if user didn't specify, use DEFAULT_LIBJPEG
52446  if test "x${with_libjpeg}" = "x"; then
52447    with_libjpeg=${DEFAULT_LIBJPEG}
52448  fi
52449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
52450$as_echo "${with_libjpeg}" >&6; }
52451
52452  if test "x${with_libjpeg}" = "xbundled"; then
52453    USE_EXTERNAL_LIBJPEG=false
52454  elif test "x${with_libjpeg}" = "xsystem"; then
52455    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
52456if test "x$ac_cv_header_jpeglib_h" = xyes; then :
52457
52458else
52459   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
52460fi
52461
52462
52463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
52464$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
52465if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
52466  $as_echo_n "(cached) " >&6
52467else
52468  ac_check_lib_save_LIBS=$LIBS
52469LIBS="-ljpeg  $LIBS"
52470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52471/* end confdefs.h.  */
52472
52473/* Override any GCC internal prototype to avoid an error.
52474   Use char because int might match the return type of a GCC
52475   builtin and then its argument prototype would still apply.  */
52476#ifdef __cplusplus
52477extern "C"
52478#endif
52479char jpeg_CreateDecompress ();
52480int
52481main ()
52482{
52483return jpeg_CreateDecompress ();
52484  ;
52485  return 0;
52486}
52487_ACEOF
52488if ac_fn_cxx_try_link "$LINENO"; then :
52489  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
52490else
52491  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
52492fi
52493rm -f core conftest.err conftest.$ac_objext \
52494    conftest$ac_exeext conftest.$ac_ext
52495LIBS=$ac_check_lib_save_LIBS
52496fi
52497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
52498$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
52499if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
52500  cat >>confdefs.h <<_ACEOF
52501#define HAVE_LIBJPEG 1
52502_ACEOF
52503
52504  LIBS="-ljpeg $LIBS"
52505
52506else
52507   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
52508fi
52509
52510
52511    USE_EXTERNAL_LIBJPEG=true
52512  else
52513    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
52514  fi
52515
52516
52517
52518
52519
52520# Check whether --with-giflib was given.
52521if test "${with_giflib+set}" = set; then :
52522  withval=$with_giflib;
52523fi
52524
52525
52526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
52527$as_echo_n "checking for which giflib to use... " >&6; }
52528  # default is bundled
52529  DEFAULT_GIFLIB=bundled
52530  # if user didn't specify, use DEFAULT_GIFLIB
52531  if test "x${with_giflib}" = "x"; then
52532    with_giflib=${DEFAULT_GIFLIB}
52533  fi
52534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
52535$as_echo "${with_giflib}" >&6; }
52536
52537  if test "x${with_giflib}" = "xbundled"; then
52538    USE_EXTERNAL_LIBGIF=false
52539  elif test "x${with_giflib}" = "xsystem"; then
52540    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
52541if test "x$ac_cv_header_gif_lib_h" = xyes; then :
52542
52543else
52544   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
52545fi
52546
52547
52548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
52549$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
52550if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
52551  $as_echo_n "(cached) " >&6
52552else
52553  ac_check_lib_save_LIBS=$LIBS
52554LIBS="-lgif  $LIBS"
52555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52556/* end confdefs.h.  */
52557
52558/* Override any GCC internal prototype to avoid an error.
52559   Use char because int might match the return type of a GCC
52560   builtin and then its argument prototype would still apply.  */
52561#ifdef __cplusplus
52562extern "C"
52563#endif
52564char DGifGetCode ();
52565int
52566main ()
52567{
52568return DGifGetCode ();
52569  ;
52570  return 0;
52571}
52572_ACEOF
52573if ac_fn_cxx_try_link "$LINENO"; then :
52574  ac_cv_lib_gif_DGifGetCode=yes
52575else
52576  ac_cv_lib_gif_DGifGetCode=no
52577fi
52578rm -f core conftest.err conftest.$ac_objext \
52579    conftest$ac_exeext conftest.$ac_ext
52580LIBS=$ac_check_lib_save_LIBS
52581fi
52582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
52583$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
52584if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
52585  cat >>confdefs.h <<_ACEOF
52586#define HAVE_LIBGIF 1
52587_ACEOF
52588
52589  LIBS="-lgif $LIBS"
52590
52591else
52592   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
52593fi
52594
52595
52596    USE_EXTERNAL_LIBGIF=true
52597  else
52598    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
52599  fi
52600
52601
52602
52603
52604
52605# Check whether --with-libpng was given.
52606if test "${with_libpng+set}" = set; then :
52607  withval=$with_libpng;
52608fi
52609
52610
52611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
52612$as_echo_n "checking for which libpng to use... " >&6; }
52613
52614  # default is bundled
52615  DEFAULT_LIBPNG=bundled
52616  # if user didn't specify, use DEFAULT_LIBPNG
52617  if test "x${with_libpng}" = "x"; then
52618      with_libpng=${DEFAULT_LIBPNG}
52619  fi
52620
52621  if test "x${with_libpng}" = "xbundled"; then
52622      USE_EXTERNAL_LIBPNG=false
52623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52624$as_echo "bundled" >&6; }
52625  elif test "x${with_libpng}" = "xsystem"; then
52626
52627pkg_failed=no
52628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
52629$as_echo_n "checking for PNG... " >&6; }
52630
52631if test -n "$PNG_CFLAGS"; then
52632    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
52633 elif test -n "$PKG_CONFIG"; then
52634    if test -n "$PKG_CONFIG" && \
52635    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52636  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52637  ac_status=$?
52638  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52639  test $ac_status = 0; }; then
52640  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
52641else
52642  pkg_failed=yes
52643fi
52644 else
52645    pkg_failed=untried
52646fi
52647if test -n "$PNG_LIBS"; then
52648    pkg_cv_PNG_LIBS="$PNG_LIBS"
52649 elif test -n "$PKG_CONFIG"; then
52650    if test -n "$PKG_CONFIG" && \
52651    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
52652  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
52653  ac_status=$?
52654  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52655  test $ac_status = 0; }; then
52656  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
52657else
52658  pkg_failed=yes
52659fi
52660 else
52661    pkg_failed=untried
52662fi
52663
52664
52665
52666if test $pkg_failed = yes; then
52667
52668if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52669        _pkg_short_errors_supported=yes
52670else
52671        _pkg_short_errors_supported=no
52672fi
52673        if test $_pkg_short_errors_supported = yes; then
52674	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
52675        else
52676	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
52677        fi
52678	# Put the nasty error message in config.log where it belongs
52679	echo "$PNG_PKG_ERRORS" >&5
52680
52681	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52682$as_echo "no" >&6; }
52683                 LIBPNG_FOUND=no
52684elif test $pkg_failed = untried; then
52685	 LIBPNG_FOUND=no
52686else
52687	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
52688	PNG_LIBS=$pkg_cv_PNG_LIBS
52689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52690$as_echo "yes" >&6; }
52691	 LIBPNG_FOUND=yes
52692fi
52693      if test "x${LIBPNG_FOUND}" = "xyes"; then
52694          USE_EXTERNAL_LIBPNG=true
52695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52696$as_echo "system" >&6; }
52697      else
52698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52699$as_echo "system not found" >&6; }
52700          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
52701      fi
52702  else
52703      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
52704  fi
52705
52706
52707
52708
52709
52710# Check whether --with-zlib was given.
52711if test "${with_zlib+set}" = set; then :
52712  withval=$with_zlib;
52713fi
52714
52715
52716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
52717$as_echo_n "checking for compress in -lz... " >&6; }
52718if ${ac_cv_lib_z_compress+:} false; then :
52719  $as_echo_n "(cached) " >&6
52720else
52721  ac_check_lib_save_LIBS=$LIBS
52722LIBS="-lz  $LIBS"
52723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52724/* end confdefs.h.  */
52725
52726/* Override any GCC internal prototype to avoid an error.
52727   Use char because int might match the return type of a GCC
52728   builtin and then its argument prototype would still apply.  */
52729#ifdef __cplusplus
52730extern "C"
52731#endif
52732char compress ();
52733int
52734main ()
52735{
52736return compress ();
52737  ;
52738  return 0;
52739}
52740_ACEOF
52741if ac_fn_cxx_try_link "$LINENO"; then :
52742  ac_cv_lib_z_compress=yes
52743else
52744  ac_cv_lib_z_compress=no
52745fi
52746rm -f core conftest.err conftest.$ac_objext \
52747    conftest$ac_exeext conftest.$ac_ext
52748LIBS=$ac_check_lib_save_LIBS
52749fi
52750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
52751$as_echo "$ac_cv_lib_z_compress" >&6; }
52752if test "x$ac_cv_lib_z_compress" = xyes; then :
52753   ZLIB_FOUND=yes
52754else
52755   ZLIB_FOUND=no
52756fi
52757
52758
52759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
52760$as_echo_n "checking for which zlib to use... " >&6; }
52761
52762  DEFAULT_ZLIB=bundled
52763  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52764    # On macosx default is system...on others default is bundled
52765    DEFAULT_ZLIB=system
52766  fi
52767
52768  if test "x${ZLIB_FOUND}" != "xyes"; then
52769    # If we don't find any system...set default to bundled
52770    DEFAULT_ZLIB=bundled
52771  fi
52772
52773  # If user didn't specify, use DEFAULT_ZLIB
52774  if test "x${with_zlib}" = "x"; then
52775    with_zlib=${DEFAULT_ZLIB}
52776  fi
52777
52778  if test "x${with_zlib}" = "xbundled"; then
52779    USE_EXTERNAL_LIBZ=false
52780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52781$as_echo "bundled" >&6; }
52782  elif test "x${with_zlib}" = "xsystem"; then
52783    if test "x${ZLIB_FOUND}" = "xyes"; then
52784      USE_EXTERNAL_LIBZ=true
52785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52786$as_echo "system" >&6; }
52787    else
52788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
52789$as_echo "system not found" >&6; }
52790      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
52791    fi
52792  else
52793    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
52794  fi
52795
52796
52797
52798
52799
52800# Check whether --with-lcms was given.
52801if test "${with_lcms+set}" = set; then :
52802  withval=$with_lcms;
52803fi
52804
52805
52806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
52807$as_echo_n "checking for which lcms to use... " >&6; }
52808
52809  DEFAULT_LCMS=bundled
52810  # If user didn't specify, use DEFAULT_LCMS
52811  if test "x${with_lcms}" = "x"; then
52812      with_lcms=${DEFAULT_LCMS}
52813  fi
52814
52815  if test "x${with_lcms}" = "xbundled"; then
52816    USE_EXTERNAL_LCMS=false
52817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
52818$as_echo "bundled" >&6; }
52819  elif test "x${with_lcms}" = "xsystem"; then
52820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
52821$as_echo "system" >&6; }
52822
52823pkg_failed=no
52824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
52825$as_echo_n "checking for LCMS... " >&6; }
52826
52827if test -n "$LCMS_CFLAGS"; then
52828    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
52829 elif test -n "$PKG_CONFIG"; then
52830    if test -n "$PKG_CONFIG" && \
52831    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52832  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52833  ac_status=$?
52834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52835  test $ac_status = 0; }; then
52836  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
52837else
52838  pkg_failed=yes
52839fi
52840 else
52841    pkg_failed=untried
52842fi
52843if test -n "$LCMS_LIBS"; then
52844    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
52845 elif test -n "$PKG_CONFIG"; then
52846    if test -n "$PKG_CONFIG" && \
52847    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
52848  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
52849  ac_status=$?
52850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52851  test $ac_status = 0; }; then
52852  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
52853else
52854  pkg_failed=yes
52855fi
52856 else
52857    pkg_failed=untried
52858fi
52859
52860
52861
52862if test $pkg_failed = yes; then
52863
52864if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52865        _pkg_short_errors_supported=yes
52866else
52867        _pkg_short_errors_supported=no
52868fi
52869        if test $_pkg_short_errors_supported = yes; then
52870	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
52871        else
52872	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
52873        fi
52874	# Put the nasty error message in config.log where it belongs
52875	echo "$LCMS_PKG_ERRORS" >&5
52876
52877	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52878$as_echo "no" >&6; }
52879                LCMS_FOUND=no
52880elif test $pkg_failed = untried; then
52881	LCMS_FOUND=no
52882else
52883	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
52884	LCMS_LIBS=$pkg_cv_LCMS_LIBS
52885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52886$as_echo "yes" >&6; }
52887	LCMS_FOUND=yes
52888fi
52889    if test "x${LCMS_FOUND}" = "xyes"; then
52890      USE_EXTERNAL_LCMS=true
52891    else
52892      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
52893    fi
52894  else
52895    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
52896  fi
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908  # Setup libm (the maths library)
52909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
52910$as_echo_n "checking for cos in -lm... " >&6; }
52911if ${ac_cv_lib_m_cos+:} false; then :
52912  $as_echo_n "(cached) " >&6
52913else
52914  ac_check_lib_save_LIBS=$LIBS
52915LIBS="-lm  $LIBS"
52916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52917/* end confdefs.h.  */
52918
52919/* Override any GCC internal prototype to avoid an error.
52920   Use char because int might match the return type of a GCC
52921   builtin and then its argument prototype would still apply.  */
52922#ifdef __cplusplus
52923extern "C"
52924#endif
52925char cos ();
52926int
52927main ()
52928{
52929return cos ();
52930  ;
52931  return 0;
52932}
52933_ACEOF
52934if ac_fn_cxx_try_link "$LINENO"; then :
52935  ac_cv_lib_m_cos=yes
52936else
52937  ac_cv_lib_m_cos=no
52938fi
52939rm -f core conftest.err conftest.$ac_objext \
52940    conftest$ac_exeext conftest.$ac_ext
52941LIBS=$ac_check_lib_save_LIBS
52942fi
52943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
52944$as_echo "$ac_cv_lib_m_cos" >&6; }
52945if test "x$ac_cv_lib_m_cos" = xyes; then :
52946  cat >>confdefs.h <<_ACEOF
52947#define HAVE_LIBM 1
52948_ACEOF
52949
52950  LIBS="-lm $LIBS"
52951
52952else
52953
52954      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
52955$as_echo "$as_me: Maths library was not found" >&6;}
52956
52957fi
52958
52959  LIBM=-lm
52960
52961
52962  # Setup libdl (for dynamic library loading)
52963  save_LIBS="$LIBS"
52964  LIBS=""
52965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
52966$as_echo_n "checking for dlopen in -ldl... " >&6; }
52967if ${ac_cv_lib_dl_dlopen+:} false; then :
52968  $as_echo_n "(cached) " >&6
52969else
52970  ac_check_lib_save_LIBS=$LIBS
52971LIBS="-ldl  $LIBS"
52972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52973/* end confdefs.h.  */
52974
52975/* Override any GCC internal prototype to avoid an error.
52976   Use char because int might match the return type of a GCC
52977   builtin and then its argument prototype would still apply.  */
52978#ifdef __cplusplus
52979extern "C"
52980#endif
52981char dlopen ();
52982int
52983main ()
52984{
52985return dlopen ();
52986  ;
52987  return 0;
52988}
52989_ACEOF
52990if ac_fn_cxx_try_link "$LINENO"; then :
52991  ac_cv_lib_dl_dlopen=yes
52992else
52993  ac_cv_lib_dl_dlopen=no
52994fi
52995rm -f core conftest.err conftest.$ac_objext \
52996    conftest$ac_exeext conftest.$ac_ext
52997LIBS=$ac_check_lib_save_LIBS
52998fi
52999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
53000$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
53001if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
53002  cat >>confdefs.h <<_ACEOF
53003#define HAVE_LIBDL 1
53004_ACEOF
53005
53006  LIBS="-ldl $LIBS"
53007
53008fi
53009
53010  LIBDL="$LIBS"
53011
53012  LIBS="$save_LIBS"
53013
53014  # Deprecated libraries, keep the flags for backwards compatibility
53015  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53016
53017
53018# Check whether --with-dxsdk was given.
53019if test "${with_dxsdk+set}" = set; then :
53020  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
53021$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
53022fi
53023
53024
53025
53026
53027# Check whether --with-dxsdk-lib was given.
53028if test "${with_dxsdk_lib+set}" = set; then :
53029  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
53030$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
53031fi
53032
53033
53034
53035
53036# Check whether --with-dxsdk-include was given.
53037if test "${with_dxsdk_include+set}" = set; then :
53038  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
53039$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
53040fi
53041
53042
53043  fi
53044
53045  # Control if libzip can use mmap. Available for purposes of overriding.
53046  LIBZIP_CAN_USE_MMAP=true
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061###############################################################################
53062#
53063# We need to do some final tweaking, when everything else is done.
53064#
53065###############################################################################
53066
53067
53068  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
53069
53070
53071  # The name of the Service Agent jar.
53072  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
53073  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53074    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
53075  fi
53076
53077
53078
53079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
53080$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
53081
53082    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
53083      ENABLE_INTREE_EC=yes
53084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53085$as_echo "yes" >&6; }
53086    else
53087      ENABLE_INTREE_EC=no
53088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53089$as_echo "no" >&6; }
53090    fi
53091
53092
53093
53094
53095###############################################################################
53096#
53097# Configure parts of the build that only affect the build performance,
53098# not the result.
53099#
53100###############################################################################
53101
53102
53103  # How many cores do we have on this build system?
53104
53105# Check whether --with-num-cores was given.
53106if test "${with_num_cores+set}" = set; then :
53107  withval=$with_num_cores;
53108fi
53109
53110  if test "x$with_num_cores" = x; then
53111    # The number of cores were not specified, try to probe them.
53112
53113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
53114$as_echo_n "checking for number of cores... " >&6; }
53115  NUM_CORES=1
53116  FOUND_CORES=no
53117
53118  if test -f /proc/cpuinfo; then
53119    # Looks like a Linux (or cygwin) system
53120    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
53121    FOUND_CORES=yes
53122  elif test -x /usr/sbin/psrinfo; then
53123    # Looks like a Solaris system
53124    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
53125    FOUND_CORES=yes
53126  elif test -x /usr/sbin/system_profiler; then
53127    # Looks like a MacOSX system
53128    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
53129    FOUND_CORES=yes
53130  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
53131    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
53132    FOUND_CORES=yes
53133  elif test -n "$NUMBER_OF_PROCESSORS"; then
53134    # On windows, look in the env
53135    NUM_CORES=$NUMBER_OF_PROCESSORS
53136    FOUND_CORES=yes
53137  fi
53138
53139  if test "x$FOUND_CORES" = xyes; then
53140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
53141$as_echo "$NUM_CORES" >&6; }
53142  else
53143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
53144$as_echo "could not detect number of cores, defaulting to 1" >&6; }
53145    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
53146$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
53147  fi
53148
53149  else
53150    NUM_CORES=$with_num_cores
53151  fi
53152
53153
53154
53155  # How much memory do we have on this build system?
53156
53157# Check whether --with-memory-size was given.
53158if test "${with_memory_size+set}" = set; then :
53159  withval=$with_memory_size;
53160fi
53161
53162  if test "x$with_memory_size" = x; then
53163    # The memory size was not specified, try to probe it.
53164
53165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
53166$as_echo_n "checking for memory size... " >&6; }
53167  # Default to 1024 MB
53168  MEMORY_SIZE=1024
53169  FOUND_MEM=no
53170
53171  if test -f /proc/meminfo; then
53172    # Looks like a Linux (or cygwin) system
53173    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
53174    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
53175    FOUND_MEM=yes
53176  elif test -x /usr/sbin/prtconf; then
53177    # Looks like a Solaris or AIX system
53178    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
53179    FOUND_MEM=yes
53180  elif test -x /usr/sbin/system_profiler; then
53181    # Looks like a MacOSX system
53182    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
53183    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
53184    FOUND_MEM=yes
53185  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53186    # Windows, but without cygwin
53187    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
53188    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
53189    FOUND_MEM=yes
53190  fi
53191
53192  if test "x$FOUND_MEM" = xyes; then
53193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
53194$as_echo "$MEMORY_SIZE MB" >&6; }
53195  else
53196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
53197$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
53198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
53199$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
53200  fi
53201
53202  else
53203    MEMORY_SIZE=$with_memory_size
53204  fi
53205
53206
53207
53208  # Provide a decent default number of parallel jobs for make depending on
53209  # number of cores, amount of memory and machine architecture.
53210
53211# Check whether --with-jobs was given.
53212if test "${with_jobs+set}" = set; then :
53213  withval=$with_jobs;
53214fi
53215
53216  if test "x$with_jobs" = x; then
53217    # Number of jobs was not specified, calculate.
53218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
53219$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
53220    # Approximate memory in GB.
53221    memory_gb=`expr $MEMORY_SIZE / 1024`
53222    # Pick the lowest of memory in gb and number of cores.
53223    if test "$memory_gb" -lt "$NUM_CORES"; then
53224      JOBS="$memory_gb"
53225    else
53226      JOBS="$NUM_CORES"
53227      # On bigger machines, leave some room for other processes to run
53228      if test "$JOBS" -gt "4"; then
53229        JOBS=`expr $JOBS '*' 90 / 100`
53230      fi
53231    fi
53232    # Cap number of jobs to 16
53233    if test "$JOBS" -gt "16"; then
53234      JOBS=16
53235    fi
53236    if test "$JOBS" -eq "0"; then
53237      JOBS=1
53238    fi
53239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
53240$as_echo "$JOBS" >&6; }
53241  else
53242    JOBS=$with_jobs
53243  fi
53244
53245
53246
53247# Setup arguments for the boot jdk (after cores and memory have been setup)
53248
53249  ##############################################################################
53250  #
53251  # Specify jvm options for anything that is run with the Boot JDK.
53252  # Not all JVM:s accept the same arguments on the command line.
53253  #
53254
53255# Check whether --with-boot-jdk-jvmargs was given.
53256if test "${with_boot_jdk_jvmargs+set}" = set; then :
53257  withval=$with_boot_jdk_jvmargs;
53258fi
53259
53260
53261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
53262$as_echo_n "checking flags for boot jdk java command ... " >&6; }
53263
53264  # Disable special log output when a debug build is used as Boot JDK...
53265
53266  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
53267  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
53268  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
53269  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53270  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53271  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53272    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
53273    JVM_ARG_OK=true
53274  else
53275    $ECHO "Arg failed:" >&5
53276    $ECHO "$OUTPUT" >&5
53277    JVM_ARG_OK=false
53278  fi
53279
53280
53281  # Apply user provided options.
53282
53283  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
53284  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
53285  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
53286  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53287  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53288  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53289    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
53290    JVM_ARG_OK=true
53291  else
53292    $ECHO "Arg failed:" >&5
53293    $ECHO "$OUTPUT" >&5
53294    JVM_ARG_OK=false
53295  fi
53296
53297
53298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
53299$as_echo "$boot_jdk_jvmargs" >&6; }
53300
53301  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
53302  JAVA_FLAGS=$boot_jdk_jvmargs
53303
53304
53305
53306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
53307$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
53308
53309  # Starting amount of heap memory.
53310
53311  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
53312  $ECHO "Command: $JAVA -Xms64M -version" >&5
53313  OUTPUT=`$JAVA -Xms64M -version 2>&1`
53314  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53315  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53316  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53317    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
53318    JVM_ARG_OK=true
53319  else
53320    $ECHO "Arg failed:" >&5
53321    $ECHO "$OUTPUT" >&5
53322    JVM_ARG_OK=false
53323  fi
53324
53325
53326  # Maximum amount of heap memory.
53327  # Maximum stack size.
53328  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
53329  if test "x$BOOT_JDK_BITS" = "x32"; then
53330    if test "$JVM_MAX_HEAP" -gt "1100"; then
53331      JVM_MAX_HEAP=1100
53332    elif test "$JVM_MAX_HEAP" -lt "512"; then
53333      JVM_MAX_HEAP=512
53334    fi
53335    STACK_SIZE=768
53336  else
53337    # Running a 64 bit JVM allows for and requires a bigger heap
53338    if test "$JVM_MAX_HEAP" -gt "1600"; then
53339      JVM_MAX_HEAP=1600
53340    elif test "$JVM_MAX_HEAP" -lt "512"; then
53341      JVM_MAX_HEAP=512
53342    fi
53343    STACK_SIZE=1536
53344  fi
53345
53346  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
53347  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
53348  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
53349  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53350  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53351  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53352    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
53353    JVM_ARG_OK=true
53354  else
53355    $ECHO "Arg failed:" >&5
53356    $ECHO "$OUTPUT" >&5
53357    JVM_ARG_OK=false
53358  fi
53359
53360
53361  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
53362  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
53363  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
53364  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53365  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53366  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53367    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
53368    JVM_ARG_OK=true
53369  else
53370    $ECHO "Arg failed:" >&5
53371    $ECHO "$OUTPUT" >&5
53372    JVM_ARG_OK=false
53373  fi
53374
53375
53376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
53377$as_echo "$boot_jdk_jvmargs_big" >&6; }
53378
53379  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
53380
53381
53382
53383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
53384$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
53385
53386  # Use serial gc for small short lived tools if possible
53387
53388  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
53389  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
53390  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
53391  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53392  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53393  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53394    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
53395    JVM_ARG_OK=true
53396  else
53397    $ECHO "Arg failed:" >&5
53398    $ECHO "$OUTPUT" >&5
53399    JVM_ARG_OK=false
53400  fi
53401
53402
53403  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
53404  $ECHO "Command: $JAVA -Xms32M -version" >&5
53405  OUTPUT=`$JAVA -Xms32M -version 2>&1`
53406  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53407  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53408  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53409    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
53410    JVM_ARG_OK=true
53411  else
53412    $ECHO "Arg failed:" >&5
53413    $ECHO "$OUTPUT" >&5
53414    JVM_ARG_OK=false
53415  fi
53416
53417
53418  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
53419  $ECHO "Command: $JAVA -Xmx512M -version" >&5
53420  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
53421  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53422  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53423  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53424    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
53425    JVM_ARG_OK=true
53426  else
53427    $ECHO "Arg failed:" >&5
53428    $ECHO "$OUTPUT" >&5
53429    JVM_ARG_OK=false
53430  fi
53431
53432
53433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
53434$as_echo "$boot_jdk_jvmargs_small" >&6; }
53435
53436  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
53437
53438
53439  JAVA_TOOL_FLAGS_SMALL=""
53440  for f in $JAVA_FLAGS_SMALL; do
53441    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
53442  done
53443
53444
53445
53446# Setup smart javac (after cores and memory have been setup)
53447
53448
53449# Check whether --with-sjavac-server-java was given.
53450if test "${with_sjavac_server_java+set}" = set; then :
53451  withval=$with_sjavac_server_java;
53452fi
53453
53454
53455  if test "x$with_sjavac_server_java" != x; then
53456    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
53457    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
53458    if test "x$FOUND_VERSION" = x; then
53459      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
53460    fi
53461  else
53462    SJAVAC_SERVER_JAVA="$JAVA"
53463  fi
53464
53465
53466  if test "$MEMORY_SIZE" -gt "3000"; then
53467
53468  $ECHO "Check if jvm arg is ok: -d64" >&5
53469  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
53470  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
53471  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53472  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53473  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53474    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
53475    JVM_ARG_OK=true
53476  else
53477    $ECHO "Arg failed:" >&5
53478    $ECHO "$OUTPUT" >&5
53479    JVM_ARG_OK=false
53480  fi
53481
53482    if test "$JVM_ARG_OK" = true; then
53483      JVM_64BIT=true
53484      JVM_ARG_OK=false
53485    fi
53486  fi
53487
53488  MX_VALUE=`expr $MEMORY_SIZE / 2`
53489  if test "$JVM_64BIT" = true; then
53490    # Set ms lower than mx since more than one instance of the server might
53491    # get launched at the same time before they figure out which instance won.
53492    MS_VALUE=512
53493    if test "$MX_VALUE" -gt "2048"; then
53494      MX_VALUE=2048
53495    fi
53496  else
53497    MS_VALUE=256
53498    if test "$MX_VALUE" -gt "1500"; then
53499      MX_VALUE=1500
53500    fi
53501  fi
53502  if test "$MX_VALUE" -lt "512"; then
53503    MX_VALUE=512
53504  fi
53505
53506  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53507  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53508  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53509  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53510  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53511  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53512    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53513    JVM_ARG_OK=true
53514  else
53515    $ECHO "Arg failed:" >&5
53516    $ECHO "$OUTPUT" >&5
53517    JVM_ARG_OK=false
53518  fi
53519
53520
53521
53522  # Check whether --enable-sjavac was given.
53523if test "${enable_sjavac+set}" = set; then :
53524  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53525else
53526  ENABLE_SJAVAC="no"
53527fi
53528
53529  if test "x$JVM_ARG_OK" = "xfalse"; then
53530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53531$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53532    ENABLE_SJAVAC="no"
53533  fi
53534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53535$as_echo_n "checking whether to use sjavac... " >&6; }
53536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53537$as_echo "$ENABLE_SJAVAC" >&6; }
53538
53539
53540  # Check whether --enable-javac-server was given.
53541if test "${enable_javac_server+set}" = set; then :
53542  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
53543else
53544  ENABLE_JAVAC_SERVER="no"
53545fi
53546
53547  if test "x$JVM_ARG_OK" = "xfalse"; then
53548    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
53549$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
53550    ENABLE_JAVAC_SERVER="no"
53551  fi
53552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
53553$as_echo_n "checking whether to use javac server... " >&6; }
53554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
53555$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
53556
53557
53558
53559# Can the C/C++ compiler use precompiled headers?
53560
53561
53562  ###############################################################################
53563  #
53564  # Can the C/C++ compiler use precompiled headers?
53565  #
53566  # Check whether --enable-precompiled-headers was given.
53567if test "${enable_precompiled_headers+set}" = set; then :
53568  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53569else
53570  ENABLE_PRECOMPH=yes
53571fi
53572
53573
53574  USE_PRECOMPILED_HEADER=1
53575  if test "x$ENABLE_PRECOMPH" = xno; then
53576    USE_PRECOMPILED_HEADER=0
53577  fi
53578
53579  if test "x$ENABLE_PRECOMPH" = xyes; then
53580    # Check that the compiler actually supports precomp headers.
53581    if test "x$TOOLCHAIN_TYPE" = xgcc; then
53582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53583$as_echo_n "checking that precompiled headers work... " >&6; }
53584      echo "int alfa();" > conftest.h
53585      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53586      if test ! -f conftest.hpp.gch; then
53587        USE_PRECOMPILED_HEADER=0
53588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53589$as_echo "no" >&6; }
53590      else
53591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53592$as_echo "yes" >&6; }
53593      fi
53594      rm -f conftest.h conftest.hpp.gch
53595    fi
53596  fi
53597
53598
53599
53600
53601# Setup use of ccache, if available
53602
53603  # Check whether --enable-ccache was given.
53604if test "${enable_ccache+set}" = set; then :
53605  enableval=$enable_ccache;
53606fi
53607
53608
53609  CCACHE=
53610  CCACHE_STATUS=
53611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53612$as_echo_n "checking is ccache enabled... " >&6; }
53613  if test "x$enable_ccache" = xyes; then
53614    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53616$as_echo "yes" >&6; }
53617      OLD_PATH="$PATH"
53618      if test "x$TOOLCHAIN_PATH" != x; then
53619        PATH=$TOOLCHAIN_PATH:$PATH
53620      fi
53621
53622
53623
53624  # Publish this variable in the help.
53625
53626
53627  if [ -z "${CCACHE+x}" ]; then
53628    # The variable is not set by user, try to locate tool using the code snippet
53629    for ac_prog in ccache
53630do
53631  # Extract the first word of "$ac_prog", so it can be a program name with args.
53632set dummy $ac_prog; ac_word=$2
53633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53634$as_echo_n "checking for $ac_word... " >&6; }
53635if ${ac_cv_path_CCACHE+:} false; then :
53636  $as_echo_n "(cached) " >&6
53637else
53638  case $CCACHE in
53639  [\\/]* | ?:[\\/]*)
53640  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53641  ;;
53642  *)
53643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53644for as_dir in $PATH
53645do
53646  IFS=$as_save_IFS
53647  test -z "$as_dir" && as_dir=.
53648    for ac_exec_ext in '' $ac_executable_extensions; do
53649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53650    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53652    break 2
53653  fi
53654done
53655  done
53656IFS=$as_save_IFS
53657
53658  ;;
53659esac
53660fi
53661CCACHE=$ac_cv_path_CCACHE
53662if test -n "$CCACHE"; then
53663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53664$as_echo "$CCACHE" >&6; }
53665else
53666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53667$as_echo "no" >&6; }
53668fi
53669
53670
53671  test -n "$CCACHE" && break
53672done
53673
53674  else
53675    # The variable is set, but is it from the command line or the environment?
53676
53677    # Try to remove the string !CCACHE! from our list.
53678    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53679    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53680      # If it failed, the variable was not from the command line. Ignore it,
53681      # but warn the user (except for BASH, which is always set by the calling BASH).
53682      if test "xCCACHE" != xBASH; then
53683        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53684$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53685      fi
53686      # Try to locate tool using the code snippet
53687      for ac_prog in ccache
53688do
53689  # Extract the first word of "$ac_prog", so it can be a program name with args.
53690set dummy $ac_prog; ac_word=$2
53691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53692$as_echo_n "checking for $ac_word... " >&6; }
53693if ${ac_cv_path_CCACHE+:} false; then :
53694  $as_echo_n "(cached) " >&6
53695else
53696  case $CCACHE in
53697  [\\/]* | ?:[\\/]*)
53698  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53699  ;;
53700  *)
53701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53702for as_dir in $PATH
53703do
53704  IFS=$as_save_IFS
53705  test -z "$as_dir" && as_dir=.
53706    for ac_exec_ext in '' $ac_executable_extensions; do
53707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53708    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53710    break 2
53711  fi
53712done
53713  done
53714IFS=$as_save_IFS
53715
53716  ;;
53717esac
53718fi
53719CCACHE=$ac_cv_path_CCACHE
53720if test -n "$CCACHE"; then
53721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53722$as_echo "$CCACHE" >&6; }
53723else
53724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53725$as_echo "no" >&6; }
53726fi
53727
53728
53729  test -n "$CCACHE" && break
53730done
53731
53732    else
53733      # If it succeeded, then it was overridden by the user. We will use it
53734      # for the tool.
53735
53736      # First remove it from the list of overridden variables, so we can test
53737      # for unknown variables in the end.
53738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53739
53740      # Check if we try to supply an empty value
53741      if test "x$CCACHE" = x; then
53742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
53743$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
53744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53745$as_echo_n "checking for CCACHE... " >&6; }
53746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
53747$as_echo "disabled" >&6; }
53748      else
53749        # Check if the provided tool contains a complete path.
53750        tool_specified="$CCACHE"
53751        tool_basename="${tool_specified##*/}"
53752        if test "x$tool_basename" = "x$tool_specified"; then
53753          # A command without a complete path is provided, search $PATH.
53754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53755$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53756          # Extract the first word of "$tool_basename", so it can be a program name with args.
53757set dummy $tool_basename; ac_word=$2
53758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53759$as_echo_n "checking for $ac_word... " >&6; }
53760if ${ac_cv_path_CCACHE+:} false; then :
53761  $as_echo_n "(cached) " >&6
53762else
53763  case $CCACHE in
53764  [\\/]* | ?:[\\/]*)
53765  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53766  ;;
53767  *)
53768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53769for as_dir in $PATH
53770do
53771  IFS=$as_save_IFS
53772  test -z "$as_dir" && as_dir=.
53773    for ac_exec_ext in '' $ac_executable_extensions; do
53774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53775    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53777    break 2
53778  fi
53779done
53780  done
53781IFS=$as_save_IFS
53782
53783  ;;
53784esac
53785fi
53786CCACHE=$ac_cv_path_CCACHE
53787if test -n "$CCACHE"; then
53788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53789$as_echo "$CCACHE" >&6; }
53790else
53791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53792$as_echo "no" >&6; }
53793fi
53794
53795
53796          if test "x$CCACHE" = x; then
53797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53798          fi
53799        else
53800          # Otherwise we believe it is a complete path. Use it as it is.
53801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53802$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53804$as_echo_n "checking for CCACHE... " >&6; }
53805          if test ! -x "$tool_specified"; then
53806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53807$as_echo "not found" >&6; }
53808            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53809          fi
53810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53811$as_echo "$tool_specified" >&6; }
53812        fi
53813      fi
53814    fi
53815  fi
53816
53817
53818
53819  if test "x$CCACHE" = x; then
53820    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53821  fi
53822
53823
53824      PATH="$OLD_PATH"
53825      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53826      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53827    else
53828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53829$as_echo "no" >&6; }
53830      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53831$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53832    fi
53833  elif test "x$enable_ccache" = xno; then
53834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53835$as_echo "no, explicitly disabled" >&6; }
53836    CCACHE_STATUS="Disabled"
53837  elif test "x$enable_ccache" = x; then
53838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53839$as_echo "no" >&6; }
53840  else
53841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53842$as_echo "unknown" >&6; }
53843    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53844  fi
53845
53846
53847
53848# Check whether --with-ccache-dir was given.
53849if test "${with_ccache_dir+set}" = set; then :
53850  withval=$with_ccache_dir;
53851fi
53852
53853
53854  if test "x$with_ccache_dir" != x; then
53855    # When using a non home ccache directory, assume the use is to share ccache files
53856    # with other users. Thus change the umask.
53857    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53858    if test "x$CCACHE" = x; then
53859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53860$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53861    fi
53862  fi
53863
53864  if test "x$CCACHE" != x; then
53865
53866  if test "x$CCACHE" != x; then
53867    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53868      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53869          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53870      if test "x$HAS_BAD_CCACHE" != "x"; then
53871        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53872      fi
53873      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53874$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53875      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53876      PUSHED_FLAGS="$CXXFLAGS"
53877      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53878      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53879/* end confdefs.h.  */
53880
53881int
53882main ()
53883{
53884
53885  ;
53886  return 0;
53887}
53888_ACEOF
53889if ac_fn_cxx_try_compile "$LINENO"; then :
53890  CC_KNOWS_CCACHE_TRICK=yes
53891else
53892  CC_KNOWS_CCACHE_TRICK=no
53893fi
53894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53895      CXXFLAGS="$PUSHED_FLAGS"
53896      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53898$as_echo "yes" >&6; }
53899        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53900
53901        CCACHE_SLOPPINESS=pch_defines,time_macros
53902      else
53903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53904$as_echo "no" >&6; }
53905        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53906      fi
53907    fi
53908
53909    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53910        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53911
53912    if test "x$SET_CCACHE_DIR" != x; then
53913      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53914      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53915    fi
53916  fi
53917
53918  fi
53919
53920
53921###############################################################################
53922#
53923# And now the finish...
53924#
53925###############################################################################
53926
53927# Check for some common pitfalls
53928
53929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53930    file_to_test="$SRC_ROOT/LICENSE"
53931    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53932      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
53933    fi
53934  fi
53935
53936
53937  # Did user specify any unknown variables?
53938
53939  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53940    # Replace the separating ! with spaces before presenting for end user.
53941    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53942    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53943$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53944  fi
53945
53946
53947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53948$as_echo_n "checking if build directory is on local disk... " >&6; }
53949
53950  # df -l lists only local disks; if the given directory is not found then
53951  # a non-zero exit code is given
53952  if test "x$DF" = x; then
53953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53954      # msys does not have df; use Windows "net use" instead.
53955      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53956      if test "x$IS_NETWORK_DISK" = x; then
53957        OUTPUT_DIR_IS_LOCAL="yes"
53958      else
53959        OUTPUT_DIR_IS_LOCAL="no"
53960      fi
53961    else
53962      # No df here, say it's local
53963      OUTPUT_DIR_IS_LOCAL="yes"
53964    fi
53965  else
53966    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53967      OUTPUT_DIR_IS_LOCAL="yes"
53968    else
53969      OUTPUT_DIR_IS_LOCAL="no"
53970    fi
53971  fi
53972
53973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53974$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53975
53976
53977
53978  # Check if the user has any old-style ALT_ variables set.
53979  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53980
53981  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53982  # Since we can't properly handle the dependencies for this, warn the user about the situation
53983  if test -e $OUTPUT_ROOT/spec.gmk; then
53984    IS_RECONFIGURE=yes
53985  else
53986    IS_RECONFIGURE=no
53987  fi
53988
53989
53990# At the end, call the custom hook. (Dummy macro if no custom sources available)
53991
53992
53993# We're messing a bit with internal autoconf variables to put the config.status
53994# in the output directory instead of the current directory.
53995CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53996
53997# Create the actual output files. Now the main work of configure is done.
53998cat >confcache <<\_ACEOF
53999# This file is a shell script that caches the results of configure
54000# tests run on this system so they can be shared between configure
54001# scripts and configure runs, see configure's option --config-cache.
54002# It is not useful on other systems.  If it contains results you don't
54003# want to keep, you may remove or edit it.
54004#
54005# config.status only pays attention to the cache file if you give it
54006# the --recheck option to rerun configure.
54007#
54008# `ac_cv_env_foo' variables (set or unset) will be overridden when
54009# loading this file, other *unset* `ac_cv_foo' will be assigned the
54010# following values.
54011
54012_ACEOF
54013
54014# The following way of writing the cache mishandles newlines in values,
54015# but we know of no workaround that is simple, portable, and efficient.
54016# So, we kill variables containing newlines.
54017# Ultrix sh set writes to stderr and can't be redirected directly,
54018# and sets the high bit in the cache file unless we assign to the vars.
54019(
54020  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
54021    eval ac_val=\$$ac_var
54022    case $ac_val in #(
54023    *${as_nl}*)
54024      case $ac_var in #(
54025      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
54026$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
54027      esac
54028      case $ac_var in #(
54029      _ | IFS | as_nl) ;; #(
54030      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
54031      *) { eval $ac_var=; unset $ac_var;} ;;
54032      esac ;;
54033    esac
54034  done
54035
54036  (set) 2>&1 |
54037    case $as_nl`(ac_space=' '; set) 2>&1` in #(
54038    *${as_nl}ac_space=\ *)
54039      # `set' does not quote correctly, so add quotes: double-quote
54040      # substitution turns \\\\ into \\, and sed turns \\ into \.
54041      sed -n \
54042	"s/'/'\\\\''/g;
54043	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
54044      ;; #(
54045    *)
54046      # `set' quotes correctly as required by POSIX, so do not add quotes.
54047      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
54048      ;;
54049    esac |
54050    sort
54051) |
54052  sed '
54053     /^ac_cv_env_/b end
54054     t clear
54055     :clear
54056     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
54057     t end
54058     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
54059     :end' >>confcache
54060if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
54061  if test -w "$cache_file"; then
54062    if test "x$cache_file" != "x/dev/null"; then
54063      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
54064$as_echo "$as_me: updating cache $cache_file" >&6;}
54065      if test ! -f "$cache_file" || test -h "$cache_file"; then
54066	cat confcache >"$cache_file"
54067      else
54068        case $cache_file in #(
54069        */* | ?:*)
54070	  mv -f confcache "$cache_file"$$ &&
54071	  mv -f "$cache_file"$$ "$cache_file" ;; #(
54072        *)
54073	  mv -f confcache "$cache_file" ;;
54074	esac
54075      fi
54076    fi
54077  else
54078    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
54079$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
54080  fi
54081fi
54082rm -f confcache
54083
54084test "x$prefix" = xNONE && prefix=$ac_default_prefix
54085# Let make expand exec_prefix.
54086test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
54087
54088# Transform confdefs.h into DEFS.
54089# Protect against shell expansion while executing Makefile rules.
54090# Protect against Makefile macro expansion.
54091#
54092# If the first sed substitution is executed (which looks for macros that
54093# take arguments), then branch to the quote section.  Otherwise,
54094# look for a macro that doesn't take arguments.
54095ac_script='
54096:mline
54097/\\$/{
54098 N
54099 s,\\\n,,
54100 b mline
54101}
54102t clear
54103:clear
54104s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
54105t quote
54106s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
54107t quote
54108b any
54109:quote
54110s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
54111s/\[/\\&/g
54112s/\]/\\&/g
54113s/\$/$$/g
54114H
54115:any
54116${
54117	g
54118	s/^\n//
54119	s/\n/ /g
54120	p
54121}
54122'
54123DEFS=`sed -n "$ac_script" confdefs.h`
54124
54125
54126ac_libobjs=
54127ac_ltlibobjs=
54128U=
54129for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
54130  # 1. Remove the extension, and $U if already installed.
54131  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
54132  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
54133  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
54134  #    will be set to the directory where LIBOBJS objects are built.
54135  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
54136  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
54137done
54138LIBOBJS=$ac_libobjs
54139
54140LTLIBOBJS=$ac_ltlibobjs
54141
54142
54143
54144: "${CONFIG_STATUS=./config.status}"
54145ac_write_fail=0
54146ac_clean_files_save=$ac_clean_files
54147ac_clean_files="$ac_clean_files $CONFIG_STATUS"
54148{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
54149$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
54150as_write_fail=0
54151cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
54152#! $SHELL
54153# Generated by $as_me.
54154# Run this file to recreate the current configuration.
54155# Compiler output produced by configure, useful for debugging
54156# configure, is in config.log if it exists.
54157
54158debug=false
54159ac_cs_recheck=false
54160ac_cs_silent=false
54161
54162SHELL=\${CONFIG_SHELL-$SHELL}
54163export SHELL
54164_ASEOF
54165cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
54166## -------------------- ##
54167## M4sh Initialization. ##
54168## -------------------- ##
54169
54170# Be more Bourne compatible
54171DUALCASE=1; export DUALCASE # for MKS sh
54172if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
54173  emulate sh
54174  NULLCMD=:
54175  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
54176  # is contrary to our usage.  Disable this feature.
54177  alias -g '${1+"$@"}'='"$@"'
54178  setopt NO_GLOB_SUBST
54179else
54180  case `(set -o) 2>/dev/null` in #(
54181  *posix*) :
54182    set -o posix ;; #(
54183  *) :
54184     ;;
54185esac
54186fi
54187
54188
54189as_nl='
54190'
54191export as_nl
54192# Printing a long string crashes Solaris 7 /usr/bin/printf.
54193as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
54194as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
54195as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
54196# Prefer a ksh shell builtin over an external printf program on Solaris,
54197# but without wasting forks for bash or zsh.
54198if test -z "$BASH_VERSION$ZSH_VERSION" \
54199    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
54200  as_echo='print -r --'
54201  as_echo_n='print -rn --'
54202elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
54203  as_echo='printf %s\n'
54204  as_echo_n='printf %s'
54205else
54206  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54207    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54208    as_echo_n='/usr/ucb/echo -n'
54209  else
54210    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
54211    as_echo_n_body='eval
54212      arg=$1;
54213      case $arg in #(
54214      *"$as_nl"*)
54215	expr "X$arg" : "X\\(.*\\)$as_nl";
54216	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
54217      esac;
54218      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
54219    '
54220    export as_echo_n_body
54221    as_echo_n='sh -c $as_echo_n_body as_echo'
54222  fi
54223  export as_echo_body
54224  as_echo='sh -c $as_echo_body as_echo'
54225fi
54226
54227# The user is always right.
54228if test "${PATH_SEPARATOR+set}" != set; then
54229  PATH_SEPARATOR=:
54230  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
54231    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
54232      PATH_SEPARATOR=';'
54233  }
54234fi
54235
54236
54237# IFS
54238# We need space, tab and new line, in precisely that order.  Quoting is
54239# there to prevent editors from complaining about space-tab.
54240# (If _AS_PATH_WALK were called with IFS unset, it would disable word
54241# splitting by setting IFS to empty value.)
54242IFS=" ""	$as_nl"
54243
54244# Find who we are.  Look in the path if we contain no directory separator.
54245as_myself=
54246case $0 in #((
54247  *[\\/]* ) as_myself=$0 ;;
54248  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54249for as_dir in $PATH
54250do
54251  IFS=$as_save_IFS
54252  test -z "$as_dir" && as_dir=.
54253    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54254  done
54255IFS=$as_save_IFS
54256
54257     ;;
54258esac
54259# We did not find ourselves, most probably we were run as `sh COMMAND'
54260# in which case we are not to be found in the path.
54261if test "x$as_myself" = x; then
54262  as_myself=$0
54263fi
54264if test ! -f "$as_myself"; then
54265  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54266  exit 1
54267fi
54268
54269# Unset variables that we do not need and which cause bugs (e.g. in
54270# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
54271# suppresses any "Segmentation fault" message there.  '((' could
54272# trigger a bug in pdksh 5.2.14.
54273for as_var in BASH_ENV ENV MAIL MAILPATH
54274do eval test x\${$as_var+set} = xset \
54275  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54276done
54277PS1='$ '
54278PS2='> '
54279PS4='+ '
54280
54281# NLS nuisances.
54282LC_ALL=C
54283export LC_ALL
54284LANGUAGE=C
54285export LANGUAGE
54286
54287# CDPATH.
54288(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54289
54290
54291# as_fn_error STATUS ERROR [LINENO LOG_FD]
54292# ----------------------------------------
54293# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54294# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54295# script with STATUS, using 1 if that was 0.
54296as_fn_error ()
54297{
54298  as_status=$1; test $as_status -eq 0 && as_status=1
54299  if test "$4"; then
54300    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54301    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54302  fi
54303  $as_echo "$as_me: error: $2" >&2
54304  as_fn_exit $as_status
54305} # as_fn_error
54306
54307
54308# as_fn_set_status STATUS
54309# -----------------------
54310# Set $? to STATUS, without forking.
54311as_fn_set_status ()
54312{
54313  return $1
54314} # as_fn_set_status
54315
54316# as_fn_exit STATUS
54317# -----------------
54318# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54319as_fn_exit ()
54320{
54321  set +e
54322  as_fn_set_status $1
54323  exit $1
54324} # as_fn_exit
54325
54326# as_fn_unset VAR
54327# ---------------
54328# Portably unset VAR.
54329as_fn_unset ()
54330{
54331  { eval $1=; unset $1;}
54332}
54333as_unset=as_fn_unset
54334# as_fn_append VAR VALUE
54335# ----------------------
54336# Append the text in VALUE to the end of the definition contained in VAR. Take
54337# advantage of any shell optimizations that allow amortized linear growth over
54338# repeated appends, instead of the typical quadratic growth present in naive
54339# implementations.
54340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54341  eval 'as_fn_append ()
54342  {
54343    eval $1+=\$2
54344  }'
54345else
54346  as_fn_append ()
54347  {
54348    eval $1=\$$1\$2
54349  }
54350fi # as_fn_append
54351
54352# as_fn_arith ARG...
54353# ------------------
54354# Perform arithmetic evaluation on the ARGs, and store the result in the
54355# global $as_val. Take advantage of shells that can avoid forks. The arguments
54356# must be portable across $(()) and expr.
54357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54358  eval 'as_fn_arith ()
54359  {
54360    as_val=$(( $* ))
54361  }'
54362else
54363  as_fn_arith ()
54364  {
54365    as_val=`expr "$@" || test $? -eq 1`
54366  }
54367fi # as_fn_arith
54368
54369
54370if expr a : '\(a\)' >/dev/null 2>&1 &&
54371   test "X`expr 00001 : '.*\(...\)'`" = X001; then
54372  as_expr=expr
54373else
54374  as_expr=false
54375fi
54376
54377if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54378  as_basename=basename
54379else
54380  as_basename=false
54381fi
54382
54383if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54384  as_dirname=dirname
54385else
54386  as_dirname=false
54387fi
54388
54389as_me=`$as_basename -- "$0" ||
54390$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54391	 X"$0" : 'X\(//\)$' \| \
54392	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54393$as_echo X/"$0" |
54394    sed '/^.*\/\([^/][^/]*\)\/*$/{
54395	    s//\1/
54396	    q
54397	  }
54398	  /^X\/\(\/\/\)$/{
54399	    s//\1/
54400	    q
54401	  }
54402	  /^X\/\(\/\).*/{
54403	    s//\1/
54404	    q
54405	  }
54406	  s/.*/./; q'`
54407
54408# Avoid depending upon Character Ranges.
54409as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54410as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54411as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54412as_cr_digits='0123456789'
54413as_cr_alnum=$as_cr_Letters$as_cr_digits
54414
54415ECHO_C= ECHO_N= ECHO_T=
54416case `echo -n x` in #(((((
54417-n*)
54418  case `echo 'xy\c'` in
54419  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54420  xy)  ECHO_C='\c';;
54421  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54422       ECHO_T='	';;
54423  esac;;
54424*)
54425  ECHO_N='-n';;
54426esac
54427
54428rm -f conf$$ conf$$.exe conf$$.file
54429if test -d conf$$.dir; then
54430  rm -f conf$$.dir/conf$$.file
54431else
54432  rm -f conf$$.dir
54433  mkdir conf$$.dir 2>/dev/null
54434fi
54435if (echo >conf$$.file) 2>/dev/null; then
54436  if ln -s conf$$.file conf$$ 2>/dev/null; then
54437    as_ln_s='ln -s'
54438    # ... but there are two gotchas:
54439    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54440    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54441    # In both cases, we have to default to `cp -pR'.
54442    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54443      as_ln_s='cp -pR'
54444  elif ln conf$$.file conf$$ 2>/dev/null; then
54445    as_ln_s=ln
54446  else
54447    as_ln_s='cp -pR'
54448  fi
54449else
54450  as_ln_s='cp -pR'
54451fi
54452rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54453rmdir conf$$.dir 2>/dev/null
54454
54455
54456# as_fn_mkdir_p
54457# -------------
54458# Create "$as_dir" as a directory, including parents if necessary.
54459as_fn_mkdir_p ()
54460{
54461
54462  case $as_dir in #(
54463  -*) as_dir=./$as_dir;;
54464  esac
54465  test -d "$as_dir" || eval $as_mkdir_p || {
54466    as_dirs=
54467    while :; do
54468      case $as_dir in #(
54469      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54470      *) as_qdir=$as_dir;;
54471      esac
54472      as_dirs="'$as_qdir' $as_dirs"
54473      as_dir=`$as_dirname -- "$as_dir" ||
54474$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54475	 X"$as_dir" : 'X\(//\)[^/]' \| \
54476	 X"$as_dir" : 'X\(//\)$' \| \
54477	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54478$as_echo X"$as_dir" |
54479    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54480	    s//\1/
54481	    q
54482	  }
54483	  /^X\(\/\/\)[^/].*/{
54484	    s//\1/
54485	    q
54486	  }
54487	  /^X\(\/\/\)$/{
54488	    s//\1/
54489	    q
54490	  }
54491	  /^X\(\/\).*/{
54492	    s//\1/
54493	    q
54494	  }
54495	  s/.*/./; q'`
54496      test -d "$as_dir" && break
54497    done
54498    test -z "$as_dirs" || eval "mkdir $as_dirs"
54499  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54500
54501
54502} # as_fn_mkdir_p
54503if mkdir -p . 2>/dev/null; then
54504  as_mkdir_p='mkdir -p "$as_dir"'
54505else
54506  test -d ./-p && rmdir ./-p
54507  as_mkdir_p=false
54508fi
54509
54510
54511# as_fn_executable_p FILE
54512# -----------------------
54513# Test if FILE is an executable regular file.
54514as_fn_executable_p ()
54515{
54516  test -f "$1" && test -x "$1"
54517} # as_fn_executable_p
54518as_test_x='test -x'
54519as_executable_p=as_fn_executable_p
54520
54521# Sed expression to map a string onto a valid CPP name.
54522as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54523
54524# Sed expression to map a string onto a valid variable name.
54525as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54526
54527
54528exec 6>&1
54529## ----------------------------------- ##
54530## Main body of $CONFIG_STATUS script. ##
54531## ----------------------------------- ##
54532_ASEOF
54533test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54534
54535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54536# Save the log message, to keep $0 and so on meaningful, and to
54537# report actual input values of CONFIG_FILES etc. instead of their
54538# values after options handling.
54539ac_log="
54540This file was extended by OpenJDK $as_me jdk9, which was
54541generated by GNU Autoconf 2.69.  Invocation command line was
54542
54543  CONFIG_FILES    = $CONFIG_FILES
54544  CONFIG_HEADERS  = $CONFIG_HEADERS
54545  CONFIG_LINKS    = $CONFIG_LINKS
54546  CONFIG_COMMANDS = $CONFIG_COMMANDS
54547  $ $0 $@
54548
54549on `(hostname || uname -n) 2>/dev/null | sed 1q`
54550"
54551
54552_ACEOF
54553
54554case $ac_config_files in *"
54555"*) set x $ac_config_files; shift; ac_config_files=$*;;
54556esac
54557
54558
54559
54560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54561# Files that config.status was made for.
54562config_files="$ac_config_files"
54563
54564_ACEOF
54565
54566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54567ac_cs_usage="\
54568\`$as_me' instantiates files and other configuration actions
54569from templates according to the current configuration.  Unless the files
54570and actions are specified as TAGs, all are instantiated by default.
54571
54572Usage: $0 [OPTION]... [TAG]...
54573
54574  -h, --help       print this help, then exit
54575  -V, --version    print version number and configuration settings, then exit
54576      --config     print configuration, then exit
54577  -q, --quiet, --silent
54578                   do not print progress messages
54579  -d, --debug      don't remove temporary files
54580      --recheck    update $as_me by reconfiguring in the same conditions
54581      --file=FILE[:TEMPLATE]
54582                   instantiate the configuration file FILE
54583
54584Configuration files:
54585$config_files
54586
54587Report bugs to <build-dev@openjdk.java.net>.
54588OpenJDK home page: <http://openjdk.java.net>."
54589
54590_ACEOF
54591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54592ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54593ac_cs_version="\\
54594OpenJDK config.status jdk9
54595configured by $0, generated by GNU Autoconf 2.69,
54596  with options \\"\$ac_cs_config\\"
54597
54598Copyright (C) 2012 Free Software Foundation, Inc.
54599This config.status script is free software; the Free Software Foundation
54600gives unlimited permission to copy, distribute and modify it."
54601
54602ac_pwd='$ac_pwd'
54603srcdir='$srcdir'
54604AWK='$AWK'
54605test -n "\$AWK" || AWK=awk
54606_ACEOF
54607
54608cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54609# The default lists apply if the user does not specify any file.
54610ac_need_defaults=:
54611while test $# != 0
54612do
54613  case $1 in
54614  --*=?*)
54615    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54616    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54617    ac_shift=:
54618    ;;
54619  --*=)
54620    ac_option=`expr "X$1" : 'X\([^=]*\)='`
54621    ac_optarg=
54622    ac_shift=:
54623    ;;
54624  *)
54625    ac_option=$1
54626    ac_optarg=$2
54627    ac_shift=shift
54628    ;;
54629  esac
54630
54631  case $ac_option in
54632  # Handling of the options.
54633  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54634    ac_cs_recheck=: ;;
54635  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54636    $as_echo "$ac_cs_version"; exit ;;
54637  --config | --confi | --conf | --con | --co | --c )
54638    $as_echo "$ac_cs_config"; exit ;;
54639  --debug | --debu | --deb | --de | --d | -d )
54640    debug=: ;;
54641  --file | --fil | --fi | --f )
54642    $ac_shift
54643    case $ac_optarg in
54644    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54645    '') as_fn_error $? "missing file argument" ;;
54646    esac
54647    as_fn_append CONFIG_FILES " '$ac_optarg'"
54648    ac_need_defaults=false;;
54649  --he | --h |  --help | --hel | -h )
54650    $as_echo "$ac_cs_usage"; exit ;;
54651  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54652  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54653    ac_cs_silent=: ;;
54654
54655  # This is an error.
54656  -*) as_fn_error $? "unrecognized option: \`$1'
54657Try \`$0 --help' for more information." ;;
54658
54659  *) as_fn_append ac_config_targets " $1"
54660     ac_need_defaults=false ;;
54661
54662  esac
54663  shift
54664done
54665
54666ac_configure_extra_args=
54667
54668if $ac_cs_silent; then
54669  exec 6>/dev/null
54670  ac_configure_extra_args="$ac_configure_extra_args --silent"
54671fi
54672
54673_ACEOF
54674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54675if \$ac_cs_recheck; then
54676  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54677  shift
54678  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54679  CONFIG_SHELL='$SHELL'
54680  export CONFIG_SHELL
54681  exec "\$@"
54682fi
54683
54684_ACEOF
54685cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54686exec 5>>config.log
54687{
54688  echo
54689  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54690## Running $as_me. ##
54691_ASBOX
54692  $as_echo "$ac_log"
54693} >&5
54694
54695_ACEOF
54696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54697_ACEOF
54698
54699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54700
54701# Handling of arguments.
54702for ac_config_target in $ac_config_targets
54703do
54704  case $ac_config_target in
54705    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54706    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54707    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54708    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54709    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54710
54711  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54712  esac
54713done
54714
54715
54716# If the user did not use the arguments to specify the items to instantiate,
54717# then the envvar interface is used.  Set only those that are not.
54718# We use the long form for the default assignment because of an extremely
54719# bizarre bug on SunOS 4.1.3.
54720if $ac_need_defaults; then
54721  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54722fi
54723
54724# Have a temporary directory for convenience.  Make it in the build tree
54725# simply because there is no reason against having it here, and in addition,
54726# creating and moving files from /tmp can sometimes cause problems.
54727# Hook for its removal unless debugging.
54728# Note that there is a small window in which the directory will not be cleaned:
54729# after its creation but before its name has been assigned to `$tmp'.
54730$debug ||
54731{
54732  tmp= ac_tmp=
54733  trap 'exit_status=$?
54734  : "${ac_tmp:=$tmp}"
54735  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54736' 0
54737  trap 'as_fn_exit 1' 1 2 13 15
54738}
54739# Create a (secure) tmp directory for tmp files.
54740
54741{
54742  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54743  test -d "$tmp"
54744}  ||
54745{
54746  tmp=./conf$$-$RANDOM
54747  (umask 077 && mkdir "$tmp")
54748} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54749ac_tmp=$tmp
54750
54751# Set up the scripts for CONFIG_FILES section.
54752# No need to generate them if there are no CONFIG_FILES.
54753# This happens for instance with `./config.status config.h'.
54754if test -n "$CONFIG_FILES"; then
54755
54756
54757ac_cr=`echo X | tr X '\015'`
54758# On cygwin, bash can eat \r inside `` if the user requested igncr.
54759# But we know of no other shell where ac_cr would be empty at this
54760# point, so we can use a bashism as a fallback.
54761if test "x$ac_cr" = x; then
54762  eval ac_cr=\$\'\\r\'
54763fi
54764ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54765if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54766  ac_cs_awk_cr='\\r'
54767else
54768  ac_cs_awk_cr=$ac_cr
54769fi
54770
54771echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54772_ACEOF
54773
54774
54775{
54776  echo "cat >conf$$subs.awk <<_ACEOF" &&
54777  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54778  echo "_ACEOF"
54779} >conf$$subs.sh ||
54780  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54781ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54782ac_delim='%!_!# '
54783for ac_last_try in false false false false false :; do
54784  . ./conf$$subs.sh ||
54785    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54786
54787  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54788  if test $ac_delim_n = $ac_delim_num; then
54789    break
54790  elif $ac_last_try; then
54791    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54792  else
54793    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54794  fi
54795done
54796rm -f conf$$subs.sh
54797
54798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54799cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54800_ACEOF
54801sed -n '
54802h
54803s/^/S["/; s/!.*/"]=/
54804p
54805g
54806s/^[^!]*!//
54807:repl
54808t repl
54809s/'"$ac_delim"'$//
54810t delim
54811:nl
54812h
54813s/\(.\{148\}\)..*/\1/
54814t more1
54815s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54816p
54817n
54818b repl
54819:more1
54820s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54821p
54822g
54823s/.\{148\}//
54824t nl
54825:delim
54826h
54827s/\(.\{148\}\)..*/\1/
54828t more2
54829s/["\\]/\\&/g; s/^/"/; s/$/"/
54830p
54831b
54832:more2
54833s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54834p
54835g
54836s/.\{148\}//
54837t delim
54838' <conf$$subs.awk | sed '
54839/^[^""]/{
54840  N
54841  s/\n//
54842}
54843' >>$CONFIG_STATUS || ac_write_fail=1
54844rm -f conf$$subs.awk
54845cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54846_ACAWK
54847cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54848  for (key in S) S_is_set[key] = 1
54849  FS = ""
54850
54851}
54852{
54853  line = $ 0
54854  nfields = split(line, field, "@")
54855  substed = 0
54856  len = length(field[1])
54857  for (i = 2; i < nfields; i++) {
54858    key = field[i]
54859    keylen = length(key)
54860    if (S_is_set[key]) {
54861      value = S[key]
54862      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54863      len += length(value) + length(field[++i])
54864      substed = 1
54865    } else
54866      len += 1 + keylen
54867  }
54868
54869  print line
54870}
54871
54872_ACAWK
54873_ACEOF
54874cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54875if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54876  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54877else
54878  cat
54879fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54880  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54881_ACEOF
54882
54883# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54884# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54885# trailing colons and then remove the whole line if VPATH becomes empty
54886# (actually we leave an empty line to preserve line numbers).
54887if test "x$srcdir" = x.; then
54888  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54889h
54890s///
54891s/^/:/
54892s/[	 ]*$/:/
54893s/:\$(srcdir):/:/g
54894s/:\${srcdir}:/:/g
54895s/:@srcdir@:/:/g
54896s/^:*//
54897s/:*$//
54898x
54899s/\(=[	 ]*\).*/\1/
54900G
54901s/\n//
54902s/^[^=]*=[	 ]*$//
54903}'
54904fi
54905
54906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54907fi # test -n "$CONFIG_FILES"
54908
54909
54910eval set X "  :F $CONFIG_FILES      "
54911shift
54912for ac_tag
54913do
54914  case $ac_tag in
54915  :[FHLC]) ac_mode=$ac_tag; continue;;
54916  esac
54917  case $ac_mode$ac_tag in
54918  :[FHL]*:*);;
54919  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54920  :[FH]-) ac_tag=-:-;;
54921  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54922  esac
54923  ac_save_IFS=$IFS
54924  IFS=:
54925  set x $ac_tag
54926  IFS=$ac_save_IFS
54927  shift
54928  ac_file=$1
54929  shift
54930
54931  case $ac_mode in
54932  :L) ac_source=$1;;
54933  :[FH])
54934    ac_file_inputs=
54935    for ac_f
54936    do
54937      case $ac_f in
54938      -) ac_f="$ac_tmp/stdin";;
54939      *) # Look for the file first in the build tree, then in the source tree
54940	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54941	 # because $ac_f cannot contain `:'.
54942	 test -f "$ac_f" ||
54943	   case $ac_f in
54944	   [\\/$]*) false;;
54945	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54946	   esac ||
54947	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54948      esac
54949      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54950      as_fn_append ac_file_inputs " '$ac_f'"
54951    done
54952
54953    # Let's still pretend it is `configure' which instantiates (i.e., don't
54954    # use $as_me), people would be surprised to read:
54955    #    /* config.h.  Generated by config.status.  */
54956    configure_input='Generated from '`
54957	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54958	`' by configure.'
54959    if test x"$ac_file" != x-; then
54960      configure_input="$ac_file.  $configure_input"
54961      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54962$as_echo "$as_me: creating $ac_file" >&6;}
54963    fi
54964    # Neutralize special characters interpreted by sed in replacement strings.
54965    case $configure_input in #(
54966    *\&* | *\|* | *\\* )
54967       ac_sed_conf_input=`$as_echo "$configure_input" |
54968       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54969    *) ac_sed_conf_input=$configure_input;;
54970    esac
54971
54972    case $ac_tag in
54973    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54974      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54975    esac
54976    ;;
54977  esac
54978
54979  ac_dir=`$as_dirname -- "$ac_file" ||
54980$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54981	 X"$ac_file" : 'X\(//\)[^/]' \| \
54982	 X"$ac_file" : 'X\(//\)$' \| \
54983	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54984$as_echo X"$ac_file" |
54985    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54986	    s//\1/
54987	    q
54988	  }
54989	  /^X\(\/\/\)[^/].*/{
54990	    s//\1/
54991	    q
54992	  }
54993	  /^X\(\/\/\)$/{
54994	    s//\1/
54995	    q
54996	  }
54997	  /^X\(\/\).*/{
54998	    s//\1/
54999	    q
55000	  }
55001	  s/.*/./; q'`
55002  as_dir="$ac_dir"; as_fn_mkdir_p
55003  ac_builddir=.
55004
55005case "$ac_dir" in
55006.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
55007*)
55008  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
55009  # A ".." for each directory in $ac_dir_suffix.
55010  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
55011  case $ac_top_builddir_sub in
55012  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
55013  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
55014  esac ;;
55015esac
55016ac_abs_top_builddir=$ac_pwd
55017ac_abs_builddir=$ac_pwd$ac_dir_suffix
55018# for backward compatibility:
55019ac_top_builddir=$ac_top_build_prefix
55020
55021case $srcdir in
55022  .)  # We are building in place.
55023    ac_srcdir=.
55024    ac_top_srcdir=$ac_top_builddir_sub
55025    ac_abs_top_srcdir=$ac_pwd ;;
55026  [\\/]* | ?:[\\/]* )  # Absolute name.
55027    ac_srcdir=$srcdir$ac_dir_suffix;
55028    ac_top_srcdir=$srcdir
55029    ac_abs_top_srcdir=$srcdir ;;
55030  *) # Relative name.
55031    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
55032    ac_top_srcdir=$ac_top_build_prefix$srcdir
55033    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
55034esac
55035ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
55036
55037
55038  case $ac_mode in
55039  :F)
55040  #
55041  # CONFIG_FILE
55042  #
55043
55044_ACEOF
55045
55046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55047# If the template does not know about datarootdir, expand it.
55048# FIXME: This hack should be removed a few years after 2.60.
55049ac_datarootdir_hack=; ac_datarootdir_seen=
55050ac_sed_dataroot='
55051/datarootdir/ {
55052  p
55053  q
55054}
55055/@datadir@/p
55056/@docdir@/p
55057/@infodir@/p
55058/@localedir@/p
55059/@mandir@/p'
55060case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
55061*datarootdir*) ac_datarootdir_seen=yes;;
55062*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
55063  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
55064$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
55065_ACEOF
55066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55067  ac_datarootdir_hack='
55068  s&@datadir@&$datadir&g
55069  s&@docdir@&$docdir&g
55070  s&@infodir@&$infodir&g
55071  s&@localedir@&$localedir&g
55072  s&@mandir@&$mandir&g
55073  s&\\\${datarootdir}&$datarootdir&g' ;;
55074esac
55075_ACEOF
55076
55077# Neutralize VPATH when `$srcdir' = `.'.
55078# Shell code in configure.ac might set extrasub.
55079# FIXME: do we really want to maintain this feature?
55080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55081ac_sed_extra="$ac_vpsub
55082$extrasub
55083_ACEOF
55084cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55085:t
55086/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
55087s|@configure_input@|$ac_sed_conf_input|;t t
55088s&@top_builddir@&$ac_top_builddir_sub&;t t
55089s&@top_build_prefix@&$ac_top_build_prefix&;t t
55090s&@srcdir@&$ac_srcdir&;t t
55091s&@abs_srcdir@&$ac_abs_srcdir&;t t
55092s&@top_srcdir@&$ac_top_srcdir&;t t
55093s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
55094s&@builddir@&$ac_builddir&;t t
55095s&@abs_builddir@&$ac_abs_builddir&;t t
55096s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
55097$ac_datarootdir_hack
55098"
55099eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
55100  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
55101
55102test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
55103  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
55104  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
55105      "$ac_tmp/out"`; test -z "$ac_out"; } &&
55106  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
55107which seems to be undefined.  Please make sure it is defined" >&5
55108$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
55109which seems to be undefined.  Please make sure it is defined" >&2;}
55110
55111  rm -f "$ac_tmp/stdin"
55112  case $ac_file in
55113  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
55114  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
55115  esac \
55116  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
55117 ;;
55118
55119
55120
55121  esac
55122
55123done # for ac_tag
55124
55125
55126as_fn_exit 0
55127_ACEOF
55128ac_clean_files=$ac_clean_files_save
55129
55130test $ac_write_fail = 0 ||
55131  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
55132
55133
55134# configure is writing to config.log, and then calls config.status.
55135# config.status does its own redirection, appending to config.log.
55136# Unfortunately, on DOS this fails, as config.log is still kept open
55137# by configure, so config.status won't be able to write to it; its
55138# output is simply discarded.  So we exec the FD to /dev/null,
55139# effectively closing config.log, so it can be properly (re)opened and
55140# appended to by config.status.  When coming back to configure, we
55141# need to make the FD available again.
55142if test "$no_create" != yes; then
55143  ac_cs_success=:
55144  ac_config_status_args=
55145  test "$silent" = yes &&
55146    ac_config_status_args="$ac_config_status_args --quiet"
55147  exec 5>/dev/null
55148  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
55149  exec 5>>config.log
55150  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
55151  # would make configure fail if this is the last instruction.
55152  $ac_cs_success || as_fn_exit 1
55153fi
55154if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
55155  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
55156$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
55157fi
55158
55159
55160# After AC_OUTPUT, we need to do final work
55161
55162
55163  # Try to move config.log (generated by autoconf) to the configure-support directory.
55164  if test -e ./config.log; then
55165    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
55166  fi
55167
55168  # Rotate our log file (configure.log)
55169  if test -e "$OUTPUT_ROOT/configure.log.old"; then
55170    $RM -f "$OUTPUT_ROOT/configure.log.old"
55171  fi
55172  if test -e "$OUTPUT_ROOT/configure.log"; then
55173    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
55174  fi
55175
55176  # Move configure.log from current directory to the build output root
55177  if test -e ./configure.log; then
55178    echo found it
55179    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
55180  fi
55181
55182  # Make the compare script executable
55183  $CHMOD +x $OUTPUT_ROOT/compare.sh
55184
55185
55186# Finally output some useful information to the user
55187
55188  # Finally output some useful information to the user
55189
55190  printf "\n"
55191  printf "====================================================\n"
55192  if test "x$no_create" != "xyes"; then
55193    if test "x$IS_RECONFIGURE" != "xyes"; then
55194      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
55195    else
55196      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
55197    fi
55198  else
55199    if test "x$IS_RECONFIGURE" != "xyes"; then
55200      printf "A configuration has been successfully checked but not created\n"
55201    else
55202      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
55203    fi
55204  fi
55205  if test "x$CONFIGURE_COMMAND_LINE" != x; then
55206    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
55207  else
55208    printf "using default settings.\n"
55209  fi
55210
55211  printf "\n"
55212  printf "Configuration summary:\n"
55213  printf "* Debug level:    $DEBUG_LEVEL\n"
55214  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
55215  printf "* JDK variant:    $JDK_VARIANT\n"
55216  printf "* JVM variants:   $with_jvm_variants\n"
55217  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
55218
55219  printf "\n"
55220  printf "Tools summary:\n"
55221  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
55222    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
55223  fi
55224  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
55225  if test "x$TOOLCHAIN_VERSION" != "x"; then
55226    print_version=" $TOOLCHAIN_VERSION"
55227  fi
55228  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
55229  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
55230  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
55231
55232  printf "\n"
55233  printf "Build performance summary:\n"
55234  printf "* Cores to use:   $JOBS\n"
55235  printf "* Memory limit:   $MEMORY_SIZE MB\n"
55236  if test "x$CCACHE_STATUS" != "x"; then
55237    printf "* ccache status:  $CCACHE_STATUS\n"
55238  fi
55239  printf "\n"
55240
55241  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
55242    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
55243    printf "will result in longer build times.\n"
55244    printf "\n"
55245  fi
55246
55247  if test "x$FOUND_ALT_VARIABLES" != "x"; then
55248    printf "WARNING: You have old-style ALT_ environment variables set.\n"
55249    printf "These are not respected, and will be ignored. It is recommended\n"
55250    printf "that you clean your environment. The following variables are set:\n"
55251    printf "$FOUND_ALT_VARIABLES\n"
55252    printf "\n"
55253  fi
55254
55255  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
55256    printf "WARNING: Your build output directory is not on a local disk.\n"
55257    printf "This will severely degrade build performance!\n"
55258    printf "It is recommended that you create an output directory on a local disk,\n"
55259    printf "and run the configure script again from that directory.\n"
55260    printf "\n"
55261  fi
55262
55263  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
55264    printf "WARNING: The result of this configuration has overridden an older\n"
55265    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
55266    printf "proper build. Failure to do so might result in strange build problems.\n"
55267    printf "\n"
55268  fi
55269
55270  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
55271    printf "WARNING: The result of this configuration was not saved.\n"
55272    printf "You should run without '--no-create | -n' to create the configuration.\n"
55273    printf "\n"
55274  fi
55275
55276
55277
55278  # Locate config.log.
55279  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
55280    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
55281  elif test -e "./config.log"; then
55282    CONFIG_LOG_PATH="."
55283  fi
55284
55285  if test -e "$CONFIG_LOG_PATH/config.log"; then
55286    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
55287    if test $? -eq 0; then
55288      printf "The following warnings were produced. Repeated here for convenience:\n"
55289      # We must quote sed expression (using []) to stop m4 from eating the [].
55290      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
55291      printf "\n"
55292    fi
55293  fi
55294
55295