generated-configure.sh revision 1332:f3c96aea372d
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
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682ZIP_DEBUGINFO_FILES
683ENABLE_DEBUG_SYMBOLS
684CFLAGS_WARNINGS_ARE_ERRORS
685COMPILER_SUPPORTS_TARGET_BITS_FLAG
686ZERO_ARCHFLAG
687LDFLAGS_CXX_JDK
688LDFLAGS_JDKEXE_SUFFIX
689LDFLAGS_JDKLIB_SUFFIX
690LDFLAGS_JDKEXE
691LDFLAGS_JDKLIB
692CXXFLAGS_JDKEXE
693CXXFLAGS_JDKLIB
694CFLAGS_JDKEXE
695CFLAGS_JDKLIB
696MACOSX_VERSION_MIN
697LEGACY_EXTRA_LDFLAGS
698LEGACY_EXTRA_CXXFLAGS
699LEGACY_EXTRA_CFLAGS
700CXX_O_FLAG_NONE
701CXX_O_FLAG_DEBUG
702CXX_O_FLAG_NORM
703CXX_O_FLAG_HI
704CXX_O_FLAG_HIGHEST
705C_O_FLAG_NONE
706C_O_FLAG_DEBUG
707C_O_FLAG_NORM
708C_O_FLAG_HI
709C_O_FLAG_HIGHEST
710CXXFLAGS_DEBUG_OPTIONS
711CFLAGS_DEBUG_OPTIONS
712CXXFLAGS_DEBUG_SYMBOLS
713CFLAGS_DEBUG_SYMBOLS
714CXX_FLAG_DEPS
715C_FLAG_DEPS
716SET_SHARED_LIBRARY_MAPFILE
717SET_SHARED_LIBRARY_NAME
718SET_SHARED_LIBRARY_ORIGIN
719SET_EXECUTABLE_ORIGIN
720SHARED_LIBRARY_FLAGS
721CXX_FLAG_REORDER
722C_FLAG_REORDER
723SYSROOT_LDFLAGS
724SYSROOT_CFLAGS
725RC_FLAGS
726AR_OUT_OPTION
727LD_OUT_OPTION
728EXE_OUT_OPTION
729CC_OUT_OPTION
730POST_MCS_CMD
731POST_STRIP_CMD
732ARFLAGS
733COMPILER_TARGET_BITS_FLAG
734JT_HOME
735JTREGEXE
736USING_BROKEN_SUSE_LD
737PACKAGE_PATH
738LDEXECXX
739LDEXE
740USE_CLANG
741HOTSPOT_LD
742HOTSPOT_CXX
743HOTSPOT_RC
744HOTSPOT_MT
745BUILD_LD
746BUILD_CXX
747BUILD_CC
748ac_ct_OBJDUMP
749OBJDUMP
750ac_ct_OBJCOPY
751OBJCOPY
752ac_ct_NM
753ac_ct_STRIP
754MCS
755GNM
756NM
757STRIP
758MSBUILD
759DUMPBIN
760RC
761MT
762LIPO
763ac_ct_OBJC
764OBJCFLAGS
765OBJC
766ac_ct_AR
767AR
768AS
769LDCXX
770LD
771CXXCPP
772CPP
773ac_ct_CXX
774CXXFLAGS
775CXX
776ac_ct_PROPER_COMPILER_CXX
777PROPER_COMPILER_CXX
778TOOLCHAIN_PATH_CXX
779POTENTIAL_CXX
780OBJEXT
781EXEEXT
782ac_ct_CC
783CPPFLAGS
784LDFLAGS
785CFLAGS
786CC
787ac_ct_PROPER_COMPILER_CC
788PROPER_COMPILER_CC
789TOOLCHAIN_PATH_CC
790POTENTIAL_CC
791VS_LIB
792VS_INCLUDE
793VS_PATH
794CYGWIN_LINK
795EXE_SUFFIX
796OBJ_SUFFIX
797STATIC_LIBRARY
798SHARED_LIBRARY
799STATIC_LIBRARY_SUFFIX
800SHARED_LIBRARY_SUFFIX
801LIBRARY_PREFIX
802TOOLCHAIN_TYPE
803BUILD_HOTSPOT
804HOTSPOT_DIST
805BUILD_OUTPUT
806OVERRIDE_SRC_ROOT
807ADD_SRC_ROOT
808JDK_TOPDIR
809NASHORN_TOPDIR
810HOTSPOT_TOPDIR
811JAXWS_TOPDIR
812JAXP_TOPDIR
813CORBA_TOPDIR
814LANGTOOLS_TOPDIR
815JAVAC_FLAGS
816BOOT_JDK_SOURCETARGET
817JARSIGNER
818NATIVE2ASCII
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844RMICONNECTOR_IIOP
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851BDEPS_FTP
852BDEPS_UNZIP
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862TIME
863STAT
864HG
865READELF
866OTOOL
867LDD
868ZIP
869UNZIP
870FIND_DELETE
871OUTPUT_SYNC
872OUTPUT_SYNC_SUPPORTED
873MAKE
874CHECK_TOOLSDIR_MAKE
875CHECK_TOOLSDIR_GMAKE
876CHECK_MAKE
877CHECK_GMAKE
878PKGHANDLER
879OUTPUT_ROOT
880CONF_NAME
881SPEC
882SDKROOT
883XCODEBUILD
884BUILD_VARIANT_RELEASE
885DEBUG_CLASSFILES
886FASTDEBUG
887VARIANT
888DEBUG_LEVEL
889MACOSX_UNIVERSAL
890INCLUDE_SA
891JVM_VARIANT_CORE
892JVM_VARIANT_ZEROSHARK
893JVM_VARIANT_ZERO
894JVM_VARIANT_KERNEL
895JVM_VARIANT_MINIMAL1
896JVM_VARIANT_CLIENT
897JVM_VARIANT_SERVER
898JVM_VARIANTS
899JVM_INTERPRETER
900JDK_VARIANT
901SET_OPENJDK
902BUILD_LOG_WRAPPER
903BUILD_LOG_PREVIOUS
904BUILD_LOG
905TOPDIR
906PATH_SEP
907ZERO_ARCHDEF
908DEFINE_CROSS_COMPILE_ARCH
909LP64
910OPENJDK_TARGET_OS_EXPORT_DIR
911OPENJDK_TARGET_CPU_JLI_CFLAGS
912OPENJDK_TARGET_CPU_OSARCH
913OPENJDK_TARGET_CPU_ISADIR
914OPENJDK_TARGET_CPU_LIBDIR
915OPENJDK_TARGET_CPU_LEGACY_LIB
916OPENJDK_TARGET_CPU_LEGACY
917REQUIRED_OS_VERSION
918REQUIRED_OS_NAME
919COMPILE_TYPE
920OPENJDK_TARGET_CPU_ENDIAN
921OPENJDK_TARGET_CPU_BITS
922OPENJDK_TARGET_CPU_ARCH
923OPENJDK_TARGET_CPU
924OPENJDK_TARGET_OS_ENV
925OPENJDK_TARGET_OS_TYPE
926OPENJDK_TARGET_OS
927OPENJDK_BUILD_CPU_ENDIAN
928OPENJDK_BUILD_CPU_BITS
929OPENJDK_BUILD_CPU_ARCH
930OPENJDK_BUILD_CPU
931OPENJDK_BUILD_OS_ENV
932OPENJDK_BUILD_OS_TYPE
933OPENJDK_BUILD_OS
934OPENJDK_BUILD_AUTOCONF_NAME
935OPENJDK_TARGET_AUTOCONF_NAME
936target_os
937target_vendor
938target_cpu
939target
940host_os
941host_vendor
942host_cpu
943host
944build_os
945build_vendor
946build_cpu
947build
948CPIO
949SETFILE
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995CONFIGURE_COMMAND_LINE
996target_alias
997host_alias
998build_alias
999LIBS
1000ECHO_T
1001ECHO_N
1002ECHO_C
1003DEFS
1004mandir
1005localedir
1006libdir
1007psdir
1008pdfdir
1009dvidir
1010htmldir
1011infodir
1012docdir
1013oldincludedir
1014includedir
1015localstatedir
1016sharedstatedir
1017sysconfdir
1018datadir
1019datarootdir
1020libexecdir
1021sbindir
1022bindir
1023program_transform_name
1024prefix
1025exec_prefix
1026PACKAGE_URL
1027PACKAGE_BUGREPORT
1028PACKAGE_STRING
1029PACKAGE_VERSION
1030PACKAGE_TARNAME
1031PACKAGE_NAME
1032PATH_SEPARATOR
1033SHELL'
1034ac_subst_files=''
1035ac_user_opts='
1036enable_option_checking
1037with_target_bits
1038enable_openjdk_only
1039with_custom_make_dir
1040with_jdk_variant
1041with_jvm_interpreter
1042with_jvm_variants
1043enable_debug
1044with_debug_level
1045with_devkit
1046with_sys_root
1047with_sysroot
1048with_tools_dir
1049with_toolchain_path
1050with_extra_path
1051with_sdk_name
1052with_conf_name
1053with_output_sync
1054with_builddeps_conf
1055with_builddeps_server
1056with_builddeps_dir
1057with_builddeps_group
1058enable_headful
1059enable_hotspot_test_in_build
1060with_cacerts_file
1061enable_unlimited_crypto
1062enable_rmiconnector_iiop
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_copyright_year
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080with_toolchain_type
1081with_toolchain_version
1082with_jtreg
1083with_extra_cflags
1084with_extra_cxxflags
1085with_extra_ldflags
1086enable_debug_symbols
1087enable_zip_debug_info
1088with_x
1089with_cups
1090with_cups_include
1091with_freetype
1092with_freetype_include
1093with_freetype_lib
1094with_freetype_src
1095enable_freetype_bundling
1096with_alsa
1097with_alsa_include
1098with_alsa_lib
1099with_libjpeg
1100with_giflib
1101with_lcms
1102with_libpng
1103with_zlib
1104with_stdc__lib
1105with_msvcr_dll
1106with_msvcp_dll
1107with_dxsdk
1108with_dxsdk_lib
1109with_dxsdk_include
1110with_num_cores
1111with_memory_size
1112with_jobs
1113with_boot_jdk_jvmargs
1114with_sjavac_server_java
1115enable_sjavac
1116enable_precompiled_headers
1117enable_ccache
1118with_ccache_dir
1119'
1120      ac_precious_vars='build_alias
1121host_alias
1122target_alias
1123BASENAME
1124BASH
1125CAT
1126CHMOD
1127CMP
1128COMM
1129CP
1130CUT
1131DATE
1132DIFF
1133DIRNAME
1134ECHO
1135EXPR
1136FILE
1137FIND
1138HEAD
1139LN
1140LS
1141MKDIR
1142MKTEMP
1143MV
1144NAWK
1145PRINTF
1146RM
1147SH
1148SORT
1149TAIL
1150TAR
1151TEE
1152TOUCH
1153TR
1154UNAME
1155UNIQ
1156WC
1157WHICH
1158XARGS
1159AWK
1160GREP
1161EGREP
1162FGREP
1163SED
1164CYGPATH
1165READLINK
1166DF
1167SETFILE
1168CPIO
1169UNZIP
1170ZIP
1171LDD
1172OTOOL
1173READELF
1174HG
1175STAT
1176TIME
1177DSYMUTIL
1178XATTR
1179CODESIGN
1180PKG_CONFIG
1181JAVA
1182JAVAC
1183JAVAH
1184JAR
1185NATIVE2ASCII
1186JARSIGNER
1187CC
1188CFLAGS
1189LDFLAGS
1190LIBS
1191CPPFLAGS
1192CXX
1193CXXFLAGS
1194CCC
1195CPP
1196CXXCPP
1197AS
1198AR
1199OBJC
1200OBJCFLAGS
1201LIPO
1202STRIP
1203NM
1204GNM
1205MCS
1206OBJCOPY
1207OBJDUMP
1208BUILD_CC
1209BUILD_CXX
1210BUILD_LD
1211JTREGEXE
1212XMKMF
1213FREETYPE_CFLAGS
1214FREETYPE_LIBS
1215ALSA_CFLAGS
1216ALSA_LIBS
1217LCMS_CFLAGS
1218LCMS_LIBS
1219PNG_CFLAGS
1220PNG_LIBS
1221LIBFFI_CFLAGS
1222LIBFFI_LIBS
1223CCACHE'
1224
1225
1226# Initialize some variables set by options.
1227ac_init_help=
1228ac_init_version=false
1229ac_unrecognized_opts=
1230ac_unrecognized_sep=
1231# The variables have the same names as the options, with
1232# dashes changed to underlines.
1233cache_file=/dev/null
1234exec_prefix=NONE
1235no_create=
1236no_recursion=
1237prefix=NONE
1238program_prefix=NONE
1239program_suffix=NONE
1240program_transform_name=s,x,x,
1241silent=
1242site=
1243srcdir=
1244verbose=
1245x_includes=NONE
1246x_libraries=NONE
1247
1248# Installation directory options.
1249# These are left unexpanded so users can "make install exec_prefix=/foo"
1250# and all the variables that are supposed to be based on exec_prefix
1251# by default will actually change.
1252# Use braces instead of parens because sh, perl, etc. also accept them.
1253# (The list follows the same order as the GNU Coding Standards.)
1254bindir='${exec_prefix}/bin'
1255sbindir='${exec_prefix}/sbin'
1256libexecdir='${exec_prefix}/libexec'
1257datarootdir='${prefix}/share'
1258datadir='${datarootdir}'
1259sysconfdir='${prefix}/etc'
1260sharedstatedir='${prefix}/com'
1261localstatedir='${prefix}/var'
1262includedir='${prefix}/include'
1263oldincludedir='/usr/include'
1264docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1265infodir='${datarootdir}/info'
1266htmldir='${docdir}'
1267dvidir='${docdir}'
1268pdfdir='${docdir}'
1269psdir='${docdir}'
1270libdir='${exec_prefix}/lib'
1271localedir='${datarootdir}/locale'
1272mandir='${datarootdir}/man'
1273
1274ac_prev=
1275ac_dashdash=
1276for ac_option
1277do
1278  # If the previous option needs an argument, assign it.
1279  if test -n "$ac_prev"; then
1280    eval $ac_prev=\$ac_option
1281    ac_prev=
1282    continue
1283  fi
1284
1285  case $ac_option in
1286  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1287  *=)   ac_optarg= ;;
1288  *)    ac_optarg=yes ;;
1289  esac
1290
1291  # Accept the important Cygnus configure options, so we can diagnose typos.
1292
1293  case $ac_dashdash$ac_option in
1294  --)
1295    ac_dashdash=yes ;;
1296
1297  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1298    ac_prev=bindir ;;
1299  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1300    bindir=$ac_optarg ;;
1301
1302  -build | --build | --buil | --bui | --bu)
1303    ac_prev=build_alias ;;
1304  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1305    build_alias=$ac_optarg ;;
1306
1307  -cache-file | --cache-file | --cache-fil | --cache-fi \
1308  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1309    ac_prev=cache_file ;;
1310  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1311  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1312    cache_file=$ac_optarg ;;
1313
1314  --config-cache | -C)
1315    cache_file=config.cache ;;
1316
1317  -datadir | --datadir | --datadi | --datad)
1318    ac_prev=datadir ;;
1319  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1320    datadir=$ac_optarg ;;
1321
1322  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1323  | --dataroo | --dataro | --datar)
1324    ac_prev=datarootdir ;;
1325  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1326  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1327    datarootdir=$ac_optarg ;;
1328
1329  -disable-* | --disable-*)
1330    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1331    # Reject names that are not valid shell variable names.
1332    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1333      as_fn_error $? "invalid feature name: $ac_useropt"
1334    ac_useropt_orig=$ac_useropt
1335    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1336    case $ac_user_opts in
1337      *"
1338"enable_$ac_useropt"
1339"*) ;;
1340      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1341	 ac_unrecognized_sep=', ';;
1342    esac
1343    eval enable_$ac_useropt=no ;;
1344
1345  -docdir | --docdir | --docdi | --doc | --do)
1346    ac_prev=docdir ;;
1347  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1348    docdir=$ac_optarg ;;
1349
1350  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1351    ac_prev=dvidir ;;
1352  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1353    dvidir=$ac_optarg ;;
1354
1355  -enable-* | --enable-*)
1356    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1357    # Reject names that are not valid shell variable names.
1358    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1359      as_fn_error $? "invalid feature name: $ac_useropt"
1360    ac_useropt_orig=$ac_useropt
1361    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1362    case $ac_user_opts in
1363      *"
1364"enable_$ac_useropt"
1365"*) ;;
1366      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1367	 ac_unrecognized_sep=', ';;
1368    esac
1369    eval enable_$ac_useropt=\$ac_optarg ;;
1370
1371  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1372  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1373  | --exec | --exe | --ex)
1374    ac_prev=exec_prefix ;;
1375  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1376  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1377  | --exec=* | --exe=* | --ex=*)
1378    exec_prefix=$ac_optarg ;;
1379
1380  -gas | --gas | --ga | --g)
1381    # Obsolete; use --with-gas.
1382    with_gas=yes ;;
1383
1384  -help | --help | --hel | --he | -h)
1385    ac_init_help=long ;;
1386  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1387    ac_init_help=recursive ;;
1388  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1389    ac_init_help=short ;;
1390
1391  -host | --host | --hos | --ho)
1392    ac_prev=host_alias ;;
1393  -host=* | --host=* | --hos=* | --ho=*)
1394    host_alias=$ac_optarg ;;
1395
1396  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1397    ac_prev=htmldir ;;
1398  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1399  | --ht=*)
1400    htmldir=$ac_optarg ;;
1401
1402  -includedir | --includedir | --includedi | --included | --include \
1403  | --includ | --inclu | --incl | --inc)
1404    ac_prev=includedir ;;
1405  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1406  | --includ=* | --inclu=* | --incl=* | --inc=*)
1407    includedir=$ac_optarg ;;
1408
1409  -infodir | --infodir | --infodi | --infod | --info | --inf)
1410    ac_prev=infodir ;;
1411  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1412    infodir=$ac_optarg ;;
1413
1414  -libdir | --libdir | --libdi | --libd)
1415    ac_prev=libdir ;;
1416  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1417    libdir=$ac_optarg ;;
1418
1419  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1420  | --libexe | --libex | --libe)
1421    ac_prev=libexecdir ;;
1422  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1423  | --libexe=* | --libex=* | --libe=*)
1424    libexecdir=$ac_optarg ;;
1425
1426  -localedir | --localedir | --localedi | --localed | --locale)
1427    ac_prev=localedir ;;
1428  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1429    localedir=$ac_optarg ;;
1430
1431  -localstatedir | --localstatedir | --localstatedi | --localstated \
1432  | --localstate | --localstat | --localsta | --localst | --locals)
1433    ac_prev=localstatedir ;;
1434  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1435  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1436    localstatedir=$ac_optarg ;;
1437
1438  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1439    ac_prev=mandir ;;
1440  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1441    mandir=$ac_optarg ;;
1442
1443  -nfp | --nfp | --nf)
1444    # Obsolete; use --without-fp.
1445    with_fp=no ;;
1446
1447  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1448  | --no-cr | --no-c | -n)
1449    no_create=yes ;;
1450
1451  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1452  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1453    no_recursion=yes ;;
1454
1455  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1456  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1457  | --oldin | --oldi | --old | --ol | --o)
1458    ac_prev=oldincludedir ;;
1459  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1460  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1461  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1462    oldincludedir=$ac_optarg ;;
1463
1464  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1465    ac_prev=prefix ;;
1466  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1467    prefix=$ac_optarg ;;
1468
1469  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1470  | --program-pre | --program-pr | --program-p)
1471    ac_prev=program_prefix ;;
1472  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1473  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1474    program_prefix=$ac_optarg ;;
1475
1476  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1477  | --program-suf | --program-su | --program-s)
1478    ac_prev=program_suffix ;;
1479  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1480  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1481    program_suffix=$ac_optarg ;;
1482
1483  -program-transform-name | --program-transform-name \
1484  | --program-transform-nam | --program-transform-na \
1485  | --program-transform-n | --program-transform- \
1486  | --program-transform | --program-transfor \
1487  | --program-transfo | --program-transf \
1488  | --program-trans | --program-tran \
1489  | --progr-tra | --program-tr | --program-t)
1490    ac_prev=program_transform_name ;;
1491  -program-transform-name=* | --program-transform-name=* \
1492  | --program-transform-nam=* | --program-transform-na=* \
1493  | --program-transform-n=* | --program-transform-=* \
1494  | --program-transform=* | --program-transfor=* \
1495  | --program-transfo=* | --program-transf=* \
1496  | --program-trans=* | --program-tran=* \
1497  | --progr-tra=* | --program-tr=* | --program-t=*)
1498    program_transform_name=$ac_optarg ;;
1499
1500  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1501    ac_prev=pdfdir ;;
1502  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1503    pdfdir=$ac_optarg ;;
1504
1505  -psdir | --psdir | --psdi | --psd | --ps)
1506    ac_prev=psdir ;;
1507  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1508    psdir=$ac_optarg ;;
1509
1510  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1511  | -silent | --silent | --silen | --sile | --sil)
1512    silent=yes ;;
1513
1514  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1515    ac_prev=sbindir ;;
1516  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1517  | --sbi=* | --sb=*)
1518    sbindir=$ac_optarg ;;
1519
1520  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1521  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1522  | --sharedst | --shareds | --shared | --share | --shar \
1523  | --sha | --sh)
1524    ac_prev=sharedstatedir ;;
1525  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1526  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1527  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1528  | --sha=* | --sh=*)
1529    sharedstatedir=$ac_optarg ;;
1530
1531  -site | --site | --sit)
1532    ac_prev=site ;;
1533  -site=* | --site=* | --sit=*)
1534    site=$ac_optarg ;;
1535
1536  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1537    ac_prev=srcdir ;;
1538  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1539    srcdir=$ac_optarg ;;
1540
1541  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1542  | --syscon | --sysco | --sysc | --sys | --sy)
1543    ac_prev=sysconfdir ;;
1544  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1545  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1546    sysconfdir=$ac_optarg ;;
1547
1548  -target | --target | --targe | --targ | --tar | --ta | --t)
1549    ac_prev=target_alias ;;
1550  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1551    target_alias=$ac_optarg ;;
1552
1553  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1554    verbose=yes ;;
1555
1556  -version | --version | --versio | --versi | --vers | -V)
1557    ac_init_version=: ;;
1558
1559  -with-* | --with-*)
1560    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1561    # Reject names that are not valid shell variable names.
1562    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1563      as_fn_error $? "invalid package name: $ac_useropt"
1564    ac_useropt_orig=$ac_useropt
1565    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1566    case $ac_user_opts in
1567      *"
1568"with_$ac_useropt"
1569"*) ;;
1570      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1571	 ac_unrecognized_sep=', ';;
1572    esac
1573    eval with_$ac_useropt=\$ac_optarg ;;
1574
1575  -without-* | --without-*)
1576    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1577    # Reject names that are not valid shell variable names.
1578    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1579      as_fn_error $? "invalid package name: $ac_useropt"
1580    ac_useropt_orig=$ac_useropt
1581    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1582    case $ac_user_opts in
1583      *"
1584"with_$ac_useropt"
1585"*) ;;
1586      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1587	 ac_unrecognized_sep=', ';;
1588    esac
1589    eval with_$ac_useropt=no ;;
1590
1591  --x)
1592    # Obsolete; use --with-x.
1593    with_x=yes ;;
1594
1595  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1596  | --x-incl | --x-inc | --x-in | --x-i)
1597    ac_prev=x_includes ;;
1598  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1599  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1600    x_includes=$ac_optarg ;;
1601
1602  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1603  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1604    ac_prev=x_libraries ;;
1605  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1606  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1607    x_libraries=$ac_optarg ;;
1608
1609  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1610Try \`$0 --help' for more information"
1611    ;;
1612
1613  *=*)
1614    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1615    # Reject names that are not valid shell variable names.
1616    case $ac_envvar in #(
1617      '' | [0-9]* | *[!_$as_cr_alnum]* )
1618      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1619    esac
1620    eval $ac_envvar=\$ac_optarg
1621    export $ac_envvar ;;
1622
1623  *)
1624    # FIXME: should be removed in autoconf 3.0.
1625    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1626    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1627      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1628    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1629    ;;
1630
1631  esac
1632done
1633
1634if test -n "$ac_prev"; then
1635  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1636  as_fn_error $? "missing argument to $ac_option"
1637fi
1638
1639if test -n "$ac_unrecognized_opts"; then
1640  case $enable_option_checking in
1641    no) ;;
1642    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1643    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1644  esac
1645fi
1646
1647# Check all directory arguments for consistency.
1648for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1649		datadir sysconfdir sharedstatedir localstatedir includedir \
1650		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1651		libdir localedir mandir
1652do
1653  eval ac_val=\$$ac_var
1654  # Remove trailing slashes.
1655  case $ac_val in
1656    */ )
1657      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1658      eval $ac_var=\$ac_val;;
1659  esac
1660  # Be sure to have absolute directory names.
1661  case $ac_val in
1662    [\\/$]* | ?:[\\/]* )  continue;;
1663    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1664  esac
1665  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1666done
1667
1668# There might be people who depend on the old broken behavior: `$host'
1669# used to hold the argument of --host etc.
1670# FIXME: To remove some day.
1671build=$build_alias
1672host=$host_alias
1673target=$target_alias
1674
1675# FIXME: To remove some day.
1676if test "x$host_alias" != x; then
1677  if test "x$build_alias" = x; then
1678    cross_compiling=maybe
1679  elif test "x$build_alias" != "x$host_alias"; then
1680    cross_compiling=yes
1681  fi
1682fi
1683
1684ac_tool_prefix=
1685test -n "$host_alias" && ac_tool_prefix=$host_alias-
1686
1687test "$silent" = yes && exec 6>/dev/null
1688
1689
1690ac_pwd=`pwd` && test -n "$ac_pwd" &&
1691ac_ls_di=`ls -di .` &&
1692ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1693  as_fn_error $? "working directory cannot be determined"
1694test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1695  as_fn_error $? "pwd does not report name of working directory"
1696
1697
1698# Find the source files, if location was not specified.
1699if test -z "$srcdir"; then
1700  ac_srcdir_defaulted=yes
1701  # Try the directory containing this script, then the parent directory.
1702  ac_confdir=`$as_dirname -- "$as_myself" ||
1703$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1704	 X"$as_myself" : 'X\(//\)[^/]' \| \
1705	 X"$as_myself" : 'X\(//\)$' \| \
1706	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1707$as_echo X"$as_myself" |
1708    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1709	    s//\1/
1710	    q
1711	  }
1712	  /^X\(\/\/\)[^/].*/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\/\)$/{
1717	    s//\1/
1718	    q
1719	  }
1720	  /^X\(\/\).*/{
1721	    s//\1/
1722	    q
1723	  }
1724	  s/.*/./; q'`
1725  srcdir=$ac_confdir
1726  if test ! -r "$srcdir/$ac_unique_file"; then
1727    srcdir=..
1728  fi
1729else
1730  ac_srcdir_defaulted=no
1731fi
1732if test ! -r "$srcdir/$ac_unique_file"; then
1733  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1734  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1735fi
1736ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1737ac_abs_confdir=`(
1738	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1739	pwd)`
1740# When building in place, set srcdir=.
1741if test "$ac_abs_confdir" = "$ac_pwd"; then
1742  srcdir=.
1743fi
1744# Remove unnecessary trailing slashes from srcdir.
1745# Double slashes in file names in object file debugging info
1746# mess up M-x gdb in Emacs.
1747case $srcdir in
1748*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1749esac
1750for ac_var in $ac_precious_vars; do
1751  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1752  eval ac_env_${ac_var}_value=\$${ac_var}
1753  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1754  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1755done
1756
1757#
1758# Report the --help message.
1759#
1760if test "$ac_init_help" = "long"; then
1761  # Omit some internal or obsolete options to make the list less imposing.
1762  # This message is too long to be a string in the A/UX 3.1 sh.
1763  cat <<_ACEOF
1764\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1765
1766Usage: $0 [OPTION]... [VAR=VALUE]...
1767
1768To assign environment variables (e.g., CC, CFLAGS...), specify them as
1769VAR=VALUE.  See below for descriptions of some of the useful variables.
1770
1771Defaults for the options are specified in brackets.
1772
1773Configuration:
1774  -h, --help              display this help and exit
1775      --help=short        display options specific to this package
1776      --help=recursive    display the short help of all the included packages
1777  -V, --version           display version information and exit
1778  -q, --quiet, --silent   do not print \`checking ...' messages
1779      --cache-file=FILE   cache test results in FILE [disabled]
1780  -C, --config-cache      alias for \`--cache-file=config.cache'
1781  -n, --no-create         do not create output files
1782      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1783
1784Installation directories:
1785  --prefix=PREFIX         install architecture-independent files in PREFIX
1786                          [$ac_default_prefix]
1787  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1788                          [PREFIX]
1789
1790By default, \`make install' will install all the files in
1791\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1792an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1793for instance \`--prefix=\$HOME'.
1794
1795For better control, use the options below.
1796
1797Fine tuning of the installation directories:
1798  --bindir=DIR            user executables [EPREFIX/bin]
1799  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1800  --libexecdir=DIR        program executables [EPREFIX/libexec]
1801  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1802  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1803  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1804  --libdir=DIR            object code libraries [EPREFIX/lib]
1805  --includedir=DIR        C header files [PREFIX/include]
1806  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1807  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1808  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1809  --infodir=DIR           info documentation [DATAROOTDIR/info]
1810  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1811  --mandir=DIR            man documentation [DATAROOTDIR/man]
1812  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1813  --htmldir=DIR           html documentation [DOCDIR]
1814  --dvidir=DIR            dvi documentation [DOCDIR]
1815  --pdfdir=DIR            pdf documentation [DOCDIR]
1816  --psdir=DIR             ps documentation [DOCDIR]
1817_ACEOF
1818
1819  cat <<\_ACEOF
1820
1821X features:
1822  --x-includes=DIR    X include files are in DIR
1823  --x-libraries=DIR   X library files are in DIR
1824
1825System types:
1826  --build=BUILD     configure for building on BUILD [guessed]
1827  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1828  --target=TARGET   configure for building compilers for TARGET [HOST]
1829_ACEOF
1830fi
1831
1832if test -n "$ac_init_help"; then
1833  case $ac_init_help in
1834     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1835   esac
1836  cat <<\_ACEOF
1837
1838Optional Features:
1839  --disable-option-checking  ignore unrecognized --enable/--with options
1840  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1841  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1842  --enable-openjdk-only   suppress building custom source even if present
1843                          [disabled]
1844  --enable-debug          set the debug level to fastdebug (shorthand for
1845                          --with-debug-level=fastdebug) [disabled]
1846  --disable-headful       disable building headful support (graphical UI
1847                          support) [enabled]
1848  --enable-hotspot-test-in-build
1849                          run the Queens test after Hotspot build [disabled]
1850  --enable-unlimited-crypto
1851                          Enable unlimited crypto policy [disabled]
1852  --enable-rmiconnector-iiop
1853                          enable the JMX RMIConnector iiop transport
1854                          [disabled]
1855  --disable-debug-symbols disable generation of debug symbols [enabled]
1856  --disable-zip-debug-info
1857                          disable zipping of debug-info files [enabled]
1858  --disable-freetype-bundling
1859                          disable bundling of the freetype library with the
1860                          build result [enabled on Windows or when using
1861                          --with-freetype, disabled otherwise]
1862  --enable-sjavac         use sjavac to do fast incremental compiles
1863                          [disabled]
1864  --disable-precompiled-headers
1865                          disable using precompiled headers when compiling C++
1866                          [enabled]
1867  --enable-ccache         enable using ccache to speed up recompilations
1868                          [disabled]
1869
1870Optional Packages:
1871  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1872  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1873  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1874                          support it), e.g. --with-target-bits=32 [guessed]
1875  --with-custom-make-dir  Deprecated. Option is kept for backwards
1876                          compatibility and is ignored
1877  --with-jdk-variant      JDK variant to build (normal) [normal]
1878  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1879  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1880                          client, minimal1, kernel, zero, zeroshark, core)
1881                          [server]
1882  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1883                          optimized (HotSpot build only)) [release]
1884  --with-devkit           use this devkit for compilers, tools and resources
1885  --with-sys-root         alias for --with-sysroot for backwards compatability
1886  --with-sysroot          use this directory as sysroot
1887  --with-tools-dir        alias for --with-toolchain-path for backwards
1888                          compatibility
1889  --with-toolchain-path   prepend these directories when searching for
1890                          toolchain binaries (compilers etc)
1891  --with-extra-path       prepend these directories to the default path
1892  --with-sdk-name         use the platform SDK of the given name. [macosx]
1893  --with-conf-name        use this as the name of the configuration [generated
1894                          from important configuration options]
1895  --with-output-sync      set make output sync type if supported by make.
1896                          [recurse]
1897  --with-builddeps-conf   use this configuration file for the builddeps
1898  --with-builddeps-server download and use build dependencies from this server
1899                          url
1900  --with-builddeps-dir    store downloaded build dependencies here
1901                          [/localhome/builddeps]
1902  --with-builddeps-group  chgrp the downloaded build dependencies to this
1903                          group
1904  --with-cacerts-file     specify alternative cacerts file
1905  --with-milestone        Set milestone value for build [internal]
1906  --with-update-version   Set update version value for build [b00]
1907  --with-user-release-suffix
1908                          Add a custom string to the version string if build
1909                          number is not set.[username_builddateb00]
1910  --with-build-number     Set build number value for build [b00]
1911  --with-copyright-year   Set copyright year value for build [current year]
1912  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1913  --with-add-source-root  for each and every source directory, look in this
1914                          additional source root for the same directory; if it
1915                          exists and have files in it, include it in the build
1916  --with-override-source-root
1917                          for each and every source directory, look in this
1918                          override source root for the same directory; if it
1919                          exists, use that directory instead and ignore the
1920                          directory in the original source root
1921  --with-adds-and-overrides
1922                          use the subdirs 'adds' and 'overrides' in the
1923                          specified directory as add-source-root and
1924                          override-source-root
1925  --with-override-langtools
1926                          use this langtools dir for the build
1927  --with-override-corba   use this corba dir for the build
1928  --with-override-jaxp    use this jaxp dir for the build
1929  --with-override-jaxws   use this jaxws dir for the build
1930  --with-override-hotspot use this hotspot dir for the build
1931  --with-override-nashorn use this nashorn dir for the build
1932  --with-override-jdk     use this jdk dir for the build
1933  --with-import-hotspot   import hotspot binaries from this jdk image or
1934                          hotspot build dist dir instead of building from
1935                          source
1936  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1937                          to show possible values [platform dependent]
1938  --with-toolchain-version
1939                          the version of the toolchain to look for, use
1940                          '--help' to show possible values [platform
1941                          dependent]
1942  --with-jtreg            Regression Test Harness [probed]
1943  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1944  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1945  --with-extra-ldflags    extra flags to be used when linking jdk
1946  --with-x                use the X Window System
1947  --with-cups             specify prefix directory for the cups package
1948                          (expecting the headers under PATH/include)
1949  --with-cups-include     specify directory for the cups include files
1950  --with-freetype         specify prefix directory for the freetype package
1951                          (expecting the libraries under PATH/lib and the
1952                          headers under PATH/include)
1953  --with-freetype-include specify directory for the freetype include files
1954  --with-freetype-lib     specify directory for the freetype library
1955  --with-freetype-src     specify directory with freetype sources to
1956                          automatically build the library (experimental,
1957                          Windows-only)
1958  --with-alsa             specify prefix directory for the alsa package
1959                          (expecting the libraries under PATH/lib and the
1960                          headers under PATH/include)
1961  --with-alsa-include     specify directory for the alsa include files
1962  --with-alsa-lib         specify directory for the alsa library
1963  --with-libjpeg          use libjpeg from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-giflib           use giflib from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-lcms             use lcms2 from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-libpng           use libpng from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-zlib             use zlib from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-stdc++lib=<static>,<dynamic>,<default>
1974                          force linking of the C++ runtime on Linux to either
1975                          static or dynamic, default is static with dynamic as
1976                          fallback
1977  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1978                          (Windows only) [probed]
1979  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1980                          (Windows only) [probed]
1981  --with-dxsdk            Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-include    Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-num-cores        number of cores in the build system, e.g.
1988                          --with-num-cores=8 [probed]
1989  --with-memory-size      memory (in MB) available in the build system, e.g.
1990                          --with-memory-size=1024 [probed]
1991  --with-jobs             number of parallel jobs to let make run [calculated
1992                          based on cores and memory]
1993  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1994                          invocations of boot JDK, overriding the default
1995                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1996                          -enableassertions"
1997  --with-sjavac-server-java
1998                          use this java binary for running the sjavac
1999                          background server [Boot JDK java]
2000  --with-ccache-dir       where to store ccache files [~/.ccache]
2001
2002Some influential environment variables:
2003  BASENAME    Override default value for BASENAME
2004  BASH        Override default value for BASH
2005  CAT         Override default value for CAT
2006  CHMOD       Override default value for CHMOD
2007  CMP         Override default value for CMP
2008  COMM        Override default value for COMM
2009  CP          Override default value for CP
2010  CUT         Override default value for CUT
2011  DATE        Override default value for DATE
2012  DIFF        Override default value for DIFF
2013  DIRNAME     Override default value for DIRNAME
2014  ECHO        Override default value for ECHO
2015  EXPR        Override default value for EXPR
2016  FILE        Override default value for FILE
2017  FIND        Override default value for FIND
2018  HEAD        Override default value for HEAD
2019  LN          Override default value for LN
2020  LS          Override default value for LS
2021  MKDIR       Override default value for MKDIR
2022  MKTEMP      Override default value for MKTEMP
2023  MV          Override default value for MV
2024  NAWK        Override default value for NAWK
2025  PRINTF      Override default value for PRINTF
2026  RM          Override default value for RM
2027  SH          Override default value for SH
2028  SORT        Override default value for SORT
2029  TAIL        Override default value for TAIL
2030  TAR         Override default value for TAR
2031  TEE         Override default value for TEE
2032  TOUCH       Override default value for TOUCH
2033  TR          Override default value for TR
2034  UNAME       Override default value for UNAME
2035  UNIQ        Override default value for UNIQ
2036  WC          Override default value for WC
2037  WHICH       Override default value for WHICH
2038  XARGS       Override default value for XARGS
2039  AWK         Override default value for AWK
2040  GREP        Override default value for GREP
2041  EGREP       Override default value for EGREP
2042  FGREP       Override default value for FGREP
2043  SED         Override default value for SED
2044  CYGPATH     Override default value for CYGPATH
2045  READLINK    Override default value for READLINK
2046  DF          Override default value for DF
2047  SETFILE     Override default value for SETFILE
2048  CPIO        Override default value for CPIO
2049  UNZIP       Override default value for UNZIP
2050  ZIP         Override default value for ZIP
2051  LDD         Override default value for LDD
2052  OTOOL       Override default value for OTOOL
2053  READELF     Override default value for READELF
2054  HG          Override default value for HG
2055  STAT        Override default value for STAT
2056  TIME        Override default value for TIME
2057  DSYMUTIL    Override default value for DSYMUTIL
2058  XATTR       Override default value for XATTR
2059  CODESIGN    Override default value for CODESIGN
2060  PKG_CONFIG  path to pkg-config utility
2061  JAVA        Override default value for JAVA
2062  JAVAC       Override default value for JAVAC
2063  JAVAH       Override default value for JAVAH
2064  JAR         Override default value for JAR
2065  NATIVE2ASCII
2066              Override default value for NATIVE2ASCII
2067  JARSIGNER   Override default value for JARSIGNER
2068  CC          C compiler command
2069  CFLAGS      C compiler flags
2070  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2071              nonstandard directory <lib dir>
2072  LIBS        libraries to pass to the linker, e.g. -l<library>
2073  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2074              you have headers in a nonstandard directory <include dir>
2075  CXX         C++ compiler command
2076  CXXFLAGS    C++ compiler flags
2077  CPP         C preprocessor
2078  CXXCPP      C++ preprocessor
2079  AS          Override default value for AS
2080  AR          Override default value for AR
2081  OBJC        Objective C compiler command
2082  OBJCFLAGS   Objective C compiler flags
2083  LIPO        Override default value for LIPO
2084  STRIP       Override default value for STRIP
2085  NM          Override default value for NM
2086  GNM         Override default value for GNM
2087  MCS         Override default value for MCS
2088  OBJCOPY     Override default value for OBJCOPY
2089  OBJDUMP     Override default value for OBJDUMP
2090  BUILD_CC    Override default value for BUILD_CC
2091  BUILD_CXX   Override default value for BUILD_CXX
2092  BUILD_LD    Override default value for BUILD_LD
2093  JTREGEXE    Override default value for JTREGEXE
2094  XMKMF       Path to xmkmf, Makefile generator for X Window System
2095  FREETYPE_CFLAGS
2096              C compiler flags for FREETYPE, overriding pkg-config
2097  FREETYPE_LIBS
2098              linker flags for FREETYPE, overriding pkg-config
2099  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2100  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2101  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2102  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2103  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2104  PNG_LIBS    linker flags for PNG, 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  CCACHE      Override default value for CCACHE
2109
2110Use these variables to override the choices made by `configure' or to help
2111it to find libraries and programs with nonstandard names/locations.
2112
2113Report bugs to <build-dev@openjdk.java.net>.
2114OpenJDK home page: <http://openjdk.java.net>.
2115_ACEOF
2116ac_status=$?
2117fi
2118
2119if test "$ac_init_help" = "recursive"; then
2120  # If there are subdirs, report their specific --help.
2121  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2122    test -d "$ac_dir" ||
2123      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2124      continue
2125    ac_builddir=.
2126
2127case "$ac_dir" in
2128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2129*)
2130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2131  # A ".." for each directory in $ac_dir_suffix.
2132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2133  case $ac_top_builddir_sub in
2134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2136  esac ;;
2137esac
2138ac_abs_top_builddir=$ac_pwd
2139ac_abs_builddir=$ac_pwd$ac_dir_suffix
2140# for backward compatibility:
2141ac_top_builddir=$ac_top_build_prefix
2142
2143case $srcdir in
2144  .)  # We are building in place.
2145    ac_srcdir=.
2146    ac_top_srcdir=$ac_top_builddir_sub
2147    ac_abs_top_srcdir=$ac_pwd ;;
2148  [\\/]* | ?:[\\/]* )  # Absolute name.
2149    ac_srcdir=$srcdir$ac_dir_suffix;
2150    ac_top_srcdir=$srcdir
2151    ac_abs_top_srcdir=$srcdir ;;
2152  *) # Relative name.
2153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2154    ac_top_srcdir=$ac_top_build_prefix$srcdir
2155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2156esac
2157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2158
2159    cd "$ac_dir" || { ac_status=$?; continue; }
2160    # Check for guested configure.
2161    if test -f "$ac_srcdir/configure.gnu"; then
2162      echo &&
2163      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2164    elif test -f "$ac_srcdir/configure"; then
2165      echo &&
2166      $SHELL "$ac_srcdir/configure" --help=recursive
2167    else
2168      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2169    fi || ac_status=$?
2170    cd "$ac_pwd" || { ac_status=$?; break; }
2171  done
2172fi
2173
2174test -n "$ac_init_help" && exit $ac_status
2175if $ac_init_version; then
2176  cat <<\_ACEOF
2177OpenJDK configure jdk9
2178generated by GNU Autoconf 2.69
2179
2180Copyright (C) 2012 Free Software Foundation, Inc.
2181This configure script is free software; the Free Software Foundation
2182gives unlimited permission to copy, distribute and modify it.
2183_ACEOF
2184  exit
2185fi
2186
2187## ------------------------ ##
2188## Autoconf initialization. ##
2189## ------------------------ ##
2190
2191# ac_fn_c_try_compile LINENO
2192# --------------------------
2193# Try to compile conftest.$ac_ext, and return whether this succeeded.
2194ac_fn_c_try_compile ()
2195{
2196  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197  rm -f conftest.$ac_objext
2198  if { { ac_try="$ac_compile"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_compile") 2>conftest.err
2206  ac_status=$?
2207  if test -s conftest.err; then
2208    grep -v '^ *+' conftest.err >conftest.er1
2209    cat conftest.er1 >&5
2210    mv -f conftest.er1 conftest.err
2211  fi
2212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213  test $ac_status = 0; } && {
2214	 test -z "$ac_c_werror_flag" ||
2215	 test ! -s conftest.err
2216       } && test -s conftest.$ac_objext; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: failed program was:" >&5
2220sed 's/^/| /' conftest.$ac_ext >&5
2221
2222	ac_retval=1
2223fi
2224  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225  as_fn_set_status $ac_retval
2226
2227} # ac_fn_c_try_compile
2228
2229# ac_fn_cxx_try_compile LINENO
2230# ----------------------------
2231# Try to compile conftest.$ac_ext, and return whether this succeeded.
2232ac_fn_cxx_try_compile ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  rm -f conftest.$ac_objext
2236  if { { ac_try="$ac_compile"
2237case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_compile") 2>conftest.err
2244  ac_status=$?
2245  if test -s conftest.err; then
2246    grep -v '^ *+' conftest.err >conftest.er1
2247    cat conftest.er1 >&5
2248    mv -f conftest.er1 conftest.err
2249  fi
2250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2251  test $ac_status = 0; } && {
2252	 test -z "$ac_cxx_werror_flag" ||
2253	 test ! -s conftest.err
2254       } && test -s conftest.$ac_objext; then :
2255  ac_retval=0
2256else
2257  $as_echo "$as_me: failed program was:" >&5
2258sed 's/^/| /' conftest.$ac_ext >&5
2259
2260	ac_retval=1
2261fi
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_compile
2266
2267# ac_fn_c_try_cpp LINENO
2268# ----------------------
2269# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2270ac_fn_c_try_cpp ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if { { ac_try="$ac_cpp conftest.$ac_ext"
2274case "(($ac_try" in
2275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276  *) ac_try_echo=$ac_try;;
2277esac
2278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279$as_echo "$ac_try_echo"; } >&5
2280  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2281  ac_status=$?
2282  if test -s conftest.err; then
2283    grep -v '^ *+' conftest.err >conftest.er1
2284    cat conftest.er1 >&5
2285    mv -f conftest.er1 conftest.err
2286  fi
2287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2288  test $ac_status = 0; } > conftest.i && {
2289	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2290	 test ! -s conftest.err
2291       }; then :
2292  ac_retval=0
2293else
2294  $as_echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297    ac_retval=1
2298fi
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300  as_fn_set_status $ac_retval
2301
2302} # ac_fn_c_try_cpp
2303
2304# ac_fn_cxx_try_cpp LINENO
2305# ------------------------
2306# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2307ac_fn_cxx_try_cpp ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if { { ac_try="$ac_cpp conftest.$ac_ext"
2311case "(($ac_try" in
2312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313  *) ac_try_echo=$ac_try;;
2314esac
2315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316$as_echo "$ac_try_echo"; } >&5
2317  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2318  ac_status=$?
2319  if test -s conftest.err; then
2320    grep -v '^ *+' conftest.err >conftest.er1
2321    cat conftest.er1 >&5
2322    mv -f conftest.er1 conftest.err
2323  fi
2324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325  test $ac_status = 0; } > conftest.i && {
2326	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2327	 test ! -s conftest.err
2328       }; then :
2329  ac_retval=0
2330else
2331  $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334    ac_retval=1
2335fi
2336  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337  as_fn_set_status $ac_retval
2338
2339} # ac_fn_cxx_try_cpp
2340
2341# ac_fn_objc_try_compile LINENO
2342# -----------------------------
2343# Try to compile conftest.$ac_ext, and return whether this succeeded.
2344ac_fn_objc_try_compile ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  rm -f conftest.$ac_objext
2348  if { { ac_try="$ac_compile"
2349case "(($ac_try" in
2350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351  *) ac_try_echo=$ac_try;;
2352esac
2353eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354$as_echo "$ac_try_echo"; } >&5
2355  (eval "$ac_compile") 2>conftest.err
2356  ac_status=$?
2357  if test -s conftest.err; then
2358    grep -v '^ *+' conftest.err >conftest.er1
2359    cat conftest.er1 >&5
2360    mv -f conftest.er1 conftest.err
2361  fi
2362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2363  test $ac_status = 0; } && {
2364	 test -z "$ac_objc_werror_flag" ||
2365	 test ! -s conftest.err
2366       } && test -s conftest.$ac_objext; then :
2367  ac_retval=0
2368else
2369  $as_echo "$as_me: failed program was:" >&5
2370sed 's/^/| /' conftest.$ac_ext >&5
2371
2372	ac_retval=1
2373fi
2374  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2375  as_fn_set_status $ac_retval
2376
2377} # ac_fn_objc_try_compile
2378
2379# ac_fn_c_try_link LINENO
2380# -----------------------
2381# Try to link conftest.$ac_ext, and return whether this succeeded.
2382ac_fn_c_try_link ()
2383{
2384  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2385  rm -f conftest.$ac_objext conftest$ac_exeext
2386  if { { ac_try="$ac_link"
2387case "(($ac_try" in
2388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2389  *) ac_try_echo=$ac_try;;
2390esac
2391eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2392$as_echo "$ac_try_echo"; } >&5
2393  (eval "$ac_link") 2>conftest.err
2394  ac_status=$?
2395  if test -s conftest.err; then
2396    grep -v '^ *+' conftest.err >conftest.er1
2397    cat conftest.er1 >&5
2398    mv -f conftest.er1 conftest.err
2399  fi
2400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2401  test $ac_status = 0; } && {
2402	 test -z "$ac_c_werror_flag" ||
2403	 test ! -s conftest.err
2404       } && test -s conftest$ac_exeext && {
2405	 test "$cross_compiling" = yes ||
2406	 test -x conftest$ac_exeext
2407       }; then :
2408  ac_retval=0
2409else
2410  $as_echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413	ac_retval=1
2414fi
2415  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2416  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2417  # interfere with the next link command; also delete a directory that is
2418  # left behind by Apple's compiler.  We do this before executing the actions.
2419  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421  as_fn_set_status $ac_retval
2422
2423} # ac_fn_c_try_link
2424
2425# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2426# ---------------------------------------------------------
2427# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2428# the include files in INCLUDES and setting the cache variable VAR
2429# accordingly.
2430ac_fn_cxx_check_header_mongrel ()
2431{
2432  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433  if eval \${$3+:} false; then :
2434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2435$as_echo_n "checking for $2... " >&6; }
2436if eval \${$3+:} false; then :
2437  $as_echo_n "(cached) " >&6
2438fi
2439eval ac_res=\$$3
2440	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2441$as_echo "$ac_res" >&6; }
2442else
2443  # Is the header compilable?
2444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2445$as_echo_n "checking $2 usability... " >&6; }
2446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447/* end confdefs.h.  */
2448$4
2449#include <$2>
2450_ACEOF
2451if ac_fn_cxx_try_compile "$LINENO"; then :
2452  ac_header_compiler=yes
2453else
2454  ac_header_compiler=no
2455fi
2456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2458$as_echo "$ac_header_compiler" >&6; }
2459
2460# Is the header present?
2461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2462$as_echo_n "checking $2 presence... " >&6; }
2463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2464/* end confdefs.h.  */
2465#include <$2>
2466_ACEOF
2467if ac_fn_cxx_try_cpp "$LINENO"; then :
2468  ac_header_preproc=yes
2469else
2470  ac_header_preproc=no
2471fi
2472rm -f conftest.err conftest.i conftest.$ac_ext
2473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2474$as_echo "$ac_header_preproc" >&6; }
2475
2476# So?  What about this header?
2477case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2478  yes:no: )
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2480$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2482$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2483    ;;
2484  no:yes:* )
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2486$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2488$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2490$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2491    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2492$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2493    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2494$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2495( $as_echo "## ----------------------------------------- ##
2496## Report this to build-dev@openjdk.java.net ##
2497## ----------------------------------------- ##"
2498     ) | sed "s/^/$as_me: WARNING:     /" >&2
2499    ;;
2500esac
2501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2502$as_echo_n "checking for $2... " >&6; }
2503if eval \${$3+:} false; then :
2504  $as_echo_n "(cached) " >&6
2505else
2506  eval "$3=\$ac_header_compiler"
2507fi
2508eval ac_res=\$$3
2509	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2510$as_echo "$ac_res" >&6; }
2511fi
2512  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2513
2514} # ac_fn_cxx_check_header_mongrel
2515
2516# ac_fn_cxx_try_run LINENO
2517# ------------------------
2518# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2519# that executables *can* be run.
2520ac_fn_cxx_try_run ()
2521{
2522  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2523  if { { ac_try="$ac_link"
2524case "(($ac_try" in
2525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526  *) ac_try_echo=$ac_try;;
2527esac
2528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529$as_echo "$ac_try_echo"; } >&5
2530  (eval "$ac_link") 2>&5
2531  ac_status=$?
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2534  { { case "(($ac_try" in
2535  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536  *) ac_try_echo=$ac_try;;
2537esac
2538eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539$as_echo "$ac_try_echo"; } >&5
2540  (eval "$ac_try") 2>&5
2541  ac_status=$?
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; }; }; then :
2544  ac_retval=0
2545else
2546  $as_echo "$as_me: program exited with status $ac_status" >&5
2547       $as_echo "$as_me: failed program was:" >&5
2548sed 's/^/| /' conftest.$ac_ext >&5
2549
2550       ac_retval=$ac_status
2551fi
2552  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2553  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2554  as_fn_set_status $ac_retval
2555
2556} # ac_fn_cxx_try_run
2557
2558# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2559# ---------------------------------------------------------
2560# Tests whether HEADER exists and can be compiled using the include files in
2561# INCLUDES, setting the cache variable VAR accordingly.
2562ac_fn_cxx_check_header_compile ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2566$as_echo_n "checking for $2... " >&6; }
2567if eval \${$3+:} false; then :
2568  $as_echo_n "(cached) " >&6
2569else
2570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2571/* end confdefs.h.  */
2572$4
2573#include <$2>
2574_ACEOF
2575if ac_fn_cxx_try_compile "$LINENO"; then :
2576  eval "$3=yes"
2577else
2578  eval "$3=no"
2579fi
2580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2581fi
2582eval ac_res=\$$3
2583	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2584$as_echo "$ac_res" >&6; }
2585  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2586
2587} # ac_fn_cxx_check_header_compile
2588
2589# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2590# ----------------------------------------------
2591# Tries to find the compile-time value of EXPR in a program that includes
2592# INCLUDES, setting VAR accordingly. Returns whether the value could be
2593# computed
2594ac_fn_cxx_compute_int ()
2595{
2596  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597  if test "$cross_compiling" = yes; then
2598    # Depending upon the size, compute the lo and hi bounds.
2599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2600/* end confdefs.h.  */
2601$4
2602int
2603main ()
2604{
2605static int test_array [1 - 2 * !(($2) >= 0)];
2606test_array [0] = 0;
2607return test_array [0];
2608
2609  ;
2610  return 0;
2611}
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_lo=0 ac_mid=0
2615  while :; do
2616    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617/* end confdefs.h.  */
2618$4
2619int
2620main ()
2621{
2622static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2623test_array [0] = 0;
2624return test_array [0];
2625
2626  ;
2627  return 0;
2628}
2629_ACEOF
2630if ac_fn_cxx_try_compile "$LINENO"; then :
2631  ac_hi=$ac_mid; break
2632else
2633  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2634			if test $ac_lo -le $ac_mid; then
2635			  ac_lo= ac_hi=
2636			  break
2637			fi
2638			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2639fi
2640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2641  done
2642else
2643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645$4
2646int
2647main ()
2648{
2649static int test_array [1 - 2 * !(($2) < 0)];
2650test_array [0] = 0;
2651return test_array [0];
2652
2653  ;
2654  return 0;
2655}
2656_ACEOF
2657if ac_fn_cxx_try_compile "$LINENO"; then :
2658  ac_hi=-1 ac_mid=-1
2659  while :; do
2660    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2661/* end confdefs.h.  */
2662$4
2663int
2664main ()
2665{
2666static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2667test_array [0] = 0;
2668return test_array [0];
2669
2670  ;
2671  return 0;
2672}
2673_ACEOF
2674if ac_fn_cxx_try_compile "$LINENO"; then :
2675  ac_lo=$ac_mid; break
2676else
2677  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2678			if test $ac_mid -le $ac_hi; then
2679			  ac_lo= ac_hi=
2680			  break
2681			fi
2682			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2683fi
2684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2685  done
2686else
2687  ac_lo= ac_hi=
2688fi
2689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2690fi
2691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692# Binary search between lo and hi bounds.
2693while test "x$ac_lo" != "x$ac_hi"; do
2694  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2696/* end confdefs.h.  */
2697$4
2698int
2699main ()
2700{
2701static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2702test_array [0] = 0;
2703return test_array [0];
2704
2705  ;
2706  return 0;
2707}
2708_ACEOF
2709if ac_fn_cxx_try_compile "$LINENO"; then :
2710  ac_hi=$ac_mid
2711else
2712  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2713fi
2714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2715done
2716case $ac_lo in #((
2717?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2718'') ac_retval=1 ;;
2719esac
2720  else
2721    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2722/* end confdefs.h.  */
2723$4
2724static long int longval () { return $2; }
2725static unsigned long int ulongval () { return $2; }
2726#include <stdio.h>
2727#include <stdlib.h>
2728int
2729main ()
2730{
2731
2732  FILE *f = fopen ("conftest.val", "w");
2733  if (! f)
2734    return 1;
2735  if (($2) < 0)
2736    {
2737      long int i = longval ();
2738      if (i != ($2))
2739	return 1;
2740      fprintf (f, "%ld", i);
2741    }
2742  else
2743    {
2744      unsigned long int i = ulongval ();
2745      if (i != ($2))
2746	return 1;
2747      fprintf (f, "%lu", i);
2748    }
2749  /* Do not output a trailing newline, as this causes \r\n confusion
2750     on some platforms.  */
2751  return ferror (f) || fclose (f) != 0;
2752
2753  ;
2754  return 0;
2755}
2756_ACEOF
2757if ac_fn_cxx_try_run "$LINENO"; then :
2758  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2759else
2760  ac_retval=1
2761fi
2762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2763  conftest.$ac_objext conftest.beam conftest.$ac_ext
2764rm -f conftest.val
2765
2766  fi
2767  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2768  as_fn_set_status $ac_retval
2769
2770} # ac_fn_cxx_compute_int
2771
2772# ac_fn_cxx_try_link LINENO
2773# -------------------------
2774# Try to link conftest.$ac_ext, and return whether this succeeded.
2775ac_fn_cxx_try_link ()
2776{
2777  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2778  rm -f conftest.$ac_objext conftest$ac_exeext
2779  if { { ac_try="$ac_link"
2780case "(($ac_try" in
2781  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2782  *) ac_try_echo=$ac_try;;
2783esac
2784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2785$as_echo "$ac_try_echo"; } >&5
2786  (eval "$ac_link") 2>conftest.err
2787  ac_status=$?
2788  if test -s conftest.err; then
2789    grep -v '^ *+' conftest.err >conftest.er1
2790    cat conftest.er1 >&5
2791    mv -f conftest.er1 conftest.err
2792  fi
2793  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2794  test $ac_status = 0; } && {
2795	 test -z "$ac_cxx_werror_flag" ||
2796	 test ! -s conftest.err
2797       } && test -s conftest$ac_exeext && {
2798	 test "$cross_compiling" = yes ||
2799	 test -x conftest$ac_exeext
2800       }; then :
2801  ac_retval=0
2802else
2803  $as_echo "$as_me: failed program was:" >&5
2804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806	ac_retval=1
2807fi
2808  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2809  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2810  # interfere with the next link command; also delete a directory that is
2811  # left behind by Apple's compiler.  We do this before executing the actions.
2812  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2813  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2814  as_fn_set_status $ac_retval
2815
2816} # ac_fn_cxx_try_link
2817
2818# ac_fn_cxx_check_func LINENO FUNC VAR
2819# ------------------------------------
2820# Tests whether FUNC exists, setting the cache variable VAR accordingly
2821ac_fn_cxx_check_func ()
2822{
2823  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2825$as_echo_n "checking for $2... " >&6; }
2826if eval \${$3+:} false; then :
2827  $as_echo_n "(cached) " >&6
2828else
2829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2830/* end confdefs.h.  */
2831/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2832   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2833#define $2 innocuous_$2
2834
2835/* System header to define __stub macros and hopefully few prototypes,
2836    which can conflict with char $2 (); below.
2837    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2838    <limits.h> exists even on freestanding compilers.  */
2839
2840#ifdef __STDC__
2841# include <limits.h>
2842#else
2843# include <assert.h>
2844#endif
2845
2846#undef $2
2847
2848/* Override any GCC internal prototype to avoid an error.
2849   Use char because int might match the return type of a GCC
2850   builtin and then its argument prototype would still apply.  */
2851#ifdef __cplusplus
2852extern "C"
2853#endif
2854char $2 ();
2855/* The GNU C library defines this for functions which it implements
2856    to always fail with ENOSYS.  Some functions are actually named
2857    something starting with __ and the normal name is an alias.  */
2858#if defined __stub_$2 || defined __stub___$2
2859choke me
2860#endif
2861
2862int
2863main ()
2864{
2865return $2 ();
2866  ;
2867  return 0;
2868}
2869_ACEOF
2870if ac_fn_cxx_try_link "$LINENO"; then :
2871  eval "$3=yes"
2872else
2873  eval "$3=no"
2874fi
2875rm -f core conftest.err conftest.$ac_objext \
2876    conftest$ac_exeext conftest.$ac_ext
2877fi
2878eval ac_res=\$$3
2879	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2880$as_echo "$ac_res" >&6; }
2881  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2882
2883} # ac_fn_cxx_check_func
2884
2885# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2886# -------------------------------------------------------
2887# Tests whether HEADER exists and can be compiled using the include files in
2888# INCLUDES, setting the cache variable VAR accordingly.
2889ac_fn_c_check_header_compile ()
2890{
2891  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2893$as_echo_n "checking for $2... " >&6; }
2894if eval \${$3+:} false; then :
2895  $as_echo_n "(cached) " >&6
2896else
2897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2898/* end confdefs.h.  */
2899$4
2900#include <$2>
2901_ACEOF
2902if ac_fn_c_try_compile "$LINENO"; then :
2903  eval "$3=yes"
2904else
2905  eval "$3=no"
2906fi
2907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2908fi
2909eval ac_res=\$$3
2910	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2911$as_echo "$ac_res" >&6; }
2912  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2913
2914} # ac_fn_c_check_header_compile
2915cat >config.log <<_ACEOF
2916This file contains any messages produced by compilers while
2917running configure, to aid debugging if configure makes a mistake.
2918
2919It was created by OpenJDK $as_me jdk9, which was
2920generated by GNU Autoconf 2.69.  Invocation command line was
2921
2922  $ $0 $@
2923
2924_ACEOF
2925exec 5>>config.log
2926{
2927cat <<_ASUNAME
2928## --------- ##
2929## Platform. ##
2930## --------- ##
2931
2932hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2933uname -m = `(uname -m) 2>/dev/null || echo unknown`
2934uname -r = `(uname -r) 2>/dev/null || echo unknown`
2935uname -s = `(uname -s) 2>/dev/null || echo unknown`
2936uname -v = `(uname -v) 2>/dev/null || echo unknown`
2937
2938/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2939/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2940
2941/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2942/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2943/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2944/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2945/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2946/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2947/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2948
2949_ASUNAME
2950
2951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2952for as_dir in $PATH
2953do
2954  IFS=$as_save_IFS
2955  test -z "$as_dir" && as_dir=.
2956    $as_echo "PATH: $as_dir"
2957  done
2958IFS=$as_save_IFS
2959
2960} >&5
2961
2962cat >&5 <<_ACEOF
2963
2964
2965## ----------- ##
2966## Core tests. ##
2967## ----------- ##
2968
2969_ACEOF
2970
2971
2972# Keep a trace of the command line.
2973# Strip out --no-create and --no-recursion so they do not pile up.
2974# Strip out --silent because we don't want to record it for future runs.
2975# Also quote any args containing shell meta-characters.
2976# Make two passes to allow for proper duplicate-argument suppression.
2977ac_configure_args=
2978ac_configure_args0=
2979ac_configure_args1=
2980ac_must_keep_next=false
2981for ac_pass in 1 2
2982do
2983  for ac_arg
2984  do
2985    case $ac_arg in
2986    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2987    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2988    | -silent | --silent | --silen | --sile | --sil)
2989      continue ;;
2990    *\'*)
2991      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2992    esac
2993    case $ac_pass in
2994    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2995    2)
2996      as_fn_append ac_configure_args1 " '$ac_arg'"
2997      if test $ac_must_keep_next = true; then
2998	ac_must_keep_next=false # Got value, back to normal.
2999      else
3000	case $ac_arg in
3001	  *=* | --config-cache | -C | -disable-* | --disable-* \
3002	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3003	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3004	  | -with-* | --with-* | -without-* | --without-* | --x)
3005	    case "$ac_configure_args0 " in
3006	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3007	    esac
3008	    ;;
3009	  -* ) ac_must_keep_next=true ;;
3010	esac
3011      fi
3012      as_fn_append ac_configure_args " '$ac_arg'"
3013      ;;
3014    esac
3015  done
3016done
3017{ ac_configure_args0=; unset ac_configure_args0;}
3018{ ac_configure_args1=; unset ac_configure_args1;}
3019
3020# When interrupted or exit'd, cleanup temporary files, and complete
3021# config.log.  We remove comments because anyway the quotes in there
3022# would cause problems or look ugly.
3023# WARNING: Use '\'' to represent an apostrophe within the trap.
3024# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3025trap 'exit_status=$?
3026  # Save into config.log some information that might help in debugging.
3027  {
3028    echo
3029
3030    $as_echo "## ---------------- ##
3031## Cache variables. ##
3032## ---------------- ##"
3033    echo
3034    # The following way of writing the cache mishandles newlines in values,
3035(
3036  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3037    eval ac_val=\$$ac_var
3038    case $ac_val in #(
3039    *${as_nl}*)
3040      case $ac_var in #(
3041      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3042$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3043      esac
3044      case $ac_var in #(
3045      _ | IFS | as_nl) ;; #(
3046      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3047      *) { eval $ac_var=; unset $ac_var;} ;;
3048      esac ;;
3049    esac
3050  done
3051  (set) 2>&1 |
3052    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3053    *${as_nl}ac_space=\ *)
3054      sed -n \
3055	"s/'\''/'\''\\\\'\'''\''/g;
3056	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3057      ;; #(
3058    *)
3059      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3060      ;;
3061    esac |
3062    sort
3063)
3064    echo
3065
3066    $as_echo "## ----------------- ##
3067## Output variables. ##
3068## ----------------- ##"
3069    echo
3070    for ac_var in $ac_subst_vars
3071    do
3072      eval ac_val=\$$ac_var
3073      case $ac_val in
3074      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3075      esac
3076      $as_echo "$ac_var='\''$ac_val'\''"
3077    done | sort
3078    echo
3079
3080    if test -n "$ac_subst_files"; then
3081      $as_echo "## ------------------- ##
3082## File substitutions. ##
3083## ------------------- ##"
3084      echo
3085      for ac_var in $ac_subst_files
3086      do
3087	eval ac_val=\$$ac_var
3088	case $ac_val in
3089	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3090	esac
3091	$as_echo "$ac_var='\''$ac_val'\''"
3092      done | sort
3093      echo
3094    fi
3095
3096    if test -s confdefs.h; then
3097      $as_echo "## ----------- ##
3098## confdefs.h. ##
3099## ----------- ##"
3100      echo
3101      cat confdefs.h
3102      echo
3103    fi
3104    test "$ac_signal" != 0 &&
3105      $as_echo "$as_me: caught signal $ac_signal"
3106    $as_echo "$as_me: exit $exit_status"
3107  } >&5
3108  rm -f core *.core core.conftest.* &&
3109    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3110    exit $exit_status
3111' 0
3112for ac_signal in 1 2 13 15; do
3113  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3114done
3115ac_signal=0
3116
3117# confdefs.h avoids OS command line length limits that DEFS can exceed.
3118rm -f -r conftest* confdefs.h
3119
3120$as_echo "/* confdefs.h */" > confdefs.h
3121
3122# Predefined preprocessor variables.
3123
3124cat >>confdefs.h <<_ACEOF
3125#define PACKAGE_NAME "$PACKAGE_NAME"
3126_ACEOF
3127
3128cat >>confdefs.h <<_ACEOF
3129#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3130_ACEOF
3131
3132cat >>confdefs.h <<_ACEOF
3133#define PACKAGE_VERSION "$PACKAGE_VERSION"
3134_ACEOF
3135
3136cat >>confdefs.h <<_ACEOF
3137#define PACKAGE_STRING "$PACKAGE_STRING"
3138_ACEOF
3139
3140cat >>confdefs.h <<_ACEOF
3141#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3142_ACEOF
3143
3144cat >>confdefs.h <<_ACEOF
3145#define PACKAGE_URL "$PACKAGE_URL"
3146_ACEOF
3147
3148
3149# Let the site file select an alternate cache file if it wants to.
3150# Prefer an explicitly selected file to automatically selected ones.
3151ac_site_file1=NONE
3152ac_site_file2=NONE
3153if test -n "$CONFIG_SITE"; then
3154  # We do not want a PATH search for config.site.
3155  case $CONFIG_SITE in #((
3156    -*)  ac_site_file1=./$CONFIG_SITE;;
3157    */*) ac_site_file1=$CONFIG_SITE;;
3158    *)   ac_site_file1=./$CONFIG_SITE;;
3159  esac
3160elif test "x$prefix" != xNONE; then
3161  ac_site_file1=$prefix/share/config.site
3162  ac_site_file2=$prefix/etc/config.site
3163else
3164  ac_site_file1=$ac_default_prefix/share/config.site
3165  ac_site_file2=$ac_default_prefix/etc/config.site
3166fi
3167for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3168do
3169  test "x$ac_site_file" = xNONE && continue
3170  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3171    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3172$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3173    sed 's/^/| /' "$ac_site_file" >&5
3174    . "$ac_site_file" \
3175      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3177as_fn_error $? "failed to load site script $ac_site_file
3178See \`config.log' for more details" "$LINENO" 5; }
3179  fi
3180done
3181
3182if test -r "$cache_file"; then
3183  # Some versions of bash will fail to source /dev/null (special files
3184  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3185  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3186    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3187$as_echo "$as_me: loading cache $cache_file" >&6;}
3188    case $cache_file in
3189      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3190      *)                      . "./$cache_file";;
3191    esac
3192  fi
3193else
3194  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3195$as_echo "$as_me: creating cache $cache_file" >&6;}
3196  >$cache_file
3197fi
3198
3199# Check that the precious variables saved in the cache have kept the same
3200# value.
3201ac_cache_corrupted=false
3202for ac_var in $ac_precious_vars; do
3203  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3204  eval ac_new_set=\$ac_env_${ac_var}_set
3205  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3206  eval ac_new_val=\$ac_env_${ac_var}_value
3207  case $ac_old_set,$ac_new_set in
3208    set,)
3209      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3210$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3211      ac_cache_corrupted=: ;;
3212    ,set)
3213      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3214$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3215      ac_cache_corrupted=: ;;
3216    ,);;
3217    *)
3218      if test "x$ac_old_val" != "x$ac_new_val"; then
3219	# differences in whitespace do not lead to failure.
3220	ac_old_val_w=`echo x $ac_old_val`
3221	ac_new_val_w=`echo x $ac_new_val`
3222	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3223	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3224$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3225	  ac_cache_corrupted=:
3226	else
3227	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3228$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3229	  eval $ac_var=\$ac_old_val
3230	fi
3231	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3232$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3233	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3234$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3235      fi;;
3236  esac
3237  # Pass precious variables to config.status.
3238  if test "$ac_new_set" = set; then
3239    case $ac_new_val in
3240    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3241    *) ac_arg=$ac_var=$ac_new_val ;;
3242    esac
3243    case " $ac_configure_args " in
3244      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3245      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3246    esac
3247  fi
3248done
3249if $ac_cache_corrupted; then
3250  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3251$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3252  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3253$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3254  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3255fi
3256## -------------------- ##
3257## Main body of script. ##
3258## -------------------- ##
3259
3260ac_ext=c
3261ac_cpp='$CPP $CPPFLAGS'
3262ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3263ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3264ac_compiler_gnu=$ac_cv_c_compiler_gnu
3265
3266
3267
3268ac_aux_dir=
3269for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3270  if test -f "$ac_dir/install-sh"; then
3271    ac_aux_dir=$ac_dir
3272    ac_install_sh="$ac_aux_dir/install-sh -c"
3273    break
3274  elif test -f "$ac_dir/install.sh"; then
3275    ac_aux_dir=$ac_dir
3276    ac_install_sh="$ac_aux_dir/install.sh -c"
3277    break
3278  elif test -f "$ac_dir/shtool"; then
3279    ac_aux_dir=$ac_dir
3280    ac_install_sh="$ac_aux_dir/shtool install -c"
3281    break
3282  fi
3283done
3284if test -z "$ac_aux_dir"; then
3285  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
3286fi
3287
3288# These three variables are undocumented and unsupported,
3289# and are intended to be withdrawn in a future Autoconf release.
3290# They can cause serious problems if a builder's source tree is in a directory
3291# whose full name contains unusual characters.
3292ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3293ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3294ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3295
3296
3297# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3298
3299#
3300# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3301# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3302#
3303# This code is free software; you can redistribute it and/or modify it
3304# under the terms of the GNU General Public License version 2 only, as
3305# published by the Free Software Foundation.  Oracle designates this
3306# particular file as subject to the "Classpath" exception as provided
3307# by Oracle in the LICENSE file that accompanied this code.
3308#
3309# This code is distributed in the hope that it will be useful, but WITHOUT
3310# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3311# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3312# version 2 for more details (a copy is included in the LICENSE file that
3313# accompanied this code).
3314#
3315# You should have received a copy of the GNU General Public License version
3316# 2 along with this work; if not, write to the Free Software Foundation,
3317# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3318#
3319# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3320# or visit www.oracle.com if you need additional information or have any
3321# questions.
3322#
3323
3324#
3325# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3326#
3327# This program is free software; you can redistribute it and/or modify
3328# it under the terms of the GNU General Public License as published by
3329# the Free Software Foundation; either version 2 of the License, or
3330# (at your option) any later version.
3331#
3332# This program is distributed in the hope that it will be useful, but
3333# WITHOUT ANY WARRANTY; without even the implied warranty of
3334# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3335# General Public License for more details.
3336#
3337# You should have received a copy of the GNU General Public License
3338# along with this program; if not, write to the Free Software
3339# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3340#
3341# As a special exception to the GNU General Public License, if you
3342# distribute this file as part of a program that contains a
3343# configuration script generated by Autoconf, you may include it under
3344# the same distribution terms that you use for the rest of that program.
3345
3346# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3347# ----------------------------------
3348# PKG_PROG_PKG_CONFIG
3349
3350# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3351#
3352# Check to see whether a particular set of modules exists.  Similar
3353# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3354#
3355#
3356# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3357# this or PKG_CHECK_MODULES is called, or make sure to call
3358# PKG_CHECK_EXISTS manually
3359# --------------------------------------------------------------
3360
3361
3362
3363# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3364# ---------------------------------------------
3365# _PKG_CONFIG
3366
3367# _PKG_SHORT_ERRORS_SUPPORTED
3368# -----------------------------
3369# _PKG_SHORT_ERRORS_SUPPORTED
3370
3371
3372# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3373# [ACTION-IF-NOT-FOUND])
3374#
3375#
3376# Note that if there is a possibility the first call to
3377# PKG_CHECK_MODULES might not happen, you should be sure to include an
3378# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3379#
3380#
3381# --------------------------------------------------------------
3382# PKG_CHECK_MODULES
3383
3384
3385# Include these first...
3386#
3387# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3388# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3389#
3390# This code is free software; you can redistribute it and/or modify it
3391# under the terms of the GNU General Public License version 2 only, as
3392# published by the Free Software Foundation.  Oracle designates this
3393# particular file as subject to the "Classpath" exception as provided
3394# by Oracle in the LICENSE file that accompanied this code.
3395#
3396# This code is distributed in the hope that it will be useful, but WITHOUT
3397# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3398# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3399# version 2 for more details (a copy is included in the LICENSE file that
3400# accompanied this code).
3401#
3402# You should have received a copy of the GNU General Public License version
3403# 2 along with this work; if not, write to the Free Software Foundation,
3404# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3405#
3406# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3407# or visit www.oracle.com if you need additional information or have any
3408# questions.
3409#
3410
3411# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3412# If so, then append $1 to $2 \
3413# Also set JVM_ARG_OK to true/false depending on outcome.
3414
3415
3416# Appends a string to a path variable, only adding the : when needed.
3417
3418
3419# Prepends a string to a path variable, only adding the : when needed.
3420
3421
3422# This will make sure the given variable points to a full and proper
3423# path. This means:
3424# 1) There will be no spaces in the path. On unix platforms,
3425#    spaces in the path will result in an error. On Windows,
3426#    the path will be rewritten using short-style to be space-free.
3427# 2) The path will be absolute, and it will be in unix-style (on
3428#     cygwin).
3429# $1: The name of the variable to fix
3430
3431
3432# This will make sure the given variable points to a executable
3433# with a full and proper path. This means:
3434# 1) There will be no spaces in the path. On unix platforms,
3435#    spaces in the path will result in an error. On Windows,
3436#    the path will be rewritten using short-style to be space-free.
3437# 2) The path will be absolute, and it will be in unix-style (on
3438#     cygwin).
3439# Any arguments given to the executable is preserved.
3440# If the input variable does not have a directory specification, then
3441# it need to be in the PATH.
3442# $1: The name of the variable to fix
3443
3444
3445
3446
3447# Register a --with argument but mark it as deprecated
3448# $1: The name of the with argument to deprecate, not including --with-
3449
3450
3451# Register a --enable argument but mark it as deprecated
3452# $1: The name of the with argument to deprecate, not including --enable-
3453# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3454
3455
3456
3457
3458# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3459# $1: variable to check
3460
3461
3462# Check that there are no unprocessed overridden variables left.
3463# If so, they are an incorrect argument and we will exit with an error.
3464
3465
3466# Setup a tool for the given variable. If correctly specified by the user,
3467# use that value, otherwise search for the tool using the supplied code snippet.
3468# $1: variable to set
3469# $2: code snippet to call to look for the tool
3470
3471
3472# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3478# $1: variable to set
3479# $2: executable name (or list of names) to look for
3480
3481
3482# Like BASIC_PATH_PROGS but fails if no tool was found.
3483# $1: variable to set
3484# $2: executable name (or list of names) to look for
3485
3486
3487# Like BASIC_SETUP_TOOL but fails if no tool was found.
3488# $1: variable to set
3489# $2: autoconf macro to call to look for the special tool
3490
3491
3492# Setup the most fundamental tools that relies on not much else to set up,
3493# but is used by much of the early bootstrap code.
3494
3495
3496# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506#%%% Simple tools %%%
3507
3508# Check if we have found a usable version of make
3509# $1: the path to a potential make binary (or empty)
3510# $2: the description on how we found this
3511
3512
3513
3514
3515# Goes looking for a usable version of GNU make.
3516
3517
3518
3519
3520
3521
3522# Check if build directory is on local disk. If not possible to determine,
3523# we prefer to claim it's local.
3524# Argument 1: directory to test
3525# Argument 2: what to do if it is on local disk
3526# Argument 3: what to do otherwise (remote disk or failure)
3527
3528
3529# Check that source files have basic read permissions set. This might
3530# not be the case in cygwin in certain conditions.
3531
3532
3533
3534
3535# Check for support for specific options in bash
3536
3537
3538#
3539# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541#
3542# This code is free software; you can redistribute it and/or modify it
3543# under the terms of the GNU General Public License version 2 only, as
3544# published by the Free Software Foundation.  Oracle designates this
3545# particular file as subject to the "Classpath" exception as provided
3546# by Oracle in the LICENSE file that accompanied this code.
3547#
3548# This code is distributed in the hope that it will be useful, but WITHOUT
3549# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3551# version 2 for more details (a copy is included in the LICENSE file that
3552# accompanied this code).
3553#
3554# You should have received a copy of the GNU General Public License version
3555# 2 along with this work; if not, write to the Free Software Foundation,
3556# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557#
3558# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559# or visit www.oracle.com if you need additional information or have any
3560# questions.
3561#
3562
3563
3564
3565
3566
3567# Helper function which possibly converts a path using DOS-style short mode.
3568# If so, the updated path is stored in $new_path.
3569# $1: The path to check
3570
3571
3572# Helper function which possibly converts a path using DOS-style short mode.
3573# If so, the updated path is stored in $new_path.
3574# $1: The path to check
3575
3576
3577# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3578# and could probably be heavily simplified. However, all changes in this
3579# area tend to need lot of testing in different scenarios, and in lack of
3580# proper unit testing, cleaning this up has not been deemed worth the effort
3581# at the moment.
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3592
3593
3594
3595
3596#
3597# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631# ... then the rest
3632#
3633# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3634# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3635#
3636# This code is free software; you can redistribute it and/or modify it
3637# under the terms of the GNU General Public License version 2 only, as
3638# published by the Free Software Foundation.  Oracle designates this
3639# particular file as subject to the "Classpath" exception as provided
3640# by Oracle in the LICENSE file that accompanied this code.
3641#
3642# This code is distributed in the hope that it will be useful, but WITHOUT
3643# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3644# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3645# version 2 for more details (a copy is included in the LICENSE file that
3646# accompanied this code).
3647#
3648# You should have received a copy of the GNU General Public License version
3649# 2 along with this work; if not, write to the Free Software Foundation,
3650# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3651#
3652# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3653# or visit www.oracle.com if you need additional information or have any
3654# questions.
3655#
3656
3657########################################################################
3658# This file handles detection of the Boot JDK. The Boot JDK detection
3659# process has been developed as a response to solve a complex real-world
3660# problem. Initially, it was simple, but it has grown as platform after
3661# platform, idiosyncracy after idiosyncracy has been supported.
3662#
3663# The basic idea is this:
3664# 1) You need an acceptable *) JDK to use as a Boot JDK
3665# 2) There are several ways to locate a JDK, that are mostly platform
3666#    dependent **)
3667# 3) You can have multiple JDKs installed
3668# 4) If possible, configure should try to dig out an acceptable JDK
3669#    automatically, without having to resort to command-line options
3670#
3671# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3672#     javac) and not a JRE, etc.
3673#
3674# **) On Windows we typically use a well-known path.
3675#     On MacOSX we typically use the tool java_home.
3676#     On Linux we typically find javac in the $PATH, and then follow a
3677#     chain of symlinks that often ends up in a real JDK.
3678#
3679# This leads to the code where we check in different ways to locate a
3680# JDK, and if one is found, check if it is acceptable. If not, we print
3681# our reasons for rejecting it (useful when debugging non-working
3682# configure situations) and continue checking the next one.
3683########################################################################
3684
3685# Execute the check given as argument, and verify the result
3686# If the Boot JDK was previously found, do nothing
3687# $1 A command line (typically autoconf macro) to execute
3688
3689
3690# Test: Is bootjdk explicitely set by command line arguments?
3691
3692
3693# Test: Is bootjdk available from builddeps?
3694
3695
3696# Test: Is $JAVA_HOME set?
3697
3698
3699# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3700
3701
3702# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3703# $1: Argument to the java_home binary (optional)
3704
3705
3706# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3707
3708
3709# Look for a jdk in the given path. If there are multiple, try to select the newest.
3710# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3711# $1 = Path to directory containing jdk installations.
3712# $2 = String to append to the found JDK directory to get the proper JDK home
3713
3714
3715# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3716# environmental variable as base for where to look.
3717# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3718
3719
3720# Test: Is there a JDK installed in default, well-known locations?
3721
3722
3723# Check that a command-line tool in the Boot JDK is correct
3724# $1 = name of variable to assign
3725# $2 = name of binary
3726
3727
3728###############################################################################
3729#
3730# We need a Boot JDK to bootstrap the build.
3731#
3732
3733
3734
3735
3736
3737#
3738# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781#
3782# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3783# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3784#
3785# This code is free software; you can redistribute it and/or modify it
3786# under the terms of the GNU General Public License version 2 only, as
3787# published by the Free Software Foundation.  Oracle designates this
3788# particular file as subject to the "Classpath" exception as provided
3789# by Oracle in the LICENSE file that accompanied this code.
3790#
3791# This code is distributed in the hope that it will be useful, but WITHOUT
3792# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3793# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3794# version 2 for more details (a copy is included in the LICENSE file that
3795# accompanied this code).
3796#
3797# You should have received a copy of the GNU General Public License version
3798# 2 along with this work; if not, write to the Free Software Foundation,
3799# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3800#
3801# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3802# or visit www.oracle.com if you need additional information or have any
3803# questions.
3804#
3805
3806
3807
3808
3809
3810# Documentation on common flags used for solstudio in HIGHEST.
3811#
3812# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3813#          done with care, there are some assumptions below that need to
3814#          be understood about the use of pointers, and IEEE behavior.
3815#
3816# -fns: Use non-standard floating point mode (not IEEE 754)
3817# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3818# -fsingle: Use single precision floating point with 'float'
3819# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3820#   (Source with excessing pointer casting and data access with mixed
3821#    pointer types are not recommended)
3822# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3823#   (If you expect perfect errno behavior, do not use this)
3824# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3825# -xrestrict: Pointer parameters to functions do not overlap
3826#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3827#    If you pass in multiple pointers to the same data, do not use this)
3828# -xlibmil: Inline some library routines
3829#   (If you expect perfect errno behavior, do not use this)
3830# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3831#   (If you expect perfect errno behavior, do not use this)
3832#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3833
3834    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3835    # Bug?
3836    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3837    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3838    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3839    #fi
3840
3841
3842
3843
3844
3845# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3846#                                   [RUN-IF-FALSE])
3847# ------------------------------------------------------------
3848# Check that the c and c++ compilers support an argument
3849
3850
3851# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3852#                                    [RUN-IF-FALSE])
3853# ------------------------------------------------------------
3854# Check that the linker support an argument
3855
3856
3857
3858
3859#
3860# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3862#
3863# This code is free software; you can redistribute it and/or modify it
3864# under the terms of the GNU General Public License version 2 only, as
3865# published by the Free Software Foundation.  Oracle designates this
3866# particular file as subject to the "Classpath" exception as provided
3867# by Oracle in the LICENSE file that accompanied this code.
3868#
3869# This code is distributed in the hope that it will be useful, but WITHOUT
3870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3872# version 2 for more details (a copy is included in the LICENSE file that
3873# accompanied this code).
3874#
3875# You should have received a copy of the GNU General Public License version
3876# 2 along with this work; if not, write to the Free Software Foundation,
3877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3878#
3879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3880# or visit www.oracle.com if you need additional information or have any
3881# questions.
3882#
3883
3884
3885
3886
3887
3888cygwin_help() {
3889  case $1 in
3890    unzip)
3891      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893      ;;
3894    zip)
3895      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897      ;;
3898    make)
3899      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3900      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3901      ;;
3902    freetype)
3903      HELP_MSG="
3904The freetype library can now be build during the configure process.
3905Download the freetype sources and unpack them into an arbitrary directory:
3906
3907wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3908tar -xzf freetype-2.5.3.tar.gz
3909
3910Then run configure with '--with-freetype-src=<freetype_src>'. This will
3911automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3912builds or into '<freetype_src>/lib32' for 32-bit builds.
3913Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3914and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3915      ;;
3916  esac
3917}
3918
3919msys_help() {
3920  PKGHANDLER_COMMAND=""
3921}
3922
3923apt_help() {
3924  case $1 in
3925    devkit)
3926      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3927    openjdk)
3928      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3929    alsa)
3930      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3931    cups)
3932      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3933    freetype)
3934      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3935    pulse)
3936      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3937    x11)
3938      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3939    ccache)
3940      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3941  esac
3942}
3943
3944yum_help() {
3945  case $1 in
3946    devkit)
3947      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3948    openjdk)
3949      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3950    alsa)
3951      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3952    cups)
3953      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3954    freetype)
3955      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3956    pulse)
3957      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3958    x11)
3959      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3960    ccache)
3961      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3962  esac
3963}
3964
3965port_help() {
3966  PKGHANDLER_COMMAND=""
3967}
3968
3969pkgutil_help() {
3970  PKGHANDLER_COMMAND=""
3971}
3972
3973pkgadd_help() {
3974  PKGHANDLER_COMMAND=""
3975}
3976
3977# This function will check if we're called from the "configure" wrapper while
3978# printing --help. If so, we will print out additional information that can
3979# only be extracted within the autoconf script, and then exit. This must be
3980# called at the very beginning in configure.ac.
3981
3982
3983
3984
3985
3986
3987#
3988# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3989# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990#
3991# This code is free software; you can redistribute it and/or modify it
3992# under the terms of the GNU General Public License version 2 only, as
3993# published by the Free Software Foundation.  Oracle designates this
3994# particular file as subject to the "Classpath" exception as provided
3995# by Oracle in the LICENSE file that accompanied this code.
3996#
3997# This code is distributed in the hope that it will be useful, but WITHOUT
3998# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4000# version 2 for more details (a copy is included in the LICENSE file that
4001# accompanied this code).
4002#
4003# You should have received a copy of the GNU General Public License version
4004# 2 along with this work; if not, write to the Free Software Foundation,
4005# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006#
4007# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008# or visit www.oracle.com if you need additional information or have any
4009# questions.
4010#
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021###############################################################################
4022#
4023# Should we build only OpenJDK even if closed sources are present?
4024#
4025
4026
4027
4028
4029###############################################################################
4030#
4031# Setup version numbers
4032#
4033
4034
4035
4036
4037
4038
4039#
4040# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4041# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4042#
4043# This code is free software; you can redistribute it and/or modify it
4044# under the terms of the GNU General Public License version 2 only, as
4045# published by the Free Software Foundation.  Oracle designates this
4046# particular file as subject to the "Classpath" exception as provided
4047# by Oracle in the LICENSE file that accompanied this code.
4048#
4049# This code is distributed in the hope that it will be useful, but WITHOUT
4050# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4051# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4052# version 2 for more details (a copy is included in the LICENSE file that
4053# accompanied this code).
4054#
4055# You should have received a copy of the GNU General Public License version
4056# 2 along with this work; if not, write to the Free Software Foundation,
4057# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4058#
4059# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4060# or visit www.oracle.com if you need additional information or have any
4061# questions.
4062#
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084#
4085# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4086# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4087#
4088# This code is free software; you can redistribute it and/or modify it
4089# under the terms of the GNU General Public License version 2 only, as
4090# published by the Free Software Foundation.  Oracle designates this
4091# particular file as subject to the "Classpath" exception as provided
4092# by Oracle in the LICENSE file that accompanied this code.
4093#
4094# This code is distributed in the hope that it will be useful, but WITHOUT
4095# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4096# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4097# version 2 for more details (a copy is included in the LICENSE file that
4098# accompanied this code).
4099#
4100# You should have received a copy of the GNU General Public License version
4101# 2 along with this work; if not, write to the Free Software Foundation,
4102# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4103#
4104# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4105# or visit www.oracle.com if you need additional information or have any
4106# questions.
4107#
4108
4109# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4110# Converts autoconf style CPU name to OpenJDK style, into
4111# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4112
4113
4114# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4115# Converts autoconf style OS name to OpenJDK style, into
4116# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4117
4118
4119# Expects $host_os $host_cpu $build_os and $build_cpu
4120# and $with_target_bits to have been setup!
4121#
4122# Translate the standard triplet(quadruplet) definition
4123# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4124# OPENJDK_BUILD_OS, etc.
4125
4126
4127# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4128# accordingly. Must be done after setting up build and target system, but before
4129# doing anything else with these values.
4130
4131
4132# Setup the legacy variables, for controlling the old makefiles.
4133#
4134
4135
4136
4137
4138#%%% Build and target systems %%%
4139
4140
4141
4142
4143# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4144# Add -mX to various FLAGS variables.
4145
4146
4147
4148
4149
4150
4151#
4152# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4153# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4154#
4155# This code is free software; you can redistribute it and/or modify it
4156# under the terms of the GNU General Public License version 2 only, as
4157# published by the Free Software Foundation.  Oracle designates this
4158# particular file as subject to the "Classpath" exception as provided
4159# by Oracle in the LICENSE file that accompanied this code.
4160#
4161# This code is distributed in the hope that it will be useful, but WITHOUT
4162# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4163# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4164# version 2 for more details (a copy is included in the LICENSE file that
4165# accompanied this code).
4166#
4167# You should have received a copy of the GNU General Public License version
4168# 2 along with this work; if not, write to the Free Software Foundation,
4169# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4170#
4171# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4172# or visit www.oracle.com if you need additional information or have any
4173# questions.
4174#
4175
4176
4177
4178
4179
4180
4181
4182
4183#
4184# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4185# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4186#
4187# This code is free software; you can redistribute it and/or modify it
4188# under the terms of the GNU General Public License version 2 only, as
4189# published by the Free Software Foundation.  Oracle designates this
4190# particular file as subject to the "Classpath" exception as provided
4191# by Oracle in the LICENSE file that accompanied this code.
4192#
4193# This code is distributed in the hope that it will be useful, but WITHOUT
4194# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4195# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4196# version 2 for more details (a copy is included in the LICENSE file that
4197# accompanied this code).
4198#
4199# You should have received a copy of the GNU General Public License version
4200# 2 along with this work; if not, write to the Free Software Foundation,
4201# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4202#
4203# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4204# or visit www.oracle.com if you need additional information or have any
4205# questions.
4206#
4207
4208########################################################################
4209# This file is responsible for detecting, verifying and setting up the
4210# toolchain, i.e. the compiler, linker and related utilities. It will setup
4211# proper paths to the binaries, but it will not setup any flags.
4212#
4213# The binaries used is determined by the toolchain type, which is the family of
4214# compilers and related tools that are used.
4215########################################################################
4216
4217
4218# All valid toolchains, regardless of platform (used by help.m4)
4219VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4220
4221# These toolchains are valid on different platforms
4222VALID_TOOLCHAINS_linux="gcc clang"
4223VALID_TOOLCHAINS_solaris="solstudio"
4224VALID_TOOLCHAINS_macosx="gcc clang"
4225VALID_TOOLCHAINS_aix="xlc"
4226VALID_TOOLCHAINS_windows="microsoft"
4227
4228# Toolchain descriptions
4229TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4230TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4231TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4232TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4233TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4234
4235# Setup a number of variables describing how native output files are
4236# named on this platform/toolchain.
4237
4238
4239# Determine which toolchain type to use, and make sure it is valid for this
4240# platform. Setup various information about the selected toolchain.
4241
4242
4243# Before we start detecting the toolchain executables, we might need some
4244# special setup, e.g. additional paths etc.
4245
4246
4247# Restore path, etc
4248
4249
4250# Check if a compiler is of the toolchain type we expect, and save the version
4251# information from it. If the compiler does not match the expected type,
4252# this function will abort using AC_MSG_ERROR. If it matches, the version will
4253# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4254# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4255#
4256# $1 = compiler to test (CC or CXX)
4257# $2 = human readable name of compiler (C or C++)
4258
4259
4260# Try to locate the given C or C++ compiler in the path, or otherwise.
4261#
4262# $1 = compiler to test (CC or CXX)
4263# $2 = human readable name of compiler (C or C++)
4264# $3 = list of compiler names to search for
4265
4266
4267# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4268# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4269# archiver (AR). Verify that the compilers are correct according to the
4270# toolchain type.
4271
4272
4273# Setup additional tools that is considered a part of the toolchain, but not the
4274# core part. Many of these are highly platform-specific and do not exist,
4275# and/or are not needed on all platforms.
4276
4277
4278# Setup the build tools (i.e, the compiler and linker used to build programs
4279# that should be run on the build platform, not the target platform, as a build
4280# helper). Since the non-cross-compile case uses the normal, target compilers
4281# for this, we can only do this after these have been setup.
4282
4283
4284# Setup legacy variables that are still needed as alternative ways to refer to
4285# parts of the toolchain.
4286
4287
4288# Do some additional checks on the detected tools.
4289
4290
4291# Setup the JTReg Regression Test Harness.
4292
4293
4294#
4295# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4296# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4297#
4298# This code is free software; you can redistribute it and/or modify it
4299# under the terms of the GNU General Public License version 2 only, as
4300# published by the Free Software Foundation.  Oracle designates this
4301# particular file as subject to the "Classpath" exception as provided
4302# by Oracle in the LICENSE file that accompanied this code.
4303#
4304# This code is distributed in the hope that it will be useful, but WITHOUT
4305# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4306# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4307# version 2 for more details (a copy is included in the LICENSE file that
4308# accompanied this code).
4309#
4310# You should have received a copy of the GNU General Public License version
4311# 2 along with this work; if not, write to the Free Software Foundation,
4312# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4313#
4314# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4315# or visit www.oracle.com if you need additional information or have any
4316# questions.
4317#
4318
4319################################################################################
4320
4321VALID_VS_VERSIONS="2010 2012 2013"
4322
4323VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4324VS_VERSION_INTERNAL_2010=100
4325VS_MSVCR_2010=msvcr100.dll
4326# We don't use msvcp on Visual Studio 2010
4327#VS_MSVCP_2010=msvcp100.dll
4328VS_ENVVAR_2010="VS100COMNTOOLS"
4329VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4330VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4331VS_VS_PLATFORM_NAME_2010="v100"
4332VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4333
4334VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4335VS_VERSION_INTERNAL_2012=110
4336VS_MSVCR_2012=msvcr110.dll
4337VS_MSVCP_2012=msvcp110.dll
4338VS_ENVVAR_2012="VS110COMNTOOLS"
4339VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4340VS_SDK_INSTALLDIR_2012=
4341VS_VS_PLATFORM_NAME_2012="v110"
4342VS_SDK_PLATFORM_NAME_2012=
4343
4344VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4345VS_VERSION_INTERNAL_2013=120
4346VS_MSVCR_2013=msvcr120.dll
4347VS_MSVCP_2013=msvcp120.dll
4348VS_ENVVAR_2013="VS120COMNTOOLS"
4349VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4350VS_SDK_INSTALLDIR_2013=
4351VS_VS_PLATFORM_NAME_2013="v120"
4352VS_SDK_PLATFORM_NAME_2013=
4353
4354################################################################################
4355
4356
4357
4358################################################################################
4359
4360
4361
4362################################################################################
4363# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4364# build environment and assigns it to VS_ENV_CMD
4365
4366
4367################################################################################
4368
4369
4370
4371################################################################################
4372# Check if the VS env variables were setup prior to running configure.
4373# If not, then find vcvarsall.bat and run it automatically, and integrate
4374# the set env variables into the spec file.
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388# This line needs to be here, verbatim, after all includes and the dummy hook
4389# definitions. It is replaced with custom functionality when building
4390# custom sources.
4391#CUSTOM_AUTOCONF_INCLUDE
4392
4393# Do not change or remove the following line, it is needed for consistency checks:
4394DATE_WHEN_GENERATED=1423144508
4395
4396###############################################################################
4397#
4398# Initialization / Boot-strapping
4399#
4400# The bootstrapping process needs to solve the "chicken or the egg" problem,
4401# thus it jumps back and forth, each time gaining something needed later on.
4402#
4403###############################################################################
4404
4405# If we are requested to print additional help, do that and then exit.
4406# This must be the very first call.
4407
4408  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4409    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4410    $PRINTF "Which are valid to use depends on the build platform.\n"
4411    for toolchain in $VALID_TOOLCHAINS_all; do
4412      # Use indirect variable referencing
4413      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4414      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4415      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4416    done
4417
4418    # And now exit directly
4419    exit 0
4420  fi
4421
4422
4423# Basic initialization that must happen first of all in the normal process.
4424
4425  # Save the original command line. This is passed to us by the wrapper configure script.
4426
4427  DATE_WHEN_CONFIGURED=`LANG=C date`
4428
4429  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4430$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4431  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4432$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4433
4434
4435  # Start with tools that do not need have cross compilation support
4436  # and can be expected to be found in the default PATH. These tools are
4437  # used by configure. Nor are these tools expected to be found in the
4438  # devkit from the builddeps server either, since they are
4439  # needed to download the devkit.
4440
4441  # First are all the simple required tools.
4442
4443
4444
4445  # Publish this variable in the help.
4446
4447
4448  if test "x$BASENAME" = x; then
4449    # The variable is not set by user, try to locate tool using the code snippet
4450    for ac_prog in basename
4451do
4452  # Extract the first word of "$ac_prog", so it can be a program name with args.
4453set dummy $ac_prog; ac_word=$2
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455$as_echo_n "checking for $ac_word... " >&6; }
4456if ${ac_cv_path_BASENAME+:} false; then :
4457  $as_echo_n "(cached) " >&6
4458else
4459  case $BASENAME in
4460  [\\/]* | ?:[\\/]*)
4461  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4462  ;;
4463  *)
4464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4465for as_dir in $PATH
4466do
4467  IFS=$as_save_IFS
4468  test -z "$as_dir" && as_dir=.
4469    for ac_exec_ext in '' $ac_executable_extensions; do
4470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4471    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4473    break 2
4474  fi
4475done
4476  done
4477IFS=$as_save_IFS
4478
4479  ;;
4480esac
4481fi
4482BASENAME=$ac_cv_path_BASENAME
4483if test -n "$BASENAME"; then
4484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4485$as_echo "$BASENAME" >&6; }
4486else
4487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4488$as_echo "no" >&6; }
4489fi
4490
4491
4492  test -n "$BASENAME" && break
4493done
4494
4495  else
4496    # The variable is set, but is it from the command line or the environment?
4497
4498    # Try to remove the string !BASENAME! from our list.
4499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4501      # If it failed, the variable was not from the command line. Ignore it,
4502      # but warn the user (except for BASH, which is always set by the calling BASH).
4503      if test "xBASENAME" != xBASH; then
4504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4505$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4506      fi
4507      # Try to locate tool using the code snippet
4508      for ac_prog in basename
4509do
4510  # Extract the first word of "$ac_prog", so it can be a program name with args.
4511set dummy $ac_prog; ac_word=$2
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513$as_echo_n "checking for $ac_word... " >&6; }
4514if ${ac_cv_path_BASENAME+:} false; then :
4515  $as_echo_n "(cached) " >&6
4516else
4517  case $BASENAME in
4518  [\\/]* | ?:[\\/]*)
4519  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4520  ;;
4521  *)
4522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523for as_dir in $PATH
4524do
4525  IFS=$as_save_IFS
4526  test -z "$as_dir" && as_dir=.
4527    for ac_exec_ext in '' $ac_executable_extensions; do
4528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4529    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4531    break 2
4532  fi
4533done
4534  done
4535IFS=$as_save_IFS
4536
4537  ;;
4538esac
4539fi
4540BASENAME=$ac_cv_path_BASENAME
4541if test -n "$BASENAME"; then
4542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4543$as_echo "$BASENAME" >&6; }
4544else
4545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
4547fi
4548
4549
4550  test -n "$BASENAME" && break
4551done
4552
4553    else
4554      # If it succeeded, then it was overridden by the user. We will use it
4555      # for the tool.
4556
4557      # First remove it from the list of overridden variables, so we can test
4558      # for unknown variables in the end.
4559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4560
4561      # Check if the provided tool contains a complete path.
4562      tool_specified="$BASENAME"
4563      tool_basename="${tool_specified##*/}"
4564      if test "x$tool_basename" = "x$tool_specified"; then
4565        # A command without a complete path is provided, search $PATH.
4566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4567$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4568        # Extract the first word of "$tool_basename", so it can be a program name with args.
4569set dummy $tool_basename; ac_word=$2
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4571$as_echo_n "checking for $ac_word... " >&6; }
4572if ${ac_cv_path_BASENAME+:} false; then :
4573  $as_echo_n "(cached) " >&6
4574else
4575  case $BASENAME in
4576  [\\/]* | ?:[\\/]*)
4577  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4578  ;;
4579  *)
4580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581for as_dir in $PATH
4582do
4583  IFS=$as_save_IFS
4584  test -z "$as_dir" && as_dir=.
4585    for ac_exec_ext in '' $ac_executable_extensions; do
4586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4587    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4589    break 2
4590  fi
4591done
4592  done
4593IFS=$as_save_IFS
4594
4595  ;;
4596esac
4597fi
4598BASENAME=$ac_cv_path_BASENAME
4599if test -n "$BASENAME"; then
4600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4601$as_echo "$BASENAME" >&6; }
4602else
4603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4604$as_echo "no" >&6; }
4605fi
4606
4607
4608        if test "x$BASENAME" = x; then
4609          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4610        fi
4611      else
4612        # Otherwise we believe it is a complete path. Use it as it is.
4613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4614$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4616$as_echo_n "checking for BASENAME... " >&6; }
4617        if test ! -x "$tool_specified"; then
4618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4619$as_echo "not found" >&6; }
4620          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4621        fi
4622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4623$as_echo "$tool_specified" >&6; }
4624      fi
4625    fi
4626  fi
4627
4628
4629
4630  if test "x$BASENAME" = x; then
4631    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4632  fi
4633
4634
4635
4636
4637
4638  # Publish this variable in the help.
4639
4640
4641  if test "x$BASH" = x; then
4642    # The variable is not set by user, try to locate tool using the code snippet
4643    for ac_prog in bash
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_BASH+:} false; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $BASH in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4664    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675BASH=$ac_cv_path_BASH
4676if test -n "$BASH"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4678$as_echo "$BASH" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$BASH" && break
4686done
4687
4688  else
4689    # The variable is set, but is it from the command line or the environment?
4690
4691    # Try to remove the string !BASH! from our list.
4692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4694      # If it failed, the variable was not from the command line. Ignore it,
4695      # but warn the user (except for BASH, which is always set by the calling BASH).
4696      if test "xBASH" != xBASH; then
4697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4698$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4699      fi
4700      # Try to locate tool using the code snippet
4701      for ac_prog in bash
4702do
4703  # Extract the first word of "$ac_prog", so it can be a program name with args.
4704set dummy $ac_prog; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_path_BASH+:} false; then :
4708  $as_echo_n "(cached) " >&6
4709else
4710  case $BASH in
4711  [\\/]* | ?:[\\/]*)
4712  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4713  ;;
4714  *)
4715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in $PATH
4717do
4718  IFS=$as_save_IFS
4719  test -z "$as_dir" && as_dir=.
4720    for ac_exec_ext in '' $ac_executable_extensions; do
4721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4722    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4724    break 2
4725  fi
4726done
4727  done
4728IFS=$as_save_IFS
4729
4730  ;;
4731esac
4732fi
4733BASH=$ac_cv_path_BASH
4734if test -n "$BASH"; then
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4736$as_echo "$BASH" >&6; }
4737else
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743  test -n "$BASH" && break
4744done
4745
4746    else
4747      # If it succeeded, then it was overridden by the user. We will use it
4748      # for the tool.
4749
4750      # First remove it from the list of overridden variables, so we can test
4751      # for unknown variables in the end.
4752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4753
4754      # Check if the provided tool contains a complete path.
4755      tool_specified="$BASH"
4756      tool_basename="${tool_specified##*/}"
4757      if test "x$tool_basename" = "x$tool_specified"; then
4758        # A command without a complete path is provided, search $PATH.
4759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4760$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4761        # Extract the first word of "$tool_basename", so it can be a program name with args.
4762set dummy $tool_basename; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
4765if ${ac_cv_path_BASH+:} false; then :
4766  $as_echo_n "(cached) " >&6
4767else
4768  case $BASH in
4769  [\\/]* | ?:[\\/]*)
4770  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4771  ;;
4772  *)
4773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in $PATH
4775do
4776  IFS=$as_save_IFS
4777  test -z "$as_dir" && as_dir=.
4778    for ac_exec_ext in '' $ac_executable_extensions; do
4779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4780    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782    break 2
4783  fi
4784done
4785  done
4786IFS=$as_save_IFS
4787
4788  ;;
4789esac
4790fi
4791BASH=$ac_cv_path_BASH
4792if test -n "$BASH"; then
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4794$as_echo "$BASH" >&6; }
4795else
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
4798fi
4799
4800
4801        if test "x$BASH" = x; then
4802          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4803        fi
4804      else
4805        # Otherwise we believe it is a complete path. Use it as it is.
4806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4807$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4809$as_echo_n "checking for BASH... " >&6; }
4810        if test ! -x "$tool_specified"; then
4811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4812$as_echo "not found" >&6; }
4813          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4814        fi
4815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4816$as_echo "$tool_specified" >&6; }
4817      fi
4818    fi
4819  fi
4820
4821
4822
4823  if test "x$BASH" = x; then
4824    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4825  fi
4826
4827
4828
4829
4830
4831  # Publish this variable in the help.
4832
4833
4834  if test "x$CAT" = x; then
4835    # The variable is not set by user, try to locate tool using the code snippet
4836    for ac_prog in cat
4837do
4838  # Extract the first word of "$ac_prog", so it can be a program name with args.
4839set dummy $ac_prog; ac_word=$2
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4841$as_echo_n "checking for $ac_word... " >&6; }
4842if ${ac_cv_path_CAT+:} false; then :
4843  $as_echo_n "(cached) " >&6
4844else
4845  case $CAT in
4846  [\\/]* | ?:[\\/]*)
4847  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4848  ;;
4849  *)
4850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4851for as_dir in $PATH
4852do
4853  IFS=$as_save_IFS
4854  test -z "$as_dir" && as_dir=.
4855    for ac_exec_ext in '' $ac_executable_extensions; do
4856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4857    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4859    break 2
4860  fi
4861done
4862  done
4863IFS=$as_save_IFS
4864
4865  ;;
4866esac
4867fi
4868CAT=$ac_cv_path_CAT
4869if test -n "$CAT"; then
4870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4871$as_echo "$CAT" >&6; }
4872else
4873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4874$as_echo "no" >&6; }
4875fi
4876
4877
4878  test -n "$CAT" && break
4879done
4880
4881  else
4882    # The variable is set, but is it from the command line or the environment?
4883
4884    # Try to remove the string !CAT! from our list.
4885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4887      # If it failed, the variable was not from the command line. Ignore it,
4888      # but warn the user (except for BASH, which is always set by the calling BASH).
4889      if test "xCAT" != xBASH; then
4890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4891$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4892      fi
4893      # Try to locate tool using the code snippet
4894      for ac_prog in cat
4895do
4896  # Extract the first word of "$ac_prog", so it can be a program name with args.
4897set dummy $ac_prog; ac_word=$2
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if ${ac_cv_path_CAT+:} false; then :
4901  $as_echo_n "(cached) " >&6
4902else
4903  case $CAT in
4904  [\\/]* | ?:[\\/]*)
4905  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4906  ;;
4907  *)
4908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911  IFS=$as_save_IFS
4912  test -z "$as_dir" && as_dir=.
4913    for ac_exec_ext in '' $ac_executable_extensions; do
4914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4915    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917    break 2
4918  fi
4919done
4920  done
4921IFS=$as_save_IFS
4922
4923  ;;
4924esac
4925fi
4926CAT=$ac_cv_path_CAT
4927if test -n "$CAT"; then
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4929$as_echo "$CAT" >&6; }
4930else
4931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
4933fi
4934
4935
4936  test -n "$CAT" && break
4937done
4938
4939    else
4940      # If it succeeded, then it was overridden by the user. We will use it
4941      # for the tool.
4942
4943      # First remove it from the list of overridden variables, so we can test
4944      # for unknown variables in the end.
4945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4946
4947      # Check if the provided tool contains a complete path.
4948      tool_specified="$CAT"
4949      tool_basename="${tool_specified##*/}"
4950      if test "x$tool_basename" = "x$tool_specified"; then
4951        # A command without a complete path is provided, search $PATH.
4952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4953$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4954        # Extract the first word of "$tool_basename", so it can be a program name with args.
4955set dummy $tool_basename; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
4958if ${ac_cv_path_CAT+:} false; then :
4959  $as_echo_n "(cached) " >&6
4960else
4961  case $CAT in
4962  [\\/]* | ?:[\\/]*)
4963  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4964  ;;
4965  *)
4966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in $PATH
4968do
4969  IFS=$as_save_IFS
4970  test -z "$as_dir" && as_dir=.
4971    for ac_exec_ext in '' $ac_executable_extensions; do
4972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975    break 2
4976  fi
4977done
4978  done
4979IFS=$as_save_IFS
4980
4981  ;;
4982esac
4983fi
4984CAT=$ac_cv_path_CAT
4985if test -n "$CAT"; then
4986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4987$as_echo "$CAT" >&6; }
4988else
4989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993
4994        if test "x$CAT" = x; then
4995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4996        fi
4997      else
4998        # Otherwise we believe it is a complete path. Use it as it is.
4999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5000$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5002$as_echo_n "checking for CAT... " >&6; }
5003        if test ! -x "$tool_specified"; then
5004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5005$as_echo "not found" >&6; }
5006          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5007        fi
5008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5009$as_echo "$tool_specified" >&6; }
5010      fi
5011    fi
5012  fi
5013
5014
5015
5016  if test "x$CAT" = x; then
5017    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5018  fi
5019
5020
5021
5022
5023
5024  # Publish this variable in the help.
5025
5026
5027  if test "x$CHMOD" = x; then
5028    # The variable is not set by user, try to locate tool using the code snippet
5029    for ac_prog in chmod
5030do
5031  # Extract the first word of "$ac_prog", so it can be a program name with args.
5032set dummy $ac_prog; ac_word=$2
5033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
5035if ${ac_cv_path_CHMOD+:} false; then :
5036  $as_echo_n "(cached) " >&6
5037else
5038  case $CHMOD in
5039  [\\/]* | ?:[\\/]*)
5040  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5041  ;;
5042  *)
5043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5044for as_dir in $PATH
5045do
5046  IFS=$as_save_IFS
5047  test -z "$as_dir" && as_dir=.
5048    for ac_exec_ext in '' $ac_executable_extensions; do
5049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5050    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5052    break 2
5053  fi
5054done
5055  done
5056IFS=$as_save_IFS
5057
5058  ;;
5059esac
5060fi
5061CHMOD=$ac_cv_path_CHMOD
5062if test -n "$CHMOD"; then
5063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5064$as_echo "$CHMOD" >&6; }
5065else
5066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5067$as_echo "no" >&6; }
5068fi
5069
5070
5071  test -n "$CHMOD" && break
5072done
5073
5074  else
5075    # The variable is set, but is it from the command line or the environment?
5076
5077    # Try to remove the string !CHMOD! from our list.
5078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5080      # If it failed, the variable was not from the command line. Ignore it,
5081      # but warn the user (except for BASH, which is always set by the calling BASH).
5082      if test "xCHMOD" != xBASH; then
5083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5084$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5085      fi
5086      # Try to locate tool using the code snippet
5087      for ac_prog in chmod
5088do
5089  # Extract the first word of "$ac_prog", so it can be a program name with args.
5090set dummy $ac_prog; ac_word=$2
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
5093if ${ac_cv_path_CHMOD+:} false; then :
5094  $as_echo_n "(cached) " >&6
5095else
5096  case $CHMOD in
5097  [\\/]* | ?:[\\/]*)
5098  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5099  ;;
5100  *)
5101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104  IFS=$as_save_IFS
5105  test -z "$as_dir" && as_dir=.
5106    for ac_exec_ext in '' $ac_executable_extensions; do
5107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5110    break 2
5111  fi
5112done
5113  done
5114IFS=$as_save_IFS
5115
5116  ;;
5117esac
5118fi
5119CHMOD=$ac_cv_path_CHMOD
5120if test -n "$CHMOD"; then
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5122$as_echo "$CHMOD" >&6; }
5123else
5124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
5126fi
5127
5128
5129  test -n "$CHMOD" && break
5130done
5131
5132    else
5133      # If it succeeded, then it was overridden by the user. We will use it
5134      # for the tool.
5135
5136      # First remove it from the list of overridden variables, so we can test
5137      # for unknown variables in the end.
5138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5139
5140      # Check if the provided tool contains a complete path.
5141      tool_specified="$CHMOD"
5142      tool_basename="${tool_specified##*/}"
5143      if test "x$tool_basename" = "x$tool_specified"; then
5144        # A command without a complete path is provided, search $PATH.
5145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5146$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5147        # Extract the first word of "$tool_basename", so it can be a program name with args.
5148set dummy $tool_basename; ac_word=$2
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150$as_echo_n "checking for $ac_word... " >&6; }
5151if ${ac_cv_path_CHMOD+:} false; then :
5152  $as_echo_n "(cached) " >&6
5153else
5154  case $CHMOD in
5155  [\\/]* | ?:[\\/]*)
5156  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5157  ;;
5158  *)
5159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5160for as_dir in $PATH
5161do
5162  IFS=$as_save_IFS
5163  test -z "$as_dir" && as_dir=.
5164    for ac_exec_ext in '' $ac_executable_extensions; do
5165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5166    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5168    break 2
5169  fi
5170done
5171  done
5172IFS=$as_save_IFS
5173
5174  ;;
5175esac
5176fi
5177CHMOD=$ac_cv_path_CHMOD
5178if test -n "$CHMOD"; then
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5180$as_echo "$CHMOD" >&6; }
5181else
5182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183$as_echo "no" >&6; }
5184fi
5185
5186
5187        if test "x$CHMOD" = x; then
5188          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5189        fi
5190      else
5191        # Otherwise we believe it is a complete path. Use it as it is.
5192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5193$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5195$as_echo_n "checking for CHMOD... " >&6; }
5196        if test ! -x "$tool_specified"; then
5197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5198$as_echo "not found" >&6; }
5199          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5200        fi
5201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5202$as_echo "$tool_specified" >&6; }
5203      fi
5204    fi
5205  fi
5206
5207
5208
5209  if test "x$CHMOD" = x; then
5210    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5211  fi
5212
5213
5214
5215
5216
5217  # Publish this variable in the help.
5218
5219
5220  if test "x$CMP" = x; then
5221    # The variable is not set by user, try to locate tool using the code snippet
5222    for ac_prog in cmp
5223do
5224  # Extract the first word of "$ac_prog", so it can be a program name with args.
5225set dummy $ac_prog; ac_word=$2
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227$as_echo_n "checking for $ac_word... " >&6; }
5228if ${ac_cv_path_CMP+:} false; then :
5229  $as_echo_n "(cached) " >&6
5230else
5231  case $CMP in
5232  [\\/]* | ?:[\\/]*)
5233  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5234  ;;
5235  *)
5236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237for as_dir in $PATH
5238do
5239  IFS=$as_save_IFS
5240  test -z "$as_dir" && as_dir=.
5241    for ac_exec_ext in '' $ac_executable_extensions; do
5242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245    break 2
5246  fi
5247done
5248  done
5249IFS=$as_save_IFS
5250
5251  ;;
5252esac
5253fi
5254CMP=$ac_cv_path_CMP
5255if test -n "$CMP"; then
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5257$as_echo "$CMP" >&6; }
5258else
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260$as_echo "no" >&6; }
5261fi
5262
5263
5264  test -n "$CMP" && break
5265done
5266
5267  else
5268    # The variable is set, but is it from the command line or the environment?
5269
5270    # Try to remove the string !CMP! from our list.
5271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5273      # If it failed, the variable was not from the command line. Ignore it,
5274      # but warn the user (except for BASH, which is always set by the calling BASH).
5275      if test "xCMP" != xBASH; then
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5277$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5278      fi
5279      # Try to locate tool using the code snippet
5280      for ac_prog in cmp
5281do
5282  # Extract the first word of "$ac_prog", so it can be a program name with args.
5283set dummy $ac_prog; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5285$as_echo_n "checking for $ac_word... " >&6; }
5286if ${ac_cv_path_CMP+:} false; then :
5287  $as_echo_n "(cached) " >&6
5288else
5289  case $CMP in
5290  [\\/]* | ?:[\\/]*)
5291  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5292  ;;
5293  *)
5294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297  IFS=$as_save_IFS
5298  test -z "$as_dir" && as_dir=.
5299    for ac_exec_ext in '' $ac_executable_extensions; do
5300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5301    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5303    break 2
5304  fi
5305done
5306  done
5307IFS=$as_save_IFS
5308
5309  ;;
5310esac
5311fi
5312CMP=$ac_cv_path_CMP
5313if test -n "$CMP"; then
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5315$as_echo "$CMP" >&6; }
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320
5321
5322  test -n "$CMP" && break
5323done
5324
5325    else
5326      # If it succeeded, then it was overridden by the user. We will use it
5327      # for the tool.
5328
5329      # First remove it from the list of overridden variables, so we can test
5330      # for unknown variables in the end.
5331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5332
5333      # Check if the provided tool contains a complete path.
5334      tool_specified="$CMP"
5335      tool_basename="${tool_specified##*/}"
5336      if test "x$tool_basename" = "x$tool_specified"; then
5337        # A command without a complete path is provided, search $PATH.
5338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5339$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5340        # Extract the first word of "$tool_basename", so it can be a program name with args.
5341set dummy $tool_basename; ac_word=$2
5342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5343$as_echo_n "checking for $ac_word... " >&6; }
5344if ${ac_cv_path_CMP+:} false; then :
5345  $as_echo_n "(cached) " >&6
5346else
5347  case $CMP in
5348  [\\/]* | ?:[\\/]*)
5349  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5350  ;;
5351  *)
5352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5353for as_dir in $PATH
5354do
5355  IFS=$as_save_IFS
5356  test -z "$as_dir" && as_dir=.
5357    for ac_exec_ext in '' $ac_executable_extensions; do
5358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5359    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5361    break 2
5362  fi
5363done
5364  done
5365IFS=$as_save_IFS
5366
5367  ;;
5368esac
5369fi
5370CMP=$ac_cv_path_CMP
5371if test -n "$CMP"; then
5372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5373$as_echo "$CMP" >&6; }
5374else
5375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376$as_echo "no" >&6; }
5377fi
5378
5379
5380        if test "x$CMP" = x; then
5381          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5382        fi
5383      else
5384        # Otherwise we believe it is a complete path. Use it as it is.
5385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5386$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5388$as_echo_n "checking for CMP... " >&6; }
5389        if test ! -x "$tool_specified"; then
5390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5391$as_echo "not found" >&6; }
5392          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5393        fi
5394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5395$as_echo "$tool_specified" >&6; }
5396      fi
5397    fi
5398  fi
5399
5400
5401
5402  if test "x$CMP" = x; then
5403    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5404  fi
5405
5406
5407
5408
5409
5410  # Publish this variable in the help.
5411
5412
5413  if test "x$COMM" = x; then
5414    # The variable is not set by user, try to locate tool using the code snippet
5415    for ac_prog in comm
5416do
5417  # Extract the first word of "$ac_prog", so it can be a program name with args.
5418set dummy $ac_prog; ac_word=$2
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5420$as_echo_n "checking for $ac_word... " >&6; }
5421if ${ac_cv_path_COMM+:} false; then :
5422  $as_echo_n "(cached) " >&6
5423else
5424  case $COMM in
5425  [\\/]* | ?:[\\/]*)
5426  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5427  ;;
5428  *)
5429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5430for as_dir in $PATH
5431do
5432  IFS=$as_save_IFS
5433  test -z "$as_dir" && as_dir=.
5434    for ac_exec_ext in '' $ac_executable_extensions; do
5435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5436    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5438    break 2
5439  fi
5440done
5441  done
5442IFS=$as_save_IFS
5443
5444  ;;
5445esac
5446fi
5447COMM=$ac_cv_path_COMM
5448if test -n "$COMM"; then
5449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5450$as_echo "$COMM" >&6; }
5451else
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5453$as_echo "no" >&6; }
5454fi
5455
5456
5457  test -n "$COMM" && break
5458done
5459
5460  else
5461    # The variable is set, but is it from the command line or the environment?
5462
5463    # Try to remove the string !COMM! from our list.
5464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5466      # If it failed, the variable was not from the command line. Ignore it,
5467      # but warn the user (except for BASH, which is always set by the calling BASH).
5468      if test "xCOMM" != xBASH; then
5469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5470$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5471      fi
5472      # Try to locate tool using the code snippet
5473      for ac_prog in comm
5474do
5475  # Extract the first word of "$ac_prog", so it can be a program name with args.
5476set dummy $ac_prog; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if ${ac_cv_path_COMM+:} false; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $COMM in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505COMM=$ac_cv_path_COMM
5506if test -n "$COMM"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5508$as_echo "$COMM" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515  test -n "$COMM" && break
5516done
5517
5518    else
5519      # If it succeeded, then it was overridden by the user. We will use it
5520      # for the tool.
5521
5522      # First remove it from the list of overridden variables, so we can test
5523      # for unknown variables in the end.
5524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5525
5526      # Check if the provided tool contains a complete path.
5527      tool_specified="$COMM"
5528      tool_basename="${tool_specified##*/}"
5529      if test "x$tool_basename" = "x$tool_specified"; then
5530        # A command without a complete path is provided, search $PATH.
5531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5532$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5533        # Extract the first word of "$tool_basename", so it can be a program name with args.
5534set dummy $tool_basename; ac_word=$2
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
5537if ${ac_cv_path_COMM+:} false; then :
5538  $as_echo_n "(cached) " >&6
5539else
5540  case $COMM in
5541  [\\/]* | ?:[\\/]*)
5542  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5543  ;;
5544  *)
5545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546for as_dir in $PATH
5547do
5548  IFS=$as_save_IFS
5549  test -z "$as_dir" && as_dir=.
5550    for ac_exec_ext in '' $ac_executable_extensions; do
5551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5552    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5554    break 2
5555  fi
5556done
5557  done
5558IFS=$as_save_IFS
5559
5560  ;;
5561esac
5562fi
5563COMM=$ac_cv_path_COMM
5564if test -n "$COMM"; then
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5566$as_echo "$COMM" >&6; }
5567else
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5569$as_echo "no" >&6; }
5570fi
5571
5572
5573        if test "x$COMM" = x; then
5574          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5575        fi
5576      else
5577        # Otherwise we believe it is a complete path. Use it as it is.
5578        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5579$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5581$as_echo_n "checking for COMM... " >&6; }
5582        if test ! -x "$tool_specified"; then
5583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5584$as_echo "not found" >&6; }
5585          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5586        fi
5587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5588$as_echo "$tool_specified" >&6; }
5589      fi
5590    fi
5591  fi
5592
5593
5594
5595  if test "x$COMM" = x; then
5596    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5597  fi
5598
5599
5600
5601
5602
5603  # Publish this variable in the help.
5604
5605
5606  if test "x$CP" = x; then
5607    # The variable is not set by user, try to locate tool using the code snippet
5608    for ac_prog in cp
5609do
5610  # Extract the first word of "$ac_prog", so it can be a program name with args.
5611set dummy $ac_prog; ac_word=$2
5612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613$as_echo_n "checking for $ac_word... " >&6; }
5614if ${ac_cv_path_CP+:} false; then :
5615  $as_echo_n "(cached) " >&6
5616else
5617  case $CP in
5618  [\\/]* | ?:[\\/]*)
5619  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5620  ;;
5621  *)
5622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623for as_dir in $PATH
5624do
5625  IFS=$as_save_IFS
5626  test -z "$as_dir" && as_dir=.
5627    for ac_exec_ext in '' $ac_executable_extensions; do
5628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5629    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631    break 2
5632  fi
5633done
5634  done
5635IFS=$as_save_IFS
5636
5637  ;;
5638esac
5639fi
5640CP=$ac_cv_path_CP
5641if test -n "$CP"; then
5642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5643$as_echo "$CP" >&6; }
5644else
5645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5646$as_echo "no" >&6; }
5647fi
5648
5649
5650  test -n "$CP" && break
5651done
5652
5653  else
5654    # The variable is set, but is it from the command line or the environment?
5655
5656    # Try to remove the string !CP! from our list.
5657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5659      # If it failed, the variable was not from the command line. Ignore it,
5660      # but warn the user (except for BASH, which is always set by the calling BASH).
5661      if test "xCP" != xBASH; then
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5663$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5664      fi
5665      # Try to locate tool using the code snippet
5666      for ac_prog in cp
5667do
5668  # Extract the first word of "$ac_prog", so it can be a program name with args.
5669set dummy $ac_prog; ac_word=$2
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671$as_echo_n "checking for $ac_word... " >&6; }
5672if ${ac_cv_path_CP+:} false; then :
5673  $as_echo_n "(cached) " >&6
5674else
5675  case $CP in
5676  [\\/]* | ?:[\\/]*)
5677  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5678  ;;
5679  *)
5680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683  IFS=$as_save_IFS
5684  test -z "$as_dir" && as_dir=.
5685    for ac_exec_ext in '' $ac_executable_extensions; do
5686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5687    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689    break 2
5690  fi
5691done
5692  done
5693IFS=$as_save_IFS
5694
5695  ;;
5696esac
5697fi
5698CP=$ac_cv_path_CP
5699if test -n "$CP"; then
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5701$as_echo "$CP" >&6; }
5702else
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704$as_echo "no" >&6; }
5705fi
5706
5707
5708  test -n "$CP" && break
5709done
5710
5711    else
5712      # If it succeeded, then it was overridden by the user. We will use it
5713      # for the tool.
5714
5715      # First remove it from the list of overridden variables, so we can test
5716      # for unknown variables in the end.
5717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5718
5719      # Check if the provided tool contains a complete path.
5720      tool_specified="$CP"
5721      tool_basename="${tool_specified##*/}"
5722      if test "x$tool_basename" = "x$tool_specified"; then
5723        # A command without a complete path is provided, search $PATH.
5724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5725$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5726        # Extract the first word of "$tool_basename", so it can be a program name with args.
5727set dummy $tool_basename; ac_word=$2
5728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5729$as_echo_n "checking for $ac_word... " >&6; }
5730if ${ac_cv_path_CP+:} false; then :
5731  $as_echo_n "(cached) " >&6
5732else
5733  case $CP in
5734  [\\/]* | ?:[\\/]*)
5735  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5736  ;;
5737  *)
5738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5739for as_dir in $PATH
5740do
5741  IFS=$as_save_IFS
5742  test -z "$as_dir" && as_dir=.
5743    for ac_exec_ext in '' $ac_executable_extensions; do
5744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5745    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5747    break 2
5748  fi
5749done
5750  done
5751IFS=$as_save_IFS
5752
5753  ;;
5754esac
5755fi
5756CP=$ac_cv_path_CP
5757if test -n "$CP"; then
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5759$as_echo "$CP" >&6; }
5760else
5761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762$as_echo "no" >&6; }
5763fi
5764
5765
5766        if test "x$CP" = x; then
5767          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5768        fi
5769      else
5770        # Otherwise we believe it is a complete path. Use it as it is.
5771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5772$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5774$as_echo_n "checking for CP... " >&6; }
5775        if test ! -x "$tool_specified"; then
5776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5777$as_echo "not found" >&6; }
5778          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5779        fi
5780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5781$as_echo "$tool_specified" >&6; }
5782      fi
5783    fi
5784  fi
5785
5786
5787
5788  if test "x$CP" = x; then
5789    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5790  fi
5791
5792
5793
5794
5795
5796  # Publish this variable in the help.
5797
5798
5799  if test "x$CUT" = x; then
5800    # The variable is not set by user, try to locate tool using the code snippet
5801    for ac_prog in cut
5802do
5803  # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_path_CUT+:} false; then :
5808  $as_echo_n "(cached) " >&6
5809else
5810  case $CUT in
5811  [\\/]* | ?:[\\/]*)
5812  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5813  ;;
5814  *)
5815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5816for as_dir in $PATH
5817do
5818  IFS=$as_save_IFS
5819  test -z "$as_dir" && as_dir=.
5820    for ac_exec_ext in '' $ac_executable_extensions; do
5821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5822    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824    break 2
5825  fi
5826done
5827  done
5828IFS=$as_save_IFS
5829
5830  ;;
5831esac
5832fi
5833CUT=$ac_cv_path_CUT
5834if test -n "$CUT"; then
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5836$as_echo "$CUT" >&6; }
5837else
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839$as_echo "no" >&6; }
5840fi
5841
5842
5843  test -n "$CUT" && break
5844done
5845
5846  else
5847    # The variable is set, but is it from the command line or the environment?
5848
5849    # Try to remove the string !CUT! from our list.
5850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5852      # If it failed, the variable was not from the command line. Ignore it,
5853      # but warn the user (except for BASH, which is always set by the calling BASH).
5854      if test "xCUT" != xBASH; then
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5856$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5857      fi
5858      # Try to locate tool using the code snippet
5859      for ac_prog in cut
5860do
5861  # Extract the first word of "$ac_prog", so it can be a program name with args.
5862set dummy $ac_prog; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_CUT+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $CUT in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891CUT=$ac_cv_path_CUT
5892if test -n "$CUT"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5894$as_echo "$CUT" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901  test -n "$CUT" && break
5902done
5903
5904    else
5905      # If it succeeded, then it was overridden by the user. We will use it
5906      # for the tool.
5907
5908      # First remove it from the list of overridden variables, so we can test
5909      # for unknown variables in the end.
5910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5911
5912      # Check if the provided tool contains a complete path.
5913      tool_specified="$CUT"
5914      tool_basename="${tool_specified##*/}"
5915      if test "x$tool_basename" = "x$tool_specified"; then
5916        # A command without a complete path is provided, search $PATH.
5917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5918$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5919        # Extract the first word of "$tool_basename", so it can be a program name with args.
5920set dummy $tool_basename; ac_word=$2
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5922$as_echo_n "checking for $ac_word... " >&6; }
5923if ${ac_cv_path_CUT+:} false; then :
5924  $as_echo_n "(cached) " >&6
5925else
5926  case $CUT in
5927  [\\/]* | ?:[\\/]*)
5928  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5929  ;;
5930  *)
5931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5932for as_dir in $PATH
5933do
5934  IFS=$as_save_IFS
5935  test -z "$as_dir" && as_dir=.
5936    for ac_exec_ext in '' $ac_executable_extensions; do
5937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5938    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5940    break 2
5941  fi
5942done
5943  done
5944IFS=$as_save_IFS
5945
5946  ;;
5947esac
5948fi
5949CUT=$ac_cv_path_CUT
5950if test -n "$CUT"; then
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5952$as_echo "$CUT" >&6; }
5953else
5954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955$as_echo "no" >&6; }
5956fi
5957
5958
5959        if test "x$CUT" = x; then
5960          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5961        fi
5962      else
5963        # Otherwise we believe it is a complete path. Use it as it is.
5964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5965$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5967$as_echo_n "checking for CUT... " >&6; }
5968        if test ! -x "$tool_specified"; then
5969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5970$as_echo "not found" >&6; }
5971          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5972        fi
5973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5974$as_echo "$tool_specified" >&6; }
5975      fi
5976    fi
5977  fi
5978
5979
5980
5981  if test "x$CUT" = x; then
5982    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5983  fi
5984
5985
5986
5987
5988
5989  # Publish this variable in the help.
5990
5991
5992  if test "x$DATE" = x; then
5993    # The variable is not set by user, try to locate tool using the code snippet
5994    for ac_prog in date
5995do
5996  # Extract the first word of "$ac_prog", so it can be a program name with args.
5997set dummy $ac_prog; ac_word=$2
5998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5999$as_echo_n "checking for $ac_word... " >&6; }
6000if ${ac_cv_path_DATE+:} false; then :
6001  $as_echo_n "(cached) " >&6
6002else
6003  case $DATE in
6004  [\\/]* | ?:[\\/]*)
6005  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6006  ;;
6007  *)
6008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6009for as_dir in $PATH
6010do
6011  IFS=$as_save_IFS
6012  test -z "$as_dir" && as_dir=.
6013    for ac_exec_ext in '' $ac_executable_extensions; do
6014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6015    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6017    break 2
6018  fi
6019done
6020  done
6021IFS=$as_save_IFS
6022
6023  ;;
6024esac
6025fi
6026DATE=$ac_cv_path_DATE
6027if test -n "$DATE"; then
6028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6029$as_echo "$DATE" >&6; }
6030else
6031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032$as_echo "no" >&6; }
6033fi
6034
6035
6036  test -n "$DATE" && break
6037done
6038
6039  else
6040    # The variable is set, but is it from the command line or the environment?
6041
6042    # Try to remove the string !DATE! from our list.
6043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6045      # If it failed, the variable was not from the command line. Ignore it,
6046      # but warn the user (except for BASH, which is always set by the calling BASH).
6047      if test "xDATE" != xBASH; then
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6049$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6050      fi
6051      # Try to locate tool using the code snippet
6052      for ac_prog in date
6053do
6054  # Extract the first word of "$ac_prog", so it can be a program name with args.
6055set dummy $ac_prog; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_path_DATE+:} false; then :
6059  $as_echo_n "(cached) " >&6
6060else
6061  case $DATE in
6062  [\\/]* | ?:[\\/]*)
6063  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6064  ;;
6065  *)
6066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067for as_dir in $PATH
6068do
6069  IFS=$as_save_IFS
6070  test -z "$as_dir" && as_dir=.
6071    for ac_exec_ext in '' $ac_executable_extensions; do
6072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6073    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075    break 2
6076  fi
6077done
6078  done
6079IFS=$as_save_IFS
6080
6081  ;;
6082esac
6083fi
6084DATE=$ac_cv_path_DATE
6085if test -n "$DATE"; then
6086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6087$as_echo "$DATE" >&6; }
6088else
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094  test -n "$DATE" && break
6095done
6096
6097    else
6098      # If it succeeded, then it was overridden by the user. We will use it
6099      # for the tool.
6100
6101      # First remove it from the list of overridden variables, so we can test
6102      # for unknown variables in the end.
6103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6104
6105      # Check if the provided tool contains a complete path.
6106      tool_specified="$DATE"
6107      tool_basename="${tool_specified##*/}"
6108      if test "x$tool_basename" = "x$tool_specified"; then
6109        # A command without a complete path is provided, search $PATH.
6110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6111$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6112        # Extract the first word of "$tool_basename", so it can be a program name with args.
6113set dummy $tool_basename; ac_word=$2
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6115$as_echo_n "checking for $ac_word... " >&6; }
6116if ${ac_cv_path_DATE+:} false; then :
6117  $as_echo_n "(cached) " >&6
6118else
6119  case $DATE in
6120  [\\/]* | ?:[\\/]*)
6121  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6122  ;;
6123  *)
6124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH
6126do
6127  IFS=$as_save_IFS
6128  test -z "$as_dir" && as_dir=.
6129    for ac_exec_ext in '' $ac_executable_extensions; do
6130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6131    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6133    break 2
6134  fi
6135done
6136  done
6137IFS=$as_save_IFS
6138
6139  ;;
6140esac
6141fi
6142DATE=$ac_cv_path_DATE
6143if test -n "$DATE"; then
6144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6145$as_echo "$DATE" >&6; }
6146else
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }
6149fi
6150
6151
6152        if test "x$DATE" = x; then
6153          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6154        fi
6155      else
6156        # Otherwise we believe it is a complete path. Use it as it is.
6157        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6158$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6160$as_echo_n "checking for DATE... " >&6; }
6161        if test ! -x "$tool_specified"; then
6162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6163$as_echo "not found" >&6; }
6164          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6165        fi
6166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6167$as_echo "$tool_specified" >&6; }
6168      fi
6169    fi
6170  fi
6171
6172
6173
6174  if test "x$DATE" = x; then
6175    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6176  fi
6177
6178
6179
6180
6181
6182  # Publish this variable in the help.
6183
6184
6185  if test "x$DIFF" = x; then
6186    # The variable is not set by user, try to locate tool using the code snippet
6187    for ac_prog in gdiff diff
6188do
6189  # Extract the first word of "$ac_prog", so it can be a program name with args.
6190set dummy $ac_prog; ac_word=$2
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6192$as_echo_n "checking for $ac_word... " >&6; }
6193if ${ac_cv_path_DIFF+:} false; then :
6194  $as_echo_n "(cached) " >&6
6195else
6196  case $DIFF in
6197  [\\/]* | ?:[\\/]*)
6198  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6199  ;;
6200  *)
6201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_exec_ext in '' $ac_executable_extensions; do
6207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6208    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210    break 2
6211  fi
6212done
6213  done
6214IFS=$as_save_IFS
6215
6216  ;;
6217esac
6218fi
6219DIFF=$ac_cv_path_DIFF
6220if test -n "$DIFF"; then
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6222$as_echo "$DIFF" >&6; }
6223else
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6225$as_echo "no" >&6; }
6226fi
6227
6228
6229  test -n "$DIFF" && break
6230done
6231
6232  else
6233    # The variable is set, but is it from the command line or the environment?
6234
6235    # Try to remove the string !DIFF! from our list.
6236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6238      # If it failed, the variable was not from the command line. Ignore it,
6239      # but warn the user (except for BASH, which is always set by the calling BASH).
6240      if test "xDIFF" != xBASH; then
6241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6242$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6243      fi
6244      # Try to locate tool using the code snippet
6245      for ac_prog in gdiff diff
6246do
6247  # Extract the first word of "$ac_prog", so it can be a program name with args.
6248set dummy $ac_prog; ac_word=$2
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6250$as_echo_n "checking for $ac_word... " >&6; }
6251if ${ac_cv_path_DIFF+:} false; then :
6252  $as_echo_n "(cached) " >&6
6253else
6254  case $DIFF in
6255  [\\/]* | ?:[\\/]*)
6256  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6257  ;;
6258  *)
6259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH
6261do
6262  IFS=$as_save_IFS
6263  test -z "$as_dir" && as_dir=.
6264    for ac_exec_ext in '' $ac_executable_extensions; do
6265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6266    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6268    break 2
6269  fi
6270done
6271  done
6272IFS=$as_save_IFS
6273
6274  ;;
6275esac
6276fi
6277DIFF=$ac_cv_path_DIFF
6278if test -n "$DIFF"; then
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6280$as_echo "$DIFF" >&6; }
6281else
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }
6284fi
6285
6286
6287  test -n "$DIFF" && break
6288done
6289
6290    else
6291      # If it succeeded, then it was overridden by the user. We will use it
6292      # for the tool.
6293
6294      # First remove it from the list of overridden variables, so we can test
6295      # for unknown variables in the end.
6296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6297
6298      # Check if the provided tool contains a complete path.
6299      tool_specified="$DIFF"
6300      tool_basename="${tool_specified##*/}"
6301      if test "x$tool_basename" = "x$tool_specified"; then
6302        # A command without a complete path is provided, search $PATH.
6303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6304$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6305        # Extract the first word of "$tool_basename", so it can be a program name with args.
6306set dummy $tool_basename; ac_word=$2
6307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6308$as_echo_n "checking for $ac_word... " >&6; }
6309if ${ac_cv_path_DIFF+:} false; then :
6310  $as_echo_n "(cached) " >&6
6311else
6312  case $DIFF in
6313  [\\/]* | ?:[\\/]*)
6314  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6315  ;;
6316  *)
6317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6318for as_dir in $PATH
6319do
6320  IFS=$as_save_IFS
6321  test -z "$as_dir" && as_dir=.
6322    for ac_exec_ext in '' $ac_executable_extensions; do
6323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6324    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6326    break 2
6327  fi
6328done
6329  done
6330IFS=$as_save_IFS
6331
6332  ;;
6333esac
6334fi
6335DIFF=$ac_cv_path_DIFF
6336if test -n "$DIFF"; then
6337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6338$as_echo "$DIFF" >&6; }
6339else
6340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341$as_echo "no" >&6; }
6342fi
6343
6344
6345        if test "x$DIFF" = x; then
6346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6347        fi
6348      else
6349        # Otherwise we believe it is a complete path. Use it as it is.
6350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6351$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6353$as_echo_n "checking for DIFF... " >&6; }
6354        if test ! -x "$tool_specified"; then
6355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6356$as_echo "not found" >&6; }
6357          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6358        fi
6359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6360$as_echo "$tool_specified" >&6; }
6361      fi
6362    fi
6363  fi
6364
6365
6366
6367  if test "x$DIFF" = x; then
6368    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6369  fi
6370
6371
6372
6373
6374
6375  # Publish this variable in the help.
6376
6377
6378  if test "x$DIRNAME" = x; then
6379    # The variable is not set by user, try to locate tool using the code snippet
6380    for ac_prog in dirname
6381do
6382  # Extract the first word of "$ac_prog", so it can be a program name with args.
6383set dummy $ac_prog; ac_word=$2
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385$as_echo_n "checking for $ac_word... " >&6; }
6386if ${ac_cv_path_DIRNAME+:} false; then :
6387  $as_echo_n "(cached) " >&6
6388else
6389  case $DIRNAME in
6390  [\\/]* | ?:[\\/]*)
6391  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6392  ;;
6393  *)
6394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397  IFS=$as_save_IFS
6398  test -z "$as_dir" && as_dir=.
6399    for ac_exec_ext in '' $ac_executable_extensions; do
6400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6401    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403    break 2
6404  fi
6405done
6406  done
6407IFS=$as_save_IFS
6408
6409  ;;
6410esac
6411fi
6412DIRNAME=$ac_cv_path_DIRNAME
6413if test -n "$DIRNAME"; then
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6415$as_echo "$DIRNAME" >&6; }
6416else
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
6419fi
6420
6421
6422  test -n "$DIRNAME" && break
6423done
6424
6425  else
6426    # The variable is set, but is it from the command line or the environment?
6427
6428    # Try to remove the string !DIRNAME! from our list.
6429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6431      # If it failed, the variable was not from the command line. Ignore it,
6432      # but warn the user (except for BASH, which is always set by the calling BASH).
6433      if test "xDIRNAME" != xBASH; then
6434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6435$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6436      fi
6437      # Try to locate tool using the code snippet
6438      for ac_prog in dirname
6439do
6440  # Extract the first word of "$ac_prog", so it can be a program name with args.
6441set dummy $ac_prog; ac_word=$2
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if ${ac_cv_path_DIRNAME+:} false; then :
6445  $as_echo_n "(cached) " >&6
6446else
6447  case $DIRNAME in
6448  [\\/]* | ?:[\\/]*)
6449  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6450  ;;
6451  *)
6452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453for as_dir in $PATH
6454do
6455  IFS=$as_save_IFS
6456  test -z "$as_dir" && as_dir=.
6457    for ac_exec_ext in '' $ac_executable_extensions; do
6458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6459    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461    break 2
6462  fi
6463done
6464  done
6465IFS=$as_save_IFS
6466
6467  ;;
6468esac
6469fi
6470DIRNAME=$ac_cv_path_DIRNAME
6471if test -n "$DIRNAME"; then
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6473$as_echo "$DIRNAME" >&6; }
6474else
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479
6480  test -n "$DIRNAME" && break
6481done
6482
6483    else
6484      # If it succeeded, then it was overridden by the user. We will use it
6485      # for the tool.
6486
6487      # First remove it from the list of overridden variables, so we can test
6488      # for unknown variables in the end.
6489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6490
6491      # Check if the provided tool contains a complete path.
6492      tool_specified="$DIRNAME"
6493      tool_basename="${tool_specified##*/}"
6494      if test "x$tool_basename" = "x$tool_specified"; then
6495        # A command without a complete path is provided, search $PATH.
6496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6497$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6498        # Extract the first word of "$tool_basename", so it can be a program name with args.
6499set dummy $tool_basename; ac_word=$2
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6501$as_echo_n "checking for $ac_word... " >&6; }
6502if ${ac_cv_path_DIRNAME+:} false; then :
6503  $as_echo_n "(cached) " >&6
6504else
6505  case $DIRNAME in
6506  [\\/]* | ?:[\\/]*)
6507  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6508  ;;
6509  *)
6510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6511for as_dir in $PATH
6512do
6513  IFS=$as_save_IFS
6514  test -z "$as_dir" && as_dir=.
6515    for ac_exec_ext in '' $ac_executable_extensions; do
6516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6517    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6519    break 2
6520  fi
6521done
6522  done
6523IFS=$as_save_IFS
6524
6525  ;;
6526esac
6527fi
6528DIRNAME=$ac_cv_path_DIRNAME
6529if test -n "$DIRNAME"; then
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6531$as_echo "$DIRNAME" >&6; }
6532else
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537
6538        if test "x$DIRNAME" = x; then
6539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6540        fi
6541      else
6542        # Otherwise we believe it is a complete path. Use it as it is.
6543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6544$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6546$as_echo_n "checking for DIRNAME... " >&6; }
6547        if test ! -x "$tool_specified"; then
6548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6549$as_echo "not found" >&6; }
6550          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6551        fi
6552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6553$as_echo "$tool_specified" >&6; }
6554      fi
6555    fi
6556  fi
6557
6558
6559
6560  if test "x$DIRNAME" = x; then
6561    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6562  fi
6563
6564
6565
6566
6567
6568  # Publish this variable in the help.
6569
6570
6571  if test "x$ECHO" = x; then
6572    # The variable is not set by user, try to locate tool using the code snippet
6573    for ac_prog in echo
6574do
6575  # Extract the first word of "$ac_prog", so it can be a program name with args.
6576set dummy $ac_prog; ac_word=$2
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578$as_echo_n "checking for $ac_word... " >&6; }
6579if ${ac_cv_path_ECHO+:} false; then :
6580  $as_echo_n "(cached) " >&6
6581else
6582  case $ECHO in
6583  [\\/]* | ?:[\\/]*)
6584  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6585  ;;
6586  *)
6587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588for as_dir in $PATH
6589do
6590  IFS=$as_save_IFS
6591  test -z "$as_dir" && as_dir=.
6592    for ac_exec_ext in '' $ac_executable_extensions; do
6593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6594    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6596    break 2
6597  fi
6598done
6599  done
6600IFS=$as_save_IFS
6601
6602  ;;
6603esac
6604fi
6605ECHO=$ac_cv_path_ECHO
6606if test -n "$ECHO"; then
6607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6608$as_echo "$ECHO" >&6; }
6609else
6610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
6612fi
6613
6614
6615  test -n "$ECHO" && break
6616done
6617
6618  else
6619    # The variable is set, but is it from the command line or the environment?
6620
6621    # Try to remove the string !ECHO! from our list.
6622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6624      # If it failed, the variable was not from the command line. Ignore it,
6625      # but warn the user (except for BASH, which is always set by the calling BASH).
6626      if test "xECHO" != xBASH; then
6627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6628$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6629      fi
6630      # Try to locate tool using the code snippet
6631      for ac_prog in echo
6632do
6633  # Extract the first word of "$ac_prog", so it can be a program name with args.
6634set dummy $ac_prog; ac_word=$2
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636$as_echo_n "checking for $ac_word... " >&6; }
6637if ${ac_cv_path_ECHO+:} false; then :
6638  $as_echo_n "(cached) " >&6
6639else
6640  case $ECHO in
6641  [\\/]* | ?:[\\/]*)
6642  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6643  ;;
6644  *)
6645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646for as_dir in $PATH
6647do
6648  IFS=$as_save_IFS
6649  test -z "$as_dir" && as_dir=.
6650    for ac_exec_ext in '' $ac_executable_extensions; do
6651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654    break 2
6655  fi
6656done
6657  done
6658IFS=$as_save_IFS
6659
6660  ;;
6661esac
6662fi
6663ECHO=$ac_cv_path_ECHO
6664if test -n "$ECHO"; then
6665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6666$as_echo "$ECHO" >&6; }
6667else
6668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
6670fi
6671
6672
6673  test -n "$ECHO" && break
6674done
6675
6676    else
6677      # If it succeeded, then it was overridden by the user. We will use it
6678      # for the tool.
6679
6680      # First remove it from the list of overridden variables, so we can test
6681      # for unknown variables in the end.
6682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6683
6684      # Check if the provided tool contains a complete path.
6685      tool_specified="$ECHO"
6686      tool_basename="${tool_specified##*/}"
6687      if test "x$tool_basename" = "x$tool_specified"; then
6688        # A command without a complete path is provided, search $PATH.
6689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6690$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6691        # Extract the first word of "$tool_basename", so it can be a program name with args.
6692set dummy $tool_basename; ac_word=$2
6693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6694$as_echo_n "checking for $ac_word... " >&6; }
6695if ${ac_cv_path_ECHO+:} false; then :
6696  $as_echo_n "(cached) " >&6
6697else
6698  case $ECHO in
6699  [\\/]* | ?:[\\/]*)
6700  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6701  ;;
6702  *)
6703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6704for as_dir in $PATH
6705do
6706  IFS=$as_save_IFS
6707  test -z "$as_dir" && as_dir=.
6708    for ac_exec_ext in '' $ac_executable_extensions; do
6709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6710    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6712    break 2
6713  fi
6714done
6715  done
6716IFS=$as_save_IFS
6717
6718  ;;
6719esac
6720fi
6721ECHO=$ac_cv_path_ECHO
6722if test -n "$ECHO"; then
6723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6724$as_echo "$ECHO" >&6; }
6725else
6726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6727$as_echo "no" >&6; }
6728fi
6729
6730
6731        if test "x$ECHO" = x; then
6732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6733        fi
6734      else
6735        # Otherwise we believe it is a complete path. Use it as it is.
6736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6737$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6739$as_echo_n "checking for ECHO... " >&6; }
6740        if test ! -x "$tool_specified"; then
6741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6742$as_echo "not found" >&6; }
6743          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6744        fi
6745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6746$as_echo "$tool_specified" >&6; }
6747      fi
6748    fi
6749  fi
6750
6751
6752
6753  if test "x$ECHO" = x; then
6754    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6755  fi
6756
6757
6758
6759
6760
6761  # Publish this variable in the help.
6762
6763
6764  if test "x$EXPR" = x; then
6765    # The variable is not set by user, try to locate tool using the code snippet
6766    for ac_prog in expr
6767do
6768  # Extract the first word of "$ac_prog", so it can be a program name with args.
6769set dummy $ac_prog; ac_word=$2
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6771$as_echo_n "checking for $ac_word... " >&6; }
6772if ${ac_cv_path_EXPR+:} false; then :
6773  $as_echo_n "(cached) " >&6
6774else
6775  case $EXPR in
6776  [\\/]* | ?:[\\/]*)
6777  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6778  ;;
6779  *)
6780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6781for as_dir in $PATH
6782do
6783  IFS=$as_save_IFS
6784  test -z "$as_dir" && as_dir=.
6785    for ac_exec_ext in '' $ac_executable_extensions; do
6786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6787    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6789    break 2
6790  fi
6791done
6792  done
6793IFS=$as_save_IFS
6794
6795  ;;
6796esac
6797fi
6798EXPR=$ac_cv_path_EXPR
6799if test -n "$EXPR"; then
6800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6801$as_echo "$EXPR" >&6; }
6802else
6803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6804$as_echo "no" >&6; }
6805fi
6806
6807
6808  test -n "$EXPR" && break
6809done
6810
6811  else
6812    # The variable is set, but is it from the command line or the environment?
6813
6814    # Try to remove the string !EXPR! from our list.
6815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6817      # If it failed, the variable was not from the command line. Ignore it,
6818      # but warn the user (except for BASH, which is always set by the calling BASH).
6819      if test "xEXPR" != xBASH; then
6820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6821$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6822      fi
6823      # Try to locate tool using the code snippet
6824      for ac_prog in expr
6825do
6826  # Extract the first word of "$ac_prog", so it can be a program name with args.
6827set dummy $ac_prog; ac_word=$2
6828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6829$as_echo_n "checking for $ac_word... " >&6; }
6830if ${ac_cv_path_EXPR+:} false; then :
6831  $as_echo_n "(cached) " >&6
6832else
6833  case $EXPR in
6834  [\\/]* | ?:[\\/]*)
6835  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6836  ;;
6837  *)
6838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6839for as_dir in $PATH
6840do
6841  IFS=$as_save_IFS
6842  test -z "$as_dir" && as_dir=.
6843    for ac_exec_ext in '' $ac_executable_extensions; do
6844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6845    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6847    break 2
6848  fi
6849done
6850  done
6851IFS=$as_save_IFS
6852
6853  ;;
6854esac
6855fi
6856EXPR=$ac_cv_path_EXPR
6857if test -n "$EXPR"; then
6858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6859$as_echo "$EXPR" >&6; }
6860else
6861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6862$as_echo "no" >&6; }
6863fi
6864
6865
6866  test -n "$EXPR" && break
6867done
6868
6869    else
6870      # If it succeeded, then it was overridden by the user. We will use it
6871      # for the tool.
6872
6873      # First remove it from the list of overridden variables, so we can test
6874      # for unknown variables in the end.
6875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6876
6877      # Check if the provided tool contains a complete path.
6878      tool_specified="$EXPR"
6879      tool_basename="${tool_specified##*/}"
6880      if test "x$tool_basename" = "x$tool_specified"; then
6881        # A command without a complete path is provided, search $PATH.
6882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6883$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6884        # Extract the first word of "$tool_basename", so it can be a program name with args.
6885set dummy $tool_basename; ac_word=$2
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6887$as_echo_n "checking for $ac_word... " >&6; }
6888if ${ac_cv_path_EXPR+:} false; then :
6889  $as_echo_n "(cached) " >&6
6890else
6891  case $EXPR in
6892  [\\/]* | ?:[\\/]*)
6893  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6894  ;;
6895  *)
6896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6897for as_dir in $PATH
6898do
6899  IFS=$as_save_IFS
6900  test -z "$as_dir" && as_dir=.
6901    for ac_exec_ext in '' $ac_executable_extensions; do
6902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6903    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6905    break 2
6906  fi
6907done
6908  done
6909IFS=$as_save_IFS
6910
6911  ;;
6912esac
6913fi
6914EXPR=$ac_cv_path_EXPR
6915if test -n "$EXPR"; then
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6917$as_echo "$EXPR" >&6; }
6918else
6919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6920$as_echo "no" >&6; }
6921fi
6922
6923
6924        if test "x$EXPR" = x; then
6925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6926        fi
6927      else
6928        # Otherwise we believe it is a complete path. Use it as it is.
6929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6930$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6932$as_echo_n "checking for EXPR... " >&6; }
6933        if test ! -x "$tool_specified"; then
6934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6935$as_echo "not found" >&6; }
6936          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6937        fi
6938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6939$as_echo "$tool_specified" >&6; }
6940      fi
6941    fi
6942  fi
6943
6944
6945
6946  if test "x$EXPR" = x; then
6947    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6948  fi
6949
6950
6951
6952
6953
6954  # Publish this variable in the help.
6955
6956
6957  if test "x$FILE" = x; then
6958    # The variable is not set by user, try to locate tool using the code snippet
6959    for ac_prog in file
6960do
6961  # Extract the first word of "$ac_prog", so it can be a program name with args.
6962set dummy $ac_prog; ac_word=$2
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6964$as_echo_n "checking for $ac_word... " >&6; }
6965if ${ac_cv_path_FILE+:} false; then :
6966  $as_echo_n "(cached) " >&6
6967else
6968  case $FILE in
6969  [\\/]* | ?:[\\/]*)
6970  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6971  ;;
6972  *)
6973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6974for as_dir in $PATH
6975do
6976  IFS=$as_save_IFS
6977  test -z "$as_dir" && as_dir=.
6978    for ac_exec_ext in '' $ac_executable_extensions; do
6979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6980    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6982    break 2
6983  fi
6984done
6985  done
6986IFS=$as_save_IFS
6987
6988  ;;
6989esac
6990fi
6991FILE=$ac_cv_path_FILE
6992if test -n "$FILE"; then
6993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6994$as_echo "$FILE" >&6; }
6995else
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997$as_echo "no" >&6; }
6998fi
6999
7000
7001  test -n "$FILE" && break
7002done
7003
7004  else
7005    # The variable is set, but is it from the command line or the environment?
7006
7007    # Try to remove the string !FILE! from our list.
7008    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7009    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7010      # If it failed, the variable was not from the command line. Ignore it,
7011      # but warn the user (except for BASH, which is always set by the calling BASH).
7012      if test "xFILE" != xBASH; then
7013        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7014$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7015      fi
7016      # Try to locate tool using the code snippet
7017      for ac_prog in file
7018do
7019  # Extract the first word of "$ac_prog", so it can be a program name with args.
7020set dummy $ac_prog; ac_word=$2
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7022$as_echo_n "checking for $ac_word... " >&6; }
7023if ${ac_cv_path_FILE+:} false; then :
7024  $as_echo_n "(cached) " >&6
7025else
7026  case $FILE in
7027  [\\/]* | ?:[\\/]*)
7028  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7029  ;;
7030  *)
7031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7032for as_dir in $PATH
7033do
7034  IFS=$as_save_IFS
7035  test -z "$as_dir" && as_dir=.
7036    for ac_exec_ext in '' $ac_executable_extensions; do
7037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7038    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7040    break 2
7041  fi
7042done
7043  done
7044IFS=$as_save_IFS
7045
7046  ;;
7047esac
7048fi
7049FILE=$ac_cv_path_FILE
7050if test -n "$FILE"; then
7051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7052$as_echo "$FILE" >&6; }
7053else
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055$as_echo "no" >&6; }
7056fi
7057
7058
7059  test -n "$FILE" && break
7060done
7061
7062    else
7063      # If it succeeded, then it was overridden by the user. We will use it
7064      # for the tool.
7065
7066      # First remove it from the list of overridden variables, so we can test
7067      # for unknown variables in the end.
7068      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7069
7070      # Check if the provided tool contains a complete path.
7071      tool_specified="$FILE"
7072      tool_basename="${tool_specified##*/}"
7073      if test "x$tool_basename" = "x$tool_specified"; then
7074        # A command without a complete path is provided, search $PATH.
7075        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7076$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7077        # Extract the first word of "$tool_basename", so it can be a program name with args.
7078set dummy $tool_basename; ac_word=$2
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080$as_echo_n "checking for $ac_word... " >&6; }
7081if ${ac_cv_path_FILE+:} false; then :
7082  $as_echo_n "(cached) " >&6
7083else
7084  case $FILE in
7085  [\\/]* | ?:[\\/]*)
7086  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7087  ;;
7088  *)
7089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090for as_dir in $PATH
7091do
7092  IFS=$as_save_IFS
7093  test -z "$as_dir" && as_dir=.
7094    for ac_exec_ext in '' $ac_executable_extensions; do
7095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098    break 2
7099  fi
7100done
7101  done
7102IFS=$as_save_IFS
7103
7104  ;;
7105esac
7106fi
7107FILE=$ac_cv_path_FILE
7108if test -n "$FILE"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7110$as_echo "$FILE" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117        if test "x$FILE" = x; then
7118          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7119        fi
7120      else
7121        # Otherwise we believe it is a complete path. Use it as it is.
7122        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7123$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7125$as_echo_n "checking for FILE... " >&6; }
7126        if test ! -x "$tool_specified"; then
7127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7128$as_echo "not found" >&6; }
7129          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7130        fi
7131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7132$as_echo "$tool_specified" >&6; }
7133      fi
7134    fi
7135  fi
7136
7137
7138
7139  if test "x$FILE" = x; then
7140    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7141  fi
7142
7143
7144
7145
7146
7147  # Publish this variable in the help.
7148
7149
7150  if test "x$FIND" = x; then
7151    # The variable is not set by user, try to locate tool using the code snippet
7152    for ac_prog in find
7153do
7154  # Extract the first word of "$ac_prog", so it can be a program name with args.
7155set dummy $ac_prog; ac_word=$2
7156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7157$as_echo_n "checking for $ac_word... " >&6; }
7158if ${ac_cv_path_FIND+:} false; then :
7159  $as_echo_n "(cached) " >&6
7160else
7161  case $FIND in
7162  [\\/]* | ?:[\\/]*)
7163  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7164  ;;
7165  *)
7166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7167for as_dir in $PATH
7168do
7169  IFS=$as_save_IFS
7170  test -z "$as_dir" && as_dir=.
7171    for ac_exec_ext in '' $ac_executable_extensions; do
7172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7173    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7175    break 2
7176  fi
7177done
7178  done
7179IFS=$as_save_IFS
7180
7181  ;;
7182esac
7183fi
7184FIND=$ac_cv_path_FIND
7185if test -n "$FIND"; then
7186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7187$as_echo "$FIND" >&6; }
7188else
7189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7190$as_echo "no" >&6; }
7191fi
7192
7193
7194  test -n "$FIND" && break
7195done
7196
7197  else
7198    # The variable is set, but is it from the command line or the environment?
7199
7200    # Try to remove the string !FIND! from our list.
7201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7203      # If it failed, the variable was not from the command line. Ignore it,
7204      # but warn the user (except for BASH, which is always set by the calling BASH).
7205      if test "xFIND" != xBASH; then
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7207$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7208      fi
7209      # Try to locate tool using the code snippet
7210      for ac_prog in find
7211do
7212  # Extract the first word of "$ac_prog", so it can be a program name with args.
7213set dummy $ac_prog; ac_word=$2
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
7216if ${ac_cv_path_FIND+:} false; then :
7217  $as_echo_n "(cached) " >&6
7218else
7219  case $FIND in
7220  [\\/]* | ?:[\\/]*)
7221  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7222  ;;
7223  *)
7224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225for as_dir in $PATH
7226do
7227  IFS=$as_save_IFS
7228  test -z "$as_dir" && as_dir=.
7229    for ac_exec_ext in '' $ac_executable_extensions; do
7230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7231    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7233    break 2
7234  fi
7235done
7236  done
7237IFS=$as_save_IFS
7238
7239  ;;
7240esac
7241fi
7242FIND=$ac_cv_path_FIND
7243if test -n "$FIND"; then
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7245$as_echo "$FIND" >&6; }
7246else
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
7249fi
7250
7251
7252  test -n "$FIND" && break
7253done
7254
7255    else
7256      # If it succeeded, then it was overridden by the user. We will use it
7257      # for the tool.
7258
7259      # First remove it from the list of overridden variables, so we can test
7260      # for unknown variables in the end.
7261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7262
7263      # Check if the provided tool contains a complete path.
7264      tool_specified="$FIND"
7265      tool_basename="${tool_specified##*/}"
7266      if test "x$tool_basename" = "x$tool_specified"; then
7267        # A command without a complete path is provided, search $PATH.
7268        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7269$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7270        # Extract the first word of "$tool_basename", so it can be a program name with args.
7271set dummy $tool_basename; ac_word=$2
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7273$as_echo_n "checking for $ac_word... " >&6; }
7274if ${ac_cv_path_FIND+:} false; then :
7275  $as_echo_n "(cached) " >&6
7276else
7277  case $FIND in
7278  [\\/]* | ?:[\\/]*)
7279  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7280  ;;
7281  *)
7282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7283for as_dir in $PATH
7284do
7285  IFS=$as_save_IFS
7286  test -z "$as_dir" && as_dir=.
7287    for ac_exec_ext in '' $ac_executable_extensions; do
7288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7289    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7291    break 2
7292  fi
7293done
7294  done
7295IFS=$as_save_IFS
7296
7297  ;;
7298esac
7299fi
7300FIND=$ac_cv_path_FIND
7301if test -n "$FIND"; then
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7303$as_echo "$FIND" >&6; }
7304else
7305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7306$as_echo "no" >&6; }
7307fi
7308
7309
7310        if test "x$FIND" = x; then
7311          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7312        fi
7313      else
7314        # Otherwise we believe it is a complete path. Use it as it is.
7315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7316$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7318$as_echo_n "checking for FIND... " >&6; }
7319        if test ! -x "$tool_specified"; then
7320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7321$as_echo "not found" >&6; }
7322          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7323        fi
7324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7325$as_echo "$tool_specified" >&6; }
7326      fi
7327    fi
7328  fi
7329
7330
7331
7332  if test "x$FIND" = x; then
7333    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7334  fi
7335
7336
7337
7338
7339
7340  # Publish this variable in the help.
7341
7342
7343  if test "x$HEAD" = x; then
7344    # The variable is not set by user, try to locate tool using the code snippet
7345    for ac_prog in head
7346do
7347  # Extract the first word of "$ac_prog", so it can be a program name with args.
7348set dummy $ac_prog; ac_word=$2
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
7351if ${ac_cv_path_HEAD+:} false; then :
7352  $as_echo_n "(cached) " >&6
7353else
7354  case $HEAD in
7355  [\\/]* | ?:[\\/]*)
7356  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7357  ;;
7358  *)
7359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7360for as_dir in $PATH
7361do
7362  IFS=$as_save_IFS
7363  test -z "$as_dir" && as_dir=.
7364    for ac_exec_ext in '' $ac_executable_extensions; do
7365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7366    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7368    break 2
7369  fi
7370done
7371  done
7372IFS=$as_save_IFS
7373
7374  ;;
7375esac
7376fi
7377HEAD=$ac_cv_path_HEAD
7378if test -n "$HEAD"; then
7379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7380$as_echo "$HEAD" >&6; }
7381else
7382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7383$as_echo "no" >&6; }
7384fi
7385
7386
7387  test -n "$HEAD" && break
7388done
7389
7390  else
7391    # The variable is set, but is it from the command line or the environment?
7392
7393    # Try to remove the string !HEAD! from our list.
7394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7396      # If it failed, the variable was not from the command line. Ignore it,
7397      # but warn the user (except for BASH, which is always set by the calling BASH).
7398      if test "xHEAD" != xBASH; then
7399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7400$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7401      fi
7402      # Try to locate tool using the code snippet
7403      for ac_prog in head
7404do
7405  # Extract the first word of "$ac_prog", so it can be a program name with args.
7406set dummy $ac_prog; ac_word=$2
7407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7408$as_echo_n "checking for $ac_word... " >&6; }
7409if ${ac_cv_path_HEAD+:} false; then :
7410  $as_echo_n "(cached) " >&6
7411else
7412  case $HEAD in
7413  [\\/]* | ?:[\\/]*)
7414  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7415  ;;
7416  *)
7417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7418for as_dir in $PATH
7419do
7420  IFS=$as_save_IFS
7421  test -z "$as_dir" && as_dir=.
7422    for ac_exec_ext in '' $ac_executable_extensions; do
7423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7424    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7426    break 2
7427  fi
7428done
7429  done
7430IFS=$as_save_IFS
7431
7432  ;;
7433esac
7434fi
7435HEAD=$ac_cv_path_HEAD
7436if test -n "$HEAD"; then
7437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7438$as_echo "$HEAD" >&6; }
7439else
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
7442fi
7443
7444
7445  test -n "$HEAD" && break
7446done
7447
7448    else
7449      # If it succeeded, then it was overridden by the user. We will use it
7450      # for the tool.
7451
7452      # First remove it from the list of overridden variables, so we can test
7453      # for unknown variables in the end.
7454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7455
7456      # Check if the provided tool contains a complete path.
7457      tool_specified="$HEAD"
7458      tool_basename="${tool_specified##*/}"
7459      if test "x$tool_basename" = "x$tool_specified"; then
7460        # A command without a complete path is provided, search $PATH.
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7462$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7463        # Extract the first word of "$tool_basename", so it can be a program name with args.
7464set dummy $tool_basename; ac_word=$2
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7466$as_echo_n "checking for $ac_word... " >&6; }
7467if ${ac_cv_path_HEAD+:} false; then :
7468  $as_echo_n "(cached) " >&6
7469else
7470  case $HEAD in
7471  [\\/]* | ?:[\\/]*)
7472  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7473  ;;
7474  *)
7475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7476for as_dir in $PATH
7477do
7478  IFS=$as_save_IFS
7479  test -z "$as_dir" && as_dir=.
7480    for ac_exec_ext in '' $ac_executable_extensions; do
7481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7482    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7484    break 2
7485  fi
7486done
7487  done
7488IFS=$as_save_IFS
7489
7490  ;;
7491esac
7492fi
7493HEAD=$ac_cv_path_HEAD
7494if test -n "$HEAD"; then
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7496$as_echo "$HEAD" >&6; }
7497else
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7499$as_echo "no" >&6; }
7500fi
7501
7502
7503        if test "x$HEAD" = x; then
7504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7505        fi
7506      else
7507        # Otherwise we believe it is a complete path. Use it as it is.
7508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7509$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7511$as_echo_n "checking for HEAD... " >&6; }
7512        if test ! -x "$tool_specified"; then
7513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7514$as_echo "not found" >&6; }
7515          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7516        fi
7517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7518$as_echo "$tool_specified" >&6; }
7519      fi
7520    fi
7521  fi
7522
7523
7524
7525  if test "x$HEAD" = x; then
7526    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7527  fi
7528
7529
7530
7531
7532
7533  # Publish this variable in the help.
7534
7535
7536  if test "x$LN" = x; then
7537    # The variable is not set by user, try to locate tool using the code snippet
7538    for ac_prog in ln
7539do
7540  # Extract the first word of "$ac_prog", so it can be a program name with args.
7541set dummy $ac_prog; ac_word=$2
7542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7543$as_echo_n "checking for $ac_word... " >&6; }
7544if ${ac_cv_path_LN+:} false; then :
7545  $as_echo_n "(cached) " >&6
7546else
7547  case $LN in
7548  [\\/]* | ?:[\\/]*)
7549  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7550  ;;
7551  *)
7552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7553for as_dir in $PATH
7554do
7555  IFS=$as_save_IFS
7556  test -z "$as_dir" && as_dir=.
7557    for ac_exec_ext in '' $ac_executable_extensions; do
7558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7559    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7561    break 2
7562  fi
7563done
7564  done
7565IFS=$as_save_IFS
7566
7567  ;;
7568esac
7569fi
7570LN=$ac_cv_path_LN
7571if test -n "$LN"; then
7572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7573$as_echo "$LN" >&6; }
7574else
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7576$as_echo "no" >&6; }
7577fi
7578
7579
7580  test -n "$LN" && break
7581done
7582
7583  else
7584    # The variable is set, but is it from the command line or the environment?
7585
7586    # Try to remove the string !LN! from our list.
7587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7589      # If it failed, the variable was not from the command line. Ignore it,
7590      # but warn the user (except for BASH, which is always set by the calling BASH).
7591      if test "xLN" != xBASH; then
7592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7593$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7594      fi
7595      # Try to locate tool using the code snippet
7596      for ac_prog in ln
7597do
7598  # Extract the first word of "$ac_prog", so it can be a program name with args.
7599set dummy $ac_prog; ac_word=$2
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7601$as_echo_n "checking for $ac_word... " >&6; }
7602if ${ac_cv_path_LN+:} false; then :
7603  $as_echo_n "(cached) " >&6
7604else
7605  case $LN in
7606  [\\/]* | ?:[\\/]*)
7607  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7608  ;;
7609  *)
7610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613  IFS=$as_save_IFS
7614  test -z "$as_dir" && as_dir=.
7615    for ac_exec_ext in '' $ac_executable_extensions; do
7616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7617    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7619    break 2
7620  fi
7621done
7622  done
7623IFS=$as_save_IFS
7624
7625  ;;
7626esac
7627fi
7628LN=$ac_cv_path_LN
7629if test -n "$LN"; then
7630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7631$as_echo "$LN" >&6; }
7632else
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7634$as_echo "no" >&6; }
7635fi
7636
7637
7638  test -n "$LN" && break
7639done
7640
7641    else
7642      # If it succeeded, then it was overridden by the user. We will use it
7643      # for the tool.
7644
7645      # First remove it from the list of overridden variables, so we can test
7646      # for unknown variables in the end.
7647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7648
7649      # Check if the provided tool contains a complete path.
7650      tool_specified="$LN"
7651      tool_basename="${tool_specified##*/}"
7652      if test "x$tool_basename" = "x$tool_specified"; then
7653        # A command without a complete path is provided, search $PATH.
7654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7655$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7656        # Extract the first word of "$tool_basename", so it can be a program name with args.
7657set dummy $tool_basename; ac_word=$2
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7659$as_echo_n "checking for $ac_word... " >&6; }
7660if ${ac_cv_path_LN+:} false; then :
7661  $as_echo_n "(cached) " >&6
7662else
7663  case $LN in
7664  [\\/]* | ?:[\\/]*)
7665  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7666  ;;
7667  *)
7668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7669for as_dir in $PATH
7670do
7671  IFS=$as_save_IFS
7672  test -z "$as_dir" && as_dir=.
7673    for ac_exec_ext in '' $ac_executable_extensions; do
7674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7675    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7677    break 2
7678  fi
7679done
7680  done
7681IFS=$as_save_IFS
7682
7683  ;;
7684esac
7685fi
7686LN=$ac_cv_path_LN
7687if test -n "$LN"; then
7688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7689$as_echo "$LN" >&6; }
7690else
7691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7692$as_echo "no" >&6; }
7693fi
7694
7695
7696        if test "x$LN" = x; then
7697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7698        fi
7699      else
7700        # Otherwise we believe it is a complete path. Use it as it is.
7701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7702$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7704$as_echo_n "checking for LN... " >&6; }
7705        if test ! -x "$tool_specified"; then
7706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7707$as_echo "not found" >&6; }
7708          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7709        fi
7710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7711$as_echo "$tool_specified" >&6; }
7712      fi
7713    fi
7714  fi
7715
7716
7717
7718  if test "x$LN" = x; then
7719    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7720  fi
7721
7722
7723
7724
7725
7726  # Publish this variable in the help.
7727
7728
7729  if test "x$LS" = x; then
7730    # The variable is not set by user, try to locate tool using the code snippet
7731    for ac_prog in ls
7732do
7733  # Extract the first word of "$ac_prog", so it can be a program name with args.
7734set dummy $ac_prog; ac_word=$2
7735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7736$as_echo_n "checking for $ac_word... " >&6; }
7737if ${ac_cv_path_LS+:} false; then :
7738  $as_echo_n "(cached) " >&6
7739else
7740  case $LS in
7741  [\\/]* | ?:[\\/]*)
7742  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7743  ;;
7744  *)
7745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7746for as_dir in $PATH
7747do
7748  IFS=$as_save_IFS
7749  test -z "$as_dir" && as_dir=.
7750    for ac_exec_ext in '' $ac_executable_extensions; do
7751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7752    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7754    break 2
7755  fi
7756done
7757  done
7758IFS=$as_save_IFS
7759
7760  ;;
7761esac
7762fi
7763LS=$ac_cv_path_LS
7764if test -n "$LS"; then
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7766$as_echo "$LS" >&6; }
7767else
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7769$as_echo "no" >&6; }
7770fi
7771
7772
7773  test -n "$LS" && break
7774done
7775
7776  else
7777    # The variable is set, but is it from the command line or the environment?
7778
7779    # Try to remove the string !LS! from our list.
7780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7782      # If it failed, the variable was not from the command line. Ignore it,
7783      # but warn the user (except for BASH, which is always set by the calling BASH).
7784      if test "xLS" != xBASH; then
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7786$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7787      fi
7788      # Try to locate tool using the code snippet
7789      for ac_prog in ls
7790do
7791  # Extract the first word of "$ac_prog", so it can be a program name with args.
7792set dummy $ac_prog; ac_word=$2
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7794$as_echo_n "checking for $ac_word... " >&6; }
7795if ${ac_cv_path_LS+:} false; then :
7796  $as_echo_n "(cached) " >&6
7797else
7798  case $LS in
7799  [\\/]* | ?:[\\/]*)
7800  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7801  ;;
7802  *)
7803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7804for as_dir in $PATH
7805do
7806  IFS=$as_save_IFS
7807  test -z "$as_dir" && as_dir=.
7808    for ac_exec_ext in '' $ac_executable_extensions; do
7809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7810    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7812    break 2
7813  fi
7814done
7815  done
7816IFS=$as_save_IFS
7817
7818  ;;
7819esac
7820fi
7821LS=$ac_cv_path_LS
7822if test -n "$LS"; then
7823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7824$as_echo "$LS" >&6; }
7825else
7826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7827$as_echo "no" >&6; }
7828fi
7829
7830
7831  test -n "$LS" && break
7832done
7833
7834    else
7835      # If it succeeded, then it was overridden by the user. We will use it
7836      # for the tool.
7837
7838      # First remove it from the list of overridden variables, so we can test
7839      # for unknown variables in the end.
7840      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7841
7842      # Check if the provided tool contains a complete path.
7843      tool_specified="$LS"
7844      tool_basename="${tool_specified##*/}"
7845      if test "x$tool_basename" = "x$tool_specified"; then
7846        # A command without a complete path is provided, search $PATH.
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7848$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7849        # Extract the first word of "$tool_basename", so it can be a program name with args.
7850set dummy $tool_basename; ac_word=$2
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7852$as_echo_n "checking for $ac_word... " >&6; }
7853if ${ac_cv_path_LS+:} false; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  case $LS in
7857  [\\/]* | ?:[\\/]*)
7858  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7859  ;;
7860  *)
7861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7862for as_dir in $PATH
7863do
7864  IFS=$as_save_IFS
7865  test -z "$as_dir" && as_dir=.
7866    for ac_exec_ext in '' $ac_executable_extensions; do
7867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7868    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7870    break 2
7871  fi
7872done
7873  done
7874IFS=$as_save_IFS
7875
7876  ;;
7877esac
7878fi
7879LS=$ac_cv_path_LS
7880if test -n "$LS"; then
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7882$as_echo "$LS" >&6; }
7883else
7884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7885$as_echo "no" >&6; }
7886fi
7887
7888
7889        if test "x$LS" = x; then
7890          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7891        fi
7892      else
7893        # Otherwise we believe it is a complete path. Use it as it is.
7894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7895$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7897$as_echo_n "checking for LS... " >&6; }
7898        if test ! -x "$tool_specified"; then
7899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7900$as_echo "not found" >&6; }
7901          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7902        fi
7903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7904$as_echo "$tool_specified" >&6; }
7905      fi
7906    fi
7907  fi
7908
7909
7910
7911  if test "x$LS" = x; then
7912    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7913  fi
7914
7915
7916
7917
7918
7919  # Publish this variable in the help.
7920
7921
7922  if test "x$MKDIR" = x; then
7923    # The variable is not set by user, try to locate tool using the code snippet
7924    for ac_prog in mkdir
7925do
7926  # Extract the first word of "$ac_prog", so it can be a program name with args.
7927set dummy $ac_prog; ac_word=$2
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7929$as_echo_n "checking for $ac_word... " >&6; }
7930if ${ac_cv_path_MKDIR+:} false; then :
7931  $as_echo_n "(cached) " >&6
7932else
7933  case $MKDIR in
7934  [\\/]* | ?:[\\/]*)
7935  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7936  ;;
7937  *)
7938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7939for as_dir in $PATH
7940do
7941  IFS=$as_save_IFS
7942  test -z "$as_dir" && as_dir=.
7943    for ac_exec_ext in '' $ac_executable_extensions; do
7944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7945    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7947    break 2
7948  fi
7949done
7950  done
7951IFS=$as_save_IFS
7952
7953  ;;
7954esac
7955fi
7956MKDIR=$ac_cv_path_MKDIR
7957if test -n "$MKDIR"; then
7958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7959$as_echo "$MKDIR" >&6; }
7960else
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7962$as_echo "no" >&6; }
7963fi
7964
7965
7966  test -n "$MKDIR" && break
7967done
7968
7969  else
7970    # The variable is set, but is it from the command line or the environment?
7971
7972    # Try to remove the string !MKDIR! from our list.
7973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7975      # If it failed, the variable was not from the command line. Ignore it,
7976      # but warn the user (except for BASH, which is always set by the calling BASH).
7977      if test "xMKDIR" != xBASH; then
7978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7979$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7980      fi
7981      # Try to locate tool using the code snippet
7982      for ac_prog in mkdir
7983do
7984  # Extract the first word of "$ac_prog", so it can be a program name with args.
7985set dummy $ac_prog; ac_word=$2
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7987$as_echo_n "checking for $ac_word... " >&6; }
7988if ${ac_cv_path_MKDIR+:} false; then :
7989  $as_echo_n "(cached) " >&6
7990else
7991  case $MKDIR in
7992  [\\/]* | ?:[\\/]*)
7993  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7994  ;;
7995  *)
7996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7997for as_dir in $PATH
7998do
7999  IFS=$as_save_IFS
8000  test -z "$as_dir" && as_dir=.
8001    for ac_exec_ext in '' $ac_executable_extensions; do
8002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8003    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8005    break 2
8006  fi
8007done
8008  done
8009IFS=$as_save_IFS
8010
8011  ;;
8012esac
8013fi
8014MKDIR=$ac_cv_path_MKDIR
8015if test -n "$MKDIR"; then
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8017$as_echo "$MKDIR" >&6; }
8018else
8019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8020$as_echo "no" >&6; }
8021fi
8022
8023
8024  test -n "$MKDIR" && break
8025done
8026
8027    else
8028      # If it succeeded, then it was overridden by the user. We will use it
8029      # for the tool.
8030
8031      # First remove it from the list of overridden variables, so we can test
8032      # for unknown variables in the end.
8033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8034
8035      # Check if the provided tool contains a complete path.
8036      tool_specified="$MKDIR"
8037      tool_basename="${tool_specified##*/}"
8038      if test "x$tool_basename" = "x$tool_specified"; then
8039        # A command without a complete path is provided, search $PATH.
8040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8041$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8042        # Extract the first word of "$tool_basename", so it can be a program name with args.
8043set dummy $tool_basename; ac_word=$2
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8045$as_echo_n "checking for $ac_word... " >&6; }
8046if ${ac_cv_path_MKDIR+:} false; then :
8047  $as_echo_n "(cached) " >&6
8048else
8049  case $MKDIR in
8050  [\\/]* | ?:[\\/]*)
8051  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8052  ;;
8053  *)
8054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8055for as_dir in $PATH
8056do
8057  IFS=$as_save_IFS
8058  test -z "$as_dir" && as_dir=.
8059    for ac_exec_ext in '' $ac_executable_extensions; do
8060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8061    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8063    break 2
8064  fi
8065done
8066  done
8067IFS=$as_save_IFS
8068
8069  ;;
8070esac
8071fi
8072MKDIR=$ac_cv_path_MKDIR
8073if test -n "$MKDIR"; then
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8075$as_echo "$MKDIR" >&6; }
8076else
8077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078$as_echo "no" >&6; }
8079fi
8080
8081
8082        if test "x$MKDIR" = x; then
8083          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8084        fi
8085      else
8086        # Otherwise we believe it is a complete path. Use it as it is.
8087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8088$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8090$as_echo_n "checking for MKDIR... " >&6; }
8091        if test ! -x "$tool_specified"; then
8092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8093$as_echo "not found" >&6; }
8094          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8095        fi
8096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8097$as_echo "$tool_specified" >&6; }
8098      fi
8099    fi
8100  fi
8101
8102
8103
8104  if test "x$MKDIR" = x; then
8105    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8106  fi
8107
8108
8109
8110
8111
8112  # Publish this variable in the help.
8113
8114
8115  if test "x$MKTEMP" = x; then
8116    # The variable is not set by user, try to locate tool using the code snippet
8117    for ac_prog in mktemp
8118do
8119  # Extract the first word of "$ac_prog", so it can be a program name with args.
8120set dummy $ac_prog; ac_word=$2
8121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8122$as_echo_n "checking for $ac_word... " >&6; }
8123if ${ac_cv_path_MKTEMP+:} false; then :
8124  $as_echo_n "(cached) " >&6
8125else
8126  case $MKTEMP in
8127  [\\/]* | ?:[\\/]*)
8128  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8129  ;;
8130  *)
8131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8132for as_dir in $PATH
8133do
8134  IFS=$as_save_IFS
8135  test -z "$as_dir" && as_dir=.
8136    for ac_exec_ext in '' $ac_executable_extensions; do
8137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8138    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8140    break 2
8141  fi
8142done
8143  done
8144IFS=$as_save_IFS
8145
8146  ;;
8147esac
8148fi
8149MKTEMP=$ac_cv_path_MKTEMP
8150if test -n "$MKTEMP"; then
8151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8152$as_echo "$MKTEMP" >&6; }
8153else
8154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8155$as_echo "no" >&6; }
8156fi
8157
8158
8159  test -n "$MKTEMP" && break
8160done
8161
8162  else
8163    # The variable is set, but is it from the command line or the environment?
8164
8165    # Try to remove the string !MKTEMP! from our list.
8166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8168      # If it failed, the variable was not from the command line. Ignore it,
8169      # but warn the user (except for BASH, which is always set by the calling BASH).
8170      if test "xMKTEMP" != xBASH; then
8171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8172$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8173      fi
8174      # Try to locate tool using the code snippet
8175      for ac_prog in mktemp
8176do
8177  # Extract the first word of "$ac_prog", so it can be a program name with args.
8178set dummy $ac_prog; ac_word=$2
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180$as_echo_n "checking for $ac_word... " >&6; }
8181if ${ac_cv_path_MKTEMP+:} false; then :
8182  $as_echo_n "(cached) " >&6
8183else
8184  case $MKTEMP in
8185  [\\/]* | ?:[\\/]*)
8186  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8187  ;;
8188  *)
8189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8190for as_dir in $PATH
8191do
8192  IFS=$as_save_IFS
8193  test -z "$as_dir" && as_dir=.
8194    for ac_exec_ext in '' $ac_executable_extensions; do
8195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8196    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8198    break 2
8199  fi
8200done
8201  done
8202IFS=$as_save_IFS
8203
8204  ;;
8205esac
8206fi
8207MKTEMP=$ac_cv_path_MKTEMP
8208if test -n "$MKTEMP"; then
8209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8210$as_echo "$MKTEMP" >&6; }
8211else
8212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8213$as_echo "no" >&6; }
8214fi
8215
8216
8217  test -n "$MKTEMP" && break
8218done
8219
8220    else
8221      # If it succeeded, then it was overridden by the user. We will use it
8222      # for the tool.
8223
8224      # First remove it from the list of overridden variables, so we can test
8225      # for unknown variables in the end.
8226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8227
8228      # Check if the provided tool contains a complete path.
8229      tool_specified="$MKTEMP"
8230      tool_basename="${tool_specified##*/}"
8231      if test "x$tool_basename" = "x$tool_specified"; then
8232        # A command without a complete path is provided, search $PATH.
8233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8234$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8235        # Extract the first word of "$tool_basename", so it can be a program name with args.
8236set dummy $tool_basename; ac_word=$2
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238$as_echo_n "checking for $ac_word... " >&6; }
8239if ${ac_cv_path_MKTEMP+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  case $MKTEMP in
8243  [\\/]* | ?:[\\/]*)
8244  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8245  ;;
8246  *)
8247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248for as_dir in $PATH
8249do
8250  IFS=$as_save_IFS
8251  test -z "$as_dir" && as_dir=.
8252    for ac_exec_ext in '' $ac_executable_extensions; do
8253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256    break 2
8257  fi
8258done
8259  done
8260IFS=$as_save_IFS
8261
8262  ;;
8263esac
8264fi
8265MKTEMP=$ac_cv_path_MKTEMP
8266if test -n "$MKTEMP"; then
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8268$as_echo "$MKTEMP" >&6; }
8269else
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271$as_echo "no" >&6; }
8272fi
8273
8274
8275        if test "x$MKTEMP" = x; then
8276          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8277        fi
8278      else
8279        # Otherwise we believe it is a complete path. Use it as it is.
8280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8281$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8283$as_echo_n "checking for MKTEMP... " >&6; }
8284        if test ! -x "$tool_specified"; then
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8286$as_echo "not found" >&6; }
8287          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8288        fi
8289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8290$as_echo "$tool_specified" >&6; }
8291      fi
8292    fi
8293  fi
8294
8295
8296
8297  if test "x$MKTEMP" = x; then
8298    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8299  fi
8300
8301
8302
8303
8304
8305  # Publish this variable in the help.
8306
8307
8308  if test "x$MV" = x; then
8309    # The variable is not set by user, try to locate tool using the code snippet
8310    for ac_prog in mv
8311do
8312  # Extract the first word of "$ac_prog", so it can be a program name with args.
8313set dummy $ac_prog; ac_word=$2
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8315$as_echo_n "checking for $ac_word... " >&6; }
8316if ${ac_cv_path_MV+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319  case $MV in
8320  [\\/]* | ?:[\\/]*)
8321  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8322  ;;
8323  *)
8324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8325for as_dir in $PATH
8326do
8327  IFS=$as_save_IFS
8328  test -z "$as_dir" && as_dir=.
8329    for ac_exec_ext in '' $ac_executable_extensions; do
8330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8331    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8333    break 2
8334  fi
8335done
8336  done
8337IFS=$as_save_IFS
8338
8339  ;;
8340esac
8341fi
8342MV=$ac_cv_path_MV
8343if test -n "$MV"; then
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8345$as_echo "$MV" >&6; }
8346else
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348$as_echo "no" >&6; }
8349fi
8350
8351
8352  test -n "$MV" && break
8353done
8354
8355  else
8356    # The variable is set, but is it from the command line or the environment?
8357
8358    # Try to remove the string !MV! from our list.
8359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8361      # If it failed, the variable was not from the command line. Ignore it,
8362      # but warn the user (except for BASH, which is always set by the calling BASH).
8363      if test "xMV" != xBASH; then
8364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8365$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8366      fi
8367      # Try to locate tool using the code snippet
8368      for ac_prog in mv
8369do
8370  # Extract the first word of "$ac_prog", so it can be a program name with args.
8371set dummy $ac_prog; ac_word=$2
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8373$as_echo_n "checking for $ac_word... " >&6; }
8374if ${ac_cv_path_MV+:} false; then :
8375  $as_echo_n "(cached) " >&6
8376else
8377  case $MV in
8378  [\\/]* | ?:[\\/]*)
8379  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8380  ;;
8381  *)
8382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8383for as_dir in $PATH
8384do
8385  IFS=$as_save_IFS
8386  test -z "$as_dir" && as_dir=.
8387    for ac_exec_ext in '' $ac_executable_extensions; do
8388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8389    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8391    break 2
8392  fi
8393done
8394  done
8395IFS=$as_save_IFS
8396
8397  ;;
8398esac
8399fi
8400MV=$ac_cv_path_MV
8401if test -n "$MV"; then
8402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8403$as_echo "$MV" >&6; }
8404else
8405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8406$as_echo "no" >&6; }
8407fi
8408
8409
8410  test -n "$MV" && break
8411done
8412
8413    else
8414      # If it succeeded, then it was overridden by the user. We will use it
8415      # for the tool.
8416
8417      # First remove it from the list of overridden variables, so we can test
8418      # for unknown variables in the end.
8419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8420
8421      # Check if the provided tool contains a complete path.
8422      tool_specified="$MV"
8423      tool_basename="${tool_specified##*/}"
8424      if test "x$tool_basename" = "x$tool_specified"; then
8425        # A command without a complete path is provided, search $PATH.
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8427$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8428        # Extract the first word of "$tool_basename", so it can be a program name with args.
8429set dummy $tool_basename; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if ${ac_cv_path_MV+:} false; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $MV in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458MV=$ac_cv_path_MV
8459if test -n "$MV"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8461$as_echo "$MV" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468        if test "x$MV" = x; then
8469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8470        fi
8471      else
8472        # Otherwise we believe it is a complete path. Use it as it is.
8473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8474$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8476$as_echo_n "checking for MV... " >&6; }
8477        if test ! -x "$tool_specified"; then
8478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8479$as_echo "not found" >&6; }
8480          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8481        fi
8482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8483$as_echo "$tool_specified" >&6; }
8484      fi
8485    fi
8486  fi
8487
8488
8489
8490  if test "x$MV" = x; then
8491    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8492  fi
8493
8494
8495
8496
8497
8498  # Publish this variable in the help.
8499
8500
8501  if test "x$NAWK" = x; then
8502    # The variable is not set by user, try to locate tool using the code snippet
8503    for ac_prog in nawk gawk awk
8504do
8505  # Extract the first word of "$ac_prog", so it can be a program name with args.
8506set dummy $ac_prog; ac_word=$2
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8508$as_echo_n "checking for $ac_word... " >&6; }
8509if ${ac_cv_path_NAWK+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  case $NAWK in
8513  [\\/]* | ?:[\\/]*)
8514  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8515  ;;
8516  *)
8517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532  ;;
8533esac
8534fi
8535NAWK=$ac_cv_path_NAWK
8536if test -n "$NAWK"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8538$as_echo "$NAWK" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544
8545  test -n "$NAWK" && break
8546done
8547
8548  else
8549    # The variable is set, but is it from the command line or the environment?
8550
8551    # Try to remove the string !NAWK! from our list.
8552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8554      # If it failed, the variable was not from the command line. Ignore it,
8555      # but warn the user (except for BASH, which is always set by the calling BASH).
8556      if test "xNAWK" != xBASH; then
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8558$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8559      fi
8560      # Try to locate tool using the code snippet
8561      for ac_prog in nawk gawk awk
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_NAWK+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $NAWK in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593NAWK=$ac_cv_path_NAWK
8594if test -n "$NAWK"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8596$as_echo "$NAWK" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$NAWK" && break
8604done
8605
8606    else
8607      # If it succeeded, then it was overridden by the user. We will use it
8608      # for the tool.
8609
8610      # First remove it from the list of overridden variables, so we can test
8611      # for unknown variables in the end.
8612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8613
8614      # Check if the provided tool contains a complete path.
8615      tool_specified="$NAWK"
8616      tool_basename="${tool_specified##*/}"
8617      if test "x$tool_basename" = "x$tool_specified"; then
8618        # A command without a complete path is provided, search $PATH.
8619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8620$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8621        # Extract the first word of "$tool_basename", so it can be a program name with args.
8622set dummy $tool_basename; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_NAWK+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $NAWK in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651NAWK=$ac_cv_path_NAWK
8652if test -n "$NAWK"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8654$as_echo "$NAWK" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661        if test "x$NAWK" = x; then
8662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8663        fi
8664      else
8665        # Otherwise we believe it is a complete path. Use it as it is.
8666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8667$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8669$as_echo_n "checking for NAWK... " >&6; }
8670        if test ! -x "$tool_specified"; then
8671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8672$as_echo "not found" >&6; }
8673          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8674        fi
8675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8676$as_echo "$tool_specified" >&6; }
8677      fi
8678    fi
8679  fi
8680
8681
8682
8683  if test "x$NAWK" = x; then
8684    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8685  fi
8686
8687
8688
8689
8690
8691  # Publish this variable in the help.
8692
8693
8694  if test "x$PRINTF" = x; then
8695    # The variable is not set by user, try to locate tool using the code snippet
8696    for ac_prog in printf
8697do
8698  # Extract the first word of "$ac_prog", so it can be a program name with args.
8699set dummy $ac_prog; ac_word=$2
8700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8701$as_echo_n "checking for $ac_word... " >&6; }
8702if ${ac_cv_path_PRINTF+:} false; then :
8703  $as_echo_n "(cached) " >&6
8704else
8705  case $PRINTF in
8706  [\\/]* | ?:[\\/]*)
8707  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8708  ;;
8709  *)
8710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711for as_dir in $PATH
8712do
8713  IFS=$as_save_IFS
8714  test -z "$as_dir" && as_dir=.
8715    for ac_exec_ext in '' $ac_executable_extensions; do
8716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8717    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8719    break 2
8720  fi
8721done
8722  done
8723IFS=$as_save_IFS
8724
8725  ;;
8726esac
8727fi
8728PRINTF=$ac_cv_path_PRINTF
8729if test -n "$PRINTF"; then
8730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8731$as_echo "$PRINTF" >&6; }
8732else
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734$as_echo "no" >&6; }
8735fi
8736
8737
8738  test -n "$PRINTF" && break
8739done
8740
8741  else
8742    # The variable is set, but is it from the command line or the environment?
8743
8744    # Try to remove the string !PRINTF! from our list.
8745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8747      # If it failed, the variable was not from the command line. Ignore it,
8748      # but warn the user (except for BASH, which is always set by the calling BASH).
8749      if test "xPRINTF" != xBASH; then
8750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8751$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8752      fi
8753      # Try to locate tool using the code snippet
8754      for ac_prog in printf
8755do
8756  # Extract the first word of "$ac_prog", so it can be a program name with args.
8757set dummy $ac_prog; ac_word=$2
8758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8759$as_echo_n "checking for $ac_word... " >&6; }
8760if ${ac_cv_path_PRINTF+:} false; then :
8761  $as_echo_n "(cached) " >&6
8762else
8763  case $PRINTF in
8764  [\\/]* | ?:[\\/]*)
8765  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8766  ;;
8767  *)
8768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8769for as_dir in $PATH
8770do
8771  IFS=$as_save_IFS
8772  test -z "$as_dir" && as_dir=.
8773    for ac_exec_ext in '' $ac_executable_extensions; do
8774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8775    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8777    break 2
8778  fi
8779done
8780  done
8781IFS=$as_save_IFS
8782
8783  ;;
8784esac
8785fi
8786PRINTF=$ac_cv_path_PRINTF
8787if test -n "$PRINTF"; then
8788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8789$as_echo "$PRINTF" >&6; }
8790else
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
8793fi
8794
8795
8796  test -n "$PRINTF" && break
8797done
8798
8799    else
8800      # If it succeeded, then it was overridden by the user. We will use it
8801      # for the tool.
8802
8803      # First remove it from the list of overridden variables, so we can test
8804      # for unknown variables in the end.
8805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8806
8807      # Check if the provided tool contains a complete path.
8808      tool_specified="$PRINTF"
8809      tool_basename="${tool_specified##*/}"
8810      if test "x$tool_basename" = "x$tool_specified"; then
8811        # A command without a complete path is provided, search $PATH.
8812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8813$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8814        # Extract the first word of "$tool_basename", so it can be a program name with args.
8815set dummy $tool_basename; ac_word=$2
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817$as_echo_n "checking for $ac_word... " >&6; }
8818if ${ac_cv_path_PRINTF+:} false; then :
8819  $as_echo_n "(cached) " >&6
8820else
8821  case $PRINTF in
8822  [\\/]* | ?:[\\/]*)
8823  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8824  ;;
8825  *)
8826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827for as_dir in $PATH
8828do
8829  IFS=$as_save_IFS
8830  test -z "$as_dir" && as_dir=.
8831    for ac_exec_ext in '' $ac_executable_extensions; do
8832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8833    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8835    break 2
8836  fi
8837done
8838  done
8839IFS=$as_save_IFS
8840
8841  ;;
8842esac
8843fi
8844PRINTF=$ac_cv_path_PRINTF
8845if test -n "$PRINTF"; then
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8847$as_echo "$PRINTF" >&6; }
8848else
8849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
8851fi
8852
8853
8854        if test "x$PRINTF" = x; then
8855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8856        fi
8857      else
8858        # Otherwise we believe it is a complete path. Use it as it is.
8859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8860$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8862$as_echo_n "checking for PRINTF... " >&6; }
8863        if test ! -x "$tool_specified"; then
8864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8865$as_echo "not found" >&6; }
8866          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8867        fi
8868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8869$as_echo "$tool_specified" >&6; }
8870      fi
8871    fi
8872  fi
8873
8874
8875
8876  if test "x$PRINTF" = x; then
8877    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8878  fi
8879
8880
8881
8882
8883
8884  # Publish this variable in the help.
8885
8886
8887  if test "x$RM" = x; then
8888    # The variable is not set by user, try to locate tool using the code snippet
8889    for ac_prog in rm
8890do
8891  # Extract the first word of "$ac_prog", so it can be a program name with args.
8892set dummy $ac_prog; ac_word=$2
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894$as_echo_n "checking for $ac_word... " >&6; }
8895if ${ac_cv_path_RM+:} false; then :
8896  $as_echo_n "(cached) " >&6
8897else
8898  case $RM in
8899  [\\/]* | ?:[\\/]*)
8900  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8901  ;;
8902  *)
8903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906  IFS=$as_save_IFS
8907  test -z "$as_dir" && as_dir=.
8908    for ac_exec_ext in '' $ac_executable_extensions; do
8909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8910    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8912    break 2
8913  fi
8914done
8915  done
8916IFS=$as_save_IFS
8917
8918  ;;
8919esac
8920fi
8921RM=$ac_cv_path_RM
8922if test -n "$RM"; then
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8924$as_echo "$RM" >&6; }
8925else
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8927$as_echo "no" >&6; }
8928fi
8929
8930
8931  test -n "$RM" && break
8932done
8933
8934  else
8935    # The variable is set, but is it from the command line or the environment?
8936
8937    # Try to remove the string !RM! from our list.
8938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8940      # If it failed, the variable was not from the command line. Ignore it,
8941      # but warn the user (except for BASH, which is always set by the calling BASH).
8942      if test "xRM" != xBASH; then
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8944$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8945      fi
8946      # Try to locate tool using the code snippet
8947      for ac_prog in rm
8948do
8949  # Extract the first word of "$ac_prog", so it can be a program name with args.
8950set dummy $ac_prog; ac_word=$2
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952$as_echo_n "checking for $ac_word... " >&6; }
8953if ${ac_cv_path_RM+:} false; then :
8954  $as_echo_n "(cached) " >&6
8955else
8956  case $RM in
8957  [\\/]* | ?:[\\/]*)
8958  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8959  ;;
8960  *)
8961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  test -z "$as_dir" && as_dir=.
8966    for ac_exec_ext in '' $ac_executable_extensions; do
8967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970    break 2
8971  fi
8972done
8973  done
8974IFS=$as_save_IFS
8975
8976  ;;
8977esac
8978fi
8979RM=$ac_cv_path_RM
8980if test -n "$RM"; then
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8982$as_echo "$RM" >&6; }
8983else
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
8987
8988
8989  test -n "$RM" && break
8990done
8991
8992    else
8993      # If it succeeded, then it was overridden by the user. We will use it
8994      # for the tool.
8995
8996      # First remove it from the list of overridden variables, so we can test
8997      # for unknown variables in the end.
8998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8999
9000      # Check if the provided tool contains a complete path.
9001      tool_specified="$RM"
9002      tool_basename="${tool_specified##*/}"
9003      if test "x$tool_basename" = "x$tool_specified"; then
9004        # A command without a complete path is provided, search $PATH.
9005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9006$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9007        # Extract the first word of "$tool_basename", so it can be a program name with args.
9008set dummy $tool_basename; ac_word=$2
9009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9010$as_echo_n "checking for $ac_word... " >&6; }
9011if ${ac_cv_path_RM+:} false; then :
9012  $as_echo_n "(cached) " >&6
9013else
9014  case $RM in
9015  [\\/]* | ?:[\\/]*)
9016  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9017  ;;
9018  *)
9019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9020for as_dir in $PATH
9021do
9022  IFS=$as_save_IFS
9023  test -z "$as_dir" && as_dir=.
9024    for ac_exec_ext in '' $ac_executable_extensions; do
9025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9026    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9028    break 2
9029  fi
9030done
9031  done
9032IFS=$as_save_IFS
9033
9034  ;;
9035esac
9036fi
9037RM=$ac_cv_path_RM
9038if test -n "$RM"; then
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9040$as_echo "$RM" >&6; }
9041else
9042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9043$as_echo "no" >&6; }
9044fi
9045
9046
9047        if test "x$RM" = x; then
9048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9049        fi
9050      else
9051        # Otherwise we believe it is a complete path. Use it as it is.
9052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9053$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9055$as_echo_n "checking for RM... " >&6; }
9056        if test ! -x "$tool_specified"; then
9057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9058$as_echo "not found" >&6; }
9059          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9060        fi
9061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9062$as_echo "$tool_specified" >&6; }
9063      fi
9064    fi
9065  fi
9066
9067
9068
9069  if test "x$RM" = x; then
9070    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9071  fi
9072
9073
9074
9075
9076
9077  # Publish this variable in the help.
9078
9079
9080  if test "x$SH" = x; then
9081    # The variable is not set by user, try to locate tool using the code snippet
9082    for ac_prog in sh
9083do
9084  # Extract the first word of "$ac_prog", so it can be a program name with args.
9085set dummy $ac_prog; ac_word=$2
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9087$as_echo_n "checking for $ac_word... " >&6; }
9088if ${ac_cv_path_SH+:} false; then :
9089  $as_echo_n "(cached) " >&6
9090else
9091  case $SH in
9092  [\\/]* | ?:[\\/]*)
9093  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9094  ;;
9095  *)
9096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9097for as_dir in $PATH
9098do
9099  IFS=$as_save_IFS
9100  test -z "$as_dir" && as_dir=.
9101    for ac_exec_ext in '' $ac_executable_extensions; do
9102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9103    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9105    break 2
9106  fi
9107done
9108  done
9109IFS=$as_save_IFS
9110
9111  ;;
9112esac
9113fi
9114SH=$ac_cv_path_SH
9115if test -n "$SH"; then
9116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9117$as_echo "$SH" >&6; }
9118else
9119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120$as_echo "no" >&6; }
9121fi
9122
9123
9124  test -n "$SH" && break
9125done
9126
9127  else
9128    # The variable is set, but is it from the command line or the environment?
9129
9130    # Try to remove the string !SH! from our list.
9131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9133      # If it failed, the variable was not from the command line. Ignore it,
9134      # but warn the user (except for BASH, which is always set by the calling BASH).
9135      if test "xSH" != xBASH; then
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9137$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9138      fi
9139      # Try to locate tool using the code snippet
9140      for ac_prog in sh
9141do
9142  # Extract the first word of "$ac_prog", so it can be a program name with args.
9143set dummy $ac_prog; ac_word=$2
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9145$as_echo_n "checking for $ac_word... " >&6; }
9146if ${ac_cv_path_SH+:} false; then :
9147  $as_echo_n "(cached) " >&6
9148else
9149  case $SH in
9150  [\\/]* | ?:[\\/]*)
9151  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9152  ;;
9153  *)
9154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9155for as_dir in $PATH
9156do
9157  IFS=$as_save_IFS
9158  test -z "$as_dir" && as_dir=.
9159    for ac_exec_ext in '' $ac_executable_extensions; do
9160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9161    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9163    break 2
9164  fi
9165done
9166  done
9167IFS=$as_save_IFS
9168
9169  ;;
9170esac
9171fi
9172SH=$ac_cv_path_SH
9173if test -n "$SH"; then
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9175$as_echo "$SH" >&6; }
9176else
9177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
9179fi
9180
9181
9182  test -n "$SH" && break
9183done
9184
9185    else
9186      # If it succeeded, then it was overridden by the user. We will use it
9187      # for the tool.
9188
9189      # First remove it from the list of overridden variables, so we can test
9190      # for unknown variables in the end.
9191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9192
9193      # Check if the provided tool contains a complete path.
9194      tool_specified="$SH"
9195      tool_basename="${tool_specified##*/}"
9196      if test "x$tool_basename" = "x$tool_specified"; then
9197        # A command without a complete path is provided, search $PATH.
9198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9199$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9200        # Extract the first word of "$tool_basename", so it can be a program name with args.
9201set dummy $tool_basename; ac_word=$2
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9203$as_echo_n "checking for $ac_word... " >&6; }
9204if ${ac_cv_path_SH+:} false; then :
9205  $as_echo_n "(cached) " >&6
9206else
9207  case $SH in
9208  [\\/]* | ?:[\\/]*)
9209  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9210  ;;
9211  *)
9212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9213for as_dir in $PATH
9214do
9215  IFS=$as_save_IFS
9216  test -z "$as_dir" && as_dir=.
9217    for ac_exec_ext in '' $ac_executable_extensions; do
9218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9219    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9221    break 2
9222  fi
9223done
9224  done
9225IFS=$as_save_IFS
9226
9227  ;;
9228esac
9229fi
9230SH=$ac_cv_path_SH
9231if test -n "$SH"; then
9232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9233$as_echo "$SH" >&6; }
9234else
9235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9236$as_echo "no" >&6; }
9237fi
9238
9239
9240        if test "x$SH" = x; then
9241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9242        fi
9243      else
9244        # Otherwise we believe it is a complete path. Use it as it is.
9245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9246$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9248$as_echo_n "checking for SH... " >&6; }
9249        if test ! -x "$tool_specified"; then
9250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9251$as_echo "not found" >&6; }
9252          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9253        fi
9254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9255$as_echo "$tool_specified" >&6; }
9256      fi
9257    fi
9258  fi
9259
9260
9261
9262  if test "x$SH" = x; then
9263    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9264  fi
9265
9266
9267
9268
9269
9270  # Publish this variable in the help.
9271
9272
9273  if test "x$SORT" = x; then
9274    # The variable is not set by user, try to locate tool using the code snippet
9275    for ac_prog in sort
9276do
9277  # Extract the first word of "$ac_prog", so it can be a program name with args.
9278set dummy $ac_prog; ac_word=$2
9279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9280$as_echo_n "checking for $ac_word... " >&6; }
9281if ${ac_cv_path_SORT+:} false; then :
9282  $as_echo_n "(cached) " >&6
9283else
9284  case $SORT in
9285  [\\/]* | ?:[\\/]*)
9286  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9287  ;;
9288  *)
9289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9290for as_dir in $PATH
9291do
9292  IFS=$as_save_IFS
9293  test -z "$as_dir" && as_dir=.
9294    for ac_exec_ext in '' $ac_executable_extensions; do
9295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9296    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9298    break 2
9299  fi
9300done
9301  done
9302IFS=$as_save_IFS
9303
9304  ;;
9305esac
9306fi
9307SORT=$ac_cv_path_SORT
9308if test -n "$SORT"; then
9309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9310$as_echo "$SORT" >&6; }
9311else
9312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313$as_echo "no" >&6; }
9314fi
9315
9316
9317  test -n "$SORT" && break
9318done
9319
9320  else
9321    # The variable is set, but is it from the command line or the environment?
9322
9323    # Try to remove the string !SORT! from our list.
9324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9326      # If it failed, the variable was not from the command line. Ignore it,
9327      # but warn the user (except for BASH, which is always set by the calling BASH).
9328      if test "xSORT" != xBASH; then
9329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9330$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9331      fi
9332      # Try to locate tool using the code snippet
9333      for ac_prog in sort
9334do
9335  # Extract the first word of "$ac_prog", so it can be a program name with args.
9336set dummy $ac_prog; ac_word=$2
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9338$as_echo_n "checking for $ac_word... " >&6; }
9339if ${ac_cv_path_SORT+:} false; then :
9340  $as_echo_n "(cached) " >&6
9341else
9342  case $SORT in
9343  [\\/]* | ?:[\\/]*)
9344  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9345  ;;
9346  *)
9347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9348for as_dir in $PATH
9349do
9350  IFS=$as_save_IFS
9351  test -z "$as_dir" && as_dir=.
9352    for ac_exec_ext in '' $ac_executable_extensions; do
9353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9354    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9356    break 2
9357  fi
9358done
9359  done
9360IFS=$as_save_IFS
9361
9362  ;;
9363esac
9364fi
9365SORT=$ac_cv_path_SORT
9366if test -n "$SORT"; then
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9368$as_echo "$SORT" >&6; }
9369else
9370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
9372fi
9373
9374
9375  test -n "$SORT" && break
9376done
9377
9378    else
9379      # If it succeeded, then it was overridden by the user. We will use it
9380      # for the tool.
9381
9382      # First remove it from the list of overridden variables, so we can test
9383      # for unknown variables in the end.
9384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9385
9386      # Check if the provided tool contains a complete path.
9387      tool_specified="$SORT"
9388      tool_basename="${tool_specified##*/}"
9389      if test "x$tool_basename" = "x$tool_specified"; then
9390        # A command without a complete path is provided, search $PATH.
9391        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9392$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9393        # Extract the first word of "$tool_basename", so it can be a program name with args.
9394set dummy $tool_basename; ac_word=$2
9395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9396$as_echo_n "checking for $ac_word... " >&6; }
9397if ${ac_cv_path_SORT+:} false; then :
9398  $as_echo_n "(cached) " >&6
9399else
9400  case $SORT in
9401  [\\/]* | ?:[\\/]*)
9402  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9403  ;;
9404  *)
9405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9406for as_dir in $PATH
9407do
9408  IFS=$as_save_IFS
9409  test -z "$as_dir" && as_dir=.
9410    for ac_exec_ext in '' $ac_executable_extensions; do
9411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9412    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9414    break 2
9415  fi
9416done
9417  done
9418IFS=$as_save_IFS
9419
9420  ;;
9421esac
9422fi
9423SORT=$ac_cv_path_SORT
9424if test -n "$SORT"; then
9425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9426$as_echo "$SORT" >&6; }
9427else
9428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9429$as_echo "no" >&6; }
9430fi
9431
9432
9433        if test "x$SORT" = x; then
9434          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9435        fi
9436      else
9437        # Otherwise we believe it is a complete path. Use it as it is.
9438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9439$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9441$as_echo_n "checking for SORT... " >&6; }
9442        if test ! -x "$tool_specified"; then
9443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9444$as_echo "not found" >&6; }
9445          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9446        fi
9447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9448$as_echo "$tool_specified" >&6; }
9449      fi
9450    fi
9451  fi
9452
9453
9454
9455  if test "x$SORT" = x; then
9456    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9457  fi
9458
9459
9460
9461
9462
9463  # Publish this variable in the help.
9464
9465
9466  if test "x$TAIL" = x; then
9467    # The variable is not set by user, try to locate tool using the code snippet
9468    for ac_prog in tail
9469do
9470  # Extract the first word of "$ac_prog", so it can be a program name with args.
9471set dummy $ac_prog; ac_word=$2
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9473$as_echo_n "checking for $ac_word... " >&6; }
9474if ${ac_cv_path_TAIL+:} false; then :
9475  $as_echo_n "(cached) " >&6
9476else
9477  case $TAIL in
9478  [\\/]* | ?:[\\/]*)
9479  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9480  ;;
9481  *)
9482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9483for as_dir in $PATH
9484do
9485  IFS=$as_save_IFS
9486  test -z "$as_dir" && as_dir=.
9487    for ac_exec_ext in '' $ac_executable_extensions; do
9488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9489    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9491    break 2
9492  fi
9493done
9494  done
9495IFS=$as_save_IFS
9496
9497  ;;
9498esac
9499fi
9500TAIL=$ac_cv_path_TAIL
9501if test -n "$TAIL"; then
9502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9503$as_echo "$TAIL" >&6; }
9504else
9505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506$as_echo "no" >&6; }
9507fi
9508
9509
9510  test -n "$TAIL" && break
9511done
9512
9513  else
9514    # The variable is set, but is it from the command line or the environment?
9515
9516    # Try to remove the string !TAIL! from our list.
9517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9519      # If it failed, the variable was not from the command line. Ignore it,
9520      # but warn the user (except for BASH, which is always set by the calling BASH).
9521      if test "xTAIL" != xBASH; then
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9523$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9524      fi
9525      # Try to locate tool using the code snippet
9526      for ac_prog in tail
9527do
9528  # Extract the first word of "$ac_prog", so it can be a program name with args.
9529set dummy $ac_prog; ac_word=$2
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9531$as_echo_n "checking for $ac_word... " >&6; }
9532if ${ac_cv_path_TAIL+:} false; then :
9533  $as_echo_n "(cached) " >&6
9534else
9535  case $TAIL in
9536  [\\/]* | ?:[\\/]*)
9537  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9538  ;;
9539  *)
9540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9541for as_dir in $PATH
9542do
9543  IFS=$as_save_IFS
9544  test -z "$as_dir" && as_dir=.
9545    for ac_exec_ext in '' $ac_executable_extensions; do
9546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9547    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9549    break 2
9550  fi
9551done
9552  done
9553IFS=$as_save_IFS
9554
9555  ;;
9556esac
9557fi
9558TAIL=$ac_cv_path_TAIL
9559if test -n "$TAIL"; then
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9561$as_echo "$TAIL" >&6; }
9562else
9563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565fi
9566
9567
9568  test -n "$TAIL" && break
9569done
9570
9571    else
9572      # If it succeeded, then it was overridden by the user. We will use it
9573      # for the tool.
9574
9575      # First remove it from the list of overridden variables, so we can test
9576      # for unknown variables in the end.
9577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9578
9579      # Check if the provided tool contains a complete path.
9580      tool_specified="$TAIL"
9581      tool_basename="${tool_specified##*/}"
9582      if test "x$tool_basename" = "x$tool_specified"; then
9583        # A command without a complete path is provided, search $PATH.
9584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9585$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9586        # Extract the first word of "$tool_basename", so it can be a program name with args.
9587set dummy $tool_basename; ac_word=$2
9588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9589$as_echo_n "checking for $ac_word... " >&6; }
9590if ${ac_cv_path_TAIL+:} false; then :
9591  $as_echo_n "(cached) " >&6
9592else
9593  case $TAIL in
9594  [\\/]* | ?:[\\/]*)
9595  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9596  ;;
9597  *)
9598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9599for as_dir in $PATH
9600do
9601  IFS=$as_save_IFS
9602  test -z "$as_dir" && as_dir=.
9603    for ac_exec_ext in '' $ac_executable_extensions; do
9604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9605    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9607    break 2
9608  fi
9609done
9610  done
9611IFS=$as_save_IFS
9612
9613  ;;
9614esac
9615fi
9616TAIL=$ac_cv_path_TAIL
9617if test -n "$TAIL"; then
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9619$as_echo "$TAIL" >&6; }
9620else
9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
9623fi
9624
9625
9626        if test "x$TAIL" = x; then
9627          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9628        fi
9629      else
9630        # Otherwise we believe it is a complete path. Use it as it is.
9631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9632$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9633        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9634$as_echo_n "checking for TAIL... " >&6; }
9635        if test ! -x "$tool_specified"; then
9636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9637$as_echo "not found" >&6; }
9638          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9639        fi
9640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9641$as_echo "$tool_specified" >&6; }
9642      fi
9643    fi
9644  fi
9645
9646
9647
9648  if test "x$TAIL" = x; then
9649    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9650  fi
9651
9652
9653
9654
9655
9656  # Publish this variable in the help.
9657
9658
9659  if test "x$TAR" = x; then
9660    # The variable is not set by user, try to locate tool using the code snippet
9661    for ac_prog in tar
9662do
9663  # Extract the first word of "$ac_prog", so it can be a program name with args.
9664set dummy $ac_prog; ac_word=$2
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9666$as_echo_n "checking for $ac_word... " >&6; }
9667if ${ac_cv_path_TAR+:} false; then :
9668  $as_echo_n "(cached) " >&6
9669else
9670  case $TAR in
9671  [\\/]* | ?:[\\/]*)
9672  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9673  ;;
9674  *)
9675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_exec_ext in '' $ac_executable_extensions; do
9681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9682    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9684    break 2
9685  fi
9686done
9687  done
9688IFS=$as_save_IFS
9689
9690  ;;
9691esac
9692fi
9693TAR=$ac_cv_path_TAR
9694if test -n "$TAR"; then
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9696$as_echo "$TAR" >&6; }
9697else
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
9700fi
9701
9702
9703  test -n "$TAR" && break
9704done
9705
9706  else
9707    # The variable is set, but is it from the command line or the environment?
9708
9709    # Try to remove the string !TAR! from our list.
9710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9712      # If it failed, the variable was not from the command line. Ignore it,
9713      # but warn the user (except for BASH, which is always set by the calling BASH).
9714      if test "xTAR" != xBASH; then
9715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9716$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9717      fi
9718      # Try to locate tool using the code snippet
9719      for ac_prog in tar
9720do
9721  # Extract the first word of "$ac_prog", so it can be a program name with args.
9722set dummy $ac_prog; ac_word=$2
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724$as_echo_n "checking for $ac_word... " >&6; }
9725if ${ac_cv_path_TAR+:} false; then :
9726  $as_echo_n "(cached) " >&6
9727else
9728  case $TAR in
9729  [\\/]* | ?:[\\/]*)
9730  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9731  ;;
9732  *)
9733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734for as_dir in $PATH
9735do
9736  IFS=$as_save_IFS
9737  test -z "$as_dir" && as_dir=.
9738    for ac_exec_ext in '' $ac_executable_extensions; do
9739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742    break 2
9743  fi
9744done
9745  done
9746IFS=$as_save_IFS
9747
9748  ;;
9749esac
9750fi
9751TAR=$ac_cv_path_TAR
9752if test -n "$TAR"; then
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9754$as_echo "$TAR" >&6; }
9755else
9756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757$as_echo "no" >&6; }
9758fi
9759
9760
9761  test -n "$TAR" && break
9762done
9763
9764    else
9765      # If it succeeded, then it was overridden by the user. We will use it
9766      # for the tool.
9767
9768      # First remove it from the list of overridden variables, so we can test
9769      # for unknown variables in the end.
9770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9771
9772      # Check if the provided tool contains a complete path.
9773      tool_specified="$TAR"
9774      tool_basename="${tool_specified##*/}"
9775      if test "x$tool_basename" = "x$tool_specified"; then
9776        # A command without a complete path is provided, search $PATH.
9777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9778$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9779        # Extract the first word of "$tool_basename", so it can be a program name with args.
9780set dummy $tool_basename; ac_word=$2
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782$as_echo_n "checking for $ac_word... " >&6; }
9783if ${ac_cv_path_TAR+:} false; then :
9784  $as_echo_n "(cached) " >&6
9785else
9786  case $TAR in
9787  [\\/]* | ?:[\\/]*)
9788  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9789  ;;
9790  *)
9791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792for as_dir in $PATH
9793do
9794  IFS=$as_save_IFS
9795  test -z "$as_dir" && as_dir=.
9796    for ac_exec_ext in '' $ac_executable_extensions; do
9797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800    break 2
9801  fi
9802done
9803  done
9804IFS=$as_save_IFS
9805
9806  ;;
9807esac
9808fi
9809TAR=$ac_cv_path_TAR
9810if test -n "$TAR"; then
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9812$as_echo "$TAR" >&6; }
9813else
9814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
9816fi
9817
9818
9819        if test "x$TAR" = x; then
9820          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9821        fi
9822      else
9823        # Otherwise we believe it is a complete path. Use it as it is.
9824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9825$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9827$as_echo_n "checking for TAR... " >&6; }
9828        if test ! -x "$tool_specified"; then
9829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9830$as_echo "not found" >&6; }
9831          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9832        fi
9833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9834$as_echo "$tool_specified" >&6; }
9835      fi
9836    fi
9837  fi
9838
9839
9840
9841  if test "x$TAR" = x; then
9842    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9843  fi
9844
9845
9846
9847
9848
9849  # Publish this variable in the help.
9850
9851
9852  if test "x$TEE" = x; then
9853    # The variable is not set by user, try to locate tool using the code snippet
9854    for ac_prog in tee
9855do
9856  # Extract the first word of "$ac_prog", so it can be a program name with args.
9857set dummy $ac_prog; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_TEE+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $TEE in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886TEE=$ac_cv_path_TEE
9887if test -n "$TEE"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9889$as_echo "$TEE" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$TEE" && break
9897done
9898
9899  else
9900    # The variable is set, but is it from the command line or the environment?
9901
9902    # Try to remove the string !TEE! from our list.
9903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9905      # If it failed, the variable was not from the command line. Ignore it,
9906      # but warn the user (except for BASH, which is always set by the calling BASH).
9907      if test "xTEE" != xBASH; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9909$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9910      fi
9911      # Try to locate tool using the code snippet
9912      for ac_prog in tee
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_TEE+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $TEE in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944TEE=$ac_cv_path_TEE
9945if test -n "$TEE"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9947$as_echo "$TEE" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$TEE" && break
9955done
9956
9957    else
9958      # If it succeeded, then it was overridden by the user. We will use it
9959      # for the tool.
9960
9961      # First remove it from the list of overridden variables, so we can test
9962      # for unknown variables in the end.
9963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9964
9965      # Check if the provided tool contains a complete path.
9966      tool_specified="$TEE"
9967      tool_basename="${tool_specified##*/}"
9968      if test "x$tool_basename" = "x$tool_specified"; then
9969        # A command without a complete path is provided, search $PATH.
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9971$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9972        # Extract the first word of "$tool_basename", so it can be a program name with args.
9973set dummy $tool_basename; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if ${ac_cv_path_TEE+:} false; then :
9977  $as_echo_n "(cached) " >&6
9978else
9979  case $TEE in
9980  [\\/]* | ?:[\\/]*)
9981  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9982  ;;
9983  *)
9984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987  IFS=$as_save_IFS
9988  test -z "$as_dir" && as_dir=.
9989    for ac_exec_ext in '' $ac_executable_extensions; do
9990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993    break 2
9994  fi
9995done
9996  done
9997IFS=$as_save_IFS
9998
9999  ;;
10000esac
10001fi
10002TEE=$ac_cv_path_TEE
10003if test -n "$TEE"; then
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10005$as_echo "$TEE" >&6; }
10006else
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009fi
10010
10011
10012        if test "x$TEE" = x; then
10013          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10014        fi
10015      else
10016        # Otherwise we believe it is a complete path. Use it as it is.
10017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10018$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10020$as_echo_n "checking for TEE... " >&6; }
10021        if test ! -x "$tool_specified"; then
10022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10023$as_echo "not found" >&6; }
10024          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10025        fi
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10027$as_echo "$tool_specified" >&6; }
10028      fi
10029    fi
10030  fi
10031
10032
10033
10034  if test "x$TEE" = x; then
10035    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10036  fi
10037
10038
10039
10040
10041
10042  # Publish this variable in the help.
10043
10044
10045  if test "x$TOUCH" = x; then
10046    # The variable is not set by user, try to locate tool using the code snippet
10047    for ac_prog in touch
10048do
10049  # Extract the first word of "$ac_prog", so it can be a program name with args.
10050set dummy $ac_prog; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_TOUCH+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $TOUCH in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079TOUCH=$ac_cv_path_TOUCH
10080if test -n "$TOUCH"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10082$as_echo "$TOUCH" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089  test -n "$TOUCH" && break
10090done
10091
10092  else
10093    # The variable is set, but is it from the command line or the environment?
10094
10095    # Try to remove the string !TOUCH! from our list.
10096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10098      # If it failed, the variable was not from the command line. Ignore it,
10099      # but warn the user (except for BASH, which is always set by the calling BASH).
10100      if test "xTOUCH" != xBASH; then
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10102$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10103      fi
10104      # Try to locate tool using the code snippet
10105      for ac_prog in touch
10106do
10107  # Extract the first word of "$ac_prog", so it can be a program name with args.
10108set dummy $ac_prog; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_TOUCH+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $TOUCH in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137TOUCH=$ac_cv_path_TOUCH
10138if test -n "$TOUCH"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10140$as_echo "$TOUCH" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147  test -n "$TOUCH" && break
10148done
10149
10150    else
10151      # If it succeeded, then it was overridden by the user. We will use it
10152      # for the tool.
10153
10154      # First remove it from the list of overridden variables, so we can test
10155      # for unknown variables in the end.
10156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10157
10158      # Check if the provided tool contains a complete path.
10159      tool_specified="$TOUCH"
10160      tool_basename="${tool_specified##*/}"
10161      if test "x$tool_basename" = "x$tool_specified"; then
10162        # A command without a complete path is provided, search $PATH.
10163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10164$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10165        # Extract the first word of "$tool_basename", so it can be a program name with args.
10166set dummy $tool_basename; ac_word=$2
10167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10168$as_echo_n "checking for $ac_word... " >&6; }
10169if ${ac_cv_path_TOUCH+:} false; then :
10170  $as_echo_n "(cached) " >&6
10171else
10172  case $TOUCH in
10173  [\\/]* | ?:[\\/]*)
10174  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10175  ;;
10176  *)
10177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10178for as_dir in $PATH
10179do
10180  IFS=$as_save_IFS
10181  test -z "$as_dir" && as_dir=.
10182    for ac_exec_ext in '' $ac_executable_extensions; do
10183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10184    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10186    break 2
10187  fi
10188done
10189  done
10190IFS=$as_save_IFS
10191
10192  ;;
10193esac
10194fi
10195TOUCH=$ac_cv_path_TOUCH
10196if test -n "$TOUCH"; then
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10198$as_echo "$TOUCH" >&6; }
10199else
10200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10201$as_echo "no" >&6; }
10202fi
10203
10204
10205        if test "x$TOUCH" = x; then
10206          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10207        fi
10208      else
10209        # Otherwise we believe it is a complete path. Use it as it is.
10210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10211$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10213$as_echo_n "checking for TOUCH... " >&6; }
10214        if test ! -x "$tool_specified"; then
10215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10216$as_echo "not found" >&6; }
10217          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10218        fi
10219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10220$as_echo "$tool_specified" >&6; }
10221      fi
10222    fi
10223  fi
10224
10225
10226
10227  if test "x$TOUCH" = x; then
10228    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10229  fi
10230
10231
10232
10233
10234
10235  # Publish this variable in the help.
10236
10237
10238  if test "x$TR" = x; then
10239    # The variable is not set by user, try to locate tool using the code snippet
10240    for ac_prog in tr
10241do
10242  # Extract the first word of "$ac_prog", so it can be a program name with args.
10243set dummy $ac_prog; ac_word=$2
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245$as_echo_n "checking for $ac_word... " >&6; }
10246if ${ac_cv_path_TR+:} false; then :
10247  $as_echo_n "(cached) " >&6
10248else
10249  case $TR in
10250  [\\/]* | ?:[\\/]*)
10251  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10252  ;;
10253  *)
10254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255for as_dir in $PATH
10256do
10257  IFS=$as_save_IFS
10258  test -z "$as_dir" && as_dir=.
10259    for ac_exec_ext in '' $ac_executable_extensions; do
10260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10261    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263    break 2
10264  fi
10265done
10266  done
10267IFS=$as_save_IFS
10268
10269  ;;
10270esac
10271fi
10272TR=$ac_cv_path_TR
10273if test -n "$TR"; then
10274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10275$as_echo "$TR" >&6; }
10276else
10277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
10279fi
10280
10281
10282  test -n "$TR" && break
10283done
10284
10285  else
10286    # The variable is set, but is it from the command line or the environment?
10287
10288    # Try to remove the string !TR! from our list.
10289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10291      # If it failed, the variable was not from the command line. Ignore it,
10292      # but warn the user (except for BASH, which is always set by the calling BASH).
10293      if test "xTR" != xBASH; then
10294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10295$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10296      fi
10297      # Try to locate tool using the code snippet
10298      for ac_prog in tr
10299do
10300  # Extract the first word of "$ac_prog", so it can be a program name with args.
10301set dummy $ac_prog; ac_word=$2
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10303$as_echo_n "checking for $ac_word... " >&6; }
10304if ${ac_cv_path_TR+:} false; then :
10305  $as_echo_n "(cached) " >&6
10306else
10307  case $TR in
10308  [\\/]* | ?:[\\/]*)
10309  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10310  ;;
10311  *)
10312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10313for as_dir in $PATH
10314do
10315  IFS=$as_save_IFS
10316  test -z "$as_dir" && as_dir=.
10317    for ac_exec_ext in '' $ac_executable_extensions; do
10318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10319    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10321    break 2
10322  fi
10323done
10324  done
10325IFS=$as_save_IFS
10326
10327  ;;
10328esac
10329fi
10330TR=$ac_cv_path_TR
10331if test -n "$TR"; then
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10333$as_echo "$TR" >&6; }
10334else
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336$as_echo "no" >&6; }
10337fi
10338
10339
10340  test -n "$TR" && break
10341done
10342
10343    else
10344      # If it succeeded, then it was overridden by the user. We will use it
10345      # for the tool.
10346
10347      # First remove it from the list of overridden variables, so we can test
10348      # for unknown variables in the end.
10349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10350
10351      # Check if the provided tool contains a complete path.
10352      tool_specified="$TR"
10353      tool_basename="${tool_specified##*/}"
10354      if test "x$tool_basename" = "x$tool_specified"; then
10355        # A command without a complete path is provided, search $PATH.
10356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10357$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10358        # Extract the first word of "$tool_basename", so it can be a program name with args.
10359set dummy $tool_basename; ac_word=$2
10360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10361$as_echo_n "checking for $ac_word... " >&6; }
10362if ${ac_cv_path_TR+:} false; then :
10363  $as_echo_n "(cached) " >&6
10364else
10365  case $TR in
10366  [\\/]* | ?:[\\/]*)
10367  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10368  ;;
10369  *)
10370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10371for as_dir in $PATH
10372do
10373  IFS=$as_save_IFS
10374  test -z "$as_dir" && as_dir=.
10375    for ac_exec_ext in '' $ac_executable_extensions; do
10376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10377    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10379    break 2
10380  fi
10381done
10382  done
10383IFS=$as_save_IFS
10384
10385  ;;
10386esac
10387fi
10388TR=$ac_cv_path_TR
10389if test -n "$TR"; then
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10391$as_echo "$TR" >&6; }
10392else
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395fi
10396
10397
10398        if test "x$TR" = x; then
10399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10400        fi
10401      else
10402        # Otherwise we believe it is a complete path. Use it as it is.
10403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10404$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10406$as_echo_n "checking for TR... " >&6; }
10407        if test ! -x "$tool_specified"; then
10408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10409$as_echo "not found" >&6; }
10410          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10411        fi
10412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10413$as_echo "$tool_specified" >&6; }
10414      fi
10415    fi
10416  fi
10417
10418
10419
10420  if test "x$TR" = x; then
10421    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10422  fi
10423
10424
10425
10426
10427
10428  # Publish this variable in the help.
10429
10430
10431  if test "x$UNAME" = x; then
10432    # The variable is not set by user, try to locate tool using the code snippet
10433    for ac_prog in uname
10434do
10435  # Extract the first word of "$ac_prog", so it can be a program name with args.
10436set dummy $ac_prog; ac_word=$2
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10438$as_echo_n "checking for $ac_word... " >&6; }
10439if ${ac_cv_path_UNAME+:} false; then :
10440  $as_echo_n "(cached) " >&6
10441else
10442  case $UNAME in
10443  [\\/]* | ?:[\\/]*)
10444  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10445  ;;
10446  *)
10447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10448for as_dir in $PATH
10449do
10450  IFS=$as_save_IFS
10451  test -z "$as_dir" && as_dir=.
10452    for ac_exec_ext in '' $ac_executable_extensions; do
10453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10454    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10456    break 2
10457  fi
10458done
10459  done
10460IFS=$as_save_IFS
10461
10462  ;;
10463esac
10464fi
10465UNAME=$ac_cv_path_UNAME
10466if test -n "$UNAME"; then
10467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10468$as_echo "$UNAME" >&6; }
10469else
10470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
10472fi
10473
10474
10475  test -n "$UNAME" && break
10476done
10477
10478  else
10479    # The variable is set, but is it from the command line or the environment?
10480
10481    # Try to remove the string !UNAME! from our list.
10482    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10483    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10484      # If it failed, the variable was not from the command line. Ignore it,
10485      # but warn the user (except for BASH, which is always set by the calling BASH).
10486      if test "xUNAME" != xBASH; then
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10488$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10489      fi
10490      # Try to locate tool using the code snippet
10491      for ac_prog in uname
10492do
10493  # Extract the first word of "$ac_prog", so it can be a program name with args.
10494set dummy $ac_prog; ac_word=$2
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496$as_echo_n "checking for $ac_word... " >&6; }
10497if ${ac_cv_path_UNAME+:} false; then :
10498  $as_echo_n "(cached) " >&6
10499else
10500  case $UNAME in
10501  [\\/]* | ?:[\\/]*)
10502  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10503  ;;
10504  *)
10505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10506for as_dir in $PATH
10507do
10508  IFS=$as_save_IFS
10509  test -z "$as_dir" && as_dir=.
10510    for ac_exec_ext in '' $ac_executable_extensions; do
10511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10512    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10514    break 2
10515  fi
10516done
10517  done
10518IFS=$as_save_IFS
10519
10520  ;;
10521esac
10522fi
10523UNAME=$ac_cv_path_UNAME
10524if test -n "$UNAME"; then
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10526$as_echo "$UNAME" >&6; }
10527else
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532
10533  test -n "$UNAME" && break
10534done
10535
10536    else
10537      # If it succeeded, then it was overridden by the user. We will use it
10538      # for the tool.
10539
10540      # First remove it from the list of overridden variables, so we can test
10541      # for unknown variables in the end.
10542      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10543
10544      # Check if the provided tool contains a complete path.
10545      tool_specified="$UNAME"
10546      tool_basename="${tool_specified##*/}"
10547      if test "x$tool_basename" = "x$tool_specified"; then
10548        # A command without a complete path is provided, search $PATH.
10549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10550$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10551        # Extract the first word of "$tool_basename", so it can be a program name with args.
10552set dummy $tool_basename; ac_word=$2
10553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554$as_echo_n "checking for $ac_word... " >&6; }
10555if ${ac_cv_path_UNAME+:} false; then :
10556  $as_echo_n "(cached) " >&6
10557else
10558  case $UNAME in
10559  [\\/]* | ?:[\\/]*)
10560  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10561  ;;
10562  *)
10563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10564for as_dir in $PATH
10565do
10566  IFS=$as_save_IFS
10567  test -z "$as_dir" && as_dir=.
10568    for ac_exec_ext in '' $ac_executable_extensions; do
10569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10570    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10572    break 2
10573  fi
10574done
10575  done
10576IFS=$as_save_IFS
10577
10578  ;;
10579esac
10580fi
10581UNAME=$ac_cv_path_UNAME
10582if test -n "$UNAME"; then
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10584$as_echo "$UNAME" >&6; }
10585else
10586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
10588fi
10589
10590
10591        if test "x$UNAME" = x; then
10592          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10593        fi
10594      else
10595        # Otherwise we believe it is a complete path. Use it as it is.
10596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10597$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10599$as_echo_n "checking for UNAME... " >&6; }
10600        if test ! -x "$tool_specified"; then
10601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10602$as_echo "not found" >&6; }
10603          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10604        fi
10605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10606$as_echo "$tool_specified" >&6; }
10607      fi
10608    fi
10609  fi
10610
10611
10612
10613  if test "x$UNAME" = x; then
10614    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10615  fi
10616
10617
10618
10619
10620
10621  # Publish this variable in the help.
10622
10623
10624  if test "x$UNIQ" = x; then
10625    # The variable is not set by user, try to locate tool using the code snippet
10626    for ac_prog in uniq
10627do
10628  # Extract the first word of "$ac_prog", so it can be a program name with args.
10629set dummy $ac_prog; ac_word=$2
10630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10631$as_echo_n "checking for $ac_word... " >&6; }
10632if ${ac_cv_path_UNIQ+:} false; then :
10633  $as_echo_n "(cached) " >&6
10634else
10635  case $UNIQ in
10636  [\\/]* | ?:[\\/]*)
10637  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10638  ;;
10639  *)
10640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10641for as_dir in $PATH
10642do
10643  IFS=$as_save_IFS
10644  test -z "$as_dir" && as_dir=.
10645    for ac_exec_ext in '' $ac_executable_extensions; do
10646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10647    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10649    break 2
10650  fi
10651done
10652  done
10653IFS=$as_save_IFS
10654
10655  ;;
10656esac
10657fi
10658UNIQ=$ac_cv_path_UNIQ
10659if test -n "$UNIQ"; then
10660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10661$as_echo "$UNIQ" >&6; }
10662else
10663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664$as_echo "no" >&6; }
10665fi
10666
10667
10668  test -n "$UNIQ" && break
10669done
10670
10671  else
10672    # The variable is set, but is it from the command line or the environment?
10673
10674    # Try to remove the string !UNIQ! from our list.
10675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10677      # If it failed, the variable was not from the command line. Ignore it,
10678      # but warn the user (except for BASH, which is always set by the calling BASH).
10679      if test "xUNIQ" != xBASH; then
10680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10681$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10682      fi
10683      # Try to locate tool using the code snippet
10684      for ac_prog in uniq
10685do
10686  # Extract the first word of "$ac_prog", so it can be a program name with args.
10687set dummy $ac_prog; ac_word=$2
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10689$as_echo_n "checking for $ac_word... " >&6; }
10690if ${ac_cv_path_UNIQ+:} false; then :
10691  $as_echo_n "(cached) " >&6
10692else
10693  case $UNIQ in
10694  [\\/]* | ?:[\\/]*)
10695  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10696  ;;
10697  *)
10698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10699for as_dir in $PATH
10700do
10701  IFS=$as_save_IFS
10702  test -z "$as_dir" && as_dir=.
10703    for ac_exec_ext in '' $ac_executable_extensions; do
10704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10705    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10707    break 2
10708  fi
10709done
10710  done
10711IFS=$as_save_IFS
10712
10713  ;;
10714esac
10715fi
10716UNIQ=$ac_cv_path_UNIQ
10717if test -n "$UNIQ"; then
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10719$as_echo "$UNIQ" >&6; }
10720else
10721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
10723fi
10724
10725
10726  test -n "$UNIQ" && break
10727done
10728
10729    else
10730      # If it succeeded, then it was overridden by the user. We will use it
10731      # for the tool.
10732
10733      # First remove it from the list of overridden variables, so we can test
10734      # for unknown variables in the end.
10735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10736
10737      # Check if the provided tool contains a complete path.
10738      tool_specified="$UNIQ"
10739      tool_basename="${tool_specified##*/}"
10740      if test "x$tool_basename" = "x$tool_specified"; then
10741        # A command without a complete path is provided, search $PATH.
10742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10743$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10744        # Extract the first word of "$tool_basename", so it can be a program name with args.
10745set dummy $tool_basename; ac_word=$2
10746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10747$as_echo_n "checking for $ac_word... " >&6; }
10748if ${ac_cv_path_UNIQ+:} false; then :
10749  $as_echo_n "(cached) " >&6
10750else
10751  case $UNIQ in
10752  [\\/]* | ?:[\\/]*)
10753  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10754  ;;
10755  *)
10756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10757for as_dir in $PATH
10758do
10759  IFS=$as_save_IFS
10760  test -z "$as_dir" && as_dir=.
10761    for ac_exec_ext in '' $ac_executable_extensions; do
10762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10763    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10765    break 2
10766  fi
10767done
10768  done
10769IFS=$as_save_IFS
10770
10771  ;;
10772esac
10773fi
10774UNIQ=$ac_cv_path_UNIQ
10775if test -n "$UNIQ"; then
10776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10777$as_echo "$UNIQ" >&6; }
10778else
10779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10780$as_echo "no" >&6; }
10781fi
10782
10783
10784        if test "x$UNIQ" = x; then
10785          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10786        fi
10787      else
10788        # Otherwise we believe it is a complete path. Use it as it is.
10789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10790$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10792$as_echo_n "checking for UNIQ... " >&6; }
10793        if test ! -x "$tool_specified"; then
10794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10795$as_echo "not found" >&6; }
10796          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10797        fi
10798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10799$as_echo "$tool_specified" >&6; }
10800      fi
10801    fi
10802  fi
10803
10804
10805
10806  if test "x$UNIQ" = x; then
10807    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10808  fi
10809
10810
10811
10812
10813
10814  # Publish this variable in the help.
10815
10816
10817  if test "x$WC" = x; then
10818    # The variable is not set by user, try to locate tool using the code snippet
10819    for ac_prog in wc
10820do
10821  # Extract the first word of "$ac_prog", so it can be a program name with args.
10822set dummy $ac_prog; ac_word=$2
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824$as_echo_n "checking for $ac_word... " >&6; }
10825if ${ac_cv_path_WC+:} false; then :
10826  $as_echo_n "(cached) " >&6
10827else
10828  case $WC in
10829  [\\/]* | ?:[\\/]*)
10830  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10831  ;;
10832  *)
10833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834for as_dir in $PATH
10835do
10836  IFS=$as_save_IFS
10837  test -z "$as_dir" && as_dir=.
10838    for ac_exec_ext in '' $ac_executable_extensions; do
10839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842    break 2
10843  fi
10844done
10845  done
10846IFS=$as_save_IFS
10847
10848  ;;
10849esac
10850fi
10851WC=$ac_cv_path_WC
10852if test -n "$WC"; then
10853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10854$as_echo "$WC" >&6; }
10855else
10856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857$as_echo "no" >&6; }
10858fi
10859
10860
10861  test -n "$WC" && break
10862done
10863
10864  else
10865    # The variable is set, but is it from the command line or the environment?
10866
10867    # Try to remove the string !WC! from our list.
10868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10870      # If it failed, the variable was not from the command line. Ignore it,
10871      # but warn the user (except for BASH, which is always set by the calling BASH).
10872      if test "xWC" != xBASH; then
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10874$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10875      fi
10876      # Try to locate tool using the code snippet
10877      for ac_prog in wc
10878do
10879  # Extract the first word of "$ac_prog", so it can be a program name with args.
10880set dummy $ac_prog; ac_word=$2
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10882$as_echo_n "checking for $ac_word... " >&6; }
10883if ${ac_cv_path_WC+:} false; then :
10884  $as_echo_n "(cached) " >&6
10885else
10886  case $WC in
10887  [\\/]* | ?:[\\/]*)
10888  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10889  ;;
10890  *)
10891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10892for as_dir in $PATH
10893do
10894  IFS=$as_save_IFS
10895  test -z "$as_dir" && as_dir=.
10896    for ac_exec_ext in '' $ac_executable_extensions; do
10897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10898    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10900    break 2
10901  fi
10902done
10903  done
10904IFS=$as_save_IFS
10905
10906  ;;
10907esac
10908fi
10909WC=$ac_cv_path_WC
10910if test -n "$WC"; then
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10912$as_echo "$WC" >&6; }
10913else
10914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10915$as_echo "no" >&6; }
10916fi
10917
10918
10919  test -n "$WC" && break
10920done
10921
10922    else
10923      # If it succeeded, then it was overridden by the user. We will use it
10924      # for the tool.
10925
10926      # First remove it from the list of overridden variables, so we can test
10927      # for unknown variables in the end.
10928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10929
10930      # Check if the provided tool contains a complete path.
10931      tool_specified="$WC"
10932      tool_basename="${tool_specified##*/}"
10933      if test "x$tool_basename" = "x$tool_specified"; then
10934        # A command without a complete path is provided, search $PATH.
10935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10936$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10937        # Extract the first word of "$tool_basename", so it can be a program name with args.
10938set dummy $tool_basename; ac_word=$2
10939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10940$as_echo_n "checking for $ac_word... " >&6; }
10941if ${ac_cv_path_WC+:} false; then :
10942  $as_echo_n "(cached) " >&6
10943else
10944  case $WC in
10945  [\\/]* | ?:[\\/]*)
10946  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10947  ;;
10948  *)
10949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10950for as_dir in $PATH
10951do
10952  IFS=$as_save_IFS
10953  test -z "$as_dir" && as_dir=.
10954    for ac_exec_ext in '' $ac_executable_extensions; do
10955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10956    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10958    break 2
10959  fi
10960done
10961  done
10962IFS=$as_save_IFS
10963
10964  ;;
10965esac
10966fi
10967WC=$ac_cv_path_WC
10968if test -n "$WC"; then
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10970$as_echo "$WC" >&6; }
10971else
10972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
10974fi
10975
10976
10977        if test "x$WC" = x; then
10978          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10979        fi
10980      else
10981        # Otherwise we believe it is a complete path. Use it as it is.
10982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10983$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10985$as_echo_n "checking for WC... " >&6; }
10986        if test ! -x "$tool_specified"; then
10987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10988$as_echo "not found" >&6; }
10989          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10990        fi
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10992$as_echo "$tool_specified" >&6; }
10993      fi
10994    fi
10995  fi
10996
10997
10998
10999  if test "x$WC" = x; then
11000    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11001  fi
11002
11003
11004
11005
11006
11007  # Publish this variable in the help.
11008
11009
11010  if test "x$WHICH" = x; then
11011    # The variable is not set by user, try to locate tool using the code snippet
11012    for ac_prog in which
11013do
11014  # Extract the first word of "$ac_prog", so it can be a program name with args.
11015set dummy $ac_prog; ac_word=$2
11016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11017$as_echo_n "checking for $ac_word... " >&6; }
11018if ${ac_cv_path_WHICH+:} false; then :
11019  $as_echo_n "(cached) " >&6
11020else
11021  case $WHICH in
11022  [\\/]* | ?:[\\/]*)
11023  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11024  ;;
11025  *)
11026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11027for as_dir in $PATH
11028do
11029  IFS=$as_save_IFS
11030  test -z "$as_dir" && as_dir=.
11031    for ac_exec_ext in '' $ac_executable_extensions; do
11032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11033    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11035    break 2
11036  fi
11037done
11038  done
11039IFS=$as_save_IFS
11040
11041  ;;
11042esac
11043fi
11044WHICH=$ac_cv_path_WHICH
11045if test -n "$WHICH"; then
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11047$as_echo "$WHICH" >&6; }
11048else
11049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11050$as_echo "no" >&6; }
11051fi
11052
11053
11054  test -n "$WHICH" && break
11055done
11056
11057  else
11058    # The variable is set, but is it from the command line or the environment?
11059
11060    # Try to remove the string !WHICH! from our list.
11061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11063      # If it failed, the variable was not from the command line. Ignore it,
11064      # but warn the user (except for BASH, which is always set by the calling BASH).
11065      if test "xWHICH" != xBASH; then
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11067$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11068      fi
11069      # Try to locate tool using the code snippet
11070      for ac_prog in which
11071do
11072  # Extract the first word of "$ac_prog", so it can be a program name with args.
11073set dummy $ac_prog; ac_word=$2
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11075$as_echo_n "checking for $ac_word... " >&6; }
11076if ${ac_cv_path_WHICH+:} false; then :
11077  $as_echo_n "(cached) " >&6
11078else
11079  case $WHICH in
11080  [\\/]* | ?:[\\/]*)
11081  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11082  ;;
11083  *)
11084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11085for as_dir in $PATH
11086do
11087  IFS=$as_save_IFS
11088  test -z "$as_dir" && as_dir=.
11089    for ac_exec_ext in '' $ac_executable_extensions; do
11090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11091    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11093    break 2
11094  fi
11095done
11096  done
11097IFS=$as_save_IFS
11098
11099  ;;
11100esac
11101fi
11102WHICH=$ac_cv_path_WHICH
11103if test -n "$WHICH"; then
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11105$as_echo "$WHICH" >&6; }
11106else
11107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11108$as_echo "no" >&6; }
11109fi
11110
11111
11112  test -n "$WHICH" && break
11113done
11114
11115    else
11116      # If it succeeded, then it was overridden by the user. We will use it
11117      # for the tool.
11118
11119      # First remove it from the list of overridden variables, so we can test
11120      # for unknown variables in the end.
11121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11122
11123      # Check if the provided tool contains a complete path.
11124      tool_specified="$WHICH"
11125      tool_basename="${tool_specified##*/}"
11126      if test "x$tool_basename" = "x$tool_specified"; then
11127        # A command without a complete path is provided, search $PATH.
11128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11129$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11130        # Extract the first word of "$tool_basename", so it can be a program name with args.
11131set dummy $tool_basename; ac_word=$2
11132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11133$as_echo_n "checking for $ac_word... " >&6; }
11134if ${ac_cv_path_WHICH+:} false; then :
11135  $as_echo_n "(cached) " >&6
11136else
11137  case $WHICH in
11138  [\\/]* | ?:[\\/]*)
11139  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11140  ;;
11141  *)
11142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11143for as_dir in $PATH
11144do
11145  IFS=$as_save_IFS
11146  test -z "$as_dir" && as_dir=.
11147    for ac_exec_ext in '' $ac_executable_extensions; do
11148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11149    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11151    break 2
11152  fi
11153done
11154  done
11155IFS=$as_save_IFS
11156
11157  ;;
11158esac
11159fi
11160WHICH=$ac_cv_path_WHICH
11161if test -n "$WHICH"; then
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11163$as_echo "$WHICH" >&6; }
11164else
11165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11166$as_echo "no" >&6; }
11167fi
11168
11169
11170        if test "x$WHICH" = x; then
11171          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11172        fi
11173      else
11174        # Otherwise we believe it is a complete path. Use it as it is.
11175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11176$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11178$as_echo_n "checking for WHICH... " >&6; }
11179        if test ! -x "$tool_specified"; then
11180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11181$as_echo "not found" >&6; }
11182          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11183        fi
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11185$as_echo "$tool_specified" >&6; }
11186      fi
11187    fi
11188  fi
11189
11190
11191
11192  if test "x$WHICH" = x; then
11193    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11194  fi
11195
11196
11197
11198
11199
11200  # Publish this variable in the help.
11201
11202
11203  if test "x$XARGS" = x; then
11204    # The variable is not set by user, try to locate tool using the code snippet
11205    for ac_prog in xargs
11206do
11207  # Extract the first word of "$ac_prog", so it can be a program name with args.
11208set dummy $ac_prog; ac_word=$2
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210$as_echo_n "checking for $ac_word... " >&6; }
11211if ${ac_cv_path_XARGS+:} false; then :
11212  $as_echo_n "(cached) " >&6
11213else
11214  case $XARGS in
11215  [\\/]* | ?:[\\/]*)
11216  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11217  ;;
11218  *)
11219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220for as_dir in $PATH
11221do
11222  IFS=$as_save_IFS
11223  test -z "$as_dir" && as_dir=.
11224    for ac_exec_ext in '' $ac_executable_extensions; do
11225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228    break 2
11229  fi
11230done
11231  done
11232IFS=$as_save_IFS
11233
11234  ;;
11235esac
11236fi
11237XARGS=$ac_cv_path_XARGS
11238if test -n "$XARGS"; then
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11240$as_echo "$XARGS" >&6; }
11241else
11242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
11244fi
11245
11246
11247  test -n "$XARGS" && break
11248done
11249
11250  else
11251    # The variable is set, but is it from the command line or the environment?
11252
11253    # Try to remove the string !XARGS! from our list.
11254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11256      # If it failed, the variable was not from the command line. Ignore it,
11257      # but warn the user (except for BASH, which is always set by the calling BASH).
11258      if test "xXARGS" != xBASH; then
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11260$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11261      fi
11262      # Try to locate tool using the code snippet
11263      for ac_prog in xargs
11264do
11265  # Extract the first word of "$ac_prog", so it can be a program name with args.
11266set dummy $ac_prog; ac_word=$2
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11268$as_echo_n "checking for $ac_word... " >&6; }
11269if ${ac_cv_path_XARGS+:} false; then :
11270  $as_echo_n "(cached) " >&6
11271else
11272  case $XARGS in
11273  [\\/]* | ?:[\\/]*)
11274  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11275  ;;
11276  *)
11277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11278for as_dir in $PATH
11279do
11280  IFS=$as_save_IFS
11281  test -z "$as_dir" && as_dir=.
11282    for ac_exec_ext in '' $ac_executable_extensions; do
11283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11284    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11286    break 2
11287  fi
11288done
11289  done
11290IFS=$as_save_IFS
11291
11292  ;;
11293esac
11294fi
11295XARGS=$ac_cv_path_XARGS
11296if test -n "$XARGS"; then
11297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11298$as_echo "$XARGS" >&6; }
11299else
11300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11301$as_echo "no" >&6; }
11302fi
11303
11304
11305  test -n "$XARGS" && break
11306done
11307
11308    else
11309      # If it succeeded, then it was overridden by the user. We will use it
11310      # for the tool.
11311
11312      # First remove it from the list of overridden variables, so we can test
11313      # for unknown variables in the end.
11314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11315
11316      # Check if the provided tool contains a complete path.
11317      tool_specified="$XARGS"
11318      tool_basename="${tool_specified##*/}"
11319      if test "x$tool_basename" = "x$tool_specified"; then
11320        # A command without a complete path is provided, search $PATH.
11321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11322$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11323        # Extract the first word of "$tool_basename", so it can be a program name with args.
11324set dummy $tool_basename; ac_word=$2
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11326$as_echo_n "checking for $ac_word... " >&6; }
11327if ${ac_cv_path_XARGS+:} false; then :
11328  $as_echo_n "(cached) " >&6
11329else
11330  case $XARGS in
11331  [\\/]* | ?:[\\/]*)
11332  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11333  ;;
11334  *)
11335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11336for as_dir in $PATH
11337do
11338  IFS=$as_save_IFS
11339  test -z "$as_dir" && as_dir=.
11340    for ac_exec_ext in '' $ac_executable_extensions; do
11341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11342    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11344    break 2
11345  fi
11346done
11347  done
11348IFS=$as_save_IFS
11349
11350  ;;
11351esac
11352fi
11353XARGS=$ac_cv_path_XARGS
11354if test -n "$XARGS"; then
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11356$as_echo "$XARGS" >&6; }
11357else
11358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
11360fi
11361
11362
11363        if test "x$XARGS" = x; then
11364          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11365        fi
11366      else
11367        # Otherwise we believe it is a complete path. Use it as it is.
11368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11369$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11371$as_echo_n "checking for XARGS... " >&6; }
11372        if test ! -x "$tool_specified"; then
11373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11374$as_echo "not found" >&6; }
11375          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11376        fi
11377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11378$as_echo "$tool_specified" >&6; }
11379      fi
11380    fi
11381  fi
11382
11383
11384
11385  if test "x$XARGS" = x; then
11386    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11387  fi
11388
11389
11390
11391  # Then required tools that require some special treatment.
11392
11393
11394  # Publish this variable in the help.
11395
11396
11397  if test "x$AWK" = x; then
11398    # The variable is not set by user, try to locate tool using the code snippet
11399    for ac_prog in gawk mawk nawk awk
11400do
11401  # Extract the first word of "$ac_prog", so it can be a program name with args.
11402set dummy $ac_prog; ac_word=$2
11403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11404$as_echo_n "checking for $ac_word... " >&6; }
11405if ${ac_cv_prog_AWK+:} false; then :
11406  $as_echo_n "(cached) " >&6
11407else
11408  if test -n "$AWK"; then
11409  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11410else
11411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11412for as_dir in $PATH
11413do
11414  IFS=$as_save_IFS
11415  test -z "$as_dir" && as_dir=.
11416    for ac_exec_ext in '' $ac_executable_extensions; do
11417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11418    ac_cv_prog_AWK="$ac_prog"
11419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11420    break 2
11421  fi
11422done
11423  done
11424IFS=$as_save_IFS
11425
11426fi
11427fi
11428AWK=$ac_cv_prog_AWK
11429if test -n "$AWK"; then
11430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11431$as_echo "$AWK" >&6; }
11432else
11433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
11435fi
11436
11437
11438  test -n "$AWK" && break
11439done
11440
11441  else
11442    # The variable is set, but is it from the command line or the environment?
11443
11444    # Try to remove the string !AWK! from our list.
11445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11447      # If it failed, the variable was not from the command line. Ignore it,
11448      # but warn the user (except for BASH, which is always set by the calling BASH).
11449      if test "xAWK" != xBASH; then
11450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11451$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11452      fi
11453      # Try to locate tool using the code snippet
11454      for ac_prog in gawk mawk nawk awk
11455do
11456  # Extract the first word of "$ac_prog", so it can be a program name with args.
11457set dummy $ac_prog; ac_word=$2
11458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11459$as_echo_n "checking for $ac_word... " >&6; }
11460if ${ac_cv_prog_AWK+:} false; then :
11461  $as_echo_n "(cached) " >&6
11462else
11463  if test -n "$AWK"; then
11464  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11465else
11466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11467for as_dir in $PATH
11468do
11469  IFS=$as_save_IFS
11470  test -z "$as_dir" && as_dir=.
11471    for ac_exec_ext in '' $ac_executable_extensions; do
11472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11473    ac_cv_prog_AWK="$ac_prog"
11474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11475    break 2
11476  fi
11477done
11478  done
11479IFS=$as_save_IFS
11480
11481fi
11482fi
11483AWK=$ac_cv_prog_AWK
11484if test -n "$AWK"; then
11485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11486$as_echo "$AWK" >&6; }
11487else
11488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
11490fi
11491
11492
11493  test -n "$AWK" && break
11494done
11495
11496    else
11497      # If it succeeded, then it was overridden by the user. We will use it
11498      # for the tool.
11499
11500      # First remove it from the list of overridden variables, so we can test
11501      # for unknown variables in the end.
11502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11503
11504      # Check if the provided tool contains a complete path.
11505      tool_specified="$AWK"
11506      tool_basename="${tool_specified##*/}"
11507      if test "x$tool_basename" = "x$tool_specified"; then
11508        # A command without a complete path is provided, search $PATH.
11509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11510$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11511        # Extract the first word of "$tool_basename", so it can be a program name with args.
11512set dummy $tool_basename; ac_word=$2
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11514$as_echo_n "checking for $ac_word... " >&6; }
11515if ${ac_cv_path_AWK+:} false; then :
11516  $as_echo_n "(cached) " >&6
11517else
11518  case $AWK in
11519  [\\/]* | ?:[\\/]*)
11520  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11521  ;;
11522  *)
11523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11524for as_dir in $PATH
11525do
11526  IFS=$as_save_IFS
11527  test -z "$as_dir" && as_dir=.
11528    for ac_exec_ext in '' $ac_executable_extensions; do
11529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11530    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11532    break 2
11533  fi
11534done
11535  done
11536IFS=$as_save_IFS
11537
11538  ;;
11539esac
11540fi
11541AWK=$ac_cv_path_AWK
11542if test -n "$AWK"; then
11543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11544$as_echo "$AWK" >&6; }
11545else
11546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11547$as_echo "no" >&6; }
11548fi
11549
11550
11551        if test "x$AWK" = x; then
11552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11553        fi
11554      else
11555        # Otherwise we believe it is a complete path. Use it as it is.
11556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11557$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11559$as_echo_n "checking for AWK... " >&6; }
11560        if test ! -x "$tool_specified"; then
11561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11562$as_echo "not found" >&6; }
11563          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11564        fi
11565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11566$as_echo "$tool_specified" >&6; }
11567      fi
11568    fi
11569  fi
11570
11571
11572  if test "x$AWK" = x; then
11573    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11574  fi
11575
11576
11577
11578
11579  # Publish this variable in the help.
11580
11581
11582  if test "x$GREP" = x; then
11583    # The variable is not set by user, try to locate tool using the code snippet
11584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11585$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11586if ${ac_cv_path_GREP+:} false; then :
11587  $as_echo_n "(cached) " >&6
11588else
11589  if test -z "$GREP"; then
11590  ac_path_GREP_found=false
11591  # Loop through the user's path and test for each of PROGNAME-LIST
11592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11593for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11594do
11595  IFS=$as_save_IFS
11596  test -z "$as_dir" && as_dir=.
11597    for ac_prog in grep ggrep; do
11598    for ac_exec_ext in '' $ac_executable_extensions; do
11599      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11600      as_fn_executable_p "$ac_path_GREP" || continue
11601# Check for GNU ac_path_GREP and select it if it is found.
11602  # Check for GNU $ac_path_GREP
11603case `"$ac_path_GREP" --version 2>&1` in
11604*GNU*)
11605  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11606*)
11607  ac_count=0
11608  $as_echo_n 0123456789 >"conftest.in"
11609  while :
11610  do
11611    cat "conftest.in" "conftest.in" >"conftest.tmp"
11612    mv "conftest.tmp" "conftest.in"
11613    cp "conftest.in" "conftest.nl"
11614    $as_echo 'GREP' >> "conftest.nl"
11615    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11616    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11617    as_fn_arith $ac_count + 1 && ac_count=$as_val
11618    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11619      # Best one so far, save it but keep looking for a better one
11620      ac_cv_path_GREP="$ac_path_GREP"
11621      ac_path_GREP_max=$ac_count
11622    fi
11623    # 10*(2^10) chars as input seems more than enough
11624    test $ac_count -gt 10 && break
11625  done
11626  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11627esac
11628
11629      $ac_path_GREP_found && break 3
11630    done
11631  done
11632  done
11633IFS=$as_save_IFS
11634  if test -z "$ac_cv_path_GREP"; then
11635    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11636  fi
11637else
11638  ac_cv_path_GREP=$GREP
11639fi
11640
11641fi
11642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11643$as_echo "$ac_cv_path_GREP" >&6; }
11644 GREP="$ac_cv_path_GREP"
11645
11646
11647  else
11648    # The variable is set, but is it from the command line or the environment?
11649
11650    # Try to remove the string !GREP! from our list.
11651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11653      # If it failed, the variable was not from the command line. Ignore it,
11654      # but warn the user (except for BASH, which is always set by the calling BASH).
11655      if test "xGREP" != xBASH; then
11656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11657$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11658      fi
11659      # Try to locate tool using the code snippet
11660      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11661$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11662if ${ac_cv_path_GREP+:} false; then :
11663  $as_echo_n "(cached) " >&6
11664else
11665  if test -z "$GREP"; then
11666  ac_path_GREP_found=false
11667  # Loop through the user's path and test for each of PROGNAME-LIST
11668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11669for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11670do
11671  IFS=$as_save_IFS
11672  test -z "$as_dir" && as_dir=.
11673    for ac_prog in grep ggrep; do
11674    for ac_exec_ext in '' $ac_executable_extensions; do
11675      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11676      as_fn_executable_p "$ac_path_GREP" || continue
11677# Check for GNU ac_path_GREP and select it if it is found.
11678  # Check for GNU $ac_path_GREP
11679case `"$ac_path_GREP" --version 2>&1` in
11680*GNU*)
11681  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11682*)
11683  ac_count=0
11684  $as_echo_n 0123456789 >"conftest.in"
11685  while :
11686  do
11687    cat "conftest.in" "conftest.in" >"conftest.tmp"
11688    mv "conftest.tmp" "conftest.in"
11689    cp "conftest.in" "conftest.nl"
11690    $as_echo 'GREP' >> "conftest.nl"
11691    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11692    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11693    as_fn_arith $ac_count + 1 && ac_count=$as_val
11694    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11695      # Best one so far, save it but keep looking for a better one
11696      ac_cv_path_GREP="$ac_path_GREP"
11697      ac_path_GREP_max=$ac_count
11698    fi
11699    # 10*(2^10) chars as input seems more than enough
11700    test $ac_count -gt 10 && break
11701  done
11702  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11703esac
11704
11705      $ac_path_GREP_found && break 3
11706    done
11707  done
11708  done
11709IFS=$as_save_IFS
11710  if test -z "$ac_cv_path_GREP"; then
11711    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11712  fi
11713else
11714  ac_cv_path_GREP=$GREP
11715fi
11716
11717fi
11718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11719$as_echo "$ac_cv_path_GREP" >&6; }
11720 GREP="$ac_cv_path_GREP"
11721
11722
11723    else
11724      # If it succeeded, then it was overridden by the user. We will use it
11725      # for the tool.
11726
11727      # First remove it from the list of overridden variables, so we can test
11728      # for unknown variables in the end.
11729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11730
11731      # Check if the provided tool contains a complete path.
11732      tool_specified="$GREP"
11733      tool_basename="${tool_specified##*/}"
11734      if test "x$tool_basename" = "x$tool_specified"; then
11735        # A command without a complete path is provided, search $PATH.
11736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11737$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11738        # Extract the first word of "$tool_basename", so it can be a program name with args.
11739set dummy $tool_basename; ac_word=$2
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11741$as_echo_n "checking for $ac_word... " >&6; }
11742if ${ac_cv_path_GREP+:} false; then :
11743  $as_echo_n "(cached) " >&6
11744else
11745  case $GREP in
11746  [\\/]* | ?:[\\/]*)
11747  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11748  ;;
11749  *)
11750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11751for as_dir in $PATH
11752do
11753  IFS=$as_save_IFS
11754  test -z "$as_dir" && as_dir=.
11755    for ac_exec_ext in '' $ac_executable_extensions; do
11756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11757    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11759    break 2
11760  fi
11761done
11762  done
11763IFS=$as_save_IFS
11764
11765  ;;
11766esac
11767fi
11768GREP=$ac_cv_path_GREP
11769if test -n "$GREP"; then
11770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11771$as_echo "$GREP" >&6; }
11772else
11773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11774$as_echo "no" >&6; }
11775fi
11776
11777
11778        if test "x$GREP" = x; then
11779          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11780        fi
11781      else
11782        # Otherwise we believe it is a complete path. Use it as it is.
11783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11784$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11786$as_echo_n "checking for GREP... " >&6; }
11787        if test ! -x "$tool_specified"; then
11788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11789$as_echo "not found" >&6; }
11790          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11791        fi
11792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11793$as_echo "$tool_specified" >&6; }
11794      fi
11795    fi
11796  fi
11797
11798
11799  if test "x$GREP" = x; then
11800    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11801  fi
11802
11803
11804
11805
11806  # Publish this variable in the help.
11807
11808
11809  if test "x$EGREP" = x; then
11810    # The variable is not set by user, try to locate tool using the code snippet
11811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11812$as_echo_n "checking for egrep... " >&6; }
11813if ${ac_cv_path_EGREP+:} false; then :
11814  $as_echo_n "(cached) " >&6
11815else
11816  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11817   then ac_cv_path_EGREP="$GREP -E"
11818   else
11819     if test -z "$EGREP"; then
11820  ac_path_EGREP_found=false
11821  # Loop through the user's path and test for each of PROGNAME-LIST
11822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11823for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11824do
11825  IFS=$as_save_IFS
11826  test -z "$as_dir" && as_dir=.
11827    for ac_prog in egrep; do
11828    for ac_exec_ext in '' $ac_executable_extensions; do
11829      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11830      as_fn_executable_p "$ac_path_EGREP" || continue
11831# Check for GNU ac_path_EGREP and select it if it is found.
11832  # Check for GNU $ac_path_EGREP
11833case `"$ac_path_EGREP" --version 2>&1` in
11834*GNU*)
11835  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11836*)
11837  ac_count=0
11838  $as_echo_n 0123456789 >"conftest.in"
11839  while :
11840  do
11841    cat "conftest.in" "conftest.in" >"conftest.tmp"
11842    mv "conftest.tmp" "conftest.in"
11843    cp "conftest.in" "conftest.nl"
11844    $as_echo 'EGREP' >> "conftest.nl"
11845    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11846    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11847    as_fn_arith $ac_count + 1 && ac_count=$as_val
11848    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11849      # Best one so far, save it but keep looking for a better one
11850      ac_cv_path_EGREP="$ac_path_EGREP"
11851      ac_path_EGREP_max=$ac_count
11852    fi
11853    # 10*(2^10) chars as input seems more than enough
11854    test $ac_count -gt 10 && break
11855  done
11856  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11857esac
11858
11859      $ac_path_EGREP_found && break 3
11860    done
11861  done
11862  done
11863IFS=$as_save_IFS
11864  if test -z "$ac_cv_path_EGREP"; then
11865    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11866  fi
11867else
11868  ac_cv_path_EGREP=$EGREP
11869fi
11870
11871   fi
11872fi
11873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11874$as_echo "$ac_cv_path_EGREP" >&6; }
11875 EGREP="$ac_cv_path_EGREP"
11876
11877
11878  else
11879    # The variable is set, but is it from the command line or the environment?
11880
11881    # Try to remove the string !EGREP! from our list.
11882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11884      # If it failed, the variable was not from the command line. Ignore it,
11885      # but warn the user (except for BASH, which is always set by the calling BASH).
11886      if test "xEGREP" != xBASH; then
11887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11888$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11889      fi
11890      # Try to locate tool using the code snippet
11891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11892$as_echo_n "checking for egrep... " >&6; }
11893if ${ac_cv_path_EGREP+:} false; then :
11894  $as_echo_n "(cached) " >&6
11895else
11896  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11897   then ac_cv_path_EGREP="$GREP -E"
11898   else
11899     if test -z "$EGREP"; then
11900  ac_path_EGREP_found=false
11901  # Loop through the user's path and test for each of PROGNAME-LIST
11902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11903for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11904do
11905  IFS=$as_save_IFS
11906  test -z "$as_dir" && as_dir=.
11907    for ac_prog in egrep; do
11908    for ac_exec_ext in '' $ac_executable_extensions; do
11909      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11910      as_fn_executable_p "$ac_path_EGREP" || continue
11911# Check for GNU ac_path_EGREP and select it if it is found.
11912  # Check for GNU $ac_path_EGREP
11913case `"$ac_path_EGREP" --version 2>&1` in
11914*GNU*)
11915  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11916*)
11917  ac_count=0
11918  $as_echo_n 0123456789 >"conftest.in"
11919  while :
11920  do
11921    cat "conftest.in" "conftest.in" >"conftest.tmp"
11922    mv "conftest.tmp" "conftest.in"
11923    cp "conftest.in" "conftest.nl"
11924    $as_echo 'EGREP' >> "conftest.nl"
11925    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11926    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11927    as_fn_arith $ac_count + 1 && ac_count=$as_val
11928    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11929      # Best one so far, save it but keep looking for a better one
11930      ac_cv_path_EGREP="$ac_path_EGREP"
11931      ac_path_EGREP_max=$ac_count
11932    fi
11933    # 10*(2^10) chars as input seems more than enough
11934    test $ac_count -gt 10 && break
11935  done
11936  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11937esac
11938
11939      $ac_path_EGREP_found && break 3
11940    done
11941  done
11942  done
11943IFS=$as_save_IFS
11944  if test -z "$ac_cv_path_EGREP"; then
11945    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11946  fi
11947else
11948  ac_cv_path_EGREP=$EGREP
11949fi
11950
11951   fi
11952fi
11953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11954$as_echo "$ac_cv_path_EGREP" >&6; }
11955 EGREP="$ac_cv_path_EGREP"
11956
11957
11958    else
11959      # If it succeeded, then it was overridden by the user. We will use it
11960      # for the tool.
11961
11962      # First remove it from the list of overridden variables, so we can test
11963      # for unknown variables in the end.
11964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11965
11966      # Check if the provided tool contains a complete path.
11967      tool_specified="$EGREP"
11968      tool_basename="${tool_specified##*/}"
11969      if test "x$tool_basename" = "x$tool_specified"; then
11970        # A command without a complete path is provided, search $PATH.
11971        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11972$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11973        # Extract the first word of "$tool_basename", so it can be a program name with args.
11974set dummy $tool_basename; ac_word=$2
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11976$as_echo_n "checking for $ac_word... " >&6; }
11977if ${ac_cv_path_EGREP+:} false; then :
11978  $as_echo_n "(cached) " >&6
11979else
11980  case $EGREP in
11981  [\\/]* | ?:[\\/]*)
11982  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11983  ;;
11984  *)
11985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11986for as_dir in $PATH
11987do
11988  IFS=$as_save_IFS
11989  test -z "$as_dir" && as_dir=.
11990    for ac_exec_ext in '' $ac_executable_extensions; do
11991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11992    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11994    break 2
11995  fi
11996done
11997  done
11998IFS=$as_save_IFS
11999
12000  ;;
12001esac
12002fi
12003EGREP=$ac_cv_path_EGREP
12004if test -n "$EGREP"; then
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12006$as_echo "$EGREP" >&6; }
12007else
12008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010fi
12011
12012
12013        if test "x$EGREP" = x; then
12014          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12015        fi
12016      else
12017        # Otherwise we believe it is a complete path. Use it as it is.
12018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12019$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12021$as_echo_n "checking for EGREP... " >&6; }
12022        if test ! -x "$tool_specified"; then
12023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12024$as_echo "not found" >&6; }
12025          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12026        fi
12027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12028$as_echo "$tool_specified" >&6; }
12029      fi
12030    fi
12031  fi
12032
12033
12034  if test "x$EGREP" = x; then
12035    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12036  fi
12037
12038
12039
12040
12041  # Publish this variable in the help.
12042
12043
12044  if test "x$FGREP" = x; then
12045    # The variable is not set by user, try to locate tool using the code snippet
12046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12047$as_echo_n "checking for fgrep... " >&6; }
12048if ${ac_cv_path_FGREP+:} false; then :
12049  $as_echo_n "(cached) " >&6
12050else
12051  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12052   then ac_cv_path_FGREP="$GREP -F"
12053   else
12054     if test -z "$FGREP"; then
12055  ac_path_FGREP_found=false
12056  # Loop through the user's path and test for each of PROGNAME-LIST
12057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12058for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12059do
12060  IFS=$as_save_IFS
12061  test -z "$as_dir" && as_dir=.
12062    for ac_prog in fgrep; do
12063    for ac_exec_ext in '' $ac_executable_extensions; do
12064      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12065      as_fn_executable_p "$ac_path_FGREP" || continue
12066# Check for GNU ac_path_FGREP and select it if it is found.
12067  # Check for GNU $ac_path_FGREP
12068case `"$ac_path_FGREP" --version 2>&1` in
12069*GNU*)
12070  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12071*)
12072  ac_count=0
12073  $as_echo_n 0123456789 >"conftest.in"
12074  while :
12075  do
12076    cat "conftest.in" "conftest.in" >"conftest.tmp"
12077    mv "conftest.tmp" "conftest.in"
12078    cp "conftest.in" "conftest.nl"
12079    $as_echo 'FGREP' >> "conftest.nl"
12080    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12081    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12082    as_fn_arith $ac_count + 1 && ac_count=$as_val
12083    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12084      # Best one so far, save it but keep looking for a better one
12085      ac_cv_path_FGREP="$ac_path_FGREP"
12086      ac_path_FGREP_max=$ac_count
12087    fi
12088    # 10*(2^10) chars as input seems more than enough
12089    test $ac_count -gt 10 && break
12090  done
12091  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12092esac
12093
12094      $ac_path_FGREP_found && break 3
12095    done
12096  done
12097  done
12098IFS=$as_save_IFS
12099  if test -z "$ac_cv_path_FGREP"; then
12100    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12101  fi
12102else
12103  ac_cv_path_FGREP=$FGREP
12104fi
12105
12106   fi
12107fi
12108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12109$as_echo "$ac_cv_path_FGREP" >&6; }
12110 FGREP="$ac_cv_path_FGREP"
12111
12112
12113  else
12114    # The variable is set, but is it from the command line or the environment?
12115
12116    # Try to remove the string !FGREP! from our list.
12117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12119      # If it failed, the variable was not from the command line. Ignore it,
12120      # but warn the user (except for BASH, which is always set by the calling BASH).
12121      if test "xFGREP" != xBASH; then
12122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12123$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12124      fi
12125      # Try to locate tool using the code snippet
12126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12127$as_echo_n "checking for fgrep... " >&6; }
12128if ${ac_cv_path_FGREP+:} false; then :
12129  $as_echo_n "(cached) " >&6
12130else
12131  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12132   then ac_cv_path_FGREP="$GREP -F"
12133   else
12134     if test -z "$FGREP"; then
12135  ac_path_FGREP_found=false
12136  # Loop through the user's path and test for each of PROGNAME-LIST
12137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12138for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12139do
12140  IFS=$as_save_IFS
12141  test -z "$as_dir" && as_dir=.
12142    for ac_prog in fgrep; do
12143    for ac_exec_ext in '' $ac_executable_extensions; do
12144      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12145      as_fn_executable_p "$ac_path_FGREP" || continue
12146# Check for GNU ac_path_FGREP and select it if it is found.
12147  # Check for GNU $ac_path_FGREP
12148case `"$ac_path_FGREP" --version 2>&1` in
12149*GNU*)
12150  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12151*)
12152  ac_count=0
12153  $as_echo_n 0123456789 >"conftest.in"
12154  while :
12155  do
12156    cat "conftest.in" "conftest.in" >"conftest.tmp"
12157    mv "conftest.tmp" "conftest.in"
12158    cp "conftest.in" "conftest.nl"
12159    $as_echo 'FGREP' >> "conftest.nl"
12160    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12161    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12162    as_fn_arith $ac_count + 1 && ac_count=$as_val
12163    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12164      # Best one so far, save it but keep looking for a better one
12165      ac_cv_path_FGREP="$ac_path_FGREP"
12166      ac_path_FGREP_max=$ac_count
12167    fi
12168    # 10*(2^10) chars as input seems more than enough
12169    test $ac_count -gt 10 && break
12170  done
12171  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12172esac
12173
12174      $ac_path_FGREP_found && break 3
12175    done
12176  done
12177  done
12178IFS=$as_save_IFS
12179  if test -z "$ac_cv_path_FGREP"; then
12180    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12181  fi
12182else
12183  ac_cv_path_FGREP=$FGREP
12184fi
12185
12186   fi
12187fi
12188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12189$as_echo "$ac_cv_path_FGREP" >&6; }
12190 FGREP="$ac_cv_path_FGREP"
12191
12192
12193    else
12194      # If it succeeded, then it was overridden by the user. We will use it
12195      # for the tool.
12196
12197      # First remove it from the list of overridden variables, so we can test
12198      # for unknown variables in the end.
12199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12200
12201      # Check if the provided tool contains a complete path.
12202      tool_specified="$FGREP"
12203      tool_basename="${tool_specified##*/}"
12204      if test "x$tool_basename" = "x$tool_specified"; then
12205        # A command without a complete path is provided, search $PATH.
12206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12207$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12208        # Extract the first word of "$tool_basename", so it can be a program name with args.
12209set dummy $tool_basename; ac_word=$2
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12211$as_echo_n "checking for $ac_word... " >&6; }
12212if ${ac_cv_path_FGREP+:} false; then :
12213  $as_echo_n "(cached) " >&6
12214else
12215  case $FGREP in
12216  [\\/]* | ?:[\\/]*)
12217  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12218  ;;
12219  *)
12220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12221for as_dir in $PATH
12222do
12223  IFS=$as_save_IFS
12224  test -z "$as_dir" && as_dir=.
12225    for ac_exec_ext in '' $ac_executable_extensions; do
12226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12227    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12229    break 2
12230  fi
12231done
12232  done
12233IFS=$as_save_IFS
12234
12235  ;;
12236esac
12237fi
12238FGREP=$ac_cv_path_FGREP
12239if test -n "$FGREP"; then
12240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12241$as_echo "$FGREP" >&6; }
12242else
12243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12244$as_echo "no" >&6; }
12245fi
12246
12247
12248        if test "x$FGREP" = x; then
12249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12250        fi
12251      else
12252        # Otherwise we believe it is a complete path. Use it as it is.
12253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12254$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12256$as_echo_n "checking for FGREP... " >&6; }
12257        if test ! -x "$tool_specified"; then
12258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12259$as_echo "not found" >&6; }
12260          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12261        fi
12262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12263$as_echo "$tool_specified" >&6; }
12264      fi
12265    fi
12266  fi
12267
12268
12269  if test "x$FGREP" = x; then
12270    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12271  fi
12272
12273
12274
12275
12276  # Publish this variable in the help.
12277
12278
12279  if test "x$SED" = x; then
12280    # The variable is not set by user, try to locate tool using the code snippet
12281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12282$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12283if ${ac_cv_path_SED+:} false; then :
12284  $as_echo_n "(cached) " >&6
12285else
12286            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12287     for ac_i in 1 2 3 4 5 6 7; do
12288       ac_script="$ac_script$as_nl$ac_script"
12289     done
12290     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12291     { ac_script=; unset ac_script;}
12292     if test -z "$SED"; then
12293  ac_path_SED_found=false
12294  # Loop through the user's path and test for each of PROGNAME-LIST
12295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12296for as_dir in $PATH
12297do
12298  IFS=$as_save_IFS
12299  test -z "$as_dir" && as_dir=.
12300    for ac_prog in sed gsed; do
12301    for ac_exec_ext in '' $ac_executable_extensions; do
12302      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12303      as_fn_executable_p "$ac_path_SED" || continue
12304# Check for GNU ac_path_SED and select it if it is found.
12305  # Check for GNU $ac_path_SED
12306case `"$ac_path_SED" --version 2>&1` in
12307*GNU*)
12308  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12309*)
12310  ac_count=0
12311  $as_echo_n 0123456789 >"conftest.in"
12312  while :
12313  do
12314    cat "conftest.in" "conftest.in" >"conftest.tmp"
12315    mv "conftest.tmp" "conftest.in"
12316    cp "conftest.in" "conftest.nl"
12317    $as_echo '' >> "conftest.nl"
12318    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12319    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12320    as_fn_arith $ac_count + 1 && ac_count=$as_val
12321    if test $ac_count -gt ${ac_path_SED_max-0}; then
12322      # Best one so far, save it but keep looking for a better one
12323      ac_cv_path_SED="$ac_path_SED"
12324      ac_path_SED_max=$ac_count
12325    fi
12326    # 10*(2^10) chars as input seems more than enough
12327    test $ac_count -gt 10 && break
12328  done
12329  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12330esac
12331
12332      $ac_path_SED_found && break 3
12333    done
12334  done
12335  done
12336IFS=$as_save_IFS
12337  if test -z "$ac_cv_path_SED"; then
12338    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12339  fi
12340else
12341  ac_cv_path_SED=$SED
12342fi
12343
12344fi
12345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12346$as_echo "$ac_cv_path_SED" >&6; }
12347 SED="$ac_cv_path_SED"
12348  rm -f conftest.sed
12349
12350  else
12351    # The variable is set, but is it from the command line or the environment?
12352
12353    # Try to remove the string !SED! from our list.
12354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12356      # If it failed, the variable was not from the command line. Ignore it,
12357      # but warn the user (except for BASH, which is always set by the calling BASH).
12358      if test "xSED" != xBASH; then
12359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12360$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12361      fi
12362      # Try to locate tool using the code snippet
12363      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12364$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12365if ${ac_cv_path_SED+:} false; then :
12366  $as_echo_n "(cached) " >&6
12367else
12368            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12369     for ac_i in 1 2 3 4 5 6 7; do
12370       ac_script="$ac_script$as_nl$ac_script"
12371     done
12372     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12373     { ac_script=; unset ac_script;}
12374     if test -z "$SED"; then
12375  ac_path_SED_found=false
12376  # Loop through the user's path and test for each of PROGNAME-LIST
12377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12378for as_dir in $PATH
12379do
12380  IFS=$as_save_IFS
12381  test -z "$as_dir" && as_dir=.
12382    for ac_prog in sed gsed; do
12383    for ac_exec_ext in '' $ac_executable_extensions; do
12384      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12385      as_fn_executable_p "$ac_path_SED" || continue
12386# Check for GNU ac_path_SED and select it if it is found.
12387  # Check for GNU $ac_path_SED
12388case `"$ac_path_SED" --version 2>&1` in
12389*GNU*)
12390  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12391*)
12392  ac_count=0
12393  $as_echo_n 0123456789 >"conftest.in"
12394  while :
12395  do
12396    cat "conftest.in" "conftest.in" >"conftest.tmp"
12397    mv "conftest.tmp" "conftest.in"
12398    cp "conftest.in" "conftest.nl"
12399    $as_echo '' >> "conftest.nl"
12400    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12401    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12402    as_fn_arith $ac_count + 1 && ac_count=$as_val
12403    if test $ac_count -gt ${ac_path_SED_max-0}; then
12404      # Best one so far, save it but keep looking for a better one
12405      ac_cv_path_SED="$ac_path_SED"
12406      ac_path_SED_max=$ac_count
12407    fi
12408    # 10*(2^10) chars as input seems more than enough
12409    test $ac_count -gt 10 && break
12410  done
12411  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12412esac
12413
12414      $ac_path_SED_found && break 3
12415    done
12416  done
12417  done
12418IFS=$as_save_IFS
12419  if test -z "$ac_cv_path_SED"; then
12420    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12421  fi
12422else
12423  ac_cv_path_SED=$SED
12424fi
12425
12426fi
12427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12428$as_echo "$ac_cv_path_SED" >&6; }
12429 SED="$ac_cv_path_SED"
12430  rm -f conftest.sed
12431
12432    else
12433      # If it succeeded, then it was overridden by the user. We will use it
12434      # for the tool.
12435
12436      # First remove it from the list of overridden variables, so we can test
12437      # for unknown variables in the end.
12438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12439
12440      # Check if the provided tool contains a complete path.
12441      tool_specified="$SED"
12442      tool_basename="${tool_specified##*/}"
12443      if test "x$tool_basename" = "x$tool_specified"; then
12444        # A command without a complete path is provided, search $PATH.
12445        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12446$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12447        # Extract the first word of "$tool_basename", so it can be a program name with args.
12448set dummy $tool_basename; ac_word=$2
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12450$as_echo_n "checking for $ac_word... " >&6; }
12451if ${ac_cv_path_SED+:} false; then :
12452  $as_echo_n "(cached) " >&6
12453else
12454  case $SED in
12455  [\\/]* | ?:[\\/]*)
12456  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12457  ;;
12458  *)
12459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12460for as_dir in $PATH
12461do
12462  IFS=$as_save_IFS
12463  test -z "$as_dir" && as_dir=.
12464    for ac_exec_ext in '' $ac_executable_extensions; do
12465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12466    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12468    break 2
12469  fi
12470done
12471  done
12472IFS=$as_save_IFS
12473
12474  ;;
12475esac
12476fi
12477SED=$ac_cv_path_SED
12478if test -n "$SED"; then
12479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12480$as_echo "$SED" >&6; }
12481else
12482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12483$as_echo "no" >&6; }
12484fi
12485
12486
12487        if test "x$SED" = x; then
12488          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12489        fi
12490      else
12491        # Otherwise we believe it is a complete path. Use it as it is.
12492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12493$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12495$as_echo_n "checking for SED... " >&6; }
12496        if test ! -x "$tool_specified"; then
12497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12498$as_echo "not found" >&6; }
12499          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12500        fi
12501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12502$as_echo "$tool_specified" >&6; }
12503      fi
12504    fi
12505  fi
12506
12507
12508  if test "x$SED" = x; then
12509    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12510  fi
12511
12512
12513
12514  # Always force rm.
12515  RM="$RM -f"
12516
12517  # pwd behaves differently on various platforms and some don't support the -L flag.
12518  # Always use the bash builtin pwd to get uniform behavior.
12519  THEPWDCMD=pwd
12520
12521  # These are not required on all platforms
12522
12523
12524  # Publish this variable in the help.
12525
12526
12527  if test "x$CYGPATH" = x; then
12528    # The variable is not set by user, try to locate tool using the code snippet
12529    for ac_prog in cygpath
12530do
12531  # Extract the first word of "$ac_prog", so it can be a program name with args.
12532set dummy $ac_prog; ac_word=$2
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12534$as_echo_n "checking for $ac_word... " >&6; }
12535if ${ac_cv_path_CYGPATH+:} false; then :
12536  $as_echo_n "(cached) " >&6
12537else
12538  case $CYGPATH in
12539  [\\/]* | ?:[\\/]*)
12540  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12541  ;;
12542  *)
12543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12544for as_dir in $PATH
12545do
12546  IFS=$as_save_IFS
12547  test -z "$as_dir" && as_dir=.
12548    for ac_exec_ext in '' $ac_executable_extensions; do
12549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12550    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12552    break 2
12553  fi
12554done
12555  done
12556IFS=$as_save_IFS
12557
12558  ;;
12559esac
12560fi
12561CYGPATH=$ac_cv_path_CYGPATH
12562if test -n "$CYGPATH"; then
12563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12564$as_echo "$CYGPATH" >&6; }
12565else
12566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
12568fi
12569
12570
12571  test -n "$CYGPATH" && break
12572done
12573
12574  else
12575    # The variable is set, but is it from the command line or the environment?
12576
12577    # Try to remove the string !CYGPATH! from our list.
12578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12580      # If it failed, the variable was not from the command line. Ignore it,
12581      # but warn the user (except for BASH, which is always set by the calling BASH).
12582      if test "xCYGPATH" != xBASH; then
12583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12584$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12585      fi
12586      # Try to locate tool using the code snippet
12587      for ac_prog in cygpath
12588do
12589  # Extract the first word of "$ac_prog", so it can be a program name with args.
12590set dummy $ac_prog; ac_word=$2
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12592$as_echo_n "checking for $ac_word... " >&6; }
12593if ${ac_cv_path_CYGPATH+:} false; then :
12594  $as_echo_n "(cached) " >&6
12595else
12596  case $CYGPATH in
12597  [\\/]* | ?:[\\/]*)
12598  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12599  ;;
12600  *)
12601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12602for as_dir in $PATH
12603do
12604  IFS=$as_save_IFS
12605  test -z "$as_dir" && as_dir=.
12606    for ac_exec_ext in '' $ac_executable_extensions; do
12607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12608    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12610    break 2
12611  fi
12612done
12613  done
12614IFS=$as_save_IFS
12615
12616  ;;
12617esac
12618fi
12619CYGPATH=$ac_cv_path_CYGPATH
12620if test -n "$CYGPATH"; then
12621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12622$as_echo "$CYGPATH" >&6; }
12623else
12624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12625$as_echo "no" >&6; }
12626fi
12627
12628
12629  test -n "$CYGPATH" && break
12630done
12631
12632    else
12633      # If it succeeded, then it was overridden by the user. We will use it
12634      # for the tool.
12635
12636      # First remove it from the list of overridden variables, so we can test
12637      # for unknown variables in the end.
12638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12639
12640      # Check if the provided tool contains a complete path.
12641      tool_specified="$CYGPATH"
12642      tool_basename="${tool_specified##*/}"
12643      if test "x$tool_basename" = "x$tool_specified"; then
12644        # A command without a complete path is provided, search $PATH.
12645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12646$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12647        # Extract the first word of "$tool_basename", so it can be a program name with args.
12648set dummy $tool_basename; ac_word=$2
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12650$as_echo_n "checking for $ac_word... " >&6; }
12651if ${ac_cv_path_CYGPATH+:} false; then :
12652  $as_echo_n "(cached) " >&6
12653else
12654  case $CYGPATH in
12655  [\\/]* | ?:[\\/]*)
12656  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12657  ;;
12658  *)
12659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12660for as_dir in $PATH
12661do
12662  IFS=$as_save_IFS
12663  test -z "$as_dir" && as_dir=.
12664    for ac_exec_ext in '' $ac_executable_extensions; do
12665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12666    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12668    break 2
12669  fi
12670done
12671  done
12672IFS=$as_save_IFS
12673
12674  ;;
12675esac
12676fi
12677CYGPATH=$ac_cv_path_CYGPATH
12678if test -n "$CYGPATH"; then
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12680$as_echo "$CYGPATH" >&6; }
12681else
12682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683$as_echo "no" >&6; }
12684fi
12685
12686
12687        if test "x$CYGPATH" = x; then
12688          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12689        fi
12690      else
12691        # Otherwise we believe it is a complete path. Use it as it is.
12692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12693$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12695$as_echo_n "checking for CYGPATH... " >&6; }
12696        if test ! -x "$tool_specified"; then
12697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12698$as_echo "not found" >&6; }
12699          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12700        fi
12701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12702$as_echo "$tool_specified" >&6; }
12703      fi
12704    fi
12705  fi
12706
12707
12708
12709
12710  # Publish this variable in the help.
12711
12712
12713  if test "x$READLINK" = x; then
12714    # The variable is not set by user, try to locate tool using the code snippet
12715    for ac_prog in greadlink readlink
12716do
12717  # Extract the first word of "$ac_prog", so it can be a program name with args.
12718set dummy $ac_prog; ac_word=$2
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12720$as_echo_n "checking for $ac_word... " >&6; }
12721if ${ac_cv_path_READLINK+:} false; then :
12722  $as_echo_n "(cached) " >&6
12723else
12724  case $READLINK in
12725  [\\/]* | ?:[\\/]*)
12726  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12727  ;;
12728  *)
12729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12730for as_dir in $PATH
12731do
12732  IFS=$as_save_IFS
12733  test -z "$as_dir" && as_dir=.
12734    for ac_exec_ext in '' $ac_executable_extensions; do
12735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12736    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12738    break 2
12739  fi
12740done
12741  done
12742IFS=$as_save_IFS
12743
12744  ;;
12745esac
12746fi
12747READLINK=$ac_cv_path_READLINK
12748if test -n "$READLINK"; then
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12750$as_echo "$READLINK" >&6; }
12751else
12752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12753$as_echo "no" >&6; }
12754fi
12755
12756
12757  test -n "$READLINK" && break
12758done
12759
12760  else
12761    # The variable is set, but is it from the command line or the environment?
12762
12763    # Try to remove the string !READLINK! from our list.
12764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12766      # If it failed, the variable was not from the command line. Ignore it,
12767      # but warn the user (except for BASH, which is always set by the calling BASH).
12768      if test "xREADLINK" != xBASH; then
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12770$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12771      fi
12772      # Try to locate tool using the code snippet
12773      for ac_prog in greadlink readlink
12774do
12775  # Extract the first word of "$ac_prog", so it can be a program name with args.
12776set dummy $ac_prog; ac_word=$2
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12778$as_echo_n "checking for $ac_word... " >&6; }
12779if ${ac_cv_path_READLINK+:} false; then :
12780  $as_echo_n "(cached) " >&6
12781else
12782  case $READLINK in
12783  [\\/]* | ?:[\\/]*)
12784  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12785  ;;
12786  *)
12787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12788for as_dir in $PATH
12789do
12790  IFS=$as_save_IFS
12791  test -z "$as_dir" && as_dir=.
12792    for ac_exec_ext in '' $ac_executable_extensions; do
12793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12794    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12796    break 2
12797  fi
12798done
12799  done
12800IFS=$as_save_IFS
12801
12802  ;;
12803esac
12804fi
12805READLINK=$ac_cv_path_READLINK
12806if test -n "$READLINK"; then
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12808$as_echo "$READLINK" >&6; }
12809else
12810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12811$as_echo "no" >&6; }
12812fi
12813
12814
12815  test -n "$READLINK" && break
12816done
12817
12818    else
12819      # If it succeeded, then it was overridden by the user. We will use it
12820      # for the tool.
12821
12822      # First remove it from the list of overridden variables, so we can test
12823      # for unknown variables in the end.
12824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12825
12826      # Check if the provided tool contains a complete path.
12827      tool_specified="$READLINK"
12828      tool_basename="${tool_specified##*/}"
12829      if test "x$tool_basename" = "x$tool_specified"; then
12830        # A command without a complete path is provided, search $PATH.
12831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12832$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12833        # Extract the first word of "$tool_basename", so it can be a program name with args.
12834set dummy $tool_basename; ac_word=$2
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12836$as_echo_n "checking for $ac_word... " >&6; }
12837if ${ac_cv_path_READLINK+:} false; then :
12838  $as_echo_n "(cached) " >&6
12839else
12840  case $READLINK in
12841  [\\/]* | ?:[\\/]*)
12842  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12843  ;;
12844  *)
12845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12846for as_dir in $PATH
12847do
12848  IFS=$as_save_IFS
12849  test -z "$as_dir" && as_dir=.
12850    for ac_exec_ext in '' $ac_executable_extensions; do
12851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12852    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12854    break 2
12855  fi
12856done
12857  done
12858IFS=$as_save_IFS
12859
12860  ;;
12861esac
12862fi
12863READLINK=$ac_cv_path_READLINK
12864if test -n "$READLINK"; then
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12866$as_echo "$READLINK" >&6; }
12867else
12868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12869$as_echo "no" >&6; }
12870fi
12871
12872
12873        if test "x$READLINK" = x; then
12874          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12875        fi
12876      else
12877        # Otherwise we believe it is a complete path. Use it as it is.
12878        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12879$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12881$as_echo_n "checking for READLINK... " >&6; }
12882        if test ! -x "$tool_specified"; then
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12884$as_echo "not found" >&6; }
12885          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12886        fi
12887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12888$as_echo "$tool_specified" >&6; }
12889      fi
12890    fi
12891  fi
12892
12893
12894
12895
12896  # Publish this variable in the help.
12897
12898
12899  if test "x$DF" = x; then
12900    # The variable is not set by user, try to locate tool using the code snippet
12901    for ac_prog in df
12902do
12903  # Extract the first word of "$ac_prog", so it can be a program name with args.
12904set dummy $ac_prog; ac_word=$2
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12906$as_echo_n "checking for $ac_word... " >&6; }
12907if ${ac_cv_path_DF+:} false; then :
12908  $as_echo_n "(cached) " >&6
12909else
12910  case $DF in
12911  [\\/]* | ?:[\\/]*)
12912  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12913  ;;
12914  *)
12915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12916for as_dir in $PATH
12917do
12918  IFS=$as_save_IFS
12919  test -z "$as_dir" && as_dir=.
12920    for ac_exec_ext in '' $ac_executable_extensions; do
12921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12922    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12924    break 2
12925  fi
12926done
12927  done
12928IFS=$as_save_IFS
12929
12930  ;;
12931esac
12932fi
12933DF=$ac_cv_path_DF
12934if test -n "$DF"; then
12935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12936$as_echo "$DF" >&6; }
12937else
12938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12939$as_echo "no" >&6; }
12940fi
12941
12942
12943  test -n "$DF" && break
12944done
12945
12946  else
12947    # The variable is set, but is it from the command line or the environment?
12948
12949    # Try to remove the string !DF! from our list.
12950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12952      # If it failed, the variable was not from the command line. Ignore it,
12953      # but warn the user (except for BASH, which is always set by the calling BASH).
12954      if test "xDF" != xBASH; then
12955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12956$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12957      fi
12958      # Try to locate tool using the code snippet
12959      for ac_prog in df
12960do
12961  # Extract the first word of "$ac_prog", so it can be a program name with args.
12962set dummy $ac_prog; ac_word=$2
12963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12964$as_echo_n "checking for $ac_word... " >&6; }
12965if ${ac_cv_path_DF+:} false; then :
12966  $as_echo_n "(cached) " >&6
12967else
12968  case $DF in
12969  [\\/]* | ?:[\\/]*)
12970  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12971  ;;
12972  *)
12973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12974for as_dir in $PATH
12975do
12976  IFS=$as_save_IFS
12977  test -z "$as_dir" && as_dir=.
12978    for ac_exec_ext in '' $ac_executable_extensions; do
12979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12980    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12982    break 2
12983  fi
12984done
12985  done
12986IFS=$as_save_IFS
12987
12988  ;;
12989esac
12990fi
12991DF=$ac_cv_path_DF
12992if test -n "$DF"; then
12993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12994$as_echo "$DF" >&6; }
12995else
12996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12997$as_echo "no" >&6; }
12998fi
12999
13000
13001  test -n "$DF" && break
13002done
13003
13004    else
13005      # If it succeeded, then it was overridden by the user. We will use it
13006      # for the tool.
13007
13008      # First remove it from the list of overridden variables, so we can test
13009      # for unknown variables in the end.
13010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13011
13012      # Check if the provided tool contains a complete path.
13013      tool_specified="$DF"
13014      tool_basename="${tool_specified##*/}"
13015      if test "x$tool_basename" = "x$tool_specified"; then
13016        # A command without a complete path is provided, search $PATH.
13017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13018$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13019        # Extract the first word of "$tool_basename", so it can be a program name with args.
13020set dummy $tool_basename; ac_word=$2
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13022$as_echo_n "checking for $ac_word... " >&6; }
13023if ${ac_cv_path_DF+:} false; then :
13024  $as_echo_n "(cached) " >&6
13025else
13026  case $DF in
13027  [\\/]* | ?:[\\/]*)
13028  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13029  ;;
13030  *)
13031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13032for as_dir in $PATH
13033do
13034  IFS=$as_save_IFS
13035  test -z "$as_dir" && as_dir=.
13036    for ac_exec_ext in '' $ac_executable_extensions; do
13037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13038    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13040    break 2
13041  fi
13042done
13043  done
13044IFS=$as_save_IFS
13045
13046  ;;
13047esac
13048fi
13049DF=$ac_cv_path_DF
13050if test -n "$DF"; then
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13052$as_echo "$DF" >&6; }
13053else
13054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13055$as_echo "no" >&6; }
13056fi
13057
13058
13059        if test "x$DF" = x; then
13060          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13061        fi
13062      else
13063        # Otherwise we believe it is a complete path. Use it as it is.
13064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13065$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13067$as_echo_n "checking for DF... " >&6; }
13068        if test ! -x "$tool_specified"; then
13069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13070$as_echo "not found" >&6; }
13071          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13072        fi
13073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13074$as_echo "$tool_specified" >&6; }
13075      fi
13076    fi
13077  fi
13078
13079
13080
13081
13082  # Publish this variable in the help.
13083
13084
13085  if test "x$SETFILE" = x; then
13086    # The variable is not set by user, try to locate tool using the code snippet
13087    for ac_prog in SetFile
13088do
13089  # Extract the first word of "$ac_prog", so it can be a program name with args.
13090set dummy $ac_prog; ac_word=$2
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13092$as_echo_n "checking for $ac_word... " >&6; }
13093if ${ac_cv_path_SETFILE+:} false; then :
13094  $as_echo_n "(cached) " >&6
13095else
13096  case $SETFILE in
13097  [\\/]* | ?:[\\/]*)
13098  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13099  ;;
13100  *)
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_exec_ext in '' $ac_executable_extensions; do
13107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13108    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13110    break 2
13111  fi
13112done
13113  done
13114IFS=$as_save_IFS
13115
13116  ;;
13117esac
13118fi
13119SETFILE=$ac_cv_path_SETFILE
13120if test -n "$SETFILE"; then
13121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13122$as_echo "$SETFILE" >&6; }
13123else
13124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13125$as_echo "no" >&6; }
13126fi
13127
13128
13129  test -n "$SETFILE" && break
13130done
13131
13132  else
13133    # The variable is set, but is it from the command line or the environment?
13134
13135    # Try to remove the string !SETFILE! from our list.
13136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13138      # If it failed, the variable was not from the command line. Ignore it,
13139      # but warn the user (except for BASH, which is always set by the calling BASH).
13140      if test "xSETFILE" != xBASH; then
13141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13142$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13143      fi
13144      # Try to locate tool using the code snippet
13145      for ac_prog in SetFile
13146do
13147  # Extract the first word of "$ac_prog", so it can be a program name with args.
13148set dummy $ac_prog; ac_word=$2
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13150$as_echo_n "checking for $ac_word... " >&6; }
13151if ${ac_cv_path_SETFILE+:} false; then :
13152  $as_echo_n "(cached) " >&6
13153else
13154  case $SETFILE in
13155  [\\/]* | ?:[\\/]*)
13156  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13157  ;;
13158  *)
13159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13160for as_dir in $PATH
13161do
13162  IFS=$as_save_IFS
13163  test -z "$as_dir" && as_dir=.
13164    for ac_exec_ext in '' $ac_executable_extensions; do
13165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13166    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13168    break 2
13169  fi
13170done
13171  done
13172IFS=$as_save_IFS
13173
13174  ;;
13175esac
13176fi
13177SETFILE=$ac_cv_path_SETFILE
13178if test -n "$SETFILE"; then
13179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13180$as_echo "$SETFILE" >&6; }
13181else
13182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13183$as_echo "no" >&6; }
13184fi
13185
13186
13187  test -n "$SETFILE" && break
13188done
13189
13190    else
13191      # If it succeeded, then it was overridden by the user. We will use it
13192      # for the tool.
13193
13194      # First remove it from the list of overridden variables, so we can test
13195      # for unknown variables in the end.
13196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13197
13198      # Check if the provided tool contains a complete path.
13199      tool_specified="$SETFILE"
13200      tool_basename="${tool_specified##*/}"
13201      if test "x$tool_basename" = "x$tool_specified"; then
13202        # A command without a complete path is provided, search $PATH.
13203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13204$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13205        # Extract the first word of "$tool_basename", so it can be a program name with args.
13206set dummy $tool_basename; ac_word=$2
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13208$as_echo_n "checking for $ac_word... " >&6; }
13209if ${ac_cv_path_SETFILE+:} false; then :
13210  $as_echo_n "(cached) " >&6
13211else
13212  case $SETFILE in
13213  [\\/]* | ?:[\\/]*)
13214  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13215  ;;
13216  *)
13217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13218for as_dir in $PATH
13219do
13220  IFS=$as_save_IFS
13221  test -z "$as_dir" && as_dir=.
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13224    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13226    break 2
13227  fi
13228done
13229  done
13230IFS=$as_save_IFS
13231
13232  ;;
13233esac
13234fi
13235SETFILE=$ac_cv_path_SETFILE
13236if test -n "$SETFILE"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13238$as_echo "$SETFILE" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245        if test "x$SETFILE" = x; then
13246          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13247        fi
13248      else
13249        # Otherwise we believe it is a complete path. Use it as it is.
13250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13251$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13253$as_echo_n "checking for SETFILE... " >&6; }
13254        if test ! -x "$tool_specified"; then
13255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13256$as_echo "not found" >&6; }
13257          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13258        fi
13259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13260$as_echo "$tool_specified" >&6; }
13261      fi
13262    fi
13263  fi
13264
13265
13266
13267
13268  # Publish this variable in the help.
13269
13270
13271  if test "x$CPIO" = x; then
13272    # The variable is not set by user, try to locate tool using the code snippet
13273    for ac_prog in cpio bsdcpio
13274do
13275  # Extract the first word of "$ac_prog", so it can be a program name with args.
13276set dummy $ac_prog; ac_word=$2
13277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13278$as_echo_n "checking for $ac_word... " >&6; }
13279if ${ac_cv_path_CPIO+:} false; then :
13280  $as_echo_n "(cached) " >&6
13281else
13282  case $CPIO in
13283  [\\/]* | ?:[\\/]*)
13284  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13285  ;;
13286  *)
13287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13288for as_dir in $PATH
13289do
13290  IFS=$as_save_IFS
13291  test -z "$as_dir" && as_dir=.
13292    for ac_exec_ext in '' $ac_executable_extensions; do
13293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13294    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13296    break 2
13297  fi
13298done
13299  done
13300IFS=$as_save_IFS
13301
13302  ;;
13303esac
13304fi
13305CPIO=$ac_cv_path_CPIO
13306if test -n "$CPIO"; then
13307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13308$as_echo "$CPIO" >&6; }
13309else
13310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
13312fi
13313
13314
13315  test -n "$CPIO" && break
13316done
13317
13318  else
13319    # The variable is set, but is it from the command line or the environment?
13320
13321    # Try to remove the string !CPIO! from our list.
13322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13324      # If it failed, the variable was not from the command line. Ignore it,
13325      # but warn the user (except for BASH, which is always set by the calling BASH).
13326      if test "xCPIO" != xBASH; then
13327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13328$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13329      fi
13330      # Try to locate tool using the code snippet
13331      for ac_prog in cpio bsdcpio
13332do
13333  # Extract the first word of "$ac_prog", so it can be a program name with args.
13334set dummy $ac_prog; ac_word=$2
13335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13336$as_echo_n "checking for $ac_word... " >&6; }
13337if ${ac_cv_path_CPIO+:} false; then :
13338  $as_echo_n "(cached) " >&6
13339else
13340  case $CPIO in
13341  [\\/]* | ?:[\\/]*)
13342  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13343  ;;
13344  *)
13345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13346for as_dir in $PATH
13347do
13348  IFS=$as_save_IFS
13349  test -z "$as_dir" && as_dir=.
13350    for ac_exec_ext in '' $ac_executable_extensions; do
13351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13352    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13354    break 2
13355  fi
13356done
13357  done
13358IFS=$as_save_IFS
13359
13360  ;;
13361esac
13362fi
13363CPIO=$ac_cv_path_CPIO
13364if test -n "$CPIO"; then
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13366$as_echo "$CPIO" >&6; }
13367else
13368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13369$as_echo "no" >&6; }
13370fi
13371
13372
13373  test -n "$CPIO" && break
13374done
13375
13376    else
13377      # If it succeeded, then it was overridden by the user. We will use it
13378      # for the tool.
13379
13380      # First remove it from the list of overridden variables, so we can test
13381      # for unknown variables in the end.
13382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13383
13384      # Check if the provided tool contains a complete path.
13385      tool_specified="$CPIO"
13386      tool_basename="${tool_specified##*/}"
13387      if test "x$tool_basename" = "x$tool_specified"; then
13388        # A command without a complete path is provided, search $PATH.
13389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13390$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13391        # Extract the first word of "$tool_basename", so it can be a program name with args.
13392set dummy $tool_basename; ac_word=$2
13393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13394$as_echo_n "checking for $ac_word... " >&6; }
13395if ${ac_cv_path_CPIO+:} false; then :
13396  $as_echo_n "(cached) " >&6
13397else
13398  case $CPIO in
13399  [\\/]* | ?:[\\/]*)
13400  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13401  ;;
13402  *)
13403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13404for as_dir in $PATH
13405do
13406  IFS=$as_save_IFS
13407  test -z "$as_dir" && as_dir=.
13408    for ac_exec_ext in '' $ac_executable_extensions; do
13409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13410    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13412    break 2
13413  fi
13414done
13415  done
13416IFS=$as_save_IFS
13417
13418  ;;
13419esac
13420fi
13421CPIO=$ac_cv_path_CPIO
13422if test -n "$CPIO"; then
13423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13424$as_echo "$CPIO" >&6; }
13425else
13426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13427$as_echo "no" >&6; }
13428fi
13429
13430
13431        if test "x$CPIO" = x; then
13432          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13433        fi
13434      else
13435        # Otherwise we believe it is a complete path. Use it as it is.
13436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13437$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13438        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13439$as_echo_n "checking for CPIO... " >&6; }
13440        if test ! -x "$tool_specified"; then
13441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13442$as_echo "not found" >&6; }
13443          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13444        fi
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13446$as_echo "$tool_specified" >&6; }
13447      fi
13448    fi
13449  fi
13450
13451
13452
13453
13454# Now we can determine OpenJDK build and target platforms. This is required to
13455# have early on.
13456# Make sure we can run config.sub.
13457$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13458  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13459
13460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13461$as_echo_n "checking build system type... " >&6; }
13462if ${ac_cv_build+:} false; then :
13463  $as_echo_n "(cached) " >&6
13464else
13465  ac_build_alias=$build_alias
13466test "x$ac_build_alias" = x &&
13467  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13468test "x$ac_build_alias" = x &&
13469  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13470ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13471  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13472
13473fi
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13475$as_echo "$ac_cv_build" >&6; }
13476case $ac_cv_build in
13477*-*-*) ;;
13478*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13479esac
13480build=$ac_cv_build
13481ac_save_IFS=$IFS; IFS='-'
13482set x $ac_cv_build
13483shift
13484build_cpu=$1
13485build_vendor=$2
13486shift; shift
13487# Remember, the first character of IFS is used to create $*,
13488# except with old shells:
13489build_os=$*
13490IFS=$ac_save_IFS
13491case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13492
13493
13494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13495$as_echo_n "checking host system type... " >&6; }
13496if ${ac_cv_host+:} false; then :
13497  $as_echo_n "(cached) " >&6
13498else
13499  if test "x$host_alias" = x; then
13500  ac_cv_host=$ac_cv_build
13501else
13502  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13503    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13504fi
13505
13506fi
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13508$as_echo "$ac_cv_host" >&6; }
13509case $ac_cv_host in
13510*-*-*) ;;
13511*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13512esac
13513host=$ac_cv_host
13514ac_save_IFS=$IFS; IFS='-'
13515set x $ac_cv_host
13516shift
13517host_cpu=$1
13518host_vendor=$2
13519shift; shift
13520# Remember, the first character of IFS is used to create $*,
13521# except with old shells:
13522host_os=$*
13523IFS=$ac_save_IFS
13524case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13525
13526
13527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13528$as_echo_n "checking target system type... " >&6; }
13529if ${ac_cv_target+:} false; then :
13530  $as_echo_n "(cached) " >&6
13531else
13532  if test "x$target_alias" = x; then
13533  ac_cv_target=$ac_cv_host
13534else
13535  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13536    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13537fi
13538
13539fi
13540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13541$as_echo "$ac_cv_target" >&6; }
13542case $ac_cv_target in
13543*-*-*) ;;
13544*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13545esac
13546target=$ac_cv_target
13547ac_save_IFS=$IFS; IFS='-'
13548set x $ac_cv_target
13549shift
13550target_cpu=$1
13551target_vendor=$2
13552shift; shift
13553# Remember, the first character of IFS is used to create $*,
13554# except with old shells:
13555target_os=$*
13556IFS=$ac_save_IFS
13557case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13558
13559
13560# The aliases save the names the user supplied, while $host etc.
13561# will get canonicalized.
13562test -n "$target_alias" &&
13563  test "$program_prefix$program_suffix$program_transform_name" = \
13564    NONENONEs,x,x, &&
13565  program_prefix=${target_alias}-
13566
13567  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13568  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13569  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13570  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13571  # to use the configure naming style.
13572
13573
13574
13575
13576
13577  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13578  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13579  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13580  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13581  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13582  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13583
13584
13585
13586  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13587
13588  case "$build_os" in
13589    *linux*)
13590      VAR_OS=linux
13591      VAR_OS_TYPE=unix
13592      ;;
13593    *solaris*)
13594      VAR_OS=solaris
13595      VAR_OS_TYPE=unix
13596      ;;
13597    *darwin*)
13598      VAR_OS=macosx
13599      VAR_OS_TYPE=unix
13600      ;;
13601    *bsd*)
13602      VAR_OS=bsd
13603      VAR_OS_TYPE=unix
13604      ;;
13605    *cygwin*)
13606      VAR_OS=windows
13607      VAR_OS_ENV=windows.cygwin
13608      ;;
13609    *mingw*)
13610      VAR_OS=windows
13611      VAR_OS_ENV=windows.msys
13612      ;;
13613    *aix*)
13614      VAR_OS=aix
13615      VAR_OS_TYPE=unix
13616      ;;
13617    *)
13618      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13619      ;;
13620  esac
13621
13622
13623  # First argument is the cpu name from the trip/quad
13624  case "$build_cpu" in
13625    x86_64)
13626      VAR_CPU=x86_64
13627      VAR_CPU_ARCH=x86
13628      VAR_CPU_BITS=64
13629      VAR_CPU_ENDIAN=little
13630      ;;
13631    i?86)
13632      VAR_CPU=x86
13633      VAR_CPU_ARCH=x86
13634      VAR_CPU_BITS=32
13635      VAR_CPU_ENDIAN=little
13636      ;;
13637    arm*)
13638      VAR_CPU=arm
13639      VAR_CPU_ARCH=arm
13640      VAR_CPU_BITS=32
13641      VAR_CPU_ENDIAN=little
13642      ;;
13643    powerpc)
13644      VAR_CPU=ppc
13645      VAR_CPU_ARCH=ppc
13646      VAR_CPU_BITS=32
13647      VAR_CPU_ENDIAN=big
13648      ;;
13649    powerpc64)
13650      VAR_CPU=ppc64
13651      VAR_CPU_ARCH=ppc
13652      VAR_CPU_BITS=64
13653      VAR_CPU_ENDIAN=big
13654      ;;
13655    powerpc64le)
13656      VAR_CPU=ppc64
13657      VAR_CPU_ARCH=ppc
13658      VAR_CPU_BITS=64
13659      VAR_CPU_ENDIAN=little
13660      ;;
13661    s390)
13662      VAR_CPU=s390
13663      VAR_CPU_ARCH=s390
13664      VAR_CPU_BITS=32
13665      VAR_CPU_ENDIAN=big
13666      ;;
13667    s390x)
13668      VAR_CPU=s390x
13669      VAR_CPU_ARCH=s390
13670      VAR_CPU_BITS=64
13671      VAR_CPU_ENDIAN=big
13672      ;;
13673    sparc)
13674      VAR_CPU=sparc
13675      VAR_CPU_ARCH=sparc
13676      VAR_CPU_BITS=32
13677      VAR_CPU_ENDIAN=big
13678      ;;
13679    sparcv9|sparc64)
13680      VAR_CPU=sparcv9
13681      VAR_CPU_ARCH=sparc
13682      VAR_CPU_BITS=64
13683      VAR_CPU_ENDIAN=big
13684      ;;
13685    *)
13686      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13687      ;;
13688  esac
13689
13690  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13691  OPENJDK_BUILD_OS="$VAR_OS"
13692  if test "x$VAR_OS_TYPE" != x; then
13693    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13694  else
13695    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13696  fi
13697  if test "x$VAR_OS_ENV" != x; then
13698    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13699  else
13700    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13701  fi
13702  OPENJDK_BUILD_CPU="$VAR_CPU"
13703  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13704  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13705  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13706
13707
13708
13709
13710
13711
13712
13713
13714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13715$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13717$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13718
13719  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13720
13721  case "$host_os" in
13722    *linux*)
13723      VAR_OS=linux
13724      VAR_OS_TYPE=unix
13725      ;;
13726    *solaris*)
13727      VAR_OS=solaris
13728      VAR_OS_TYPE=unix
13729      ;;
13730    *darwin*)
13731      VAR_OS=macosx
13732      VAR_OS_TYPE=unix
13733      ;;
13734    *bsd*)
13735      VAR_OS=bsd
13736      VAR_OS_TYPE=unix
13737      ;;
13738    *cygwin*)
13739      VAR_OS=windows
13740      VAR_OS_ENV=windows.cygwin
13741      ;;
13742    *mingw*)
13743      VAR_OS=windows
13744      VAR_OS_ENV=windows.msys
13745      ;;
13746    *aix*)
13747      VAR_OS=aix
13748      VAR_OS_TYPE=unix
13749      ;;
13750    *)
13751      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13752      ;;
13753  esac
13754
13755
13756  # First argument is the cpu name from the trip/quad
13757  case "$host_cpu" in
13758    x86_64)
13759      VAR_CPU=x86_64
13760      VAR_CPU_ARCH=x86
13761      VAR_CPU_BITS=64
13762      VAR_CPU_ENDIAN=little
13763      ;;
13764    i?86)
13765      VAR_CPU=x86
13766      VAR_CPU_ARCH=x86
13767      VAR_CPU_BITS=32
13768      VAR_CPU_ENDIAN=little
13769      ;;
13770    arm*)
13771      VAR_CPU=arm
13772      VAR_CPU_ARCH=arm
13773      VAR_CPU_BITS=32
13774      VAR_CPU_ENDIAN=little
13775      ;;
13776    powerpc)
13777      VAR_CPU=ppc
13778      VAR_CPU_ARCH=ppc
13779      VAR_CPU_BITS=32
13780      VAR_CPU_ENDIAN=big
13781      ;;
13782    powerpc64)
13783      VAR_CPU=ppc64
13784      VAR_CPU_ARCH=ppc
13785      VAR_CPU_BITS=64
13786      VAR_CPU_ENDIAN=big
13787      ;;
13788    powerpc64le)
13789      VAR_CPU=ppc64
13790      VAR_CPU_ARCH=ppc
13791      VAR_CPU_BITS=64
13792      VAR_CPU_ENDIAN=little
13793      ;;
13794    s390)
13795      VAR_CPU=s390
13796      VAR_CPU_ARCH=s390
13797      VAR_CPU_BITS=32
13798      VAR_CPU_ENDIAN=big
13799      ;;
13800    s390x)
13801      VAR_CPU=s390x
13802      VAR_CPU_ARCH=s390
13803      VAR_CPU_BITS=64
13804      VAR_CPU_ENDIAN=big
13805      ;;
13806    sparc)
13807      VAR_CPU=sparc
13808      VAR_CPU_ARCH=sparc
13809      VAR_CPU_BITS=32
13810      VAR_CPU_ENDIAN=big
13811      ;;
13812    sparcv9|sparc64)
13813      VAR_CPU=sparcv9
13814      VAR_CPU_ARCH=sparc
13815      VAR_CPU_BITS=64
13816      VAR_CPU_ENDIAN=big
13817      ;;
13818    *)
13819      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13820      ;;
13821  esac
13822
13823  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13824  OPENJDK_TARGET_OS="$VAR_OS"
13825  if test "x$VAR_OS_TYPE" != x; then
13826    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13827  else
13828    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13829  fi
13830  if test "x$VAR_OS_ENV" != x; then
13831    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13832  else
13833    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13834  fi
13835  OPENJDK_TARGET_CPU="$VAR_CPU"
13836  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13837  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13838  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13839
13840
13841
13842
13843
13844
13845
13846
13847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13848$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13850$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13851
13852
13853
13854# Check whether --with-target-bits was given.
13855if test "${with_target_bits+set}" = set; then :
13856  withval=$with_target_bits;
13857fi
13858
13859
13860  # We have three types of compiles:
13861  # native  == normal compilation, target system == build system
13862  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13863  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13864  #
13865  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13866    # We're doing a proper cross-compilation
13867    COMPILE_TYPE="cross"
13868  else
13869    COMPILE_TYPE="native"
13870  fi
13871
13872  if test "x$with_target_bits" != x; then
13873    if test "x$COMPILE_TYPE" = "xcross"; then
13874      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13875    fi
13876
13877    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13878      # A reduced build is requested
13879      COMPILE_TYPE="reduced"
13880      OPENJDK_TARGET_CPU_BITS=32
13881      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13882        OPENJDK_TARGET_CPU=x86
13883      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13884        OPENJDK_TARGET_CPU=sparc
13885      else
13886        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13887      fi
13888    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13889      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
13890    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13891      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13892$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13893    else
13894      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13895    fi
13896  fi
13897
13898
13899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13900$as_echo_n "checking compilation type... " >&6; }
13901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13902$as_echo "$COMPILE_TYPE" >&6; }
13903
13904
13905  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13906    REQUIRED_OS_NAME=SunOS
13907    REQUIRED_OS_VERSION=5.10
13908  fi
13909  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13910    REQUIRED_OS_NAME=Linux
13911    REQUIRED_OS_VERSION=2.6
13912  fi
13913  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13914    REQUIRED_OS_NAME=Windows
13915    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13916      REQUIRED_OS_VERSION=5.2
13917    else
13918      REQUIRED_OS_VERSION=5.1
13919    fi
13920  fi
13921  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13922    REQUIRED_OS_NAME=Darwin
13923    REQUIRED_OS_VERSION=11.2
13924  fi
13925
13926
13927
13928
13929
13930  # Also store the legacy naming of the cpu.
13931  # Ie i586 and amd64 instead of x86 and x86_64
13932  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13933  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13934    OPENJDK_TARGET_CPU_LEGACY="i586"
13935  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13936    # On all platforms except MacOSX replace x86_64 with amd64.
13937    OPENJDK_TARGET_CPU_LEGACY="amd64"
13938  fi
13939
13940
13941  # And the second legacy naming of the cpu.
13942  # Ie i386 and amd64 instead of x86 and x86_64.
13943  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13944  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13945    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13946  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13947    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13948  fi
13949
13950
13951  # This is the name of the cpu (but using i386 and amd64 instead of
13952  # x86 and x86_64, respectively), preceeded by a /, to be used when
13953  # locating libraries. On macosx, it's empty, though.
13954  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13955  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13956    OPENJDK_TARGET_CPU_LIBDIR=""
13957  fi
13958
13959
13960  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13961  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13962  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13963  OPENJDK_TARGET_CPU_ISADIR=""
13964  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13965    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13966      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13967    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13968      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13969    fi
13970  fi
13971
13972
13973  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13974  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13975  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13976    # On linux only, we replace x86 with i386.
13977    OPENJDK_TARGET_CPU_OSARCH="i386"
13978  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13979    # On all platforms except macosx, we replace x86_64 with amd64.
13980    OPENJDK_TARGET_CPU_OSARCH="amd64"
13981  fi
13982
13983
13984  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13985  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13986    OPENJDK_TARGET_CPU_JLI="i386"
13987  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13988    # On all platforms except macosx, we replace x86_64 with amd64.
13989    OPENJDK_TARGET_CPU_JLI="amd64"
13990  fi
13991  # Now setup the -D flags for building libjli.
13992  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13993  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13994    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13995      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13996    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13997      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13998    fi
13999  fi
14000
14001
14002  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14003      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14004  else
14005      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14006  fi
14007
14008
14009  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14010    A_LP64="LP64:="
14011    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14012    # unpack200.exe
14013    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14014      ADD_LP64="-D_LP64=1"
14015    fi
14016  fi
14017  LP64=$A_LP64
14018
14019
14020  if test "x$COMPILE_TYPE" = "xcross"; then
14021    # FIXME: ... or should this include reduced builds..?
14022    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14023  else
14024    DEFINE_CROSS_COMPILE_ARCH=""
14025  fi
14026
14027
14028  # ZERO_ARCHDEF is used to enable architecture-specific code
14029  case "${OPENJDK_TARGET_CPU}" in
14030    ppc)     ZERO_ARCHDEF=PPC32 ;;
14031    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14032    s390*)   ZERO_ARCHDEF=S390  ;;
14033    sparc*)  ZERO_ARCHDEF=SPARC ;;
14034    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14035    x86)     ZERO_ARCHDEF=IA32  ;;
14036    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14037  esac
14038
14039
14040
14041
14042# Continue setting up basic stuff. Most remaining code require fundamental tools.
14043
14044  # Save the current directory this script was started from
14045  CURDIR="$PWD"
14046
14047  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14048    PATH_SEP=";"
14049
14050  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14051  if test $SRC_ROOT_LENGTH -gt 100; then
14052    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14053  fi
14054
14055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14057$as_echo_n "checking cygwin release... " >&6; }
14058    CYGWIN_VERSION=`$UNAME -r`
14059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14060$as_echo "$CYGWIN_VERSION" >&6; }
14061    WINDOWS_ENV_VENDOR='cygwin'
14062    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14063
14064    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14065    if test "x$CYGWIN_VERSION_OK" = x; then
14066      { $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
14067$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;}
14068      as_fn_error $? "Cannot continue" "$LINENO" 5
14069    fi
14070    if test "x$CYGPATH" = x; then
14071      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14072    fi
14073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14074$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14075    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14076    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14077    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14078    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14080$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14081    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14082    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14083    if test "x$test_cygdrive_prefix" = x; then
14084      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14085    fi
14086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14088$as_echo_n "checking msys release... " >&6; }
14089    MSYS_VERSION=`$UNAME -r`
14090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14091$as_echo "$MSYS_VERSION" >&6; }
14092
14093    WINDOWS_ENV_VENDOR='msys'
14094    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14095
14096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14097$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14098    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14099    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14100
14101  windows_path="$MSYS_ROOT_PATH"
14102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14103    unix_path=`$CYGPATH -u "$windows_path"`
14104    MSYS_ROOT_PATH="$unix_path"
14105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14107    MSYS_ROOT_PATH="$unix_path"
14108  fi
14109
14110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14111$as_echo "$MSYS_ROOT_PATH" >&6; }
14112    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14113  else
14114    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14115  fi
14116
14117  # Test if windows or unix (cygwin/msys) find is first in path.
14118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14119$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14120  FIND_BINARY_OUTPUT=`find --version 2>&1`
14121  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14123$as_echo "unix style" >&6; }
14124  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14126$as_echo "Windows" >&6; }
14127    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14128$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14129    { $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
14130$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14131    as_fn_error $? "Cannot continue" "$LINENO" 5
14132  else
14133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14134$as_echo "unknown" >&6; }
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14136$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14137  fi
14138
14139  else
14140    PATH_SEP=":"
14141  fi
14142
14143
14144  # We get the top-level directory from the supporting wrappers.
14145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14146$as_echo_n "checking for top-level directory... " >&6; }
14147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14148$as_echo "$TOPDIR" >&6; }
14149
14150
14151  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14152
14153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14154
14155  # Input might be given as Windows format, start by converting to
14156  # unix format.
14157  path="$CURDIR"
14158  new_path=`$CYGPATH -u "$path"`
14159
14160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14163  # "foo.exe" is OK but "foo" is an error.
14164  #
14165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14166  # It is also a way to make sure we got the proper file name for the real test later on.
14167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14168  if test "x$test_shortpath" = x; then
14169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14170$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14171    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14172  fi
14173
14174  # Call helper function which possibly converts this using DOS-style short mode.
14175  # If so, the updated path is stored in $new_path.
14176
14177  input_path="$new_path"
14178  # Check if we need to convert this using DOS-style short mode. If the path
14179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14180  # take no chances and rewrite it.
14181  # Note: m4 eats our [], so we need to use [ and ] instead.
14182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14183  if test "x$has_forbidden_chars" != x; then
14184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14188      # Going to short mode and back again did indeed matter. Since short mode is
14189      # case insensitive, let's make it lowercase to improve readability.
14190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14191      # Now convert it back to Unix-stile (cygpath)
14192      input_path=`$CYGPATH -u "$shortmode_path"`
14193      new_path="$input_path"
14194    fi
14195  fi
14196
14197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14198  if test "x$test_cygdrive_prefix" = x; then
14199    # As a simple fix, exclude /usr/bin since it's not a real path.
14200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14202      # a path prefixed by /cygdrive for fixpath to work.
14203      new_path="$CYGWIN_ROOT_PATH$input_path"
14204    fi
14205  fi
14206
14207
14208  if test "x$path" != "x$new_path"; then
14209    CURDIR="$new_path"
14210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14211$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14212  fi
14213
14214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14215
14216  path="$CURDIR"
14217  has_colon=`$ECHO $path | $GREP ^.:`
14218  new_path="$path"
14219  if test "x$has_colon" = x; then
14220    # Not in mixed or Windows style, start by that.
14221    new_path=`cmd //c echo $path`
14222  fi
14223
14224
14225  input_path="$new_path"
14226  # Check if we need to convert this using DOS-style short mode. If the path
14227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14228  # take no chances and rewrite it.
14229  # Note: m4 eats our [], so we need to use [ and ] instead.
14230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14231  if test "x$has_forbidden_chars" != x; then
14232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14234  fi
14235
14236
14237  windows_path="$new_path"
14238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14239    unix_path=`$CYGPATH -u "$windows_path"`
14240    new_path="$unix_path"
14241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14243    new_path="$unix_path"
14244  fi
14245
14246  if test "x$path" != "x$new_path"; then
14247    CURDIR="$new_path"
14248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14249$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14250  fi
14251
14252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14254
14255  else
14256    # We're on a unix platform. Hooray! :)
14257    path="$CURDIR"
14258    has_space=`$ECHO "$path" | $GREP " "`
14259    if test "x$has_space" != x; then
14260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14261$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14262      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14263    fi
14264
14265    # Use eval to expand a potential ~
14266    eval path="$path"
14267    if test ! -f "$path" && test ! -d "$path"; then
14268      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14269    fi
14270
14271    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14272  fi
14273
14274
14275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14276
14277  # Input might be given as Windows format, start by converting to
14278  # unix format.
14279  path="$TOPDIR"
14280  new_path=`$CYGPATH -u "$path"`
14281
14282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14285  # "foo.exe" is OK but "foo" is an error.
14286  #
14287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14288  # It is also a way to make sure we got the proper file name for the real test later on.
14289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14290  if test "x$test_shortpath" = x; then
14291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14292$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14293    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14294  fi
14295
14296  # Call helper function which possibly converts this using DOS-style short mode.
14297  # If so, the updated path is stored in $new_path.
14298
14299  input_path="$new_path"
14300  # Check if we need to convert this using DOS-style short mode. If the path
14301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14302  # take no chances and rewrite it.
14303  # Note: m4 eats our [], so we need to use [ and ] instead.
14304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14305  if test "x$has_forbidden_chars" != x; then
14306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14310      # Going to short mode and back again did indeed matter. Since short mode is
14311      # case insensitive, let's make it lowercase to improve readability.
14312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313      # Now convert it back to Unix-stile (cygpath)
14314      input_path=`$CYGPATH -u "$shortmode_path"`
14315      new_path="$input_path"
14316    fi
14317  fi
14318
14319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14320  if test "x$test_cygdrive_prefix" = x; then
14321    # As a simple fix, exclude /usr/bin since it's not a real path.
14322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14324      # a path prefixed by /cygdrive for fixpath to work.
14325      new_path="$CYGWIN_ROOT_PATH$input_path"
14326    fi
14327  fi
14328
14329
14330  if test "x$path" != "x$new_path"; then
14331    TOPDIR="$new_path"
14332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14333$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14334  fi
14335
14336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14337
14338  path="$TOPDIR"
14339  has_colon=`$ECHO $path | $GREP ^.:`
14340  new_path="$path"
14341  if test "x$has_colon" = x; then
14342    # Not in mixed or Windows style, start by that.
14343    new_path=`cmd //c echo $path`
14344  fi
14345
14346
14347  input_path="$new_path"
14348  # Check if we need to convert this using DOS-style short mode. If the path
14349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350  # take no chances and rewrite it.
14351  # Note: m4 eats our [], so we need to use [ and ] instead.
14352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14353  if test "x$has_forbidden_chars" != x; then
14354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14356  fi
14357
14358
14359  windows_path="$new_path"
14360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14361    unix_path=`$CYGPATH -u "$windows_path"`
14362    new_path="$unix_path"
14363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14365    new_path="$unix_path"
14366  fi
14367
14368  if test "x$path" != "x$new_path"; then
14369    TOPDIR="$new_path"
14370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14371$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14372  fi
14373
14374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14376
14377  else
14378    # We're on a unix platform. Hooray! :)
14379    path="$TOPDIR"
14380    has_space=`$ECHO "$path" | $GREP " "`
14381    if test "x$has_space" != x; then
14382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14383$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14384      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385    fi
14386
14387    # Use eval to expand a potential ~
14388    eval path="$path"
14389    if test ! -f "$path" && test ! -d "$path"; then
14390      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14391    fi
14392
14393    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14394  fi
14395
14396  # SRC_ROOT is a traditional alias for TOPDIR.
14397  SRC_ROOT=$TOPDIR
14398
14399  # Locate the directory of this script.
14400  AUTOCONF_DIR=$TOPDIR/common/autoconf
14401
14402
14403  # Setup default logging of stdout and stderr to build.log in the output root.
14404  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14405  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14406  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14407
14408
14409
14410
14411
14412# Check if it's a pure open build or if custom sources are to be used.
14413
14414  # Check whether --enable-openjdk-only was given.
14415if test "${enable_openjdk_only+set}" = set; then :
14416  enableval=$enable_openjdk_only;
14417else
14418  enable_openjdk_only="no"
14419fi
14420
14421
14422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14423$as_echo_n "checking for presence of closed sources... " >&6; }
14424  if test -d "$SRC_ROOT/jdk/src/closed"; then
14425    CLOSED_SOURCE_PRESENT=yes
14426  else
14427    CLOSED_SOURCE_PRESENT=no
14428  fi
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14430$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14431
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14433$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14434  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14436$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14437
14438  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14439    OPENJDK=true
14440    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14441      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14442$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14443    fi
14444  else
14445    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14446      OPENJDK=true
14447    else
14448      OPENJDK=false
14449    fi
14450  fi
14451
14452  if test "x$OPENJDK" = "xtrue"; then
14453    SET_OPENJDK="OPENJDK=true"
14454  fi
14455
14456
14457
14458  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14459  # the IncludeCustomExtension macro.
14460
14461
14462# Check whether --with-custom-make-dir was given.
14463if test "${with_custom_make_dir+set}" = set; then :
14464  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
14465$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14466fi
14467
14468
14469
14470
14471# These are needed to be able to create a configuration name (and thus the output directory)
14472
14473  ###############################################################################
14474  #
14475  # Check which variant of the JDK that we want to build.
14476  # Currently we have:
14477  #    normal:   standard edition
14478  # but the custom make system may add other variants
14479  #
14480  # Effectively the JDK variant gives a name to a specific set of
14481  # modules to compile into the JDK. In the future, these modules
14482  # might even be Jigsaw modules.
14483  #
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14485$as_echo_n "checking which variant of the JDK to build... " >&6; }
14486
14487# Check whether --with-jdk-variant was given.
14488if test "${with_jdk_variant+set}" = set; then :
14489  withval=$with_jdk_variant;
14490fi
14491
14492
14493  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14494    JDK_VARIANT="normal"
14495  else
14496    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14497  fi
14498
14499
14500
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14502$as_echo "$JDK_VARIANT" >&6; }
14503
14504
14505###############################################################################
14506#
14507# Check which interpreter of the JVM we want to build.
14508# Currently we have:
14509#    template: Template interpreter (the default)
14510#    cpp     : C++ interpreter
14511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14512$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14513
14514# Check whether --with-jvm-interpreter was given.
14515if test "${with_jvm_interpreter+set}" = set; then :
14516  withval=$with_jvm_interpreter;
14517fi
14518
14519
14520if test "x$with_jvm_interpreter" = x; then
14521     with_jvm_interpreter="template"
14522fi
14523
14524JVM_INTERPRETER="$with_jvm_interpreter"
14525
14526if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14527   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14528fi
14529
14530
14531
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14533$as_echo "$with_jvm_interpreter" >&6; }
14534
14535
14536
14537  ###############################################################################
14538  #
14539  # Check which variants of the JVM that we want to build.
14540  # Currently we have:
14541  #    server: normal interpreter and a tiered C1/C2 compiler
14542  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14543  #    minimal1: reduced form of client with optional VM services and features stripped out
14544  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14545  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14546  #    zero: no machine code interpreter, no compiler
14547  #    zeroshark: zero interpreter and shark/llvm compiler backend
14548#    core: interpreter only, no compiler (only works on some platforms)
14549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14550$as_echo_n "checking which variants of the JVM to build... " >&6; }
14551
14552# Check whether --with-jvm-variants was given.
14553if test "${with_jvm_variants+set}" = set; then :
14554  withval=$with_jvm_variants;
14555fi
14556
14557
14558  if test "x$with_jvm_variants" = x; then
14559    with_jvm_variants="server"
14560  fi
14561
14562  JVM_VARIANTS=",$with_jvm_variants,"
14563  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,//'`
14564
14565  if test "x$TEST_VARIANTS" != "x,"; then
14566     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14567  fi
14568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14569$as_echo "$with_jvm_variants" >&6; }
14570
14571  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14572  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14573  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14574  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14575  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14576  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14577  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14578
14579  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14580    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14581      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14582    fi
14583  fi
14584  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14585    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14586      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14587    fi
14588  fi
14589  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14590    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14591      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14592    fi
14593  fi
14594
14595  # Replace the commas with AND for use in the build directory name.
14596  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14597  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/'`
14598  if test "x$COUNT_VARIANTS" != "x,1"; then
14599    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14600  else
14601    BUILDING_MULTIPLE_JVM_VARIANTS=no
14602  fi
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613  INCLUDE_SA=true
14614  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14615    INCLUDE_SA=false
14616  fi
14617  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14618    INCLUDE_SA=false
14619  fi
14620  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14621    INCLUDE_SA=false
14622  fi
14623
14624
14625  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14626    MACOSX_UNIVERSAL="true"
14627  fi
14628
14629
14630
14631
14632  ###############################################################################
14633  #
14634  # Set the debug level
14635  #    release: no debug information, all optimizations, no asserts.
14636  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14637  #    fastdebug: debug information (-g), all optimizations, all asserts
14638  #    slowdebug: debug information (-g), no optimizations, all asserts
14639  #
14640  DEBUG_LEVEL="release"
14641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14642$as_echo_n "checking which debug level to use... " >&6; }
14643  # Check whether --enable-debug was given.
14644if test "${enable_debug+set}" = set; then :
14645  enableval=$enable_debug;
14646        ENABLE_DEBUG="${enableval}"
14647        DEBUG_LEVEL="fastdebug"
14648
14649else
14650  ENABLE_DEBUG="no"
14651fi
14652
14653
14654
14655# Check whether --with-debug-level was given.
14656if test "${with_debug_level+set}" = set; then :
14657  withval=$with_debug_level;
14658        DEBUG_LEVEL="${withval}"
14659        if test "x$ENABLE_DEBUG" = xyes; then
14660          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14661        fi
14662
14663fi
14664
14665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14666$as_echo "$DEBUG_LEVEL" >&6; }
14667
14668  if test "x$DEBUG_LEVEL" != xrelease && \
14669      test "x$DEBUG_LEVEL" != xoptimized && \
14670      test "x$DEBUG_LEVEL" != xfastdebug && \
14671      test "x$DEBUG_LEVEL" != xslowdebug; then
14672    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14673  fi
14674
14675
14676  ###############################################################################
14677  #
14678  # Setup legacy vars/targets and new vars to deal with different debug levels.
14679  #
14680
14681  case $DEBUG_LEVEL in
14682    release )
14683      VARIANT="OPT"
14684      FASTDEBUG="false"
14685      DEBUG_CLASSFILES="false"
14686      BUILD_VARIANT_RELEASE=""
14687      HOTSPOT_DEBUG_LEVEL="product"
14688      HOTSPOT_EXPORT="product"
14689      ;;
14690    fastdebug )
14691      VARIANT="DBG"
14692      FASTDEBUG="true"
14693      DEBUG_CLASSFILES="true"
14694      BUILD_VARIANT_RELEASE="-fastdebug"
14695      HOTSPOT_DEBUG_LEVEL="fastdebug"
14696      HOTSPOT_EXPORT="fastdebug"
14697      ;;
14698    slowdebug )
14699      VARIANT="DBG"
14700      FASTDEBUG="false"
14701      DEBUG_CLASSFILES="true"
14702      BUILD_VARIANT_RELEASE="-debug"
14703      HOTSPOT_DEBUG_LEVEL="debug"
14704      HOTSPOT_EXPORT="debug"
14705      ;;
14706    optimized )
14707      VARIANT="OPT"
14708      FASTDEBUG="false"
14709      DEBUG_CLASSFILES="false"
14710      BUILD_VARIANT_RELEASE="-optimized"
14711      HOTSPOT_DEBUG_LEVEL="optimized"
14712      HOTSPOT_EXPORT="optimized"
14713      ;;
14714  esac
14715
14716  # The debug level 'optimized' is a little special because it is currently only
14717  # applicable to the HotSpot build where it means to build a completely
14718  # optimized version of the VM without any debugging code (like for the
14719  # 'release' debug level which is called 'product' in the HotSpot build) but
14720  # with the exception that it can contain additional code which is otherwise
14721  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14722  # test new and/or experimental features which are not intended for customer
14723  # shipment. Because these new features need to be tested and benchmarked in
14724  # real world scenarios, we want to build the containing JDK at the 'release'
14725  # debug level.
14726  if test "x$DEBUG_LEVEL" = xoptimized; then
14727    DEBUG_LEVEL="release"
14728  fi
14729
14730  #####
14731  # Generate the legacy makefile targets for hotspot.
14732  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14733  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14734  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14735  # But until then ...
14736  HOTSPOT_TARGET=""
14737
14738  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14739    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14740  fi
14741
14742  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14743    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14744  fi
14745
14746  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14747    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14748  fi
14749
14750  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14752  fi
14753
14754  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14755    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14756  fi
14757
14758  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14759    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14760  fi
14761
14762  if test "x$JVM_VARIANT_CORE" = xtrue; then
14763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14764  fi
14765
14766  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14767
14768  # On Macosx universal binaries are produced, but they only contain
14769  # 64 bit intel. This invalidates control of which jvms are built
14770  # from configure, but only server is valid anyway. Fix this
14771  # when hotspot makefiles are rewritten.
14772  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14773    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14774  fi
14775
14776  #####
14777
14778
14779
14780
14781
14782
14783
14784
14785# With basic setup done, call the custom early hook.
14786
14787
14788# Check if we have devkits, extra paths or sysroot set.
14789
14790
14791# Check whether --with-devkit was given.
14792if test "${with_devkit+set}" = set; then :
14793  withval=$with_devkit;
14794
14795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14796
14797  # Input might be given as Windows format, start by converting to
14798  # unix format.
14799  path="$with_devkit"
14800  new_path=`$CYGPATH -u "$path"`
14801
14802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14805  # "foo.exe" is OK but "foo" is an error.
14806  #
14807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14808  # It is also a way to make sure we got the proper file name for the real test later on.
14809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14810  if test "x$test_shortpath" = x; then
14811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14812$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14813    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14814  fi
14815
14816  # Call helper function which possibly converts this using DOS-style short mode.
14817  # If so, the updated path is stored in $new_path.
14818
14819  input_path="$new_path"
14820  # Check if we need to convert this using DOS-style short mode. If the path
14821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14822  # take no chances and rewrite it.
14823  # Note: m4 eats our [], so we need to use [ and ] instead.
14824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14825  if test "x$has_forbidden_chars" != x; then
14826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14830      # Going to short mode and back again did indeed matter. Since short mode is
14831      # case insensitive, let's make it lowercase to improve readability.
14832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14833      # Now convert it back to Unix-stile (cygpath)
14834      input_path=`$CYGPATH -u "$shortmode_path"`
14835      new_path="$input_path"
14836    fi
14837  fi
14838
14839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14840  if test "x$test_cygdrive_prefix" = x; then
14841    # As a simple fix, exclude /usr/bin since it's not a real path.
14842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14844      # a path prefixed by /cygdrive for fixpath to work.
14845      new_path="$CYGWIN_ROOT_PATH$input_path"
14846    fi
14847  fi
14848
14849
14850  if test "x$path" != "x$new_path"; then
14851    with_devkit="$new_path"
14852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14853$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14854  fi
14855
14856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14857
14858  path="$with_devkit"
14859  has_colon=`$ECHO $path | $GREP ^.:`
14860  new_path="$path"
14861  if test "x$has_colon" = x; then
14862    # Not in mixed or Windows style, start by that.
14863    new_path=`cmd //c echo $path`
14864  fi
14865
14866
14867  input_path="$new_path"
14868  # Check if we need to convert this using DOS-style short mode. If the path
14869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14870  # take no chances and rewrite it.
14871  # Note: m4 eats our [], so we need to use [ and ] instead.
14872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14873  if test "x$has_forbidden_chars" != x; then
14874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14876  fi
14877
14878
14879  windows_path="$new_path"
14880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14881    unix_path=`$CYGPATH -u "$windows_path"`
14882    new_path="$unix_path"
14883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14885    new_path="$unix_path"
14886  fi
14887
14888  if test "x$path" != "x$new_path"; then
14889    with_devkit="$new_path"
14890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14891$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14892  fi
14893
14894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14896
14897  else
14898    # We're on a unix platform. Hooray! :)
14899    path="$with_devkit"
14900    has_space=`$ECHO "$path" | $GREP " "`
14901    if test "x$has_space" != x; then
14902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14903$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14904      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14905    fi
14906
14907    # Use eval to expand a potential ~
14908    eval path="$path"
14909    if test ! -f "$path" && test ! -d "$path"; then
14910      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14911    fi
14912
14913    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14914  fi
14915
14916        DEVKIT_ROOT="$with_devkit"
14917        # Check for a meta data info file in the root of the devkit
14918        if test -f "$DEVKIT_ROOT/devkit.info"; then
14919          # This potentially sets the following:
14920          # DEVKIT_NAME: A descriptive name of the devkit
14921          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14922          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14923          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14924          . $DEVKIT_ROOT/devkit.info
14925        fi
14926
14927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14928$as_echo_n "checking for devkit... " >&6; }
14929        if test "x$DEVKIT_NAME" != x; then
14930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14931$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14932        else
14933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14934$as_echo "$DEVKIT_ROOT" >&6; }
14935        fi
14936
14937        if test "x$DEVKIT_EXTRA_PATH" != x; then
14938
14939  if test "x$DEVKIT_EXTRA_PATH" != x; then
14940    if test "x$EXTRA_PATH" = x; then
14941      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14942    else
14943      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14944    fi
14945  fi
14946
14947        fi
14948
14949        # Fallback default of just /bin if DEVKIT_PATH is not defined
14950        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14951          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14952        fi
14953
14954  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14955    if test "x$TOOLCHAIN_PATH" = x; then
14956      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14957    else
14958      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14959    fi
14960  fi
14961
14962
14963        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14964        # places for backwards compatiblity.
14965        if test "x$DEVKIT_SYSROOT" != x; then
14966          SYSROOT="$DEVKIT_SYSROOT"
14967        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14968          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14969        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14970          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14971        fi
14972
14973
14974fi
14975
14976
14977  # You can force the sysroot if the sysroot encoded into the compiler tools
14978  # is not correct.
14979
14980# Check whether --with-sys-root was given.
14981if test "${with_sys_root+set}" = set; then :
14982  withval=$with_sys_root; SYSROOT=$with_sys_root
14983
14984fi
14985
14986
14987
14988# Check whether --with-sysroot was given.
14989if test "${with_sysroot+set}" = set; then :
14990  withval=$with_sysroot; SYSROOT=$with_sysroot
14991
14992fi
14993
14994
14995
14996# Check whether --with-tools-dir was given.
14997if test "${with_tools_dir+set}" = set; then :
14998  withval=$with_tools_dir;
14999  if test "x$with_tools_dir" != x; then
15000    if test "x$TOOLCHAIN_PATH" = x; then
15001      TOOLCHAIN_PATH="$with_tools_dir"
15002    else
15003      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15004    fi
15005  fi
15006
15007
15008fi
15009
15010
15011
15012# Check whether --with-toolchain-path was given.
15013if test "${with_toolchain_path+set}" = set; then :
15014  withval=$with_toolchain_path;
15015  if test "x$with_toolchain_path" != x; then
15016    if test "x$TOOLCHAIN_PATH" = x; then
15017      TOOLCHAIN_PATH="$with_toolchain_path"
15018    else
15019      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15020    fi
15021  fi
15022
15023
15024fi
15025
15026
15027
15028# Check whether --with-extra-path was given.
15029if test "${with_extra_path+set}" = set; then :
15030  withval=$with_extra_path;
15031  if test "x$with_extra_path" != x; then
15032    if test "x$EXTRA_PATH" = x; then
15033      EXTRA_PATH="$with_extra_path"
15034    else
15035      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15036    fi
15037  fi
15038
15039
15040fi
15041
15042
15043  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15044    # detect if Xcode is installed by running xcodebuild -version
15045    # if no Xcode installed, xcodebuild exits with 1
15046    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15047    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15048      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15049      # fall back on the stub binary in /usr/bin/xcodebuild
15050      # Extract the first word of "xcodebuild", so it can be a program name with args.
15051set dummy xcodebuild; ac_word=$2
15052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15053$as_echo_n "checking for $ac_word... " >&6; }
15054if ${ac_cv_path_XCODEBUILD+:} false; then :
15055  $as_echo_n "(cached) " >&6
15056else
15057  case $XCODEBUILD in
15058  [\\/]* | ?:[\\/]*)
15059  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15060  ;;
15061  *)
15062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15063for as_dir in $TOOLCHAIN_PATH
15064do
15065  IFS=$as_save_IFS
15066  test -z "$as_dir" && as_dir=.
15067    for ac_exec_ext in '' $ac_executable_extensions; do
15068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15069    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15071    break 2
15072  fi
15073done
15074  done
15075IFS=$as_save_IFS
15076
15077  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15078  ;;
15079esac
15080fi
15081XCODEBUILD=$ac_cv_path_XCODEBUILD
15082if test -n "$XCODEBUILD"; then
15083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15084$as_echo "$XCODEBUILD" >&6; }
15085else
15086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15087$as_echo "no" >&6; }
15088fi
15089
15090
15091    else
15092      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15093      # when only the command line tools are installed there are no SDKs, so headers
15094      # are copied into the system frameworks
15095      XCODEBUILD=
15096
15097    fi
15098
15099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15100$as_echo_n "checking for sdk name... " >&6; }
15101
15102# Check whether --with-sdk-name was given.
15103if test "${with_sdk_name+set}" = set; then :
15104  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15105
15106fi
15107
15108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15109$as_echo "$SDKNAME" >&6; }
15110
15111    # if toolchain path is specified then don't rely on system headers, they may not compile
15112    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15113    test -z "$TOOLCHAIN_PATH" && \
15114      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15115
15116    if test -z "$SYSROOT"; then
15117      if test -n "$XCODEBUILD"; then
15118        # if we don't have system headers, use default SDK name (last resort)
15119        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15120          SDKNAME=${SDKNAME:-macosx}
15121        fi
15122
15123        if test -n "$SDKNAME"; then
15124          # Call xcodebuild to determine SYSROOT
15125          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15126        fi
15127      else
15128        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15129          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
15130        fi
15131      fi
15132    else
15133      # warn user if --with-sdk-name was also set
15134      if test -n "$with_sdk_name"; then
15135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15136$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15137      fi
15138    fi
15139
15140    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15141      # If no system framework headers, then SYSROOT must be set, or we won't build
15142      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
15143    fi
15144
15145    # Perform a basic sanity test
15146    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15147      if test -z "$SYSROOT"; then
15148        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
15149      else
15150        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15151      fi
15152    fi
15153
15154    # set SDKROOT too, Xcode tools will pick it up
15155    SDKROOT=$SYSROOT
15156
15157  fi
15158
15159  # Prepend the extra path to the global path
15160
15161  if test "x$EXTRA_PATH" != x; then
15162    if test "x$PATH" = x; then
15163      PATH="$EXTRA_PATH"
15164    else
15165      PATH="$EXTRA_PATH:$PATH"
15166    fi
15167  fi
15168
15169
15170  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15171    # Add extra search paths on solaris for utilities like ar and as etc...
15172    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15173  fi
15174
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15176$as_echo_n "checking for sysroot... " >&6; }
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15178$as_echo "$SYSROOT" >&6; }
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15180$as_echo_n "checking for toolchain path... " >&6; }
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15182$as_echo "$TOOLCHAIN_PATH" >&6; }
15183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15184$as_echo_n "checking for extra path... " >&6; }
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15186$as_echo "$EXTRA_PATH" >&6; }
15187
15188
15189# To properly create a configuration name, we need to have the OpenJDK target
15190# and options (variants and debug level) parsed.
15191
15192
15193
15194# Check whether --with-conf-name was given.
15195if test "${with_conf_name+set}" = set; then :
15196  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15197fi
15198
15199
15200  # Test from where we are running configure, in or outside of src root.
15201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15202$as_echo_n "checking where to store configuration... " >&6; }
15203  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15204      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15205      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15206    # We are running configure from the src root.
15207    # Create a default ./build/target-variant-debuglevel output root.
15208    if test "x${CONF_NAME}" = x; then
15209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15210$as_echo "in default location" >&6; }
15211      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15212    else
15213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15214$as_echo "in build directory with custom name" >&6; }
15215    fi
15216    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15217    $MKDIR -p "$OUTPUT_ROOT"
15218    if test ! -d "$OUTPUT_ROOT"; then
15219      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15220    fi
15221  else
15222    # We are running configure from outside of the src dir.
15223    # Then use the current directory as output dir!
15224    # If configuration is situated in normal build directory, just use the build
15225    # directory name as configuration name, otherwise use the complete path.
15226    if test "x${CONF_NAME}" = x; then
15227      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15228    fi
15229    OUTPUT_ROOT="$CURDIR"
15230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15231$as_echo "in current directory" >&6; }
15232
15233    # WARNING: This might be a bad thing to do. You need to be sure you want to
15234    # have a configuration in this directory. Do some sanity checks!
15235
15236    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15237      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15238      # other files
15239      files_present=`$LS $OUTPUT_ROOT`
15240      # Configure has already touched config.log and confdefs.h in the current dir when this check
15241      # is performed.
15242      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15243      | $TR -d '\n'`
15244      if test "x$filtered_files" != x; then
15245        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15246$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15248$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15250$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15252$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15253        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15254$as_echo "$as_me: seriously mess up just about everything." >&6;}
15255        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15256$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15257        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15258$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15259        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15260      fi
15261    fi
15262  fi
15263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15264$as_echo_n "checking what configuration name to use... " >&6; }
15265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15266$as_echo "$CONF_NAME" >&6; }
15267
15268
15269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15270
15271  # Input might be given as Windows format, start by converting to
15272  # unix format.
15273  path="$OUTPUT_ROOT"
15274  new_path=`$CYGPATH -u "$path"`
15275
15276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15279  # "foo.exe" is OK but "foo" is an error.
15280  #
15281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15282  # It is also a way to make sure we got the proper file name for the real test later on.
15283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15284  if test "x$test_shortpath" = x; then
15285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15286$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15287    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15288  fi
15289
15290  # Call helper function which possibly converts this using DOS-style short mode.
15291  # If so, the updated path is stored in $new_path.
15292
15293  input_path="$new_path"
15294  # Check if we need to convert this using DOS-style short mode. If the path
15295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15296  # take no chances and rewrite it.
15297  # Note: m4 eats our [], so we need to use [ and ] instead.
15298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15299  if test "x$has_forbidden_chars" != x; then
15300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15304      # Going to short mode and back again did indeed matter. Since short mode is
15305      # case insensitive, let's make it lowercase to improve readability.
15306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15307      # Now convert it back to Unix-stile (cygpath)
15308      input_path=`$CYGPATH -u "$shortmode_path"`
15309      new_path="$input_path"
15310    fi
15311  fi
15312
15313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15314  if test "x$test_cygdrive_prefix" = x; then
15315    # As a simple fix, exclude /usr/bin since it's not a real path.
15316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15318      # a path prefixed by /cygdrive for fixpath to work.
15319      new_path="$CYGWIN_ROOT_PATH$input_path"
15320    fi
15321  fi
15322
15323
15324  if test "x$path" != "x$new_path"; then
15325    OUTPUT_ROOT="$new_path"
15326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15327$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15328  fi
15329
15330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15331
15332  path="$OUTPUT_ROOT"
15333  has_colon=`$ECHO $path | $GREP ^.:`
15334  new_path="$path"
15335  if test "x$has_colon" = x; then
15336    # Not in mixed or Windows style, start by that.
15337    new_path=`cmd //c echo $path`
15338  fi
15339
15340
15341  input_path="$new_path"
15342  # Check if we need to convert this using DOS-style short mode. If the path
15343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15344  # take no chances and rewrite it.
15345  # Note: m4 eats our [], so we need to use [ and ] instead.
15346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15347  if test "x$has_forbidden_chars" != x; then
15348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15350  fi
15351
15352
15353  windows_path="$new_path"
15354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15355    unix_path=`$CYGPATH -u "$windows_path"`
15356    new_path="$unix_path"
15357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15359    new_path="$unix_path"
15360  fi
15361
15362  if test "x$path" != "x$new_path"; then
15363    OUTPUT_ROOT="$new_path"
15364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15365$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15366  fi
15367
15368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15370
15371  else
15372    # We're on a unix platform. Hooray! :)
15373    path="$OUTPUT_ROOT"
15374    has_space=`$ECHO "$path" | $GREP " "`
15375    if test "x$has_space" != x; then
15376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15377$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15378      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15379    fi
15380
15381    # Use eval to expand a potential ~
15382    eval path="$path"
15383    if test ! -f "$path" && test ! -d "$path"; then
15384      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15385    fi
15386
15387    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15388  fi
15389
15390
15391  SPEC=$OUTPUT_ROOT/spec.gmk
15392
15393  CONF_NAME=$CONF_NAME
15394
15395  OUTPUT_ROOT=$OUTPUT_ROOT
15396
15397
15398  # The spec.gmk file contains all variables for the make system.
15399  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15400
15401  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15402  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15403
15404  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15405  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15406
15407  # The compare.sh is used to compare the build output to other builds.
15408  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15409
15410  # The generated Makefile knows where the spec.gmk is and where the source is.
15411  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15412  # which will look for generated configurations
15413  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15414
15415
15416
15417# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15418
15419  for ac_prog in apt-get yum port pkgutil pkgadd
15420do
15421  # Extract the first word of "$ac_prog", so it can be a program name with args.
15422set dummy $ac_prog; ac_word=$2
15423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15424$as_echo_n "checking for $ac_word... " >&6; }
15425if ${ac_cv_prog_PKGHANDLER+:} false; then :
15426  $as_echo_n "(cached) " >&6
15427else
15428  if test -n "$PKGHANDLER"; then
15429  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15430else
15431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15432for as_dir in $PATH
15433do
15434  IFS=$as_save_IFS
15435  test -z "$as_dir" && as_dir=.
15436    for ac_exec_ext in '' $ac_executable_extensions; do
15437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15438    ac_cv_prog_PKGHANDLER="$ac_prog"
15439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15440    break 2
15441  fi
15442done
15443  done
15444IFS=$as_save_IFS
15445
15446fi
15447fi
15448PKGHANDLER=$ac_cv_prog_PKGHANDLER
15449if test -n "$PKGHANDLER"; then
15450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15451$as_echo "$PKGHANDLER" >&6; }
15452else
15453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15454$as_echo "no" >&6; }
15455fi
15456
15457
15458  test -n "$PKGHANDLER" && break
15459done
15460
15461
15462
15463# Setup tools that requires more complex handling, or that is not needed by the configure script.
15464
15465
15466  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15467  if test "x$MAKE" != x; then
15468    # User has supplied a make, test it.
15469    if test ! -f "$MAKE"; then
15470      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15471    fi
15472
15473  MAKE_CANDIDATE=""$MAKE""
15474  DESCRIPTION="user supplied MAKE=$MAKE"
15475  if test "x$MAKE_CANDIDATE" != x; then
15476    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15477$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15478    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15479    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15480    if test "x$IS_GNU_MAKE" = x; then
15481      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15482$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15483    else
15484      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15485      if test "x$IS_MODERN_MAKE" = x; then
15486        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15487$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15488      else
15489        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15490          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15491            MAKE_EXPECTED_ENV='cygwin'
15492          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15493            MAKE_EXPECTED_ENV='msys'
15494          else
15495            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15496          fi
15497          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15498          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15499        else
15500          # Not relevant for non-Windows
15501          IS_MAKE_CORRECT_ENV=true
15502        fi
15503        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15504          { $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
15505$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;}
15506        else
15507          FOUND_MAKE=$MAKE_CANDIDATE
15508
15509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15510
15511  # First separate the path from the arguments. This will split at the first
15512  # space.
15513  complete="$FOUND_MAKE"
15514  path="${complete%% *}"
15515  tmp="$complete EOL"
15516  arguments="${tmp#* }"
15517
15518  # Input might be given as Windows format, start by converting to
15519  # unix format.
15520  new_path=`$CYGPATH -u "$path"`
15521
15522  # Now try to locate executable using which
15523  new_path=`$WHICH "$new_path" 2> /dev/null`
15524  # bat and cmd files are not always considered executable in cygwin causing which
15525  # to not find them
15526  if test "x$new_path" = x \
15527      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15528      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15529    new_path=`$CYGPATH -u "$path"`
15530  fi
15531  if test "x$new_path" = x; then
15532    # Oops. Which didn't find the executable.
15533    # The splitting of arguments from the executable at a space might have been incorrect,
15534    # since paths with space are more likely in Windows. Give it another try with the whole
15535    # argument.
15536    path="$complete"
15537    arguments="EOL"
15538    new_path=`$CYGPATH -u "$path"`
15539    new_path=`$WHICH "$new_path" 2> /dev/null`
15540    # bat and cmd files are not always considered executable in cygwin causing which
15541    # to not find them
15542    if test "x$new_path" = x \
15543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15545      new_path=`$CYGPATH -u "$path"`
15546    fi
15547    if test "x$new_path" = x; then
15548      # It's still not found. Now this is an unrecoverable error.
15549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15550$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15551      has_space=`$ECHO "$complete" | $GREP " "`
15552      if test "x$has_space" != x; then
15553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15555      fi
15556      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15557    fi
15558  fi
15559
15560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15563  # "foo.exe" is OK but "foo" is an error.
15564  #
15565  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15566  # It is also a way to make sure we got the proper file name for the real test later on.
15567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15568  if test "x$test_shortpath" = x; then
15569    # Short path failed, file does not exist as specified.
15570    # Try adding .exe or .cmd
15571    if test -f "${new_path}.exe"; then
15572      input_to_shortpath="${new_path}.exe"
15573    elif test -f "${new_path}.cmd"; then
15574      input_to_shortpath="${new_path}.cmd"
15575    else
15576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15577$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15581    fi
15582  else
15583    input_to_shortpath="$new_path"
15584  fi
15585
15586  # Call helper function which possibly converts this using DOS-style short mode.
15587  # If so, the updated path is stored in $new_path.
15588  new_path="$input_to_shortpath"
15589
15590  input_path="$input_to_shortpath"
15591  # Check if we need to convert this using DOS-style short mode. If the path
15592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15593  # take no chances and rewrite it.
15594  # Note: m4 eats our [], so we need to use [ and ] instead.
15595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15596  if test "x$has_forbidden_chars" != x; then
15597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15601      # Going to short mode and back again did indeed matter. Since short mode is
15602      # case insensitive, let's make it lowercase to improve readability.
15603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15604      # Now convert it back to Unix-stile (cygpath)
15605      input_path=`$CYGPATH -u "$shortmode_path"`
15606      new_path="$input_path"
15607    fi
15608  fi
15609
15610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15611  if test "x$test_cygdrive_prefix" = x; then
15612    # As a simple fix, exclude /usr/bin since it's not a real path.
15613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15615      # a path prefixed by /cygdrive for fixpath to work.
15616      new_path="$CYGWIN_ROOT_PATH$input_path"
15617    fi
15618  fi
15619
15620  # remove trailing .exe if any
15621  new_path="${new_path/%.exe/}"
15622
15623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15624
15625  # First separate the path from the arguments. This will split at the first
15626  # space.
15627  complete="$FOUND_MAKE"
15628  path="${complete%% *}"
15629  tmp="$complete EOL"
15630  arguments="${tmp#* }"
15631
15632  # Input might be given as Windows format, start by converting to
15633  # unix format.
15634  new_path="$path"
15635
15636  windows_path="$new_path"
15637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15638    unix_path=`$CYGPATH -u "$windows_path"`
15639    new_path="$unix_path"
15640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15642    new_path="$unix_path"
15643  fi
15644
15645
15646  # Now try to locate executable using which
15647  new_path=`$WHICH "$new_path" 2> /dev/null`
15648
15649  if test "x$new_path" = x; then
15650    # Oops. Which didn't find the executable.
15651    # The splitting of arguments from the executable at a space might have been incorrect,
15652    # since paths with space are more likely in Windows. Give it another try with the whole
15653    # argument.
15654    path="$complete"
15655    arguments="EOL"
15656    new_path="$path"
15657
15658  windows_path="$new_path"
15659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15660    unix_path=`$CYGPATH -u "$windows_path"`
15661    new_path="$unix_path"
15662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15664    new_path="$unix_path"
15665  fi
15666
15667
15668    new_path=`$WHICH "$new_path" 2> /dev/null`
15669    # bat and cmd files are not always considered executable in MSYS causing which
15670    # to not find them
15671    if test "x$new_path" = x \
15672        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15673        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15674      new_path="$path"
15675
15676  windows_path="$new_path"
15677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15678    unix_path=`$CYGPATH -u "$windows_path"`
15679    new_path="$unix_path"
15680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15682    new_path="$unix_path"
15683  fi
15684
15685    fi
15686
15687    if test "x$new_path" = x; then
15688      # It's still not found. Now this is an unrecoverable error.
15689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15691      has_space=`$ECHO "$complete" | $GREP " "`
15692      if test "x$has_space" != x; then
15693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15695      fi
15696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15697    fi
15698  fi
15699
15700  # Now new_path has a complete unix path to the binary
15701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15702    # Keep paths in /bin as-is, but remove trailing .exe if any
15703    new_path="${new_path/%.exe/}"
15704    # Do not save /bin paths to all_fixpath_prefixes!
15705  else
15706    # Not in mixed or Windows style, start by that.
15707    new_path=`cmd //c echo $new_path`
15708
15709  input_path="$new_path"
15710  # Check if we need to convert this using DOS-style short mode. If the path
15711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15712  # take no chances and rewrite it.
15713  # Note: m4 eats our [], so we need to use [ and ] instead.
15714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15715  if test "x$has_forbidden_chars" != x; then
15716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15718  fi
15719
15720    # Output is in $new_path
15721
15722  windows_path="$new_path"
15723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15724    unix_path=`$CYGPATH -u "$windows_path"`
15725    new_path="$unix_path"
15726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15728    new_path="$unix_path"
15729  fi
15730
15731    # remove trailing .exe if any
15732    new_path="${new_path/%.exe/}"
15733
15734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15736  fi
15737
15738  else
15739    # We're on a unix platform. Hooray! :)
15740    # First separate the path from the arguments. This will split at the first
15741    # space.
15742    complete="$FOUND_MAKE"
15743    path="${complete%% *}"
15744    tmp="$complete EOL"
15745    arguments="${tmp#* }"
15746
15747    # Cannot rely on the command "which" here since it doesn't always work.
15748    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15749    if test -z "$is_absolute_path"; then
15750      # Path to executable is not absolute. Find it.
15751      IFS_save="$IFS"
15752      IFS=:
15753      for p in $PATH; do
15754        if test -f "$p/$path" && test -x "$p/$path"; then
15755          new_path="$p/$path"
15756          break
15757        fi
15758      done
15759      IFS="$IFS_save"
15760    else
15761      # This is an absolute path, we can use it without further modifications.
15762      new_path="$path"
15763    fi
15764
15765    if test "x$new_path" = x; then
15766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15767$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15768      has_space=`$ECHO "$complete" | $GREP " "`
15769      if test "x$has_space" != x; then
15770        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15771$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15772      fi
15773      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15774    fi
15775  fi
15776
15777  # Now join together the path and the arguments once again
15778  if test "x$arguments" != xEOL; then
15779    new_complete="$new_path ${arguments% *}"
15780  else
15781    new_complete="$new_path"
15782  fi
15783
15784  if test "x$complete" != "x$new_complete"; then
15785    FOUND_MAKE="$new_complete"
15786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15787$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15788  fi
15789
15790        fi
15791      fi
15792    fi
15793  fi
15794
15795    if test "x$FOUND_MAKE" = x; then
15796      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15797    fi
15798  else
15799    # Try our hardest to locate a correct version of GNU make
15800    for ac_prog in gmake
15801do
15802  # Extract the first word of "$ac_prog", so it can be a program name with args.
15803set dummy $ac_prog; ac_word=$2
15804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15805$as_echo_n "checking for $ac_word... " >&6; }
15806if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15807  $as_echo_n "(cached) " >&6
15808else
15809  case $CHECK_GMAKE in
15810  [\\/]* | ?:[\\/]*)
15811  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15812  ;;
15813  *)
15814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15815for as_dir in $PATH
15816do
15817  IFS=$as_save_IFS
15818  test -z "$as_dir" && as_dir=.
15819    for ac_exec_ext in '' $ac_executable_extensions; do
15820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15821    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15823    break 2
15824  fi
15825done
15826  done
15827IFS=$as_save_IFS
15828
15829  ;;
15830esac
15831fi
15832CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15833if test -n "$CHECK_GMAKE"; then
15834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15835$as_echo "$CHECK_GMAKE" >&6; }
15836else
15837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15838$as_echo "no" >&6; }
15839fi
15840
15841
15842  test -n "$CHECK_GMAKE" && break
15843done
15844
15845
15846  MAKE_CANDIDATE=""$CHECK_GMAKE""
15847  DESCRIPTION="gmake in PATH"
15848  if test "x$MAKE_CANDIDATE" != x; then
15849    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15850$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15851    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15852    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15853    if test "x$IS_GNU_MAKE" = x; then
15854      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15855$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15856    else
15857      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15858      if test "x$IS_MODERN_MAKE" = x; then
15859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15860$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15861      else
15862        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15863          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15864            MAKE_EXPECTED_ENV='cygwin'
15865          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15866            MAKE_EXPECTED_ENV='msys'
15867          else
15868            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15869          fi
15870          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15871          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15872        else
15873          # Not relevant for non-Windows
15874          IS_MAKE_CORRECT_ENV=true
15875        fi
15876        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15877          { $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
15878$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;}
15879        else
15880          FOUND_MAKE=$MAKE_CANDIDATE
15881
15882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15883
15884  # First separate the path from the arguments. This will split at the first
15885  # space.
15886  complete="$FOUND_MAKE"
15887  path="${complete%% *}"
15888  tmp="$complete EOL"
15889  arguments="${tmp#* }"
15890
15891  # Input might be given as Windows format, start by converting to
15892  # unix format.
15893  new_path=`$CYGPATH -u "$path"`
15894
15895  # Now try to locate executable using which
15896  new_path=`$WHICH "$new_path" 2> /dev/null`
15897  # bat and cmd files are not always considered executable in cygwin causing which
15898  # to not find them
15899  if test "x$new_path" = x \
15900      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15901      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15902    new_path=`$CYGPATH -u "$path"`
15903  fi
15904  if test "x$new_path" = x; then
15905    # Oops. Which didn't find the executable.
15906    # The splitting of arguments from the executable at a space might have been incorrect,
15907    # since paths with space are more likely in Windows. Give it another try with the whole
15908    # argument.
15909    path="$complete"
15910    arguments="EOL"
15911    new_path=`$CYGPATH -u "$path"`
15912    new_path=`$WHICH "$new_path" 2> /dev/null`
15913    # bat and cmd files are not always considered executable in cygwin causing which
15914    # to not find them
15915    if test "x$new_path" = x \
15916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15918      new_path=`$CYGPATH -u "$path"`
15919    fi
15920    if test "x$new_path" = x; then
15921      # It's still not found. Now this is an unrecoverable error.
15922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15923$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15924      has_space=`$ECHO "$complete" | $GREP " "`
15925      if test "x$has_space" != x; then
15926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15928      fi
15929      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15930    fi
15931  fi
15932
15933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15936  # "foo.exe" is OK but "foo" is an error.
15937  #
15938  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15939  # It is also a way to make sure we got the proper file name for the real test later on.
15940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15941  if test "x$test_shortpath" = x; then
15942    # Short path failed, file does not exist as specified.
15943    # Try adding .exe or .cmd
15944    if test -f "${new_path}.exe"; then
15945      input_to_shortpath="${new_path}.exe"
15946    elif test -f "${new_path}.cmd"; then
15947      input_to_shortpath="${new_path}.cmd"
15948    else
15949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15950$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15951      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15952$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15953      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15954    fi
15955  else
15956    input_to_shortpath="$new_path"
15957  fi
15958
15959  # Call helper function which possibly converts this using DOS-style short mode.
15960  # If so, the updated path is stored in $new_path.
15961  new_path="$input_to_shortpath"
15962
15963  input_path="$input_to_shortpath"
15964  # Check if we need to convert this using DOS-style short mode. If the path
15965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15966  # take no chances and rewrite it.
15967  # Note: m4 eats our [], so we need to use [ and ] instead.
15968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15969  if test "x$has_forbidden_chars" != x; then
15970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15974      # Going to short mode and back again did indeed matter. Since short mode is
15975      # case insensitive, let's make it lowercase to improve readability.
15976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15977      # Now convert it back to Unix-stile (cygpath)
15978      input_path=`$CYGPATH -u "$shortmode_path"`
15979      new_path="$input_path"
15980    fi
15981  fi
15982
15983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15984  if test "x$test_cygdrive_prefix" = x; then
15985    # As a simple fix, exclude /usr/bin since it's not a real path.
15986    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15988      # a path prefixed by /cygdrive for fixpath to work.
15989      new_path="$CYGWIN_ROOT_PATH$input_path"
15990    fi
15991  fi
15992
15993  # remove trailing .exe if any
15994  new_path="${new_path/%.exe/}"
15995
15996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15997
15998  # First separate the path from the arguments. This will split at the first
15999  # space.
16000  complete="$FOUND_MAKE"
16001  path="${complete%% *}"
16002  tmp="$complete EOL"
16003  arguments="${tmp#* }"
16004
16005  # Input might be given as Windows format, start by converting to
16006  # unix format.
16007  new_path="$path"
16008
16009  windows_path="$new_path"
16010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16011    unix_path=`$CYGPATH -u "$windows_path"`
16012    new_path="$unix_path"
16013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16015    new_path="$unix_path"
16016  fi
16017
16018
16019  # Now try to locate executable using which
16020  new_path=`$WHICH "$new_path" 2> /dev/null`
16021
16022  if test "x$new_path" = x; then
16023    # Oops. Which didn't find the executable.
16024    # The splitting of arguments from the executable at a space might have been incorrect,
16025    # since paths with space are more likely in Windows. Give it another try with the whole
16026    # argument.
16027    path="$complete"
16028    arguments="EOL"
16029    new_path="$path"
16030
16031  windows_path="$new_path"
16032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16033    unix_path=`$CYGPATH -u "$windows_path"`
16034    new_path="$unix_path"
16035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16037    new_path="$unix_path"
16038  fi
16039
16040
16041    new_path=`$WHICH "$new_path" 2> /dev/null`
16042    # bat and cmd files are not always considered executable in MSYS causing which
16043    # to not find them
16044    if test "x$new_path" = x \
16045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16047      new_path="$path"
16048
16049  windows_path="$new_path"
16050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16051    unix_path=`$CYGPATH -u "$windows_path"`
16052    new_path="$unix_path"
16053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16055    new_path="$unix_path"
16056  fi
16057
16058    fi
16059
16060    if test "x$new_path" = x; then
16061      # It's still not found. Now this is an unrecoverable error.
16062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16064      has_space=`$ECHO "$complete" | $GREP " "`
16065      if test "x$has_space" != x; then
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16068      fi
16069      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16070    fi
16071  fi
16072
16073  # Now new_path has a complete unix path to the binary
16074  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16075    # Keep paths in /bin as-is, but remove trailing .exe if any
16076    new_path="${new_path/%.exe/}"
16077    # Do not save /bin paths to all_fixpath_prefixes!
16078  else
16079    # Not in mixed or Windows style, start by that.
16080    new_path=`cmd //c echo $new_path`
16081
16082  input_path="$new_path"
16083  # Check if we need to convert this using DOS-style short mode. If the path
16084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16085  # take no chances and rewrite it.
16086  # Note: m4 eats our [], so we need to use [ and ] instead.
16087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16088  if test "x$has_forbidden_chars" != x; then
16089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16091  fi
16092
16093    # Output is in $new_path
16094
16095  windows_path="$new_path"
16096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16097    unix_path=`$CYGPATH -u "$windows_path"`
16098    new_path="$unix_path"
16099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16101    new_path="$unix_path"
16102  fi
16103
16104    # remove trailing .exe if any
16105    new_path="${new_path/%.exe/}"
16106
16107    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16108    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16109  fi
16110
16111  else
16112    # We're on a unix platform. Hooray! :)
16113    # First separate the path from the arguments. This will split at the first
16114    # space.
16115    complete="$FOUND_MAKE"
16116    path="${complete%% *}"
16117    tmp="$complete EOL"
16118    arguments="${tmp#* }"
16119
16120    # Cannot rely on the command "which" here since it doesn't always work.
16121    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16122    if test -z "$is_absolute_path"; then
16123      # Path to executable is not absolute. Find it.
16124      IFS_save="$IFS"
16125      IFS=:
16126      for p in $PATH; do
16127        if test -f "$p/$path" && test -x "$p/$path"; then
16128          new_path="$p/$path"
16129          break
16130        fi
16131      done
16132      IFS="$IFS_save"
16133    else
16134      # This is an absolute path, we can use it without further modifications.
16135      new_path="$path"
16136    fi
16137
16138    if test "x$new_path" = x; then
16139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16140$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16141      has_space=`$ECHO "$complete" | $GREP " "`
16142      if test "x$has_space" != x; then
16143        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16145      fi
16146      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16147    fi
16148  fi
16149
16150  # Now join together the path and the arguments once again
16151  if test "x$arguments" != xEOL; then
16152    new_complete="$new_path ${arguments% *}"
16153  else
16154    new_complete="$new_path"
16155  fi
16156
16157  if test "x$complete" != "x$new_complete"; then
16158    FOUND_MAKE="$new_complete"
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16160$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16161  fi
16162
16163        fi
16164      fi
16165    fi
16166  fi
16167
16168
16169    if test "x$FOUND_MAKE" = x; then
16170      for ac_prog in make
16171do
16172  # Extract the first word of "$ac_prog", so it can be a program name with args.
16173set dummy $ac_prog; ac_word=$2
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16175$as_echo_n "checking for $ac_word... " >&6; }
16176if ${ac_cv_path_CHECK_MAKE+:} false; then :
16177  $as_echo_n "(cached) " >&6
16178else
16179  case $CHECK_MAKE in
16180  [\\/]* | ?:[\\/]*)
16181  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16182  ;;
16183  *)
16184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16185for as_dir in $PATH
16186do
16187  IFS=$as_save_IFS
16188  test -z "$as_dir" && as_dir=.
16189    for ac_exec_ext in '' $ac_executable_extensions; do
16190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16191    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16193    break 2
16194  fi
16195done
16196  done
16197IFS=$as_save_IFS
16198
16199  ;;
16200esac
16201fi
16202CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16203if test -n "$CHECK_MAKE"; then
16204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16205$as_echo "$CHECK_MAKE" >&6; }
16206else
16207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16208$as_echo "no" >&6; }
16209fi
16210
16211
16212  test -n "$CHECK_MAKE" && break
16213done
16214
16215
16216  MAKE_CANDIDATE=""$CHECK_MAKE""
16217  DESCRIPTION="make in PATH"
16218  if test "x$MAKE_CANDIDATE" != x; then
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16220$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16221    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16222    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16223    if test "x$IS_GNU_MAKE" = x; then
16224      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16225$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16226    else
16227      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16228      if test "x$IS_MODERN_MAKE" = x; then
16229        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16230$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16231      else
16232        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16233          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16234            MAKE_EXPECTED_ENV='cygwin'
16235          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16236            MAKE_EXPECTED_ENV='msys'
16237          else
16238            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16239          fi
16240          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16241          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16242        else
16243          # Not relevant for non-Windows
16244          IS_MAKE_CORRECT_ENV=true
16245        fi
16246        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16247          { $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
16248$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;}
16249        else
16250          FOUND_MAKE=$MAKE_CANDIDATE
16251
16252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253
16254  # First separate the path from the arguments. This will split at the first
16255  # space.
16256  complete="$FOUND_MAKE"
16257  path="${complete%% *}"
16258  tmp="$complete EOL"
16259  arguments="${tmp#* }"
16260
16261  # Input might be given as Windows format, start by converting to
16262  # unix format.
16263  new_path=`$CYGPATH -u "$path"`
16264
16265  # Now try to locate executable using which
16266  new_path=`$WHICH "$new_path" 2> /dev/null`
16267  # bat and cmd files are not always considered executable in cygwin causing which
16268  # to not find them
16269  if test "x$new_path" = x \
16270      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16271      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16272    new_path=`$CYGPATH -u "$path"`
16273  fi
16274  if test "x$new_path" = x; then
16275    # Oops. Which didn't find the executable.
16276    # The splitting of arguments from the executable at a space might have been incorrect,
16277    # since paths with space are more likely in Windows. Give it another try with the whole
16278    # argument.
16279    path="$complete"
16280    arguments="EOL"
16281    new_path=`$CYGPATH -u "$path"`
16282    new_path=`$WHICH "$new_path" 2> /dev/null`
16283    # bat and cmd files are not always considered executable in cygwin causing which
16284    # to not find them
16285    if test "x$new_path" = x \
16286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16288      new_path=`$CYGPATH -u "$path"`
16289    fi
16290    if test "x$new_path" = x; then
16291      # It's still not found. Now this is an unrecoverable error.
16292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16293$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16294      has_space=`$ECHO "$complete" | $GREP " "`
16295      if test "x$has_space" != x; then
16296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16298      fi
16299      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16300    fi
16301  fi
16302
16303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16306  # "foo.exe" is OK but "foo" is an error.
16307  #
16308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16309  # It is also a way to make sure we got the proper file name for the real test later on.
16310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16311  if test "x$test_shortpath" = x; then
16312    # Short path failed, file does not exist as specified.
16313    # Try adding .exe or .cmd
16314    if test -f "${new_path}.exe"; then
16315      input_to_shortpath="${new_path}.exe"
16316    elif test -f "${new_path}.cmd"; then
16317      input_to_shortpath="${new_path}.cmd"
16318    else
16319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16320$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16323      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16324    fi
16325  else
16326    input_to_shortpath="$new_path"
16327  fi
16328
16329  # Call helper function which possibly converts this using DOS-style short mode.
16330  # If so, the updated path is stored in $new_path.
16331  new_path="$input_to_shortpath"
16332
16333  input_path="$input_to_shortpath"
16334  # Check if we need to convert this using DOS-style short mode. If the path
16335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16336  # take no chances and rewrite it.
16337  # Note: m4 eats our [], so we need to use [ and ] instead.
16338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16339  if test "x$has_forbidden_chars" != x; then
16340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16344      # Going to short mode and back again did indeed matter. Since short mode is
16345      # case insensitive, let's make it lowercase to improve readability.
16346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16347      # Now convert it back to Unix-stile (cygpath)
16348      input_path=`$CYGPATH -u "$shortmode_path"`
16349      new_path="$input_path"
16350    fi
16351  fi
16352
16353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16354  if test "x$test_cygdrive_prefix" = x; then
16355    # As a simple fix, exclude /usr/bin since it's not a real path.
16356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16358      # a path prefixed by /cygdrive for fixpath to work.
16359      new_path="$CYGWIN_ROOT_PATH$input_path"
16360    fi
16361  fi
16362
16363  # remove trailing .exe if any
16364  new_path="${new_path/%.exe/}"
16365
16366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16367
16368  # First separate the path from the arguments. This will split at the first
16369  # space.
16370  complete="$FOUND_MAKE"
16371  path="${complete%% *}"
16372  tmp="$complete EOL"
16373  arguments="${tmp#* }"
16374
16375  # Input might be given as Windows format, start by converting to
16376  # unix format.
16377  new_path="$path"
16378
16379  windows_path="$new_path"
16380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16381    unix_path=`$CYGPATH -u "$windows_path"`
16382    new_path="$unix_path"
16383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16385    new_path="$unix_path"
16386  fi
16387
16388
16389  # Now try to locate executable using which
16390  new_path=`$WHICH "$new_path" 2> /dev/null`
16391
16392  if test "x$new_path" = x; then
16393    # Oops. Which didn't find the executable.
16394    # The splitting of arguments from the executable at a space might have been incorrect,
16395    # since paths with space are more likely in Windows. Give it another try with the whole
16396    # argument.
16397    path="$complete"
16398    arguments="EOL"
16399    new_path="$path"
16400
16401  windows_path="$new_path"
16402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16403    unix_path=`$CYGPATH -u "$windows_path"`
16404    new_path="$unix_path"
16405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16407    new_path="$unix_path"
16408  fi
16409
16410
16411    new_path=`$WHICH "$new_path" 2> /dev/null`
16412    # bat and cmd files are not always considered executable in MSYS causing which
16413    # to not find them
16414    if test "x$new_path" = x \
16415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16417      new_path="$path"
16418
16419  windows_path="$new_path"
16420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421    unix_path=`$CYGPATH -u "$windows_path"`
16422    new_path="$unix_path"
16423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16425    new_path="$unix_path"
16426  fi
16427
16428    fi
16429
16430    if test "x$new_path" = x; then
16431      # It's still not found. Now this is an unrecoverable error.
16432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16434      has_space=`$ECHO "$complete" | $GREP " "`
16435      if test "x$has_space" != x; then
16436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16438      fi
16439      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16440    fi
16441  fi
16442
16443  # Now new_path has a complete unix path to the binary
16444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16445    # Keep paths in /bin as-is, but remove trailing .exe if any
16446    new_path="${new_path/%.exe/}"
16447    # Do not save /bin paths to all_fixpath_prefixes!
16448  else
16449    # Not in mixed or Windows style, start by that.
16450    new_path=`cmd //c echo $new_path`
16451
16452  input_path="$new_path"
16453  # Check if we need to convert this using DOS-style short mode. If the path
16454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16455  # take no chances and rewrite it.
16456  # Note: m4 eats our [], so we need to use [ and ] instead.
16457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16458  if test "x$has_forbidden_chars" != x; then
16459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16461  fi
16462
16463    # Output is in $new_path
16464
16465  windows_path="$new_path"
16466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16467    unix_path=`$CYGPATH -u "$windows_path"`
16468    new_path="$unix_path"
16469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16471    new_path="$unix_path"
16472  fi
16473
16474    # remove trailing .exe if any
16475    new_path="${new_path/%.exe/}"
16476
16477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16479  fi
16480
16481  else
16482    # We're on a unix platform. Hooray! :)
16483    # First separate the path from the arguments. This will split at the first
16484    # space.
16485    complete="$FOUND_MAKE"
16486    path="${complete%% *}"
16487    tmp="$complete EOL"
16488    arguments="${tmp#* }"
16489
16490    # Cannot rely on the command "which" here since it doesn't always work.
16491    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16492    if test -z "$is_absolute_path"; then
16493      # Path to executable is not absolute. Find it.
16494      IFS_save="$IFS"
16495      IFS=:
16496      for p in $PATH; do
16497        if test -f "$p/$path" && test -x "$p/$path"; then
16498          new_path="$p/$path"
16499          break
16500        fi
16501      done
16502      IFS="$IFS_save"
16503    else
16504      # This is an absolute path, we can use it without further modifications.
16505      new_path="$path"
16506    fi
16507
16508    if test "x$new_path" = x; then
16509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16510$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16511      has_space=`$ECHO "$complete" | $GREP " "`
16512      if test "x$has_space" != x; then
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16514$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16515      fi
16516      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16517    fi
16518  fi
16519
16520  # Now join together the path and the arguments once again
16521  if test "x$arguments" != xEOL; then
16522    new_complete="$new_path ${arguments% *}"
16523  else
16524    new_complete="$new_path"
16525  fi
16526
16527  if test "x$complete" != "x$new_complete"; then
16528    FOUND_MAKE="$new_complete"
16529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16530$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16531  fi
16532
16533        fi
16534      fi
16535    fi
16536  fi
16537
16538    fi
16539
16540    if test "x$FOUND_MAKE" = x; then
16541      if test "x$TOOLCHAIN_PATH" != x; then
16542        # We have a toolchain path, check that as well before giving up.
16543        OLD_PATH=$PATH
16544        PATH=$TOOLCHAIN_PATH:$PATH
16545        for ac_prog in gmake
16546do
16547  # Extract the first word of "$ac_prog", so it can be a program name with args.
16548set dummy $ac_prog; ac_word=$2
16549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16550$as_echo_n "checking for $ac_word... " >&6; }
16551if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16552  $as_echo_n "(cached) " >&6
16553else
16554  case $CHECK_TOOLSDIR_GMAKE in
16555  [\\/]* | ?:[\\/]*)
16556  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16557  ;;
16558  *)
16559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16560for as_dir in $PATH
16561do
16562  IFS=$as_save_IFS
16563  test -z "$as_dir" && as_dir=.
16564    for ac_exec_ext in '' $ac_executable_extensions; do
16565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16566    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16568    break 2
16569  fi
16570done
16571  done
16572IFS=$as_save_IFS
16573
16574  ;;
16575esac
16576fi
16577CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16578if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16580$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16581else
16582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16583$as_echo "no" >&6; }
16584fi
16585
16586
16587  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16588done
16589
16590
16591  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16592  DESCRIPTION="gmake in tools-dir"
16593  if test "x$MAKE_CANDIDATE" != x; then
16594    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16595$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16596    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16597    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16598    if test "x$IS_GNU_MAKE" = x; then
16599      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16600$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16601    else
16602      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16603      if test "x$IS_MODERN_MAKE" = x; then
16604        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16605$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16606      else
16607        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16608          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16609            MAKE_EXPECTED_ENV='cygwin'
16610          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16611            MAKE_EXPECTED_ENV='msys'
16612          else
16613            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16614          fi
16615          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16616          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16617        else
16618          # Not relevant for non-Windows
16619          IS_MAKE_CORRECT_ENV=true
16620        fi
16621        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16622          { $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
16623$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;}
16624        else
16625          FOUND_MAKE=$MAKE_CANDIDATE
16626
16627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16628
16629  # First separate the path from the arguments. This will split at the first
16630  # space.
16631  complete="$FOUND_MAKE"
16632  path="${complete%% *}"
16633  tmp="$complete EOL"
16634  arguments="${tmp#* }"
16635
16636  # Input might be given as Windows format, start by converting to
16637  # unix format.
16638  new_path=`$CYGPATH -u "$path"`
16639
16640  # Now try to locate executable using which
16641  new_path=`$WHICH "$new_path" 2> /dev/null`
16642  # bat and cmd files are not always considered executable in cygwin causing which
16643  # to not find them
16644  if test "x$new_path" = x \
16645      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16646      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16647    new_path=`$CYGPATH -u "$path"`
16648  fi
16649  if test "x$new_path" = x; then
16650    # Oops. Which didn't find the executable.
16651    # The splitting of arguments from the executable at a space might have been incorrect,
16652    # since paths with space are more likely in Windows. Give it another try with the whole
16653    # argument.
16654    path="$complete"
16655    arguments="EOL"
16656    new_path=`$CYGPATH -u "$path"`
16657    new_path=`$WHICH "$new_path" 2> /dev/null`
16658    # bat and cmd files are not always considered executable in cygwin causing which
16659    # to not find them
16660    if test "x$new_path" = x \
16661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16663      new_path=`$CYGPATH -u "$path"`
16664    fi
16665    if test "x$new_path" = x; then
16666      # It's still not found. Now this is an unrecoverable error.
16667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16668$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16669      has_space=`$ECHO "$complete" | $GREP " "`
16670      if test "x$has_space" != x; then
16671        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16672$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16673      fi
16674      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16675    fi
16676  fi
16677
16678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16681  # "foo.exe" is OK but "foo" is an error.
16682  #
16683  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16684  # It is also a way to make sure we got the proper file name for the real test later on.
16685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16686  if test "x$test_shortpath" = x; then
16687    # Short path failed, file does not exist as specified.
16688    # Try adding .exe or .cmd
16689    if test -f "${new_path}.exe"; then
16690      input_to_shortpath="${new_path}.exe"
16691    elif test -f "${new_path}.cmd"; then
16692      input_to_shortpath="${new_path}.cmd"
16693    else
16694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16696      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16697$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16698      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16699    fi
16700  else
16701    input_to_shortpath="$new_path"
16702  fi
16703
16704  # Call helper function which possibly converts this using DOS-style short mode.
16705  # If so, the updated path is stored in $new_path.
16706  new_path="$input_to_shortpath"
16707
16708  input_path="$input_to_shortpath"
16709  # Check if we need to convert this using DOS-style short mode. If the path
16710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16711  # take no chances and rewrite it.
16712  # Note: m4 eats our [], so we need to use [ and ] instead.
16713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16714  if test "x$has_forbidden_chars" != x; then
16715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16719      # Going to short mode and back again did indeed matter. Since short mode is
16720      # case insensitive, let's make it lowercase to improve readability.
16721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16722      # Now convert it back to Unix-stile (cygpath)
16723      input_path=`$CYGPATH -u "$shortmode_path"`
16724      new_path="$input_path"
16725    fi
16726  fi
16727
16728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16729  if test "x$test_cygdrive_prefix" = x; then
16730    # As a simple fix, exclude /usr/bin since it's not a real path.
16731    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16733      # a path prefixed by /cygdrive for fixpath to work.
16734      new_path="$CYGWIN_ROOT_PATH$input_path"
16735    fi
16736  fi
16737
16738  # remove trailing .exe if any
16739  new_path="${new_path/%.exe/}"
16740
16741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16742
16743  # First separate the path from the arguments. This will split at the first
16744  # space.
16745  complete="$FOUND_MAKE"
16746  path="${complete%% *}"
16747  tmp="$complete EOL"
16748  arguments="${tmp#* }"
16749
16750  # Input might be given as Windows format, start by converting to
16751  # unix format.
16752  new_path="$path"
16753
16754  windows_path="$new_path"
16755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16756    unix_path=`$CYGPATH -u "$windows_path"`
16757    new_path="$unix_path"
16758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16760    new_path="$unix_path"
16761  fi
16762
16763
16764  # Now try to locate executable using which
16765  new_path=`$WHICH "$new_path" 2> /dev/null`
16766
16767  if test "x$new_path" = x; then
16768    # Oops. Which didn't find the executable.
16769    # The splitting of arguments from the executable at a space might have been incorrect,
16770    # since paths with space are more likely in Windows. Give it another try with the whole
16771    # argument.
16772    path="$complete"
16773    arguments="EOL"
16774    new_path="$path"
16775
16776  windows_path="$new_path"
16777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16778    unix_path=`$CYGPATH -u "$windows_path"`
16779    new_path="$unix_path"
16780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16782    new_path="$unix_path"
16783  fi
16784
16785
16786    new_path=`$WHICH "$new_path" 2> /dev/null`
16787    # bat and cmd files are not always considered executable in MSYS causing which
16788    # to not find them
16789    if test "x$new_path" = x \
16790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16792      new_path="$path"
16793
16794  windows_path="$new_path"
16795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16796    unix_path=`$CYGPATH -u "$windows_path"`
16797    new_path="$unix_path"
16798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16800    new_path="$unix_path"
16801  fi
16802
16803    fi
16804
16805    if test "x$new_path" = x; then
16806      # It's still not found. Now this is an unrecoverable error.
16807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16808$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16809      has_space=`$ECHO "$complete" | $GREP " "`
16810      if test "x$has_space" != x; then
16811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16813      fi
16814      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16815    fi
16816  fi
16817
16818  # Now new_path has a complete unix path to the binary
16819  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16820    # Keep paths in /bin as-is, but remove trailing .exe if any
16821    new_path="${new_path/%.exe/}"
16822    # Do not save /bin paths to all_fixpath_prefixes!
16823  else
16824    # Not in mixed or Windows style, start by that.
16825    new_path=`cmd //c echo $new_path`
16826
16827  input_path="$new_path"
16828  # Check if we need to convert this using DOS-style short mode. If the path
16829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16830  # take no chances and rewrite it.
16831  # Note: m4 eats our [], so we need to use [ and ] instead.
16832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16833  if test "x$has_forbidden_chars" != x; then
16834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16836  fi
16837
16838    # Output is in $new_path
16839
16840  windows_path="$new_path"
16841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16842    unix_path=`$CYGPATH -u "$windows_path"`
16843    new_path="$unix_path"
16844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16846    new_path="$unix_path"
16847  fi
16848
16849    # remove trailing .exe if any
16850    new_path="${new_path/%.exe/}"
16851
16852    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16853    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16854  fi
16855
16856  else
16857    # We're on a unix platform. Hooray! :)
16858    # First separate the path from the arguments. This will split at the first
16859    # space.
16860    complete="$FOUND_MAKE"
16861    path="${complete%% *}"
16862    tmp="$complete EOL"
16863    arguments="${tmp#* }"
16864
16865    # Cannot rely on the command "which" here since it doesn't always work.
16866    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16867    if test -z "$is_absolute_path"; then
16868      # Path to executable is not absolute. Find it.
16869      IFS_save="$IFS"
16870      IFS=:
16871      for p in $PATH; do
16872        if test -f "$p/$path" && test -x "$p/$path"; then
16873          new_path="$p/$path"
16874          break
16875        fi
16876      done
16877      IFS="$IFS_save"
16878    else
16879      # This is an absolute path, we can use it without further modifications.
16880      new_path="$path"
16881    fi
16882
16883    if test "x$new_path" = x; then
16884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16885$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16886      has_space=`$ECHO "$complete" | $GREP " "`
16887      if test "x$has_space" != x; then
16888        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16890      fi
16891      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16892    fi
16893  fi
16894
16895  # Now join together the path and the arguments once again
16896  if test "x$arguments" != xEOL; then
16897    new_complete="$new_path ${arguments% *}"
16898  else
16899    new_complete="$new_path"
16900  fi
16901
16902  if test "x$complete" != "x$new_complete"; then
16903    FOUND_MAKE="$new_complete"
16904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16905$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16906  fi
16907
16908        fi
16909      fi
16910    fi
16911  fi
16912
16913        if test "x$FOUND_MAKE" = x; then
16914          for ac_prog in make
16915do
16916  # Extract the first word of "$ac_prog", so it can be a program name with args.
16917set dummy $ac_prog; ac_word=$2
16918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16919$as_echo_n "checking for $ac_word... " >&6; }
16920if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16921  $as_echo_n "(cached) " >&6
16922else
16923  case $CHECK_TOOLSDIR_MAKE in
16924  [\\/]* | ?:[\\/]*)
16925  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16926  ;;
16927  *)
16928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16929for as_dir in $PATH
16930do
16931  IFS=$as_save_IFS
16932  test -z "$as_dir" && as_dir=.
16933    for ac_exec_ext in '' $ac_executable_extensions; do
16934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16935    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16937    break 2
16938  fi
16939done
16940  done
16941IFS=$as_save_IFS
16942
16943  ;;
16944esac
16945fi
16946CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16947if test -n "$CHECK_TOOLSDIR_MAKE"; then
16948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16949$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16950else
16951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16952$as_echo "no" >&6; }
16953fi
16954
16955
16956  test -n "$CHECK_TOOLSDIR_MAKE" && break
16957done
16958
16959
16960  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16961  DESCRIPTION="make in tools-dir"
16962  if test "x$MAKE_CANDIDATE" != x; then
16963    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16964$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16965    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16966    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16967    if test "x$IS_GNU_MAKE" = x; then
16968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16969$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16970    else
16971      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16972      if test "x$IS_MODERN_MAKE" = x; then
16973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16974$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16975      else
16976        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16977          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978            MAKE_EXPECTED_ENV='cygwin'
16979          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980            MAKE_EXPECTED_ENV='msys'
16981          else
16982            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16983          fi
16984          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16985          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16986        else
16987          # Not relevant for non-Windows
16988          IS_MAKE_CORRECT_ENV=true
16989        fi
16990        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16991          { $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
16992$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;}
16993        else
16994          FOUND_MAKE=$MAKE_CANDIDATE
16995
16996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16997
16998  # First separate the path from the arguments. This will split at the first
16999  # space.
17000  complete="$FOUND_MAKE"
17001  path="${complete%% *}"
17002  tmp="$complete EOL"
17003  arguments="${tmp#* }"
17004
17005  # Input might be given as Windows format, start by converting to
17006  # unix format.
17007  new_path=`$CYGPATH -u "$path"`
17008
17009  # Now try to locate executable using which
17010  new_path=`$WHICH "$new_path" 2> /dev/null`
17011  # bat and cmd files are not always considered executable in cygwin causing which
17012  # to not find them
17013  if test "x$new_path" = x \
17014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17016    new_path=`$CYGPATH -u "$path"`
17017  fi
17018  if test "x$new_path" = x; then
17019    # Oops. Which didn't find the executable.
17020    # The splitting of arguments from the executable at a space might have been incorrect,
17021    # since paths with space are more likely in Windows. Give it another try with the whole
17022    # argument.
17023    path="$complete"
17024    arguments="EOL"
17025    new_path=`$CYGPATH -u "$path"`
17026    new_path=`$WHICH "$new_path" 2> /dev/null`
17027    # bat and cmd files are not always considered executable in cygwin causing which
17028    # to not find them
17029    if test "x$new_path" = x \
17030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17032      new_path=`$CYGPATH -u "$path"`
17033    fi
17034    if test "x$new_path" = x; then
17035      # It's still not found. Now this is an unrecoverable error.
17036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17038      has_space=`$ECHO "$complete" | $GREP " "`
17039      if test "x$has_space" != x; then
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17042      fi
17043      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17044    fi
17045  fi
17046
17047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17050  # "foo.exe" is OK but "foo" is an error.
17051  #
17052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17053  # It is also a way to make sure we got the proper file name for the real test later on.
17054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17055  if test "x$test_shortpath" = x; then
17056    # Short path failed, file does not exist as specified.
17057    # Try adding .exe or .cmd
17058    if test -f "${new_path}.exe"; then
17059      input_to_shortpath="${new_path}.exe"
17060    elif test -f "${new_path}.cmd"; then
17061      input_to_shortpath="${new_path}.cmd"
17062    else
17063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17068    fi
17069  else
17070    input_to_shortpath="$new_path"
17071  fi
17072
17073  # Call helper function which possibly converts this using DOS-style short mode.
17074  # If so, the updated path is stored in $new_path.
17075  new_path="$input_to_shortpath"
17076
17077  input_path="$input_to_shortpath"
17078  # Check if we need to convert this using DOS-style short mode. If the path
17079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17080  # take no chances and rewrite it.
17081  # Note: m4 eats our [], so we need to use [ and ] instead.
17082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17083  if test "x$has_forbidden_chars" != x; then
17084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17088      # Going to short mode and back again did indeed matter. Since short mode is
17089      # case insensitive, let's make it lowercase to improve readability.
17090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17091      # Now convert it back to Unix-stile (cygpath)
17092      input_path=`$CYGPATH -u "$shortmode_path"`
17093      new_path="$input_path"
17094    fi
17095  fi
17096
17097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17098  if test "x$test_cygdrive_prefix" = x; then
17099    # As a simple fix, exclude /usr/bin since it's not a real path.
17100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17102      # a path prefixed by /cygdrive for fixpath to work.
17103      new_path="$CYGWIN_ROOT_PATH$input_path"
17104    fi
17105  fi
17106
17107  # remove trailing .exe if any
17108  new_path="${new_path/%.exe/}"
17109
17110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17111
17112  # First separate the path from the arguments. This will split at the first
17113  # space.
17114  complete="$FOUND_MAKE"
17115  path="${complete%% *}"
17116  tmp="$complete EOL"
17117  arguments="${tmp#* }"
17118
17119  # Input might be given as Windows format, start by converting to
17120  # unix format.
17121  new_path="$path"
17122
17123  windows_path="$new_path"
17124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17125    unix_path=`$CYGPATH -u "$windows_path"`
17126    new_path="$unix_path"
17127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17129    new_path="$unix_path"
17130  fi
17131
17132
17133  # Now try to locate executable using which
17134  new_path=`$WHICH "$new_path" 2> /dev/null`
17135
17136  if test "x$new_path" = x; then
17137    # Oops. Which didn't find the executable.
17138    # The splitting of arguments from the executable at a space might have been incorrect,
17139    # since paths with space are more likely in Windows. Give it another try with the whole
17140    # argument.
17141    path="$complete"
17142    arguments="EOL"
17143    new_path="$path"
17144
17145  windows_path="$new_path"
17146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17147    unix_path=`$CYGPATH -u "$windows_path"`
17148    new_path="$unix_path"
17149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17151    new_path="$unix_path"
17152  fi
17153
17154
17155    new_path=`$WHICH "$new_path" 2> /dev/null`
17156    # bat and cmd files are not always considered executable in MSYS causing which
17157    # to not find them
17158    if test "x$new_path" = x \
17159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17161      new_path="$path"
17162
17163  windows_path="$new_path"
17164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17165    unix_path=`$CYGPATH -u "$windows_path"`
17166    new_path="$unix_path"
17167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17169    new_path="$unix_path"
17170  fi
17171
17172    fi
17173
17174    if test "x$new_path" = x; then
17175      # It's still not found. Now this is an unrecoverable error.
17176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17177$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17178      has_space=`$ECHO "$complete" | $GREP " "`
17179      if test "x$has_space" != x; then
17180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17182      fi
17183      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17184    fi
17185  fi
17186
17187  # Now new_path has a complete unix path to the binary
17188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17189    # Keep paths in /bin as-is, but remove trailing .exe if any
17190    new_path="${new_path/%.exe/}"
17191    # Do not save /bin paths to all_fixpath_prefixes!
17192  else
17193    # Not in mixed or Windows style, start by that.
17194    new_path=`cmd //c echo $new_path`
17195
17196  input_path="$new_path"
17197  # Check if we need to convert this using DOS-style short mode. If the path
17198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17199  # take no chances and rewrite it.
17200  # Note: m4 eats our [], so we need to use [ and ] instead.
17201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17202  if test "x$has_forbidden_chars" != x; then
17203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17205  fi
17206
17207    # Output is in $new_path
17208
17209  windows_path="$new_path"
17210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17211    unix_path=`$CYGPATH -u "$windows_path"`
17212    new_path="$unix_path"
17213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17215    new_path="$unix_path"
17216  fi
17217
17218    # remove trailing .exe if any
17219    new_path="${new_path/%.exe/}"
17220
17221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17223  fi
17224
17225  else
17226    # We're on a unix platform. Hooray! :)
17227    # First separate the path from the arguments. This will split at the first
17228    # space.
17229    complete="$FOUND_MAKE"
17230    path="${complete%% *}"
17231    tmp="$complete EOL"
17232    arguments="${tmp#* }"
17233
17234    # Cannot rely on the command "which" here since it doesn't always work.
17235    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17236    if test -z "$is_absolute_path"; then
17237      # Path to executable is not absolute. Find it.
17238      IFS_save="$IFS"
17239      IFS=:
17240      for p in $PATH; do
17241        if test -f "$p/$path" && test -x "$p/$path"; then
17242          new_path="$p/$path"
17243          break
17244        fi
17245      done
17246      IFS="$IFS_save"
17247    else
17248      # This is an absolute path, we can use it without further modifications.
17249      new_path="$path"
17250    fi
17251
17252    if test "x$new_path" = x; then
17253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17255      has_space=`$ECHO "$complete" | $GREP " "`
17256      if test "x$has_space" != x; then
17257        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17259      fi
17260      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17261    fi
17262  fi
17263
17264  # Now join together the path and the arguments once again
17265  if test "x$arguments" != xEOL; then
17266    new_complete="$new_path ${arguments% *}"
17267  else
17268    new_complete="$new_path"
17269  fi
17270
17271  if test "x$complete" != "x$new_complete"; then
17272    FOUND_MAKE="$new_complete"
17273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17274$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17275  fi
17276
17277        fi
17278      fi
17279    fi
17280  fi
17281
17282        fi
17283        PATH=$OLD_PATH
17284      fi
17285    fi
17286
17287    if test "x$FOUND_MAKE" = x; then
17288      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17289    fi
17290  fi
17291
17292  MAKE=$FOUND_MAKE
17293
17294  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17295$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17296
17297
17298  # Check if make supports the output sync option and if so, setup using it.
17299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17300$as_echo_n "checking if make --output-sync is supported... " >&6; }
17301  if $MAKE --version -O > /dev/null 2>&1; then
17302    OUTPUT_SYNC_SUPPORTED=true
17303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17304$as_echo "yes" >&6; }
17305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17306$as_echo_n "checking for output-sync value... " >&6; }
17307
17308# Check whether --with-output-sync was given.
17309if test "${with_output_sync+set}" = set; then :
17310  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17311fi
17312
17313    if test "x$OUTPUT_SYNC" = "x"; then
17314      OUTPUT_SYNC=none
17315    fi
17316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17317$as_echo "$OUTPUT_SYNC" >&6; }
17318    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17319      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17320    fi
17321  else
17322    OUTPUT_SYNC_SUPPORTED=false
17323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17324$as_echo "no" >&6; }
17325  fi
17326
17327
17328
17329
17330
17331
17332  # Test if find supports -delete
17333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17334$as_echo_n "checking if find supports -delete... " >&6; }
17335  FIND_DELETE="-delete"
17336
17337  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17338
17339  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17340
17341  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17342  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17343    # No, it does not.
17344    rm $DELETEDIR/TestIfFindSupportsDelete
17345    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17346      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17347      FIND_DELETE="-print | xargs rm"
17348    else
17349      FIND_DELETE="-exec rm \{\} \+"
17350    fi
17351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17352$as_echo "no" >&6; }
17353  else
17354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17355$as_echo "yes" >&6; }
17356  fi
17357  rmdir $DELETEDIR
17358
17359
17360
17361  # These tools might not be installed by default,
17362  # need hint on how to install them.
17363
17364
17365
17366  # Publish this variable in the help.
17367
17368
17369  if test "x$UNZIP" = x; then
17370    # The variable is not set by user, try to locate tool using the code snippet
17371    for ac_prog in unzip
17372do
17373  # Extract the first word of "$ac_prog", so it can be a program name with args.
17374set dummy $ac_prog; ac_word=$2
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17376$as_echo_n "checking for $ac_word... " >&6; }
17377if ${ac_cv_path_UNZIP+:} false; then :
17378  $as_echo_n "(cached) " >&6
17379else
17380  case $UNZIP in
17381  [\\/]* | ?:[\\/]*)
17382  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17383  ;;
17384  *)
17385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17386for as_dir in $PATH
17387do
17388  IFS=$as_save_IFS
17389  test -z "$as_dir" && as_dir=.
17390    for ac_exec_ext in '' $ac_executable_extensions; do
17391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17392    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17394    break 2
17395  fi
17396done
17397  done
17398IFS=$as_save_IFS
17399
17400  ;;
17401esac
17402fi
17403UNZIP=$ac_cv_path_UNZIP
17404if test -n "$UNZIP"; then
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17406$as_echo "$UNZIP" >&6; }
17407else
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410fi
17411
17412
17413  test -n "$UNZIP" && break
17414done
17415
17416  else
17417    # The variable is set, but is it from the command line or the environment?
17418
17419    # Try to remove the string !UNZIP! from our list.
17420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17422      # If it failed, the variable was not from the command line. Ignore it,
17423      # but warn the user (except for BASH, which is always set by the calling BASH).
17424      if test "xUNZIP" != xBASH; then
17425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17426$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17427      fi
17428      # Try to locate tool using the code snippet
17429      for ac_prog in unzip
17430do
17431  # Extract the first word of "$ac_prog", so it can be a program name with args.
17432set dummy $ac_prog; ac_word=$2
17433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17434$as_echo_n "checking for $ac_word... " >&6; }
17435if ${ac_cv_path_UNZIP+:} false; then :
17436  $as_echo_n "(cached) " >&6
17437else
17438  case $UNZIP in
17439  [\\/]* | ?:[\\/]*)
17440  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17441  ;;
17442  *)
17443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17444for as_dir in $PATH
17445do
17446  IFS=$as_save_IFS
17447  test -z "$as_dir" && as_dir=.
17448    for ac_exec_ext in '' $ac_executable_extensions; do
17449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17450    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17452    break 2
17453  fi
17454done
17455  done
17456IFS=$as_save_IFS
17457
17458  ;;
17459esac
17460fi
17461UNZIP=$ac_cv_path_UNZIP
17462if test -n "$UNZIP"; then
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17464$as_echo "$UNZIP" >&6; }
17465else
17466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17467$as_echo "no" >&6; }
17468fi
17469
17470
17471  test -n "$UNZIP" && break
17472done
17473
17474    else
17475      # If it succeeded, then it was overridden by the user. We will use it
17476      # for the tool.
17477
17478      # First remove it from the list of overridden variables, so we can test
17479      # for unknown variables in the end.
17480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17481
17482      # Check if the provided tool contains a complete path.
17483      tool_specified="$UNZIP"
17484      tool_basename="${tool_specified##*/}"
17485      if test "x$tool_basename" = "x$tool_specified"; then
17486        # A command without a complete path is provided, search $PATH.
17487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17488$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17489        # Extract the first word of "$tool_basename", so it can be a program name with args.
17490set dummy $tool_basename; ac_word=$2
17491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17492$as_echo_n "checking for $ac_word... " >&6; }
17493if ${ac_cv_path_UNZIP+:} false; then :
17494  $as_echo_n "(cached) " >&6
17495else
17496  case $UNZIP in
17497  [\\/]* | ?:[\\/]*)
17498  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17499  ;;
17500  *)
17501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17502for as_dir in $PATH
17503do
17504  IFS=$as_save_IFS
17505  test -z "$as_dir" && as_dir=.
17506    for ac_exec_ext in '' $ac_executable_extensions; do
17507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17508    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17510    break 2
17511  fi
17512done
17513  done
17514IFS=$as_save_IFS
17515
17516  ;;
17517esac
17518fi
17519UNZIP=$ac_cv_path_UNZIP
17520if test -n "$UNZIP"; then
17521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17522$as_echo "$UNZIP" >&6; }
17523else
17524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17525$as_echo "no" >&6; }
17526fi
17527
17528
17529        if test "x$UNZIP" = x; then
17530          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17531        fi
17532      else
17533        # Otherwise we believe it is a complete path. Use it as it is.
17534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17535$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17537$as_echo_n "checking for UNZIP... " >&6; }
17538        if test ! -x "$tool_specified"; then
17539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17540$as_echo "not found" >&6; }
17541          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17542        fi
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17544$as_echo "$tool_specified" >&6; }
17545      fi
17546    fi
17547  fi
17548
17549
17550
17551  if test "x$UNZIP" = x; then
17552    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17553  fi
17554
17555
17556
17557
17558
17559  # Publish this variable in the help.
17560
17561
17562  if test "x$ZIP" = x; then
17563    # The variable is not set by user, try to locate tool using the code snippet
17564    for ac_prog in zip
17565do
17566  # Extract the first word of "$ac_prog", so it can be a program name with args.
17567set dummy $ac_prog; ac_word=$2
17568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17569$as_echo_n "checking for $ac_word... " >&6; }
17570if ${ac_cv_path_ZIP+:} false; then :
17571  $as_echo_n "(cached) " >&6
17572else
17573  case $ZIP in
17574  [\\/]* | ?:[\\/]*)
17575  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17576  ;;
17577  *)
17578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17579for as_dir in $PATH
17580do
17581  IFS=$as_save_IFS
17582  test -z "$as_dir" && as_dir=.
17583    for ac_exec_ext in '' $ac_executable_extensions; do
17584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17585    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17587    break 2
17588  fi
17589done
17590  done
17591IFS=$as_save_IFS
17592
17593  ;;
17594esac
17595fi
17596ZIP=$ac_cv_path_ZIP
17597if test -n "$ZIP"; then
17598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17599$as_echo "$ZIP" >&6; }
17600else
17601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17602$as_echo "no" >&6; }
17603fi
17604
17605
17606  test -n "$ZIP" && break
17607done
17608
17609  else
17610    # The variable is set, but is it from the command line or the environment?
17611
17612    # Try to remove the string !ZIP! from our list.
17613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17615      # If it failed, the variable was not from the command line. Ignore it,
17616      # but warn the user (except for BASH, which is always set by the calling BASH).
17617      if test "xZIP" != xBASH; then
17618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17619$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17620      fi
17621      # Try to locate tool using the code snippet
17622      for ac_prog in zip
17623do
17624  # Extract the first word of "$ac_prog", so it can be a program name with args.
17625set dummy $ac_prog; ac_word=$2
17626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17627$as_echo_n "checking for $ac_word... " >&6; }
17628if ${ac_cv_path_ZIP+:} false; then :
17629  $as_echo_n "(cached) " >&6
17630else
17631  case $ZIP in
17632  [\\/]* | ?:[\\/]*)
17633  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17634  ;;
17635  *)
17636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17637for as_dir in $PATH
17638do
17639  IFS=$as_save_IFS
17640  test -z "$as_dir" && as_dir=.
17641    for ac_exec_ext in '' $ac_executable_extensions; do
17642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17643    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17645    break 2
17646  fi
17647done
17648  done
17649IFS=$as_save_IFS
17650
17651  ;;
17652esac
17653fi
17654ZIP=$ac_cv_path_ZIP
17655if test -n "$ZIP"; then
17656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17657$as_echo "$ZIP" >&6; }
17658else
17659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17660$as_echo "no" >&6; }
17661fi
17662
17663
17664  test -n "$ZIP" && break
17665done
17666
17667    else
17668      # If it succeeded, then it was overridden by the user. We will use it
17669      # for the tool.
17670
17671      # First remove it from the list of overridden variables, so we can test
17672      # for unknown variables in the end.
17673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17674
17675      # Check if the provided tool contains a complete path.
17676      tool_specified="$ZIP"
17677      tool_basename="${tool_specified##*/}"
17678      if test "x$tool_basename" = "x$tool_specified"; then
17679        # A command without a complete path is provided, search $PATH.
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17681$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17682        # Extract the first word of "$tool_basename", so it can be a program name with args.
17683set dummy $tool_basename; ac_word=$2
17684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17685$as_echo_n "checking for $ac_word... " >&6; }
17686if ${ac_cv_path_ZIP+:} false; then :
17687  $as_echo_n "(cached) " >&6
17688else
17689  case $ZIP in
17690  [\\/]* | ?:[\\/]*)
17691  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17692  ;;
17693  *)
17694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17695for as_dir in $PATH
17696do
17697  IFS=$as_save_IFS
17698  test -z "$as_dir" && as_dir=.
17699    for ac_exec_ext in '' $ac_executable_extensions; do
17700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17701    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17703    break 2
17704  fi
17705done
17706  done
17707IFS=$as_save_IFS
17708
17709  ;;
17710esac
17711fi
17712ZIP=$ac_cv_path_ZIP
17713if test -n "$ZIP"; then
17714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17715$as_echo "$ZIP" >&6; }
17716else
17717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17718$as_echo "no" >&6; }
17719fi
17720
17721
17722        if test "x$ZIP" = x; then
17723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17724        fi
17725      else
17726        # Otherwise we believe it is a complete path. Use it as it is.
17727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17728$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17730$as_echo_n "checking for ZIP... " >&6; }
17731        if test ! -x "$tool_specified"; then
17732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17733$as_echo "not found" >&6; }
17734          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17735        fi
17736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17737$as_echo "$tool_specified" >&6; }
17738      fi
17739    fi
17740  fi
17741
17742
17743
17744  if test "x$ZIP" = x; then
17745    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17746  fi
17747
17748
17749
17750  # Non-required basic tools
17751
17752
17753
17754  # Publish this variable in the help.
17755
17756
17757  if test "x$LDD" = x; then
17758    # The variable is not set by user, try to locate tool using the code snippet
17759    for ac_prog in ldd
17760do
17761  # Extract the first word of "$ac_prog", so it can be a program name with args.
17762set dummy $ac_prog; ac_word=$2
17763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17764$as_echo_n "checking for $ac_word... " >&6; }
17765if ${ac_cv_path_LDD+:} false; then :
17766  $as_echo_n "(cached) " >&6
17767else
17768  case $LDD in
17769  [\\/]* | ?:[\\/]*)
17770  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17771  ;;
17772  *)
17773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17774for as_dir in $PATH
17775do
17776  IFS=$as_save_IFS
17777  test -z "$as_dir" && as_dir=.
17778    for ac_exec_ext in '' $ac_executable_extensions; do
17779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17780    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17782    break 2
17783  fi
17784done
17785  done
17786IFS=$as_save_IFS
17787
17788  ;;
17789esac
17790fi
17791LDD=$ac_cv_path_LDD
17792if test -n "$LDD"; then
17793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17794$as_echo "$LDD" >&6; }
17795else
17796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17797$as_echo "no" >&6; }
17798fi
17799
17800
17801  test -n "$LDD" && break
17802done
17803
17804  else
17805    # The variable is set, but is it from the command line or the environment?
17806
17807    # Try to remove the string !LDD! from our list.
17808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17810      # If it failed, the variable was not from the command line. Ignore it,
17811      # but warn the user (except for BASH, which is always set by the calling BASH).
17812      if test "xLDD" != xBASH; then
17813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17814$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17815      fi
17816      # Try to locate tool using the code snippet
17817      for ac_prog in ldd
17818do
17819  # Extract the first word of "$ac_prog", so it can be a program name with args.
17820set dummy $ac_prog; ac_word=$2
17821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17822$as_echo_n "checking for $ac_word... " >&6; }
17823if ${ac_cv_path_LDD+:} false; then :
17824  $as_echo_n "(cached) " >&6
17825else
17826  case $LDD in
17827  [\\/]* | ?:[\\/]*)
17828  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17829  ;;
17830  *)
17831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17832for as_dir in $PATH
17833do
17834  IFS=$as_save_IFS
17835  test -z "$as_dir" && as_dir=.
17836    for ac_exec_ext in '' $ac_executable_extensions; do
17837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17838    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17840    break 2
17841  fi
17842done
17843  done
17844IFS=$as_save_IFS
17845
17846  ;;
17847esac
17848fi
17849LDD=$ac_cv_path_LDD
17850if test -n "$LDD"; then
17851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17852$as_echo "$LDD" >&6; }
17853else
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855$as_echo "no" >&6; }
17856fi
17857
17858
17859  test -n "$LDD" && break
17860done
17861
17862    else
17863      # If it succeeded, then it was overridden by the user. We will use it
17864      # for the tool.
17865
17866      # First remove it from the list of overridden variables, so we can test
17867      # for unknown variables in the end.
17868      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17869
17870      # Check if the provided tool contains a complete path.
17871      tool_specified="$LDD"
17872      tool_basename="${tool_specified##*/}"
17873      if test "x$tool_basename" = "x$tool_specified"; then
17874        # A command without a complete path is provided, search $PATH.
17875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17876$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17877        # Extract the first word of "$tool_basename", so it can be a program name with args.
17878set dummy $tool_basename; ac_word=$2
17879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17880$as_echo_n "checking for $ac_word... " >&6; }
17881if ${ac_cv_path_LDD+:} false; then :
17882  $as_echo_n "(cached) " >&6
17883else
17884  case $LDD in
17885  [\\/]* | ?:[\\/]*)
17886  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17887  ;;
17888  *)
17889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17890for as_dir in $PATH
17891do
17892  IFS=$as_save_IFS
17893  test -z "$as_dir" && as_dir=.
17894    for ac_exec_ext in '' $ac_executable_extensions; do
17895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17896    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17898    break 2
17899  fi
17900done
17901  done
17902IFS=$as_save_IFS
17903
17904  ;;
17905esac
17906fi
17907LDD=$ac_cv_path_LDD
17908if test -n "$LDD"; then
17909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17910$as_echo "$LDD" >&6; }
17911else
17912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17913$as_echo "no" >&6; }
17914fi
17915
17916
17917        if test "x$LDD" = x; then
17918          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17919        fi
17920      else
17921        # Otherwise we believe it is a complete path. Use it as it is.
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17923$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17925$as_echo_n "checking for LDD... " >&6; }
17926        if test ! -x "$tool_specified"; then
17927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17928$as_echo "not found" >&6; }
17929          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17930        fi
17931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17932$as_echo "$tool_specified" >&6; }
17933      fi
17934    fi
17935  fi
17936
17937
17938  if test "x$LDD" = "x"; then
17939    # List shared lib dependencies is used for
17940    # debug output and checking for forbidden dependencies.
17941    # We can build without it.
17942    LDD="true"
17943  fi
17944
17945
17946  # Publish this variable in the help.
17947
17948
17949  if test "x$OTOOL" = x; then
17950    # The variable is not set by user, try to locate tool using the code snippet
17951    for ac_prog in otool
17952do
17953  # Extract the first word of "$ac_prog", so it can be a program name with args.
17954set dummy $ac_prog; ac_word=$2
17955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956$as_echo_n "checking for $ac_word... " >&6; }
17957if ${ac_cv_path_OTOOL+:} false; then :
17958  $as_echo_n "(cached) " >&6
17959else
17960  case $OTOOL in
17961  [\\/]* | ?:[\\/]*)
17962  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17963  ;;
17964  *)
17965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17966for as_dir in $PATH
17967do
17968  IFS=$as_save_IFS
17969  test -z "$as_dir" && as_dir=.
17970    for ac_exec_ext in '' $ac_executable_extensions; do
17971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17972    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17974    break 2
17975  fi
17976done
17977  done
17978IFS=$as_save_IFS
17979
17980  ;;
17981esac
17982fi
17983OTOOL=$ac_cv_path_OTOOL
17984if test -n "$OTOOL"; then
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17986$as_echo "$OTOOL" >&6; }
17987else
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989$as_echo "no" >&6; }
17990fi
17991
17992
17993  test -n "$OTOOL" && break
17994done
17995
17996  else
17997    # The variable is set, but is it from the command line or the environment?
17998
17999    # Try to remove the string !OTOOL! from our list.
18000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18002      # If it failed, the variable was not from the command line. Ignore it,
18003      # but warn the user (except for BASH, which is always set by the calling BASH).
18004      if test "xOTOOL" != xBASH; then
18005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18006$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18007      fi
18008      # Try to locate tool using the code snippet
18009      for ac_prog in otool
18010do
18011  # Extract the first word of "$ac_prog", so it can be a program name with args.
18012set dummy $ac_prog; ac_word=$2
18013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18014$as_echo_n "checking for $ac_word... " >&6; }
18015if ${ac_cv_path_OTOOL+:} false; then :
18016  $as_echo_n "(cached) " >&6
18017else
18018  case $OTOOL in
18019  [\\/]* | ?:[\\/]*)
18020  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18021  ;;
18022  *)
18023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18024for as_dir in $PATH
18025do
18026  IFS=$as_save_IFS
18027  test -z "$as_dir" && as_dir=.
18028    for ac_exec_ext in '' $ac_executable_extensions; do
18029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18030    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18032    break 2
18033  fi
18034done
18035  done
18036IFS=$as_save_IFS
18037
18038  ;;
18039esac
18040fi
18041OTOOL=$ac_cv_path_OTOOL
18042if test -n "$OTOOL"; then
18043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18044$as_echo "$OTOOL" >&6; }
18045else
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18047$as_echo "no" >&6; }
18048fi
18049
18050
18051  test -n "$OTOOL" && break
18052done
18053
18054    else
18055      # If it succeeded, then it was overridden by the user. We will use it
18056      # for the tool.
18057
18058      # First remove it from the list of overridden variables, so we can test
18059      # for unknown variables in the end.
18060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18061
18062      # Check if the provided tool contains a complete path.
18063      tool_specified="$OTOOL"
18064      tool_basename="${tool_specified##*/}"
18065      if test "x$tool_basename" = "x$tool_specified"; then
18066        # A command without a complete path is provided, search $PATH.
18067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18068$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18069        # Extract the first word of "$tool_basename", so it can be a program name with args.
18070set dummy $tool_basename; ac_word=$2
18071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072$as_echo_n "checking for $ac_word... " >&6; }
18073if ${ac_cv_path_OTOOL+:} false; then :
18074  $as_echo_n "(cached) " >&6
18075else
18076  case $OTOOL in
18077  [\\/]* | ?:[\\/]*)
18078  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18079  ;;
18080  *)
18081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082for as_dir in $PATH
18083do
18084  IFS=$as_save_IFS
18085  test -z "$as_dir" && as_dir=.
18086    for ac_exec_ext in '' $ac_executable_extensions; do
18087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18088    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090    break 2
18091  fi
18092done
18093  done
18094IFS=$as_save_IFS
18095
18096  ;;
18097esac
18098fi
18099OTOOL=$ac_cv_path_OTOOL
18100if test -n "$OTOOL"; then
18101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18102$as_echo "$OTOOL" >&6; }
18103else
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105$as_echo "no" >&6; }
18106fi
18107
18108
18109        if test "x$OTOOL" = x; then
18110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18111        fi
18112      else
18113        # Otherwise we believe it is a complete path. Use it as it is.
18114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18115$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18117$as_echo_n "checking for OTOOL... " >&6; }
18118        if test ! -x "$tool_specified"; then
18119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18120$as_echo "not found" >&6; }
18121          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18122        fi
18123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18124$as_echo "$tool_specified" >&6; }
18125      fi
18126    fi
18127  fi
18128
18129
18130  if test "x$OTOOL" = "x"; then
18131    OTOOL="true"
18132  fi
18133
18134
18135  # Publish this variable in the help.
18136
18137
18138  if test "x$READELF" = x; then
18139    # The variable is not set by user, try to locate tool using the code snippet
18140    for ac_prog in greadelf readelf
18141do
18142  # Extract the first word of "$ac_prog", so it can be a program name with args.
18143set dummy $ac_prog; ac_word=$2
18144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18145$as_echo_n "checking for $ac_word... " >&6; }
18146if ${ac_cv_path_READELF+:} false; then :
18147  $as_echo_n "(cached) " >&6
18148else
18149  case $READELF in
18150  [\\/]* | ?:[\\/]*)
18151  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18152  ;;
18153  *)
18154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18155for as_dir in $PATH
18156do
18157  IFS=$as_save_IFS
18158  test -z "$as_dir" && as_dir=.
18159    for ac_exec_ext in '' $ac_executable_extensions; do
18160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18161    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18163    break 2
18164  fi
18165done
18166  done
18167IFS=$as_save_IFS
18168
18169  ;;
18170esac
18171fi
18172READELF=$ac_cv_path_READELF
18173if test -n "$READELF"; then
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18175$as_echo "$READELF" >&6; }
18176else
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18178$as_echo "no" >&6; }
18179fi
18180
18181
18182  test -n "$READELF" && break
18183done
18184
18185  else
18186    # The variable is set, but is it from the command line or the environment?
18187
18188    # Try to remove the string !READELF! from our list.
18189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18191      # If it failed, the variable was not from the command line. Ignore it,
18192      # but warn the user (except for BASH, which is always set by the calling BASH).
18193      if test "xREADELF" != xBASH; then
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18195$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18196      fi
18197      # Try to locate tool using the code snippet
18198      for ac_prog in greadelf readelf
18199do
18200  # Extract the first word of "$ac_prog", so it can be a program name with args.
18201set dummy $ac_prog; ac_word=$2
18202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18203$as_echo_n "checking for $ac_word... " >&6; }
18204if ${ac_cv_path_READELF+:} false; then :
18205  $as_echo_n "(cached) " >&6
18206else
18207  case $READELF in
18208  [\\/]* | ?:[\\/]*)
18209  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18210  ;;
18211  *)
18212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18213for as_dir in $PATH
18214do
18215  IFS=$as_save_IFS
18216  test -z "$as_dir" && as_dir=.
18217    for ac_exec_ext in '' $ac_executable_extensions; do
18218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18219    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18221    break 2
18222  fi
18223done
18224  done
18225IFS=$as_save_IFS
18226
18227  ;;
18228esac
18229fi
18230READELF=$ac_cv_path_READELF
18231if test -n "$READELF"; then
18232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18233$as_echo "$READELF" >&6; }
18234else
18235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18236$as_echo "no" >&6; }
18237fi
18238
18239
18240  test -n "$READELF" && break
18241done
18242
18243    else
18244      # If it succeeded, then it was overridden by the user. We will use it
18245      # for the tool.
18246
18247      # First remove it from the list of overridden variables, so we can test
18248      # for unknown variables in the end.
18249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18250
18251      # Check if the provided tool contains a complete path.
18252      tool_specified="$READELF"
18253      tool_basename="${tool_specified##*/}"
18254      if test "x$tool_basename" = "x$tool_specified"; then
18255        # A command without a complete path is provided, search $PATH.
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18257$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18258        # Extract the first word of "$tool_basename", so it can be a program name with args.
18259set dummy $tool_basename; ac_word=$2
18260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18261$as_echo_n "checking for $ac_word... " >&6; }
18262if ${ac_cv_path_READELF+:} false; then :
18263  $as_echo_n "(cached) " >&6
18264else
18265  case $READELF in
18266  [\\/]* | ?:[\\/]*)
18267  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18268  ;;
18269  *)
18270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18271for as_dir in $PATH
18272do
18273  IFS=$as_save_IFS
18274  test -z "$as_dir" && as_dir=.
18275    for ac_exec_ext in '' $ac_executable_extensions; do
18276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18277    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18279    break 2
18280  fi
18281done
18282  done
18283IFS=$as_save_IFS
18284
18285  ;;
18286esac
18287fi
18288READELF=$ac_cv_path_READELF
18289if test -n "$READELF"; then
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18291$as_echo "$READELF" >&6; }
18292else
18293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18294$as_echo "no" >&6; }
18295fi
18296
18297
18298        if test "x$READELF" = x; then
18299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18300        fi
18301      else
18302        # Otherwise we believe it is a complete path. Use it as it is.
18303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18304$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18306$as_echo_n "checking for READELF... " >&6; }
18307        if test ! -x "$tool_specified"; then
18308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18309$as_echo "not found" >&6; }
18310          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18311        fi
18312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18313$as_echo "$tool_specified" >&6; }
18314      fi
18315    fi
18316  fi
18317
18318
18319
18320
18321  # Publish this variable in the help.
18322
18323
18324  if test "x$HG" = x; then
18325    # The variable is not set by user, try to locate tool using the code snippet
18326    for ac_prog in hg
18327do
18328  # Extract the first word of "$ac_prog", so it can be a program name with args.
18329set dummy $ac_prog; ac_word=$2
18330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18331$as_echo_n "checking for $ac_word... " >&6; }
18332if ${ac_cv_path_HG+:} false; then :
18333  $as_echo_n "(cached) " >&6
18334else
18335  case $HG in
18336  [\\/]* | ?:[\\/]*)
18337  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18338  ;;
18339  *)
18340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18341for as_dir in $PATH
18342do
18343  IFS=$as_save_IFS
18344  test -z "$as_dir" && as_dir=.
18345    for ac_exec_ext in '' $ac_executable_extensions; do
18346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18347    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18349    break 2
18350  fi
18351done
18352  done
18353IFS=$as_save_IFS
18354
18355  ;;
18356esac
18357fi
18358HG=$ac_cv_path_HG
18359if test -n "$HG"; then
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18361$as_echo "$HG" >&6; }
18362else
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364$as_echo "no" >&6; }
18365fi
18366
18367
18368  test -n "$HG" && break
18369done
18370
18371  else
18372    # The variable is set, but is it from the command line or the environment?
18373
18374    # Try to remove the string !HG! from our list.
18375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18377      # If it failed, the variable was not from the command line. Ignore it,
18378      # but warn the user (except for BASH, which is always set by the calling BASH).
18379      if test "xHG" != xBASH; then
18380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18381$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18382      fi
18383      # Try to locate tool using the code snippet
18384      for ac_prog in hg
18385do
18386  # Extract the first word of "$ac_prog", so it can be a program name with args.
18387set dummy $ac_prog; ac_word=$2
18388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18389$as_echo_n "checking for $ac_word... " >&6; }
18390if ${ac_cv_path_HG+:} false; then :
18391  $as_echo_n "(cached) " >&6
18392else
18393  case $HG in
18394  [\\/]* | ?:[\\/]*)
18395  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18396  ;;
18397  *)
18398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18399for as_dir in $PATH
18400do
18401  IFS=$as_save_IFS
18402  test -z "$as_dir" && as_dir=.
18403    for ac_exec_ext in '' $ac_executable_extensions; do
18404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18405    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18407    break 2
18408  fi
18409done
18410  done
18411IFS=$as_save_IFS
18412
18413  ;;
18414esac
18415fi
18416HG=$ac_cv_path_HG
18417if test -n "$HG"; then
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18419$as_echo "$HG" >&6; }
18420else
18421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18422$as_echo "no" >&6; }
18423fi
18424
18425
18426  test -n "$HG" && break
18427done
18428
18429    else
18430      # If it succeeded, then it was overridden by the user. We will use it
18431      # for the tool.
18432
18433      # First remove it from the list of overridden variables, so we can test
18434      # for unknown variables in the end.
18435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18436
18437      # Check if the provided tool contains a complete path.
18438      tool_specified="$HG"
18439      tool_basename="${tool_specified##*/}"
18440      if test "x$tool_basename" = "x$tool_specified"; then
18441        # A command without a complete path is provided, search $PATH.
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18443$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18444        # Extract the first word of "$tool_basename", so it can be a program name with args.
18445set dummy $tool_basename; ac_word=$2
18446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18447$as_echo_n "checking for $ac_word... " >&6; }
18448if ${ac_cv_path_HG+:} false; then :
18449  $as_echo_n "(cached) " >&6
18450else
18451  case $HG in
18452  [\\/]* | ?:[\\/]*)
18453  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18454  ;;
18455  *)
18456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18457for as_dir in $PATH
18458do
18459  IFS=$as_save_IFS
18460  test -z "$as_dir" && as_dir=.
18461    for ac_exec_ext in '' $ac_executable_extensions; do
18462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18463    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18465    break 2
18466  fi
18467done
18468  done
18469IFS=$as_save_IFS
18470
18471  ;;
18472esac
18473fi
18474HG=$ac_cv_path_HG
18475if test -n "$HG"; then
18476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18477$as_echo "$HG" >&6; }
18478else
18479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18480$as_echo "no" >&6; }
18481fi
18482
18483
18484        if test "x$HG" = x; then
18485          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18486        fi
18487      else
18488        # Otherwise we believe it is a complete path. Use it as it is.
18489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18490$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18492$as_echo_n "checking for HG... " >&6; }
18493        if test ! -x "$tool_specified"; then
18494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18495$as_echo "not found" >&6; }
18496          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18497        fi
18498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18499$as_echo "$tool_specified" >&6; }
18500      fi
18501    fi
18502  fi
18503
18504
18505
18506
18507  # Publish this variable in the help.
18508
18509
18510  if test "x$STAT" = x; then
18511    # The variable is not set by user, try to locate tool using the code snippet
18512    for ac_prog in stat
18513do
18514  # Extract the first word of "$ac_prog", so it can be a program name with args.
18515set dummy $ac_prog; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_STAT+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $STAT in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544STAT=$ac_cv_path_STAT
18545if test -n "$STAT"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18547$as_echo "$STAT" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554  test -n "$STAT" && break
18555done
18556
18557  else
18558    # The variable is set, but is it from the command line or the environment?
18559
18560    # Try to remove the string !STAT! from our list.
18561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18563      # If it failed, the variable was not from the command line. Ignore it,
18564      # but warn the user (except for BASH, which is always set by the calling BASH).
18565      if test "xSTAT" != xBASH; then
18566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18567$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18568      fi
18569      # Try to locate tool using the code snippet
18570      for ac_prog in stat
18571do
18572  # Extract the first word of "$ac_prog", so it can be a program name with args.
18573set dummy $ac_prog; ac_word=$2
18574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575$as_echo_n "checking for $ac_word... " >&6; }
18576if ${ac_cv_path_STAT+:} false; then :
18577  $as_echo_n "(cached) " >&6
18578else
18579  case $STAT in
18580  [\\/]* | ?:[\\/]*)
18581  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18582  ;;
18583  *)
18584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585for as_dir in $PATH
18586do
18587  IFS=$as_save_IFS
18588  test -z "$as_dir" && as_dir=.
18589    for ac_exec_ext in '' $ac_executable_extensions; do
18590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18593    break 2
18594  fi
18595done
18596  done
18597IFS=$as_save_IFS
18598
18599  ;;
18600esac
18601fi
18602STAT=$ac_cv_path_STAT
18603if test -n "$STAT"; then
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18605$as_echo "$STAT" >&6; }
18606else
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608$as_echo "no" >&6; }
18609fi
18610
18611
18612  test -n "$STAT" && break
18613done
18614
18615    else
18616      # If it succeeded, then it was overridden by the user. We will use it
18617      # for the tool.
18618
18619      # First remove it from the list of overridden variables, so we can test
18620      # for unknown variables in the end.
18621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18622
18623      # Check if the provided tool contains a complete path.
18624      tool_specified="$STAT"
18625      tool_basename="${tool_specified##*/}"
18626      if test "x$tool_basename" = "x$tool_specified"; then
18627        # A command without a complete path is provided, search $PATH.
18628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18629$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18630        # Extract the first word of "$tool_basename", so it can be a program name with args.
18631set dummy $tool_basename; ac_word=$2
18632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18633$as_echo_n "checking for $ac_word... " >&6; }
18634if ${ac_cv_path_STAT+:} false; then :
18635  $as_echo_n "(cached) " >&6
18636else
18637  case $STAT in
18638  [\\/]* | ?:[\\/]*)
18639  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18640  ;;
18641  *)
18642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18643for as_dir in $PATH
18644do
18645  IFS=$as_save_IFS
18646  test -z "$as_dir" && as_dir=.
18647    for ac_exec_ext in '' $ac_executable_extensions; do
18648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18649    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18651    break 2
18652  fi
18653done
18654  done
18655IFS=$as_save_IFS
18656
18657  ;;
18658esac
18659fi
18660STAT=$ac_cv_path_STAT
18661if test -n "$STAT"; then
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18663$as_echo "$STAT" >&6; }
18664else
18665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18666$as_echo "no" >&6; }
18667fi
18668
18669
18670        if test "x$STAT" = x; then
18671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18672        fi
18673      else
18674        # Otherwise we believe it is a complete path. Use it as it is.
18675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18676$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18678$as_echo_n "checking for STAT... " >&6; }
18679        if test ! -x "$tool_specified"; then
18680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18681$as_echo "not found" >&6; }
18682          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18683        fi
18684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18685$as_echo "$tool_specified" >&6; }
18686      fi
18687    fi
18688  fi
18689
18690
18691
18692
18693  # Publish this variable in the help.
18694
18695
18696  if test "x$TIME" = x; then
18697    # The variable is not set by user, try to locate tool using the code snippet
18698    for ac_prog in time
18699do
18700  # Extract the first word of "$ac_prog", so it can be a program name with args.
18701set dummy $ac_prog; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_TIME+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $TIME in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730TIME=$ac_cv_path_TIME
18731if test -n "$TIME"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18733$as_echo "$TIME" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740  test -n "$TIME" && break
18741done
18742
18743  else
18744    # The variable is set, but is it from the command line or the environment?
18745
18746    # Try to remove the string !TIME! from our list.
18747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18749      # If it failed, the variable was not from the command line. Ignore it,
18750      # but warn the user (except for BASH, which is always set by the calling BASH).
18751      if test "xTIME" != xBASH; then
18752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18753$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18754      fi
18755      # Try to locate tool using the code snippet
18756      for ac_prog in time
18757do
18758  # Extract the first word of "$ac_prog", so it can be a program name with args.
18759set dummy $ac_prog; ac_word=$2
18760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761$as_echo_n "checking for $ac_word... " >&6; }
18762if ${ac_cv_path_TIME+:} false; then :
18763  $as_echo_n "(cached) " >&6
18764else
18765  case $TIME in
18766  [\\/]* | ?:[\\/]*)
18767  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18768  ;;
18769  *)
18770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18771for as_dir in $PATH
18772do
18773  IFS=$as_save_IFS
18774  test -z "$as_dir" && as_dir=.
18775    for ac_exec_ext in '' $ac_executable_extensions; do
18776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18777    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18779    break 2
18780  fi
18781done
18782  done
18783IFS=$as_save_IFS
18784
18785  ;;
18786esac
18787fi
18788TIME=$ac_cv_path_TIME
18789if test -n "$TIME"; then
18790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18791$as_echo "$TIME" >&6; }
18792else
18793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18794$as_echo "no" >&6; }
18795fi
18796
18797
18798  test -n "$TIME" && break
18799done
18800
18801    else
18802      # If it succeeded, then it was overridden by the user. We will use it
18803      # for the tool.
18804
18805      # First remove it from the list of overridden variables, so we can test
18806      # for unknown variables in the end.
18807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18808
18809      # Check if the provided tool contains a complete path.
18810      tool_specified="$TIME"
18811      tool_basename="${tool_specified##*/}"
18812      if test "x$tool_basename" = "x$tool_specified"; then
18813        # A command without a complete path is provided, search $PATH.
18814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18815$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18816        # Extract the first word of "$tool_basename", so it can be a program name with args.
18817set dummy $tool_basename; ac_word=$2
18818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18819$as_echo_n "checking for $ac_word... " >&6; }
18820if ${ac_cv_path_TIME+:} false; then :
18821  $as_echo_n "(cached) " >&6
18822else
18823  case $TIME in
18824  [\\/]* | ?:[\\/]*)
18825  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18826  ;;
18827  *)
18828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18829for as_dir in $PATH
18830do
18831  IFS=$as_save_IFS
18832  test -z "$as_dir" && as_dir=.
18833    for ac_exec_ext in '' $ac_executable_extensions; do
18834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18835    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18837    break 2
18838  fi
18839done
18840  done
18841IFS=$as_save_IFS
18842
18843  ;;
18844esac
18845fi
18846TIME=$ac_cv_path_TIME
18847if test -n "$TIME"; then
18848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18849$as_echo "$TIME" >&6; }
18850else
18851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18852$as_echo "no" >&6; }
18853fi
18854
18855
18856        if test "x$TIME" = x; then
18857          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18858        fi
18859      else
18860        # Otherwise we believe it is a complete path. Use it as it is.
18861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18862$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18864$as_echo_n "checking for TIME... " >&6; }
18865        if test ! -x "$tool_specified"; then
18866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18867$as_echo "not found" >&6; }
18868          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18869        fi
18870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18871$as_echo "$tool_specified" >&6; }
18872      fi
18873    fi
18874  fi
18875
18876
18877  # Check if it's GNU time
18878  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18879  if test "x$IS_GNU_TIME" != x; then
18880    IS_GNU_TIME=yes
18881  else
18882    IS_GNU_TIME=no
18883  fi
18884
18885
18886  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18887
18888
18889
18890  # Publish this variable in the help.
18891
18892
18893  if test "x$DSYMUTIL" = x; then
18894    # The variable is not set by user, try to locate tool using the code snippet
18895    for ac_prog in dsymutil
18896do
18897  # Extract the first word of "$ac_prog", so it can be a program name with args.
18898set dummy $ac_prog; ac_word=$2
18899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18900$as_echo_n "checking for $ac_word... " >&6; }
18901if ${ac_cv_path_DSYMUTIL+:} false; then :
18902  $as_echo_n "(cached) " >&6
18903else
18904  case $DSYMUTIL in
18905  [\\/]* | ?:[\\/]*)
18906  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18907  ;;
18908  *)
18909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18910for as_dir in $PATH
18911do
18912  IFS=$as_save_IFS
18913  test -z "$as_dir" && as_dir=.
18914    for ac_exec_ext in '' $ac_executable_extensions; do
18915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18916    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18918    break 2
18919  fi
18920done
18921  done
18922IFS=$as_save_IFS
18923
18924  ;;
18925esac
18926fi
18927DSYMUTIL=$ac_cv_path_DSYMUTIL
18928if test -n "$DSYMUTIL"; then
18929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18930$as_echo "$DSYMUTIL" >&6; }
18931else
18932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18933$as_echo "no" >&6; }
18934fi
18935
18936
18937  test -n "$DSYMUTIL" && break
18938done
18939
18940  else
18941    # The variable is set, but is it from the command line or the environment?
18942
18943    # Try to remove the string !DSYMUTIL! from our list.
18944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18946      # If it failed, the variable was not from the command line. Ignore it,
18947      # but warn the user (except for BASH, which is always set by the calling BASH).
18948      if test "xDSYMUTIL" != xBASH; then
18949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18950$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18951      fi
18952      # Try to locate tool using the code snippet
18953      for ac_prog in dsymutil
18954do
18955  # Extract the first word of "$ac_prog", so it can be a program name with args.
18956set dummy $ac_prog; ac_word=$2
18957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18958$as_echo_n "checking for $ac_word... " >&6; }
18959if ${ac_cv_path_DSYMUTIL+:} false; then :
18960  $as_echo_n "(cached) " >&6
18961else
18962  case $DSYMUTIL in
18963  [\\/]* | ?:[\\/]*)
18964  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18965  ;;
18966  *)
18967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18968for as_dir in $PATH
18969do
18970  IFS=$as_save_IFS
18971  test -z "$as_dir" && as_dir=.
18972    for ac_exec_ext in '' $ac_executable_extensions; do
18973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18974    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18976    break 2
18977  fi
18978done
18979  done
18980IFS=$as_save_IFS
18981
18982  ;;
18983esac
18984fi
18985DSYMUTIL=$ac_cv_path_DSYMUTIL
18986if test -n "$DSYMUTIL"; then
18987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18988$as_echo "$DSYMUTIL" >&6; }
18989else
18990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18991$as_echo "no" >&6; }
18992fi
18993
18994
18995  test -n "$DSYMUTIL" && break
18996done
18997
18998    else
18999      # If it succeeded, then it was overridden by the user. We will use it
19000      # for the tool.
19001
19002      # First remove it from the list of overridden variables, so we can test
19003      # for unknown variables in the end.
19004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19005
19006      # Check if the provided tool contains a complete path.
19007      tool_specified="$DSYMUTIL"
19008      tool_basename="${tool_specified##*/}"
19009      if test "x$tool_basename" = "x$tool_specified"; then
19010        # A command without a complete path is provided, search $PATH.
19011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19012$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19013        # Extract the first word of "$tool_basename", so it can be a program name with args.
19014set dummy $tool_basename; ac_word=$2
19015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19016$as_echo_n "checking for $ac_word... " >&6; }
19017if ${ac_cv_path_DSYMUTIL+:} false; then :
19018  $as_echo_n "(cached) " >&6
19019else
19020  case $DSYMUTIL in
19021  [\\/]* | ?:[\\/]*)
19022  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19023  ;;
19024  *)
19025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19026for as_dir in $PATH
19027do
19028  IFS=$as_save_IFS
19029  test -z "$as_dir" && as_dir=.
19030    for ac_exec_ext in '' $ac_executable_extensions; do
19031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19032    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19034    break 2
19035  fi
19036done
19037  done
19038IFS=$as_save_IFS
19039
19040  ;;
19041esac
19042fi
19043DSYMUTIL=$ac_cv_path_DSYMUTIL
19044if test -n "$DSYMUTIL"; then
19045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19046$as_echo "$DSYMUTIL" >&6; }
19047else
19048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19049$as_echo "no" >&6; }
19050fi
19051
19052
19053        if test "x$DSYMUTIL" = x; then
19054          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19055        fi
19056      else
19057        # Otherwise we believe it is a complete path. Use it as it is.
19058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19059$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19061$as_echo_n "checking for DSYMUTIL... " >&6; }
19062        if test ! -x "$tool_specified"; then
19063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19064$as_echo "not found" >&6; }
19065          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19066        fi
19067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19068$as_echo "$tool_specified" >&6; }
19069      fi
19070    fi
19071  fi
19072
19073
19074
19075  if test "x$DSYMUTIL" = x; then
19076    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19077  fi
19078
19079
19080
19081
19082
19083  # Publish this variable in the help.
19084
19085
19086  if test "x$XATTR" = x; then
19087    # The variable is not set by user, try to locate tool using the code snippet
19088    for ac_prog in xattr
19089do
19090  # Extract the first word of "$ac_prog", so it can be a program name with args.
19091set dummy $ac_prog; ac_word=$2
19092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19093$as_echo_n "checking for $ac_word... " >&6; }
19094if ${ac_cv_path_XATTR+:} false; then :
19095  $as_echo_n "(cached) " >&6
19096else
19097  case $XATTR in
19098  [\\/]* | ?:[\\/]*)
19099  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19100  ;;
19101  *)
19102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19103for as_dir in $PATH
19104do
19105  IFS=$as_save_IFS
19106  test -z "$as_dir" && as_dir=.
19107    for ac_exec_ext in '' $ac_executable_extensions; do
19108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19109    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19111    break 2
19112  fi
19113done
19114  done
19115IFS=$as_save_IFS
19116
19117  ;;
19118esac
19119fi
19120XATTR=$ac_cv_path_XATTR
19121if test -n "$XATTR"; then
19122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19123$as_echo "$XATTR" >&6; }
19124else
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19126$as_echo "no" >&6; }
19127fi
19128
19129
19130  test -n "$XATTR" && break
19131done
19132
19133  else
19134    # The variable is set, but is it from the command line or the environment?
19135
19136    # Try to remove the string !XATTR! from our list.
19137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19139      # If it failed, the variable was not from the command line. Ignore it,
19140      # but warn the user (except for BASH, which is always set by the calling BASH).
19141      if test "xXATTR" != xBASH; then
19142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19143$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19144      fi
19145      # Try to locate tool using the code snippet
19146      for ac_prog in xattr
19147do
19148  # Extract the first word of "$ac_prog", so it can be a program name with args.
19149set dummy $ac_prog; ac_word=$2
19150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19151$as_echo_n "checking for $ac_word... " >&6; }
19152if ${ac_cv_path_XATTR+:} false; then :
19153  $as_echo_n "(cached) " >&6
19154else
19155  case $XATTR in
19156  [\\/]* | ?:[\\/]*)
19157  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19158  ;;
19159  *)
19160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19161for as_dir in $PATH
19162do
19163  IFS=$as_save_IFS
19164  test -z "$as_dir" && as_dir=.
19165    for ac_exec_ext in '' $ac_executable_extensions; do
19166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19167    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19169    break 2
19170  fi
19171done
19172  done
19173IFS=$as_save_IFS
19174
19175  ;;
19176esac
19177fi
19178XATTR=$ac_cv_path_XATTR
19179if test -n "$XATTR"; then
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19181$as_echo "$XATTR" >&6; }
19182else
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19184$as_echo "no" >&6; }
19185fi
19186
19187
19188  test -n "$XATTR" && break
19189done
19190
19191    else
19192      # If it succeeded, then it was overridden by the user. We will use it
19193      # for the tool.
19194
19195      # First remove it from the list of overridden variables, so we can test
19196      # for unknown variables in the end.
19197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19198
19199      # Check if the provided tool contains a complete path.
19200      tool_specified="$XATTR"
19201      tool_basename="${tool_specified##*/}"
19202      if test "x$tool_basename" = "x$tool_specified"; then
19203        # A command without a complete path is provided, search $PATH.
19204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19205$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19206        # Extract the first word of "$tool_basename", so it can be a program name with args.
19207set dummy $tool_basename; ac_word=$2
19208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19209$as_echo_n "checking for $ac_word... " >&6; }
19210if ${ac_cv_path_XATTR+:} false; then :
19211  $as_echo_n "(cached) " >&6
19212else
19213  case $XATTR in
19214  [\\/]* | ?:[\\/]*)
19215  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19216  ;;
19217  *)
19218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19219for as_dir in $PATH
19220do
19221  IFS=$as_save_IFS
19222  test -z "$as_dir" && as_dir=.
19223    for ac_exec_ext in '' $ac_executable_extensions; do
19224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19225    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19227    break 2
19228  fi
19229done
19230  done
19231IFS=$as_save_IFS
19232
19233  ;;
19234esac
19235fi
19236XATTR=$ac_cv_path_XATTR
19237if test -n "$XATTR"; then
19238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19239$as_echo "$XATTR" >&6; }
19240else
19241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19242$as_echo "no" >&6; }
19243fi
19244
19245
19246        if test "x$XATTR" = x; then
19247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19248        fi
19249      else
19250        # Otherwise we believe it is a complete path. Use it as it is.
19251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19252$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19254$as_echo_n "checking for XATTR... " >&6; }
19255        if test ! -x "$tool_specified"; then
19256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19257$as_echo "not found" >&6; }
19258          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19259        fi
19260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19261$as_echo "$tool_specified" >&6; }
19262      fi
19263    fi
19264  fi
19265
19266
19267
19268  if test "x$XATTR" = x; then
19269    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19270  fi
19271
19272
19273
19274
19275  # Publish this variable in the help.
19276
19277
19278  if test "x$CODESIGN" = x; then
19279    # The variable is not set by user, try to locate tool using the code snippet
19280    for ac_prog in codesign
19281do
19282  # Extract the first word of "$ac_prog", so it can be a program name with args.
19283set dummy $ac_prog; ac_word=$2
19284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19285$as_echo_n "checking for $ac_word... " >&6; }
19286if ${ac_cv_path_CODESIGN+:} false; then :
19287  $as_echo_n "(cached) " >&6
19288else
19289  case $CODESIGN in
19290  [\\/]* | ?:[\\/]*)
19291  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19292  ;;
19293  *)
19294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19295for as_dir in $PATH
19296do
19297  IFS=$as_save_IFS
19298  test -z "$as_dir" && as_dir=.
19299    for ac_exec_ext in '' $ac_executable_extensions; do
19300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19301    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19303    break 2
19304  fi
19305done
19306  done
19307IFS=$as_save_IFS
19308
19309  ;;
19310esac
19311fi
19312CODESIGN=$ac_cv_path_CODESIGN
19313if test -n "$CODESIGN"; then
19314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19315$as_echo "$CODESIGN" >&6; }
19316else
19317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19318$as_echo "no" >&6; }
19319fi
19320
19321
19322  test -n "$CODESIGN" && break
19323done
19324
19325  else
19326    # The variable is set, but is it from the command line or the environment?
19327
19328    # Try to remove the string !CODESIGN! from our list.
19329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19331      # If it failed, the variable was not from the command line. Ignore it,
19332      # but warn the user (except for BASH, which is always set by the calling BASH).
19333      if test "xCODESIGN" != xBASH; then
19334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19335$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19336      fi
19337      # Try to locate tool using the code snippet
19338      for ac_prog in codesign
19339do
19340  # Extract the first word of "$ac_prog", so it can be a program name with args.
19341set dummy $ac_prog; ac_word=$2
19342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19343$as_echo_n "checking for $ac_word... " >&6; }
19344if ${ac_cv_path_CODESIGN+:} false; then :
19345  $as_echo_n "(cached) " >&6
19346else
19347  case $CODESIGN in
19348  [\\/]* | ?:[\\/]*)
19349  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19350  ;;
19351  *)
19352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19353for as_dir in $PATH
19354do
19355  IFS=$as_save_IFS
19356  test -z "$as_dir" && as_dir=.
19357    for ac_exec_ext in '' $ac_executable_extensions; do
19358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19359    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19361    break 2
19362  fi
19363done
19364  done
19365IFS=$as_save_IFS
19366
19367  ;;
19368esac
19369fi
19370CODESIGN=$ac_cv_path_CODESIGN
19371if test -n "$CODESIGN"; then
19372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19373$as_echo "$CODESIGN" >&6; }
19374else
19375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19376$as_echo "no" >&6; }
19377fi
19378
19379
19380  test -n "$CODESIGN" && break
19381done
19382
19383    else
19384      # If it succeeded, then it was overridden by the user. We will use it
19385      # for the tool.
19386
19387      # First remove it from the list of overridden variables, so we can test
19388      # for unknown variables in the end.
19389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19390
19391      # Check if the provided tool contains a complete path.
19392      tool_specified="$CODESIGN"
19393      tool_basename="${tool_specified##*/}"
19394      if test "x$tool_basename" = "x$tool_specified"; then
19395        # A command without a complete path is provided, search $PATH.
19396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19397$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19398        # Extract the first word of "$tool_basename", so it can be a program name with args.
19399set dummy $tool_basename; ac_word=$2
19400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19401$as_echo_n "checking for $ac_word... " >&6; }
19402if ${ac_cv_path_CODESIGN+:} false; then :
19403  $as_echo_n "(cached) " >&6
19404else
19405  case $CODESIGN in
19406  [\\/]* | ?:[\\/]*)
19407  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19408  ;;
19409  *)
19410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19411for as_dir in $PATH
19412do
19413  IFS=$as_save_IFS
19414  test -z "$as_dir" && as_dir=.
19415    for ac_exec_ext in '' $ac_executable_extensions; do
19416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19417    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19419    break 2
19420  fi
19421done
19422  done
19423IFS=$as_save_IFS
19424
19425  ;;
19426esac
19427fi
19428CODESIGN=$ac_cv_path_CODESIGN
19429if test -n "$CODESIGN"; then
19430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19431$as_echo "$CODESIGN" >&6; }
19432else
19433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19434$as_echo "no" >&6; }
19435fi
19436
19437
19438        if test "x$CODESIGN" = x; then
19439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19440        fi
19441      else
19442        # Otherwise we believe it is a complete path. Use it as it is.
19443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19444$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19446$as_echo_n "checking for CODESIGN... " >&6; }
19447        if test ! -x "$tool_specified"; then
19448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19449$as_echo "not found" >&6; }
19450          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19451        fi
19452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19453$as_echo "$tool_specified" >&6; }
19454      fi
19455    fi
19456  fi
19457
19458
19459    if test "x$CODESIGN" != "x"; then
19460      # Verify that the openjdk_codesign certificate is present
19461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19462$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19463      rm -f codesign-testfile
19464      touch codesign-testfile
19465      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19466      rm -f codesign-testfile
19467      if test "x$CODESIGN" = x; then
19468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19469$as_echo "no" >&6; }
19470      else
19471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19472$as_echo "yes" >&6; }
19473      fi
19474    fi
19475  fi
19476
19477
19478  # Test if bash supports pipefail.
19479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19480$as_echo_n "checking if bash supports pipefail... " >&6; }
19481  if ${BASH} -c 'set -o pipefail'; then
19482    BASH_ARGS="$BASH_ARGS -o pipefail"
19483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19484$as_echo "yes" >&6; }
19485  else
19486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19487$as_echo "no" >&6; }
19488  fi
19489
19490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19491$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19492  if ${BASH} -e -c 'true'; then
19493    BASH_ARGS="$BASH_ARGS -e"
19494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19495$as_echo "yes" >&6; }
19496  else
19497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19498$as_echo "no" >&6; }
19499  fi
19500
19501
19502
19503
19504# Check if pkg-config is available.
19505
19506
19507if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19508	if test -n "$ac_tool_prefix"; then
19509  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19510set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19512$as_echo_n "checking for $ac_word... " >&6; }
19513if ${ac_cv_path_PKG_CONFIG+:} false; then :
19514  $as_echo_n "(cached) " >&6
19515else
19516  case $PKG_CONFIG in
19517  [\\/]* | ?:[\\/]*)
19518  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19519  ;;
19520  *)
19521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19522for as_dir in $PATH
19523do
19524  IFS=$as_save_IFS
19525  test -z "$as_dir" && as_dir=.
19526    for ac_exec_ext in '' $ac_executable_extensions; do
19527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19528    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19530    break 2
19531  fi
19532done
19533  done
19534IFS=$as_save_IFS
19535
19536  ;;
19537esac
19538fi
19539PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19540if test -n "$PKG_CONFIG"; then
19541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19542$as_echo "$PKG_CONFIG" >&6; }
19543else
19544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19545$as_echo "no" >&6; }
19546fi
19547
19548
19549fi
19550if test -z "$ac_cv_path_PKG_CONFIG"; then
19551  ac_pt_PKG_CONFIG=$PKG_CONFIG
19552  # Extract the first word of "pkg-config", so it can be a program name with args.
19553set dummy pkg-config; ac_word=$2
19554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19555$as_echo_n "checking for $ac_word... " >&6; }
19556if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19557  $as_echo_n "(cached) " >&6
19558else
19559  case $ac_pt_PKG_CONFIG in
19560  [\\/]* | ?:[\\/]*)
19561  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19562  ;;
19563  *)
19564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19565for as_dir in $PATH
19566do
19567  IFS=$as_save_IFS
19568  test -z "$as_dir" && as_dir=.
19569    for ac_exec_ext in '' $ac_executable_extensions; do
19570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19571    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19573    break 2
19574  fi
19575done
19576  done
19577IFS=$as_save_IFS
19578
19579  ;;
19580esac
19581fi
19582ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19583if test -n "$ac_pt_PKG_CONFIG"; then
19584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19585$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19586else
19587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19588$as_echo "no" >&6; }
19589fi
19590
19591  if test "x$ac_pt_PKG_CONFIG" = x; then
19592    PKG_CONFIG=""
19593  else
19594    case $cross_compiling:$ac_tool_warned in
19595yes:)
19596{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19597$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19598ac_tool_warned=yes ;;
19599esac
19600    PKG_CONFIG=$ac_pt_PKG_CONFIG
19601  fi
19602else
19603  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19604fi
19605
19606fi
19607if test -n "$PKG_CONFIG"; then
19608	_pkg_min_version=0.9.0
19609	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19610$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19611	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19612		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19613$as_echo "yes" >&6; }
19614	else
19615		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19616$as_echo "no" >&6; }
19617		PKG_CONFIG=""
19618	fi
19619
19620fi
19621
19622# After basic tools have been setup, we can check build os specific details.
19623
19624  ###############################################################################
19625
19626  # Note that this is the build platform OS version!
19627
19628  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19629  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19630  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19631  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19632
19633
19634
19635
19636
19637# Setup builddeps, for automatic downloading of tools we need.
19638# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19639# boot-jdk setup, but we need to have basic tools setup first.
19640
19641
19642# Check whether --with-builddeps-conf was given.
19643if test "${with_builddeps_conf+set}" = set; then :
19644  withval=$with_builddeps_conf;
19645fi
19646
19647
19648
19649# Check whether --with-builddeps-server was given.
19650if test "${with_builddeps_server+set}" = set; then :
19651  withval=$with_builddeps_server;
19652fi
19653
19654
19655
19656# Check whether --with-builddeps-dir was given.
19657if test "${with_builddeps_dir+set}" = set; then :
19658  withval=$with_builddeps_dir;
19659else
19660  with_builddeps_dir=/localhome/builddeps
19661fi
19662
19663
19664
19665# Check whether --with-builddeps-group was given.
19666if test "${with_builddeps_group+set}" = set; then :
19667  withval=$with_builddeps_group;
19668fi
19669
19670
19671
19672
19673  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19674    if test "x$with_builddeps_conf" != x; then
19675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19676$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19677      builddepsfile=$with_builddeps_conf
19678      if test -s $builddepsfile; then
19679        . $builddepsfile
19680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19681$as_echo "loaded!" >&6; }
19682      else
19683        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19684      fi
19685    else
19686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19687$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19688      builddepsfile=`mktemp`
19689      touch $builddepsfile
19690      # Put all found confs into a single file.
19691      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19692      # Source the file to acquire the variables
19693      if test -s $builddepsfile; then
19694        . $builddepsfile
19695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19696$as_echo "found at least one!" >&6; }
19697      else
19698        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19699      fi
19700    fi
19701    # Create build and target names that use _ instead of "-" and ".".
19702    # This is necessary to use them in variable names.
19703    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19704    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19705    # Extract rewrite information for build and target
19706    eval rewritten_build=\${REWRITE_${build_var}}
19707    if test "x$rewritten_build" = x; then
19708      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19709      echo Build stays the same $rewritten_build
19710    else
19711      echo Rewriting build for builddeps into $rewritten_build
19712    fi
19713    eval rewritten_target=\${REWRITE_${target_var}}
19714    if test "x$rewritten_target" = x; then
19715      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19716      echo Target stays the same $rewritten_target
19717    else
19718      echo Rewriting target for builddeps into $rewritten_target
19719    fi
19720    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19721    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19722  fi
19723  for ac_prog in 7z unzip
19724do
19725  # Extract the first word of "$ac_prog", so it can be a program name with args.
19726set dummy $ac_prog; ac_word=$2
19727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19728$as_echo_n "checking for $ac_word... " >&6; }
19729if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19730  $as_echo_n "(cached) " >&6
19731else
19732  if test -n "$BDEPS_UNZIP"; then
19733  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19734else
19735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19736for as_dir in $PATH
19737do
19738  IFS=$as_save_IFS
19739  test -z "$as_dir" && as_dir=.
19740    for ac_exec_ext in '' $ac_executable_extensions; do
19741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19742    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19744    break 2
19745  fi
19746done
19747  done
19748IFS=$as_save_IFS
19749
19750fi
19751fi
19752BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19753if test -n "$BDEPS_UNZIP"; then
19754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19755$as_echo "$BDEPS_UNZIP" >&6; }
19756else
19757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19758$as_echo "no" >&6; }
19759fi
19760
19761
19762  test -n "$BDEPS_UNZIP" && break
19763done
19764
19765  if test "x$BDEPS_UNZIP" = x7z; then
19766    BDEPS_UNZIP="7z x"
19767  fi
19768
19769  for ac_prog in wget lftp ftp
19770do
19771  # Extract the first word of "$ac_prog", so it can be a program name with args.
19772set dummy $ac_prog; ac_word=$2
19773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19774$as_echo_n "checking for $ac_word... " >&6; }
19775if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19776  $as_echo_n "(cached) " >&6
19777else
19778  if test -n "$BDEPS_FTP"; then
19779  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19780else
19781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19782for as_dir in $PATH
19783do
19784  IFS=$as_save_IFS
19785  test -z "$as_dir" && as_dir=.
19786    for ac_exec_ext in '' $ac_executable_extensions; do
19787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19788    ac_cv_prog_BDEPS_FTP="$ac_prog"
19789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19790    break 2
19791  fi
19792done
19793  done
19794IFS=$as_save_IFS
19795
19796fi
19797fi
19798BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19799if test -n "$BDEPS_FTP"; then
19800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19801$as_echo "$BDEPS_FTP" >&6; }
19802else
19803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19804$as_echo "no" >&6; }
19805fi
19806
19807
19808  test -n "$BDEPS_FTP" && break
19809done
19810
19811
19812
19813###############################################################################
19814#
19815# Determine OpenJDK variants, options and version numbers.
19816#
19817###############################################################################
19818
19819# We need build & target for this.
19820
19821
19822  ###############################################################################
19823  #
19824  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19825  # We always build headless support.
19826  #
19827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19828$as_echo_n "checking headful support... " >&6; }
19829  # Check whether --enable-headful was given.
19830if test "${enable_headful+set}" = set; then :
19831  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19832else
19833  SUPPORT_HEADFUL=yes
19834fi
19835
19836
19837  SUPPORT_HEADLESS=yes
19838  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19839
19840  if test "x$SUPPORT_HEADFUL" = xyes; then
19841    # We are building both headful and headless.
19842    headful_msg="include support for both headful and headless"
19843  fi
19844
19845  if test "x$SUPPORT_HEADFUL" = xno; then
19846    # Thus we are building headless only.
19847    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19848    headful_msg="headless only"
19849  fi
19850
19851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19852$as_echo "$headful_msg" >&6; }
19853
19854
19855
19856
19857
19858  # Control wether Hotspot runs Queens test after build.
19859  # Check whether --enable-hotspot-test-in-build was given.
19860if test "${enable_hotspot_test_in_build+set}" = set; then :
19861  enableval=$enable_hotspot_test_in_build;
19862else
19863  enable_hotspot_test_in_build=no
19864fi
19865
19866  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19867    TEST_IN_BUILD=true
19868  else
19869    TEST_IN_BUILD=false
19870  fi
19871
19872
19873  ###############################################################################
19874  #
19875  # Choose cacerts source file
19876  #
19877
19878# Check whether --with-cacerts-file was given.
19879if test "${with_cacerts_file+set}" = set; then :
19880  withval=$with_cacerts_file;
19881fi
19882
19883  if test "x$with_cacerts_file" != x; then
19884    CACERTS_FILE=$with_cacerts_file
19885  fi
19886
19887
19888  ###############################################################################
19889  #
19890  # Enable or disable unlimited crypto
19891  #
19892  # Check whether --enable-unlimited-crypto was given.
19893if test "${enable_unlimited_crypto+set}" = set; then :
19894  enableval=$enable_unlimited_crypto;
19895else
19896  enable_unlimited_crypto=no
19897fi
19898
19899  if test "x$enable_unlimited_crypto" = "xyes"; then
19900    UNLIMITED_CRYPTO=true
19901  else
19902    UNLIMITED_CRYPTO=false
19903  fi
19904
19905
19906  ###############################################################################
19907  #
19908  # Enable or disable the elliptic curve crypto implementation
19909  #
19910
19911
19912  ###############################################################################
19913  #
19914  # --enable-rmiconnector-iiop
19915  #
19916  # Check whether --enable-rmiconnector-iiop was given.
19917if test "${enable_rmiconnector_iiop+set}" = set; then :
19918  enableval=$enable_rmiconnector_iiop;
19919fi
19920
19921  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19922    RMICONNECTOR_IIOP=true
19923  else
19924    RMICONNECTOR_IIOP=false
19925  fi
19926
19927
19928  ###############################################################################
19929  #
19930  # Compress jars
19931  #
19932  COMPRESS_JARS=false
19933
19934
19935
19936
19937  # Source the version numbers
19938  . $AUTOCONF_DIR/version-numbers
19939
19940  # Get the settings from parameters
19941
19942# Check whether --with-milestone was given.
19943if test "${with_milestone+set}" = set; then :
19944  withval=$with_milestone;
19945fi
19946
19947  if test "x$with_milestone" = xyes; then
19948    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19949  elif test "x$with_milestone" != x; then
19950    MILESTONE="$with_milestone"
19951  fi
19952  if test "x$MILESTONE" = x; then
19953    MILESTONE=internal
19954  fi
19955
19956
19957# Check whether --with-update-version was given.
19958if test "${with_update_version+set}" = set; then :
19959  withval=$with_update_version;
19960fi
19961
19962  if test "x$with_update_version" = xyes; then
19963    as_fn_error $? "Update version must have a value" "$LINENO" 5
19964  elif test "x$with_update_version" != x; then
19965    JDK_UPDATE_VERSION="$with_update_version"
19966    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19967    # to a bug in expr (which reduces it to just X). To work around this, we
19968    # always add a 0 to one digit update versions.
19969    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19970      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19971    fi
19972  fi
19973
19974
19975# Check whether --with-user-release-suffix was given.
19976if test "${with_user_release_suffix+set}" = set; then :
19977  withval=$with_user_release_suffix;
19978fi
19979
19980  if test "x$with_user_release_suffix" = xyes; then
19981    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19982  elif test "x$with_user_release_suffix" != x; then
19983    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19984  fi
19985
19986
19987# Check whether --with-build-number was given.
19988if test "${with_build_number+set}" = set; then :
19989  withval=$with_build_number;
19990fi
19991
19992  if test "x$with_build_number" = xyes; then
19993    as_fn_error $? "Build number must have a value" "$LINENO" 5
19994  elif test "x$with_build_number" != x; then
19995    JDK_BUILD_NUMBER="$with_build_number"
19996  fi
19997  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19998  if test "x$JDK_BUILD_NUMBER" = x; then
19999    JDK_BUILD_NUMBER=b00
20000    if test "x$USER_RELEASE_SUFFIX" = x; then
20001      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20002      # Avoid [:alnum:] since it depends on the locale.
20003      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20004      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20005    fi
20006  fi
20007
20008  # Now set the JDK version, milestone, build number etc.
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025# Check whether --with-copyright-year was given.
20026if test "${with_copyright_year+set}" = set; then :
20027  withval=$with_copyright_year;
20028fi
20029
20030  if test "x$with_copyright_year" = xyes; then
20031    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20032  elif test "x$with_copyright_year" != x; then
20033    COPYRIGHT_YEAR="$with_copyright_year"
20034  else
20035    COPYRIGHT_YEAR=`date +'%Y'`
20036  fi
20037
20038
20039  if test "x$JDK_UPDATE_VERSION" != x; then
20040    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20041  else
20042    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20043  fi
20044
20045
20046  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20047
20048
20049
20050###############################################################################
20051#
20052# Setup BootJDK, used to bootstrap the build.
20053#
20054###############################################################################
20055
20056
20057  BOOT_JDK_FOUND=no
20058
20059# Check whether --with-boot-jdk was given.
20060if test "${with_boot_jdk+set}" = set; then :
20061  withval=$with_boot_jdk;
20062fi
20063
20064
20065  # We look for the Boot JDK through various means, going from more certain to
20066  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20067  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20068  # must check if this is indeed valid; otherwise we'll continue looking.
20069
20070  # Test: Is bootjdk explicitely set by command line arguments?
20071
20072  if test "x$BOOT_JDK_FOUND" = xno; then
20073    # Now execute the test
20074
20075  if test "x$with_boot_jdk" != x; then
20076    BOOT_JDK=$with_boot_jdk
20077    BOOT_JDK_FOUND=maybe
20078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20079$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20080  fi
20081
20082
20083    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20084    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20085      # Do we have a bin/java?
20086      if test ! -x "$BOOT_JDK/bin/java"; then
20087        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20089        BOOT_JDK_FOUND=no
20090      else
20091        # Do we have a bin/javac?
20092        if test ! -x "$BOOT_JDK/bin/javac"; then
20093          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20095          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20096$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20097          BOOT_JDK_FOUND=no
20098        else
20099          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20100          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20101
20102          # Extra M4 quote needed to protect [] in grep expression.
20103          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20104          if test "x$FOUND_CORRECT_VERSION" = x; then
20105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20107            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20109            BOOT_JDK_FOUND=no
20110          else
20111            # We're done! :-)
20112            BOOT_JDK_FOUND=yes
20113
20114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20115
20116  # Input might be given as Windows format, start by converting to
20117  # unix format.
20118  path="$BOOT_JDK"
20119  new_path=`$CYGPATH -u "$path"`
20120
20121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20124  # "foo.exe" is OK but "foo" is an error.
20125  #
20126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20127  # It is also a way to make sure we got the proper file name for the real test later on.
20128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20129  if test "x$test_shortpath" = x; then
20130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20132    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20133  fi
20134
20135  # Call helper function which possibly converts this using DOS-style short mode.
20136  # If so, the updated path is stored in $new_path.
20137
20138  input_path="$new_path"
20139  # Check if we need to convert this using DOS-style short mode. If the path
20140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20141  # take no chances and rewrite it.
20142  # Note: m4 eats our [], so we need to use [ and ] instead.
20143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20144  if test "x$has_forbidden_chars" != x; then
20145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20149      # Going to short mode and back again did indeed matter. Since short mode is
20150      # case insensitive, let's make it lowercase to improve readability.
20151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20152      # Now convert it back to Unix-stile (cygpath)
20153      input_path=`$CYGPATH -u "$shortmode_path"`
20154      new_path="$input_path"
20155    fi
20156  fi
20157
20158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20159  if test "x$test_cygdrive_prefix" = x; then
20160    # As a simple fix, exclude /usr/bin since it's not a real path.
20161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20163      # a path prefixed by /cygdrive for fixpath to work.
20164      new_path="$CYGWIN_ROOT_PATH$input_path"
20165    fi
20166  fi
20167
20168
20169  if test "x$path" != "x$new_path"; then
20170    BOOT_JDK="$new_path"
20171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20173  fi
20174
20175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20176
20177  path="$BOOT_JDK"
20178  has_colon=`$ECHO $path | $GREP ^.:`
20179  new_path="$path"
20180  if test "x$has_colon" = x; then
20181    # Not in mixed or Windows style, start by that.
20182    new_path=`cmd //c echo $path`
20183  fi
20184
20185
20186  input_path="$new_path"
20187  # Check if we need to convert this using DOS-style short mode. If the path
20188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20189  # take no chances and rewrite it.
20190  # Note: m4 eats our [], so we need to use [ and ] instead.
20191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20192  if test "x$has_forbidden_chars" != x; then
20193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20195  fi
20196
20197
20198  windows_path="$new_path"
20199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20200    unix_path=`$CYGPATH -u "$windows_path"`
20201    new_path="$unix_path"
20202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20204    new_path="$unix_path"
20205  fi
20206
20207  if test "x$path" != "x$new_path"; then
20208    BOOT_JDK="$new_path"
20209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20211  fi
20212
20213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20215
20216  else
20217    # We're on a unix platform. Hooray! :)
20218    path="$BOOT_JDK"
20219    has_space=`$ECHO "$path" | $GREP " "`
20220    if test "x$has_space" != x; then
20221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20224    fi
20225
20226    # Use eval to expand a potential ~
20227    eval path="$path"
20228    if test ! -f "$path" && test ! -d "$path"; then
20229      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20230    fi
20231
20232    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20233  fi
20234
20235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20236$as_echo_n "checking for Boot JDK... " >&6; }
20237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20238$as_echo "$BOOT_JDK" >&6; }
20239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20240$as_echo_n "checking Boot JDK version... " >&6; }
20241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20243$as_echo "$BOOT_JDK_VERSION" >&6; }
20244          fi # end check jdk version
20245        fi # end check javac
20246      fi # end check java
20247    fi # end check boot jdk found
20248  fi
20249
20250  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20251    # Having specified an argument which is incorrect will produce an instant failure;
20252    # we should not go on looking
20253    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20254  fi
20255
20256  # Test: Is bootjdk available from builddeps?
20257
20258  if test "x$BOOT_JDK_FOUND" = xno; then
20259    # Now execute the test
20260
20261
20262
20263  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20264    # Source the builddeps file again, to make sure it uses the latest variables!
20265    . $builddepsfile
20266    # Look for a target and build machine specific resource!
20267    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20268    if test "x$resource" = x; then
20269      # Ok, lets instead look for a target specific resource
20270      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20271    fi
20272    if test "x$resource" = x; then
20273      # Ok, lets instead look for a build specific resource
20274      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20275    fi
20276    if test "x$resource" = x; then
20277      # Ok, lets instead look for a generic resource
20278      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20279      resource=${builddep_bootjdk}
20280    fi
20281    if test "x$resource" != x; then
20282      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20283$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20284      # If the resource in the builddeps.conf file is an existing directory,
20285      # for example /java/linux/cups
20286      if test -d ${resource}; then
20287        depdir=${resource}
20288      else
20289
20290  # bootjdk is for example mymodule
20291  # $resource is for example libs/general/libmymod_1_2_3.zip
20292  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20293  # $with_builddeps_dir is for example /localhome/builddeps
20294  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20295  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20296  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20297  filename=`basename $resource`
20298  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20299  filebase=${filename%%.*}
20300  extension=${filename#*.}
20301  installdir=$with_builddeps_dir/$filebase
20302  if test ! -f $installdir/$filename.unpacked; then
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20304$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20305    if test ! -d $installdir; then
20306      mkdir -p $installdir
20307    fi
20308    if test ! -d $installdir; then
20309      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20310    fi
20311    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20312    touch $tmpfile
20313    if test ! -f $tmpfile; then
20314      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20315    fi
20316
20317  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20318  # $tmpfile is the local file name for the downloaded file.
20319  VALID_TOOL=no
20320  if test "x$BDEPS_FTP" = xwget; then
20321    VALID_TOOL=yes
20322    wget -O $tmpfile $with_builddeps_server/$resource
20323  fi
20324  if test "x$BDEPS_FTP" = xlftp; then
20325    VALID_TOOL=yes
20326    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20327  fi
20328  if test "x$BDEPS_FTP" = xftp; then
20329    VALID_TOOL=yes
20330    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20331    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20332    FTPUSERPWD=${FTPSERVER%%@*}
20333    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20334      FTPUSER=${userpwd%%:*}
20335      FTPPWD=${userpwd#*@}
20336      FTPSERVER=${FTPSERVER#*@}
20337    else
20338      FTPUSER=ftp
20339      FTPPWD=ftp
20340    fi
20341    # the "pass" command does not work on some
20342    # ftp clients (read ftp.exe) but if it works,
20343    # passive mode is better!
20344    ( \
20345        echo "user $FTPUSER $FTPPWD"        ; \
20346        echo "pass"                         ; \
20347        echo "bin"                          ; \
20348        echo "get $FTPPATH $tmpfile"              ; \
20349    ) | ftp -in $FTPSERVER
20350  fi
20351  if test "x$VALID_TOOL" != xyes; then
20352    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20353  fi
20354
20355    mv $tmpfile $installdir/$filename
20356    if test ! -s $installdir/$filename; then
20357      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20358    fi
20359    case "$extension" in
20360      zip)  echo "Unzipping $installdir/$filename..."
20361        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20362        ;;
20363      tar.gz) echo "Untaring $installdir/$filename..."
20364        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20365        ;;
20366      tgz) echo "Untaring $installdir/$filename..."
20367        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20368        ;;
20369      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20370        ;;
20371    esac
20372  fi
20373  if test -f $installdir/$filename.unpacked; then
20374    depdir=$installdir
20375  fi
20376
20377      fi
20378      # Source the builddeps file again, because in the previous command, the depdir
20379      # was updated to point at the current build dependency install directory.
20380      . $builddepsfile
20381      # Now extract variables from the builddeps.conf files.
20382      theroot=${builddep_bootjdk_ROOT}
20383      thecflags=${builddep_bootjdk_CFLAGS}
20384      thelibs=${builddep_bootjdk_LIBS}
20385      if test "x$depdir" = x; then
20386        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20387      fi
20388      BOOT_JDK=$depdir
20389      if test "x$theroot" != x; then
20390        BOOT_JDK="$theroot"
20391      fi
20392      if test "x$thecflags" != x; then
20393        BOOT_JDK_CFLAGS="$thecflags"
20394      fi
20395      if test "x$thelibs" != x; then
20396        BOOT_JDK_LIBS="$thelibs"
20397      fi
20398      BOOT_JDK_FOUND=maybe
20399      else BOOT_JDK_FOUND=no
20400
20401    fi
20402    else BOOT_JDK_FOUND=no
20403
20404  fi
20405
20406
20407
20408    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20409    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20410      # Do we have a bin/java?
20411      if test ! -x "$BOOT_JDK/bin/java"; then
20412        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20414        BOOT_JDK_FOUND=no
20415      else
20416        # Do we have a bin/javac?
20417        if test ! -x "$BOOT_JDK/bin/javac"; then
20418          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20420          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20421$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20422          BOOT_JDK_FOUND=no
20423        else
20424          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20425          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20426
20427          # Extra M4 quote needed to protect [] in grep expression.
20428          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20429          if test "x$FOUND_CORRECT_VERSION" = x; then
20430            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20432            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20433$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20434            BOOT_JDK_FOUND=no
20435          else
20436            # We're done! :-)
20437            BOOT_JDK_FOUND=yes
20438
20439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20440
20441  # Input might be given as Windows format, start by converting to
20442  # unix format.
20443  path="$BOOT_JDK"
20444  new_path=`$CYGPATH -u "$path"`
20445
20446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20449  # "foo.exe" is OK but "foo" is an error.
20450  #
20451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20452  # It is also a way to make sure we got the proper file name for the real test later on.
20453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20454  if test "x$test_shortpath" = x; then
20455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20458  fi
20459
20460  # Call helper function which possibly converts this using DOS-style short mode.
20461  # If so, the updated path is stored in $new_path.
20462
20463  input_path="$new_path"
20464  # Check if we need to convert this using DOS-style short mode. If the path
20465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20466  # take no chances and rewrite it.
20467  # Note: m4 eats our [], so we need to use [ and ] instead.
20468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20469  if test "x$has_forbidden_chars" != x; then
20470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20474      # Going to short mode and back again did indeed matter. Since short mode is
20475      # case insensitive, let's make it lowercase to improve readability.
20476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20477      # Now convert it back to Unix-stile (cygpath)
20478      input_path=`$CYGPATH -u "$shortmode_path"`
20479      new_path="$input_path"
20480    fi
20481  fi
20482
20483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20484  if test "x$test_cygdrive_prefix" = x; then
20485    # As a simple fix, exclude /usr/bin since it's not a real path.
20486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20488      # a path prefixed by /cygdrive for fixpath to work.
20489      new_path="$CYGWIN_ROOT_PATH$input_path"
20490    fi
20491  fi
20492
20493
20494  if test "x$path" != "x$new_path"; then
20495    BOOT_JDK="$new_path"
20496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20498  fi
20499
20500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20501
20502  path="$BOOT_JDK"
20503  has_colon=`$ECHO $path | $GREP ^.:`
20504  new_path="$path"
20505  if test "x$has_colon" = x; then
20506    # Not in mixed or Windows style, start by that.
20507    new_path=`cmd //c echo $path`
20508  fi
20509
20510
20511  input_path="$new_path"
20512  # Check if we need to convert this using DOS-style short mode. If the path
20513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20514  # take no chances and rewrite it.
20515  # Note: m4 eats our [], so we need to use [ and ] instead.
20516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20517  if test "x$has_forbidden_chars" != x; then
20518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20520  fi
20521
20522
20523  windows_path="$new_path"
20524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20525    unix_path=`$CYGPATH -u "$windows_path"`
20526    new_path="$unix_path"
20527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20529    new_path="$unix_path"
20530  fi
20531
20532  if test "x$path" != "x$new_path"; then
20533    BOOT_JDK="$new_path"
20534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20536  fi
20537
20538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20540
20541  else
20542    # We're on a unix platform. Hooray! :)
20543    path="$BOOT_JDK"
20544    has_space=`$ECHO "$path" | $GREP " "`
20545    if test "x$has_space" != x; then
20546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20549    fi
20550
20551    # Use eval to expand a potential ~
20552    eval path="$path"
20553    if test ! -f "$path" && test ! -d "$path"; then
20554      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20555    fi
20556
20557    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20558  fi
20559
20560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20561$as_echo_n "checking for Boot JDK... " >&6; }
20562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20563$as_echo "$BOOT_JDK" >&6; }
20564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20565$as_echo_n "checking Boot JDK version... " >&6; }
20566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20568$as_echo "$BOOT_JDK_VERSION" >&6; }
20569          fi # end check jdk version
20570        fi # end check javac
20571      fi # end check java
20572    fi # end check boot jdk found
20573  fi
20574
20575
20576  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20577
20578  if test "x$BOOT_JDK_FOUND" = xno; then
20579    # Now execute the test
20580
20581  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20582    # First check at user selected default
20583
20584  if test "x$BOOT_JDK_FOUND" = xno; then
20585    # Now execute the test
20586
20587  if test -x /usr/libexec/java_home; then
20588    BOOT_JDK=`/usr/libexec/java_home `
20589    BOOT_JDK_FOUND=maybe
20590    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20591$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20592  fi
20593
20594
20595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20597      # Do we have a bin/java?
20598      if test ! -x "$BOOT_JDK/bin/java"; then
20599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20601        BOOT_JDK_FOUND=no
20602      else
20603        # Do we have a bin/javac?
20604        if test ! -x "$BOOT_JDK/bin/javac"; then
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20609          BOOT_JDK_FOUND=no
20610        else
20611          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20612          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20613
20614          # Extra M4 quote needed to protect [] in grep expression.
20615          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20616          if test "x$FOUND_CORRECT_VERSION" = x; then
20617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20619            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20620$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20621            BOOT_JDK_FOUND=no
20622          else
20623            # We're done! :-)
20624            BOOT_JDK_FOUND=yes
20625
20626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20627
20628  # Input might be given as Windows format, start by converting to
20629  # unix format.
20630  path="$BOOT_JDK"
20631  new_path=`$CYGPATH -u "$path"`
20632
20633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20636  # "foo.exe" is OK but "foo" is an error.
20637  #
20638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20639  # It is also a way to make sure we got the proper file name for the real test later on.
20640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20641  if test "x$test_shortpath" = x; then
20642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20644    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20645  fi
20646
20647  # Call helper function which possibly converts this using DOS-style short mode.
20648  # If so, the updated path is stored in $new_path.
20649
20650  input_path="$new_path"
20651  # Check if we need to convert this using DOS-style short mode. If the path
20652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20653  # take no chances and rewrite it.
20654  # Note: m4 eats our [], so we need to use [ and ] instead.
20655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20656  if test "x$has_forbidden_chars" != x; then
20657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20661      # Going to short mode and back again did indeed matter. Since short mode is
20662      # case insensitive, let's make it lowercase to improve readability.
20663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20664      # Now convert it back to Unix-stile (cygpath)
20665      input_path=`$CYGPATH -u "$shortmode_path"`
20666      new_path="$input_path"
20667    fi
20668  fi
20669
20670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20671  if test "x$test_cygdrive_prefix" = x; then
20672    # As a simple fix, exclude /usr/bin since it's not a real path.
20673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20675      # a path prefixed by /cygdrive for fixpath to work.
20676      new_path="$CYGWIN_ROOT_PATH$input_path"
20677    fi
20678  fi
20679
20680
20681  if test "x$path" != "x$new_path"; then
20682    BOOT_JDK="$new_path"
20683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20685  fi
20686
20687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20688
20689  path="$BOOT_JDK"
20690  has_colon=`$ECHO $path | $GREP ^.:`
20691  new_path="$path"
20692  if test "x$has_colon" = x; then
20693    # Not in mixed or Windows style, start by that.
20694    new_path=`cmd //c echo $path`
20695  fi
20696
20697
20698  input_path="$new_path"
20699  # Check if we need to convert this using DOS-style short mode. If the path
20700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20701  # take no chances and rewrite it.
20702  # Note: m4 eats our [], so we need to use [ and ] instead.
20703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20704  if test "x$has_forbidden_chars" != x; then
20705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20707  fi
20708
20709
20710  windows_path="$new_path"
20711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20712    unix_path=`$CYGPATH -u "$windows_path"`
20713    new_path="$unix_path"
20714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20716    new_path="$unix_path"
20717  fi
20718
20719  if test "x$path" != "x$new_path"; then
20720    BOOT_JDK="$new_path"
20721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20722$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20723  fi
20724
20725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20727
20728  else
20729    # We're on a unix platform. Hooray! :)
20730    path="$BOOT_JDK"
20731    has_space=`$ECHO "$path" | $GREP " "`
20732    if test "x$has_space" != x; then
20733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20735      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20736    fi
20737
20738    # Use eval to expand a potential ~
20739    eval path="$path"
20740    if test ! -f "$path" && test ! -d "$path"; then
20741      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20742    fi
20743
20744    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20745  fi
20746
20747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20748$as_echo_n "checking for Boot JDK... " >&6; }
20749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20750$as_echo "$BOOT_JDK" >&6; }
20751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20752$as_echo_n "checking Boot JDK version... " >&6; }
20753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20755$as_echo "$BOOT_JDK_VERSION" >&6; }
20756          fi # end check jdk version
20757        fi # end check javac
20758      fi # end check java
20759    fi # end check boot jdk found
20760  fi
20761
20762    # If that did not work out (e.g. too old), try explicit versions instead
20763
20764  if test "x$BOOT_JDK_FOUND" = xno; then
20765    # Now execute the test
20766
20767  if test -x /usr/libexec/java_home; then
20768    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20769    BOOT_JDK_FOUND=maybe
20770    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20771$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20772  fi
20773
20774
20775    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20776    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20777      # Do we have a bin/java?
20778      if test ! -x "$BOOT_JDK/bin/java"; then
20779        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20781        BOOT_JDK_FOUND=no
20782      else
20783        # Do we have a bin/javac?
20784        if test ! -x "$BOOT_JDK/bin/javac"; then
20785          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20787          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20788$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20789          BOOT_JDK_FOUND=no
20790        else
20791          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20792          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20793
20794          # Extra M4 quote needed to protect [] in grep expression.
20795          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20796          if test "x$FOUND_CORRECT_VERSION" = x; then
20797            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20799            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20800$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20801            BOOT_JDK_FOUND=no
20802          else
20803            # We're done! :-)
20804            BOOT_JDK_FOUND=yes
20805
20806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20807
20808  # Input might be given as Windows format, start by converting to
20809  # unix format.
20810  path="$BOOT_JDK"
20811  new_path=`$CYGPATH -u "$path"`
20812
20813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20816  # "foo.exe" is OK but "foo" is an error.
20817  #
20818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20819  # It is also a way to make sure we got the proper file name for the real test later on.
20820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20821  if test "x$test_shortpath" = x; then
20822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20825  fi
20826
20827  # Call helper function which possibly converts this using DOS-style short mode.
20828  # If so, the updated path is stored in $new_path.
20829
20830  input_path="$new_path"
20831  # Check if we need to convert this using DOS-style short mode. If the path
20832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20833  # take no chances and rewrite it.
20834  # Note: m4 eats our [], so we need to use [ and ] instead.
20835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20836  if test "x$has_forbidden_chars" != x; then
20837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20841      # Going to short mode and back again did indeed matter. Since short mode is
20842      # case insensitive, let's make it lowercase to improve readability.
20843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20844      # Now convert it back to Unix-stile (cygpath)
20845      input_path=`$CYGPATH -u "$shortmode_path"`
20846      new_path="$input_path"
20847    fi
20848  fi
20849
20850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20851  if test "x$test_cygdrive_prefix" = x; then
20852    # As a simple fix, exclude /usr/bin since it's not a real path.
20853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20855      # a path prefixed by /cygdrive for fixpath to work.
20856      new_path="$CYGWIN_ROOT_PATH$input_path"
20857    fi
20858  fi
20859
20860
20861  if test "x$path" != "x$new_path"; then
20862    BOOT_JDK="$new_path"
20863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20865  fi
20866
20867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20868
20869  path="$BOOT_JDK"
20870  has_colon=`$ECHO $path | $GREP ^.:`
20871  new_path="$path"
20872  if test "x$has_colon" = x; then
20873    # Not in mixed or Windows style, start by that.
20874    new_path=`cmd //c echo $path`
20875  fi
20876
20877
20878  input_path="$new_path"
20879  # Check if we need to convert this using DOS-style short mode. If the path
20880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20881  # take no chances and rewrite it.
20882  # Note: m4 eats our [], so we need to use [ and ] instead.
20883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20884  if test "x$has_forbidden_chars" != x; then
20885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20887  fi
20888
20889
20890  windows_path="$new_path"
20891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20892    unix_path=`$CYGPATH -u "$windows_path"`
20893    new_path="$unix_path"
20894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20896    new_path="$unix_path"
20897  fi
20898
20899  if test "x$path" != "x$new_path"; then
20900    BOOT_JDK="$new_path"
20901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20903  fi
20904
20905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20907
20908  else
20909    # We're on a unix platform. Hooray! :)
20910    path="$BOOT_JDK"
20911    has_space=`$ECHO "$path" | $GREP " "`
20912    if test "x$has_space" != x; then
20913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20915      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20916    fi
20917
20918    # Use eval to expand a potential ~
20919    eval path="$path"
20920    if test ! -f "$path" && test ! -d "$path"; then
20921      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20922    fi
20923
20924    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20925  fi
20926
20927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20928$as_echo_n "checking for Boot JDK... " >&6; }
20929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20930$as_echo "$BOOT_JDK" >&6; }
20931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20932$as_echo_n "checking Boot JDK version... " >&6; }
20933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20935$as_echo "$BOOT_JDK_VERSION" >&6; }
20936          fi # end check jdk version
20937        fi # end check javac
20938      fi # end check java
20939    fi # end check boot jdk found
20940  fi
20941
20942
20943  if test "x$BOOT_JDK_FOUND" = xno; then
20944    # Now execute the test
20945
20946  if test -x /usr/libexec/java_home; then
20947    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20948    BOOT_JDK_FOUND=maybe
20949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20950$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20951  fi
20952
20953
20954    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20955    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20956      # Do we have a bin/java?
20957      if test ! -x "$BOOT_JDK/bin/java"; then
20958        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20960        BOOT_JDK_FOUND=no
20961      else
20962        # Do we have a bin/javac?
20963        if test ! -x "$BOOT_JDK/bin/javac"; then
20964          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20966          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20967$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20968          BOOT_JDK_FOUND=no
20969        else
20970          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20971          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20972
20973          # Extra M4 quote needed to protect [] in grep expression.
20974          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20975          if test "x$FOUND_CORRECT_VERSION" = x; then
20976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20978            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20979$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20980            BOOT_JDK_FOUND=no
20981          else
20982            # We're done! :-)
20983            BOOT_JDK_FOUND=yes
20984
20985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20986
20987  # Input might be given as Windows format, start by converting to
20988  # unix format.
20989  path="$BOOT_JDK"
20990  new_path=`$CYGPATH -u "$path"`
20991
20992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20995  # "foo.exe" is OK but "foo" is an error.
20996  #
20997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20998  # It is also a way to make sure we got the proper file name for the real test later on.
20999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21000  if test "x$test_shortpath" = x; then
21001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21003    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21004  fi
21005
21006  # Call helper function which possibly converts this using DOS-style short mode.
21007  # If so, the updated path is stored in $new_path.
21008
21009  input_path="$new_path"
21010  # Check if we need to convert this using DOS-style short mode. If the path
21011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21012  # take no chances and rewrite it.
21013  # Note: m4 eats our [], so we need to use [ and ] instead.
21014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21015  if test "x$has_forbidden_chars" != x; then
21016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21020      # Going to short mode and back again did indeed matter. Since short mode is
21021      # case insensitive, let's make it lowercase to improve readability.
21022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21023      # Now convert it back to Unix-stile (cygpath)
21024      input_path=`$CYGPATH -u "$shortmode_path"`
21025      new_path="$input_path"
21026    fi
21027  fi
21028
21029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21030  if test "x$test_cygdrive_prefix" = x; then
21031    # As a simple fix, exclude /usr/bin since it's not a real path.
21032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21034      # a path prefixed by /cygdrive for fixpath to work.
21035      new_path="$CYGWIN_ROOT_PATH$input_path"
21036    fi
21037  fi
21038
21039
21040  if test "x$path" != "x$new_path"; then
21041    BOOT_JDK="$new_path"
21042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21044  fi
21045
21046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21047
21048  path="$BOOT_JDK"
21049  has_colon=`$ECHO $path | $GREP ^.:`
21050  new_path="$path"
21051  if test "x$has_colon" = x; then
21052    # Not in mixed or Windows style, start by that.
21053    new_path=`cmd //c echo $path`
21054  fi
21055
21056
21057  input_path="$new_path"
21058  # Check if we need to convert this using DOS-style short mode. If the path
21059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21060  # take no chances and rewrite it.
21061  # Note: m4 eats our [], so we need to use [ and ] instead.
21062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21063  if test "x$has_forbidden_chars" != x; then
21064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21066  fi
21067
21068
21069  windows_path="$new_path"
21070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21071    unix_path=`$CYGPATH -u "$windows_path"`
21072    new_path="$unix_path"
21073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21075    new_path="$unix_path"
21076  fi
21077
21078  if test "x$path" != "x$new_path"; then
21079    BOOT_JDK="$new_path"
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21082  fi
21083
21084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21086
21087  else
21088    # We're on a unix platform. Hooray! :)
21089    path="$BOOT_JDK"
21090    has_space=`$ECHO "$path" | $GREP " "`
21091    if test "x$has_space" != x; then
21092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21094      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21095    fi
21096
21097    # Use eval to expand a potential ~
21098    eval path="$path"
21099    if test ! -f "$path" && test ! -d "$path"; then
21100      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21101    fi
21102
21103    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21104  fi
21105
21106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21107$as_echo_n "checking for Boot JDK... " >&6; }
21108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21109$as_echo "$BOOT_JDK" >&6; }
21110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21111$as_echo_n "checking Boot JDK version... " >&6; }
21112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21114$as_echo "$BOOT_JDK_VERSION" >&6; }
21115          fi # end check jdk version
21116        fi # end check javac
21117      fi # end check java
21118    fi # end check boot jdk found
21119  fi
21120
21121
21122  if test "x$BOOT_JDK_FOUND" = xno; then
21123    # Now execute the test
21124
21125  if test -x /usr/libexec/java_home; then
21126    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21127    BOOT_JDK_FOUND=maybe
21128    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21129$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21130  fi
21131
21132
21133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21135      # Do we have a bin/java?
21136      if test ! -x "$BOOT_JDK/bin/java"; then
21137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21139        BOOT_JDK_FOUND=no
21140      else
21141        # Do we have a bin/javac?
21142        if test ! -x "$BOOT_JDK/bin/javac"; then
21143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21147          BOOT_JDK_FOUND=no
21148        else
21149          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21150          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21151
21152          # Extra M4 quote needed to protect [] in grep expression.
21153          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21154          if test "x$FOUND_CORRECT_VERSION" = x; then
21155            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21157            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21158$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21159            BOOT_JDK_FOUND=no
21160          else
21161            # We're done! :-)
21162            BOOT_JDK_FOUND=yes
21163
21164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21165
21166  # Input might be given as Windows format, start by converting to
21167  # unix format.
21168  path="$BOOT_JDK"
21169  new_path=`$CYGPATH -u "$path"`
21170
21171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21174  # "foo.exe" is OK but "foo" is an error.
21175  #
21176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21177  # It is also a way to make sure we got the proper file name for the real test later on.
21178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21179  if test "x$test_shortpath" = x; then
21180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21183  fi
21184
21185  # Call helper function which possibly converts this using DOS-style short mode.
21186  # If so, the updated path is stored in $new_path.
21187
21188  input_path="$new_path"
21189  # Check if we need to convert this using DOS-style short mode. If the path
21190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21191  # take no chances and rewrite it.
21192  # Note: m4 eats our [], so we need to use [ and ] instead.
21193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21194  if test "x$has_forbidden_chars" != x; then
21195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21199      # Going to short mode and back again did indeed matter. Since short mode is
21200      # case insensitive, let's make it lowercase to improve readability.
21201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21202      # Now convert it back to Unix-stile (cygpath)
21203      input_path=`$CYGPATH -u "$shortmode_path"`
21204      new_path="$input_path"
21205    fi
21206  fi
21207
21208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21209  if test "x$test_cygdrive_prefix" = x; then
21210    # As a simple fix, exclude /usr/bin since it's not a real path.
21211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21213      # a path prefixed by /cygdrive for fixpath to work.
21214      new_path="$CYGWIN_ROOT_PATH$input_path"
21215    fi
21216  fi
21217
21218
21219  if test "x$path" != "x$new_path"; then
21220    BOOT_JDK="$new_path"
21221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21223  fi
21224
21225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21226
21227  path="$BOOT_JDK"
21228  has_colon=`$ECHO $path | $GREP ^.:`
21229  new_path="$path"
21230  if test "x$has_colon" = x; then
21231    # Not in mixed or Windows style, start by that.
21232    new_path=`cmd //c echo $path`
21233  fi
21234
21235
21236  input_path="$new_path"
21237  # Check if we need to convert this using DOS-style short mode. If the path
21238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21239  # take no chances and rewrite it.
21240  # Note: m4 eats our [], so we need to use [ and ] instead.
21241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21242  if test "x$has_forbidden_chars" != x; then
21243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21245  fi
21246
21247
21248  windows_path="$new_path"
21249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21250    unix_path=`$CYGPATH -u "$windows_path"`
21251    new_path="$unix_path"
21252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21254    new_path="$unix_path"
21255  fi
21256
21257  if test "x$path" != "x$new_path"; then
21258    BOOT_JDK="$new_path"
21259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21261  fi
21262
21263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21265
21266  else
21267    # We're on a unix platform. Hooray! :)
21268    path="$BOOT_JDK"
21269    has_space=`$ECHO "$path" | $GREP " "`
21270    if test "x$has_space" != x; then
21271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21273      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21274    fi
21275
21276    # Use eval to expand a potential ~
21277    eval path="$path"
21278    if test ! -f "$path" && test ! -d "$path"; then
21279      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21280    fi
21281
21282    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21283  fi
21284
21285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21286$as_echo_n "checking for Boot JDK... " >&6; }
21287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21288$as_echo "$BOOT_JDK" >&6; }
21289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21290$as_echo_n "checking Boot JDK version... " >&6; }
21291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21293$as_echo "$BOOT_JDK_VERSION" >&6; }
21294          fi # end check jdk version
21295        fi # end check javac
21296      fi # end check java
21297    fi # end check boot jdk found
21298  fi
21299
21300  fi
21301
21302
21303    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21304    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21305      # Do we have a bin/java?
21306      if test ! -x "$BOOT_JDK/bin/java"; then
21307        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21309        BOOT_JDK_FOUND=no
21310      else
21311        # Do we have a bin/javac?
21312        if test ! -x "$BOOT_JDK/bin/javac"; then
21313          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21315          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21316$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21317          BOOT_JDK_FOUND=no
21318        else
21319          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21320          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21321
21322          # Extra M4 quote needed to protect [] in grep expression.
21323          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21324          if test "x$FOUND_CORRECT_VERSION" = x; then
21325            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21327            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21328$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21329            BOOT_JDK_FOUND=no
21330          else
21331            # We're done! :-)
21332            BOOT_JDK_FOUND=yes
21333
21334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21335
21336  # Input might be given as Windows format, start by converting to
21337  # unix format.
21338  path="$BOOT_JDK"
21339  new_path=`$CYGPATH -u "$path"`
21340
21341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21344  # "foo.exe" is OK but "foo" is an error.
21345  #
21346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21347  # It is also a way to make sure we got the proper file name for the real test later on.
21348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21349  if test "x$test_shortpath" = x; then
21350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21353  fi
21354
21355  # Call helper function which possibly converts this using DOS-style short mode.
21356  # If so, the updated path is stored in $new_path.
21357
21358  input_path="$new_path"
21359  # Check if we need to convert this using DOS-style short mode. If the path
21360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21361  # take no chances and rewrite it.
21362  # Note: m4 eats our [], so we need to use [ and ] instead.
21363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21364  if test "x$has_forbidden_chars" != x; then
21365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21369      # Going to short mode and back again did indeed matter. Since short mode is
21370      # case insensitive, let's make it lowercase to improve readability.
21371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21372      # Now convert it back to Unix-stile (cygpath)
21373      input_path=`$CYGPATH -u "$shortmode_path"`
21374      new_path="$input_path"
21375    fi
21376  fi
21377
21378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21379  if test "x$test_cygdrive_prefix" = x; then
21380    # As a simple fix, exclude /usr/bin since it's not a real path.
21381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21383      # a path prefixed by /cygdrive for fixpath to work.
21384      new_path="$CYGWIN_ROOT_PATH$input_path"
21385    fi
21386  fi
21387
21388
21389  if test "x$path" != "x$new_path"; then
21390    BOOT_JDK="$new_path"
21391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21393  fi
21394
21395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21396
21397  path="$BOOT_JDK"
21398  has_colon=`$ECHO $path | $GREP ^.:`
21399  new_path="$path"
21400  if test "x$has_colon" = x; then
21401    # Not in mixed or Windows style, start by that.
21402    new_path=`cmd //c echo $path`
21403  fi
21404
21405
21406  input_path="$new_path"
21407  # Check if we need to convert this using DOS-style short mode. If the path
21408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21409  # take no chances and rewrite it.
21410  # Note: m4 eats our [], so we need to use [ and ] instead.
21411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21412  if test "x$has_forbidden_chars" != x; then
21413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21415  fi
21416
21417
21418  windows_path="$new_path"
21419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21420    unix_path=`$CYGPATH -u "$windows_path"`
21421    new_path="$unix_path"
21422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21424    new_path="$unix_path"
21425  fi
21426
21427  if test "x$path" != "x$new_path"; then
21428    BOOT_JDK="$new_path"
21429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21431  fi
21432
21433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21435
21436  else
21437    # We're on a unix platform. Hooray! :)
21438    path="$BOOT_JDK"
21439    has_space=`$ECHO "$path" | $GREP " "`
21440    if test "x$has_space" != x; then
21441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21443      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21444    fi
21445
21446    # Use eval to expand a potential ~
21447    eval path="$path"
21448    if test ! -f "$path" && test ! -d "$path"; then
21449      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21450    fi
21451
21452    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21453  fi
21454
21455            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21456$as_echo_n "checking for Boot JDK... " >&6; }
21457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21458$as_echo "$BOOT_JDK" >&6; }
21459            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21460$as_echo_n "checking Boot JDK version... " >&6; }
21461            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21463$as_echo "$BOOT_JDK_VERSION" >&6; }
21464          fi # end check jdk version
21465        fi # end check javac
21466      fi # end check java
21467    fi # end check boot jdk found
21468  fi
21469
21470
21471  # Test: Is $JAVA_HOME set?
21472
21473  if test "x$BOOT_JDK_FOUND" = xno; then
21474    # Now execute the test
21475
21476  if test "x$JAVA_HOME" != x; then
21477    JAVA_HOME_PROCESSED="$JAVA_HOME"
21478
21479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21480
21481  # Input might be given as Windows format, start by converting to
21482  # unix format.
21483  path="$JAVA_HOME_PROCESSED"
21484  new_path=`$CYGPATH -u "$path"`
21485
21486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21489  # "foo.exe" is OK but "foo" is an error.
21490  #
21491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21492  # It is also a way to make sure we got the proper file name for the real test later on.
21493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21494  if test "x$test_shortpath" = x; then
21495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21496$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21497    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21498  fi
21499
21500  # Call helper function which possibly converts this using DOS-style short mode.
21501  # If so, the updated path is stored in $new_path.
21502
21503  input_path="$new_path"
21504  # Check if we need to convert this using DOS-style short mode. If the path
21505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21506  # take no chances and rewrite it.
21507  # Note: m4 eats our [], so we need to use [ and ] instead.
21508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21509  if test "x$has_forbidden_chars" != x; then
21510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21514      # Going to short mode and back again did indeed matter. Since short mode is
21515      # case insensitive, let's make it lowercase to improve readability.
21516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21517      # Now convert it back to Unix-stile (cygpath)
21518      input_path=`$CYGPATH -u "$shortmode_path"`
21519      new_path="$input_path"
21520    fi
21521  fi
21522
21523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21524  if test "x$test_cygdrive_prefix" = x; then
21525    # As a simple fix, exclude /usr/bin since it's not a real path.
21526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21528      # a path prefixed by /cygdrive for fixpath to work.
21529      new_path="$CYGWIN_ROOT_PATH$input_path"
21530    fi
21531  fi
21532
21533
21534  if test "x$path" != "x$new_path"; then
21535    JAVA_HOME_PROCESSED="$new_path"
21536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21537$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21538  fi
21539
21540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21541
21542  path="$JAVA_HOME_PROCESSED"
21543  has_colon=`$ECHO $path | $GREP ^.:`
21544  new_path="$path"
21545  if test "x$has_colon" = x; then
21546    # Not in mixed or Windows style, start by that.
21547    new_path=`cmd //c echo $path`
21548  fi
21549
21550
21551  input_path="$new_path"
21552  # Check if we need to convert this using DOS-style short mode. If the path
21553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21554  # take no chances and rewrite it.
21555  # Note: m4 eats our [], so we need to use [ and ] instead.
21556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21557  if test "x$has_forbidden_chars" != x; then
21558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21560  fi
21561
21562
21563  windows_path="$new_path"
21564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21565    unix_path=`$CYGPATH -u "$windows_path"`
21566    new_path="$unix_path"
21567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21569    new_path="$unix_path"
21570  fi
21571
21572  if test "x$path" != "x$new_path"; then
21573    JAVA_HOME_PROCESSED="$new_path"
21574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21575$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21576  fi
21577
21578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21580
21581  else
21582    # We're on a unix platform. Hooray! :)
21583    path="$JAVA_HOME_PROCESSED"
21584    has_space=`$ECHO "$path" | $GREP " "`
21585    if test "x$has_space" != x; then
21586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21587$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21588      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21589    fi
21590
21591    # Use eval to expand a potential ~
21592    eval path="$path"
21593    if test ! -f "$path" && test ! -d "$path"; then
21594      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21595    fi
21596
21597    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21598  fi
21599
21600    if test ! -d "$JAVA_HOME_PROCESSED"; then
21601      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21602$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21603    else
21604      # Aha, the user has set a JAVA_HOME
21605      # let us use that as the Boot JDK.
21606      BOOT_JDK="$JAVA_HOME_PROCESSED"
21607      BOOT_JDK_FOUND=maybe
21608      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21609$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21610    fi
21611  fi
21612
21613
21614    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21615    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21616      # Do we have a bin/java?
21617      if test ! -x "$BOOT_JDK/bin/java"; then
21618        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21620        BOOT_JDK_FOUND=no
21621      else
21622        # Do we have a bin/javac?
21623        if test ! -x "$BOOT_JDK/bin/javac"; then
21624          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21626          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21627$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21628          BOOT_JDK_FOUND=no
21629        else
21630          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21631          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21632
21633          # Extra M4 quote needed to protect [] in grep expression.
21634          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21635          if test "x$FOUND_CORRECT_VERSION" = x; then
21636            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21638            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21639$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21640            BOOT_JDK_FOUND=no
21641          else
21642            # We're done! :-)
21643            BOOT_JDK_FOUND=yes
21644
21645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21646
21647  # Input might be given as Windows format, start by converting to
21648  # unix format.
21649  path="$BOOT_JDK"
21650  new_path=`$CYGPATH -u "$path"`
21651
21652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21655  # "foo.exe" is OK but "foo" is an error.
21656  #
21657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21658  # It is also a way to make sure we got the proper file name for the real test later on.
21659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21660  if test "x$test_shortpath" = x; then
21661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21663    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21664  fi
21665
21666  # Call helper function which possibly converts this using DOS-style short mode.
21667  # If so, the updated path is stored in $new_path.
21668
21669  input_path="$new_path"
21670  # Check if we need to convert this using DOS-style short mode. If the path
21671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21672  # take no chances and rewrite it.
21673  # Note: m4 eats our [], so we need to use [ and ] instead.
21674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21675  if test "x$has_forbidden_chars" != x; then
21676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21680      # Going to short mode and back again did indeed matter. Since short mode is
21681      # case insensitive, let's make it lowercase to improve readability.
21682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21683      # Now convert it back to Unix-stile (cygpath)
21684      input_path=`$CYGPATH -u "$shortmode_path"`
21685      new_path="$input_path"
21686    fi
21687  fi
21688
21689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21690  if test "x$test_cygdrive_prefix" = x; then
21691    # As a simple fix, exclude /usr/bin since it's not a real path.
21692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21694      # a path prefixed by /cygdrive for fixpath to work.
21695      new_path="$CYGWIN_ROOT_PATH$input_path"
21696    fi
21697  fi
21698
21699
21700  if test "x$path" != "x$new_path"; then
21701    BOOT_JDK="$new_path"
21702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21704  fi
21705
21706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21707
21708  path="$BOOT_JDK"
21709  has_colon=`$ECHO $path | $GREP ^.:`
21710  new_path="$path"
21711  if test "x$has_colon" = x; then
21712    # Not in mixed or Windows style, start by that.
21713    new_path=`cmd //c echo $path`
21714  fi
21715
21716
21717  input_path="$new_path"
21718  # Check if we need to convert this using DOS-style short mode. If the path
21719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21720  # take no chances and rewrite it.
21721  # Note: m4 eats our [], so we need to use [ and ] instead.
21722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21723  if test "x$has_forbidden_chars" != x; then
21724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21726  fi
21727
21728
21729  windows_path="$new_path"
21730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21731    unix_path=`$CYGPATH -u "$windows_path"`
21732    new_path="$unix_path"
21733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21735    new_path="$unix_path"
21736  fi
21737
21738  if test "x$path" != "x$new_path"; then
21739    BOOT_JDK="$new_path"
21740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21742  fi
21743
21744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21746
21747  else
21748    # We're on a unix platform. Hooray! :)
21749    path="$BOOT_JDK"
21750    has_space=`$ECHO "$path" | $GREP " "`
21751    if test "x$has_space" != x; then
21752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21754      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21755    fi
21756
21757    # Use eval to expand a potential ~
21758    eval path="$path"
21759    if test ! -f "$path" && test ! -d "$path"; then
21760      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21761    fi
21762
21763    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21764  fi
21765
21766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21767$as_echo_n "checking for Boot JDK... " >&6; }
21768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21769$as_echo "$BOOT_JDK" >&6; }
21770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21771$as_echo_n "checking Boot JDK version... " >&6; }
21772            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21774$as_echo "$BOOT_JDK_VERSION" >&6; }
21775          fi # end check jdk version
21776        fi # end check javac
21777      fi # end check java
21778    fi # end check boot jdk found
21779  fi
21780
21781
21782  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21783
21784  if test "x$BOOT_JDK_FOUND" = xno; then
21785    # Now execute the test
21786
21787  # Extract the first word of "javac", so it can be a program name with args.
21788set dummy javac; ac_word=$2
21789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21790$as_echo_n "checking for $ac_word... " >&6; }
21791if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21792  $as_echo_n "(cached) " >&6
21793else
21794  case $JAVAC_CHECK in
21795  [\\/]* | ?:[\\/]*)
21796  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21797  ;;
21798  *)
21799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21800for as_dir in $PATH
21801do
21802  IFS=$as_save_IFS
21803  test -z "$as_dir" && as_dir=.
21804    for ac_exec_ext in '' $ac_executable_extensions; do
21805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21806    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21808    break 2
21809  fi
21810done
21811  done
21812IFS=$as_save_IFS
21813
21814  ;;
21815esac
21816fi
21817JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21818if test -n "$JAVAC_CHECK"; then
21819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21820$as_echo "$JAVAC_CHECK" >&6; }
21821else
21822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21823$as_echo "no" >&6; }
21824fi
21825
21826
21827  # Extract the first word of "java", so it can be a program name with args.
21828set dummy java; ac_word=$2
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21830$as_echo_n "checking for $ac_word... " >&6; }
21831if ${ac_cv_path_JAVA_CHECK+:} false; then :
21832  $as_echo_n "(cached) " >&6
21833else
21834  case $JAVA_CHECK in
21835  [\\/]* | ?:[\\/]*)
21836  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21837  ;;
21838  *)
21839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21840for as_dir in $PATH
21841do
21842  IFS=$as_save_IFS
21843  test -z "$as_dir" && as_dir=.
21844    for ac_exec_ext in '' $ac_executable_extensions; do
21845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21846    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21848    break 2
21849  fi
21850done
21851  done
21852IFS=$as_save_IFS
21853
21854  ;;
21855esac
21856fi
21857JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21858if test -n "$JAVA_CHECK"; then
21859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21860$as_echo "$JAVA_CHECK" >&6; }
21861else
21862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21863$as_echo "no" >&6; }
21864fi
21865
21866
21867  BINARY="$JAVAC_CHECK"
21868  if test "x$JAVAC_CHECK" = x; then
21869    BINARY="$JAVA_CHECK"
21870  fi
21871  if test "x$BINARY" != x; then
21872    # So there is a java(c) binary, it might be part of a JDK.
21873    # Lets find the JDK/JRE directory by following symbolic links.
21874    # Linux/GNU systems often have links from /usr/bin/java to
21875    # /etc/alternatives/java to the real JDK binary.
21876
21877  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21878    # Follow a chain of symbolic links. Use readlink
21879    # where it exists, else fall back to horribly
21880    # complicated shell code.
21881    if test "x$READLINK_TESTED" != yes; then
21882      # On MacOSX there is a readlink tool with a different
21883      # purpose than the GNU readlink tool. Check the found readlink.
21884      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21885      if test "x$ISGNU" = x; then
21886        # A readlink that we do not know how to use.
21887        # Are there other non-GNU readlinks out there?
21888        READLINK_TESTED=yes
21889        READLINK=
21890      fi
21891    fi
21892
21893    if test "x$READLINK" != x; then
21894      BINARY=`$READLINK -f $BINARY`
21895    else
21896      # Save the current directory for restoring afterwards
21897      STARTDIR=$PWD
21898      COUNTER=0
21899      sym_link_dir=`$DIRNAME $BINARY`
21900      sym_link_file=`$BASENAME $BINARY`
21901      cd $sym_link_dir
21902      # Use -P flag to resolve symlinks in directories.
21903      cd `$THEPWDCMD -P`
21904      sym_link_dir=`$THEPWDCMD -P`
21905      # Resolve file symlinks
21906      while test $COUNTER -lt 20; do
21907        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21908        if test "x$ISLINK" == x; then
21909          # This is not a symbolic link! We are done!
21910          break
21911        fi
21912        # Again resolve directory symlinks since the target of the just found
21913        # link could be in a different directory
21914        cd `$DIRNAME $ISLINK`
21915        sym_link_dir=`$THEPWDCMD -P`
21916        sym_link_file=`$BASENAME $ISLINK`
21917        let COUNTER=COUNTER+1
21918      done
21919      cd $STARTDIR
21920      BINARY=$sym_link_dir/$sym_link_file
21921    fi
21922  fi
21923
21924    BOOT_JDK=`dirname "$BINARY"`
21925    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21926    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21927      # Looks like we found ourselves an JDK
21928      BOOT_JDK_FOUND=maybe
21929      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21930$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21931    fi
21932  fi
21933
21934
21935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21937      # Do we have a bin/java?
21938      if test ! -x "$BOOT_JDK/bin/java"; then
21939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21941        BOOT_JDK_FOUND=no
21942      else
21943        # Do we have a bin/javac?
21944        if test ! -x "$BOOT_JDK/bin/javac"; then
21945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21949          BOOT_JDK_FOUND=no
21950        else
21951          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21952          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21953
21954          # Extra M4 quote needed to protect [] in grep expression.
21955          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21956          if test "x$FOUND_CORRECT_VERSION" = x; then
21957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21959            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21960$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21961            BOOT_JDK_FOUND=no
21962          else
21963            # We're done! :-)
21964            BOOT_JDK_FOUND=yes
21965
21966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21967
21968  # Input might be given as Windows format, start by converting to
21969  # unix format.
21970  path="$BOOT_JDK"
21971  new_path=`$CYGPATH -u "$path"`
21972
21973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21976  # "foo.exe" is OK but "foo" is an error.
21977  #
21978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21979  # It is also a way to make sure we got the proper file name for the real test later on.
21980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21981  if test "x$test_shortpath" = x; then
21982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21985  fi
21986
21987  # Call helper function which possibly converts this using DOS-style short mode.
21988  # If so, the updated path is stored in $new_path.
21989
21990  input_path="$new_path"
21991  # Check if we need to convert this using DOS-style short mode. If the path
21992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21993  # take no chances and rewrite it.
21994  # Note: m4 eats our [], so we need to use [ and ] instead.
21995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21996  if test "x$has_forbidden_chars" != x; then
21997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22001      # Going to short mode and back again did indeed matter. Since short mode is
22002      # case insensitive, let's make it lowercase to improve readability.
22003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22004      # Now convert it back to Unix-stile (cygpath)
22005      input_path=`$CYGPATH -u "$shortmode_path"`
22006      new_path="$input_path"
22007    fi
22008  fi
22009
22010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22011  if test "x$test_cygdrive_prefix" = x; then
22012    # As a simple fix, exclude /usr/bin since it's not a real path.
22013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22015      # a path prefixed by /cygdrive for fixpath to work.
22016      new_path="$CYGWIN_ROOT_PATH$input_path"
22017    fi
22018  fi
22019
22020
22021  if test "x$path" != "x$new_path"; then
22022    BOOT_JDK="$new_path"
22023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22025  fi
22026
22027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22028
22029  path="$BOOT_JDK"
22030  has_colon=`$ECHO $path | $GREP ^.:`
22031  new_path="$path"
22032  if test "x$has_colon" = x; then
22033    # Not in mixed or Windows style, start by that.
22034    new_path=`cmd //c echo $path`
22035  fi
22036
22037
22038  input_path="$new_path"
22039  # Check if we need to convert this using DOS-style short mode. If the path
22040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22041  # take no chances and rewrite it.
22042  # Note: m4 eats our [], so we need to use [ and ] instead.
22043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22044  if test "x$has_forbidden_chars" != x; then
22045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22047  fi
22048
22049
22050  windows_path="$new_path"
22051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22052    unix_path=`$CYGPATH -u "$windows_path"`
22053    new_path="$unix_path"
22054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22056    new_path="$unix_path"
22057  fi
22058
22059  if test "x$path" != "x$new_path"; then
22060    BOOT_JDK="$new_path"
22061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22063  fi
22064
22065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22067
22068  else
22069    # We're on a unix platform. Hooray! :)
22070    path="$BOOT_JDK"
22071    has_space=`$ECHO "$path" | $GREP " "`
22072    if test "x$has_space" != x; then
22073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22075      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22076    fi
22077
22078    # Use eval to expand a potential ~
22079    eval path="$path"
22080    if test ! -f "$path" && test ! -d "$path"; then
22081      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22082    fi
22083
22084    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22085  fi
22086
22087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22088$as_echo_n "checking for Boot JDK... " >&6; }
22089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22090$as_echo "$BOOT_JDK" >&6; }
22091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22092$as_echo_n "checking Boot JDK version... " >&6; }
22093            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22095$as_echo "$BOOT_JDK_VERSION" >&6; }
22096          fi # end check jdk version
22097        fi # end check javac
22098      fi # end check java
22099    fi # end check boot jdk found
22100  fi
22101
22102
22103  # Test: Is there a JDK installed in default, well-known locations?
22104
22105  if test "x$BOOT_JDK_FOUND" = xno; then
22106    # Now execute the test
22107
22108  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22109
22110  if test "x$BOOT_JDK_FOUND" = xno; then
22111    # Now execute the test
22112
22113  if test "x$ProgramW6432" != x; then
22114    VIRTUAL_DIR="$ProgramW6432/Java"
22115
22116  windows_path="$VIRTUAL_DIR"
22117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22118    unix_path=`$CYGPATH -u "$windows_path"`
22119    VIRTUAL_DIR="$unix_path"
22120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22122    VIRTUAL_DIR="$unix_path"
22123  fi
22124
22125
22126  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22127  BOOT_JDK_SUFFIX=""
22128  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22129  if test "x$ALL_JDKS_FOUND" != x; then
22130    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22131
22132  if test "x$BOOT_JDK_FOUND" = xno; then
22133    # Now execute the test
22134
22135        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22136        if test -d "$BOOT_JDK"; then
22137          BOOT_JDK_FOUND=maybe
22138          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22139$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22140        fi
22141
22142
22143    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22144    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22145      # Do we have a bin/java?
22146      if test ! -x "$BOOT_JDK/bin/java"; then
22147        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22149        BOOT_JDK_FOUND=no
22150      else
22151        # Do we have a bin/javac?
22152        if test ! -x "$BOOT_JDK/bin/javac"; then
22153          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22155          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22156$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22157          BOOT_JDK_FOUND=no
22158        else
22159          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22160          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22161
22162          # Extra M4 quote needed to protect [] in grep expression.
22163          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22164          if test "x$FOUND_CORRECT_VERSION" = x; then
22165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22167            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22168$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22169            BOOT_JDK_FOUND=no
22170          else
22171            # We're done! :-)
22172            BOOT_JDK_FOUND=yes
22173
22174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22175
22176  # Input might be given as Windows format, start by converting to
22177  # unix format.
22178  path="$BOOT_JDK"
22179  new_path=`$CYGPATH -u "$path"`
22180
22181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22184  # "foo.exe" is OK but "foo" is an error.
22185  #
22186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22187  # It is also a way to make sure we got the proper file name for the real test later on.
22188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22189  if test "x$test_shortpath" = x; then
22190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22192    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22193  fi
22194
22195  # Call helper function which possibly converts this using DOS-style short mode.
22196  # If so, the updated path is stored in $new_path.
22197
22198  input_path="$new_path"
22199  # Check if we need to convert this using DOS-style short mode. If the path
22200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22201  # take no chances and rewrite it.
22202  # Note: m4 eats our [], so we need to use [ and ] instead.
22203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22204  if test "x$has_forbidden_chars" != x; then
22205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22209      # Going to short mode and back again did indeed matter. Since short mode is
22210      # case insensitive, let's make it lowercase to improve readability.
22211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22212      # Now convert it back to Unix-stile (cygpath)
22213      input_path=`$CYGPATH -u "$shortmode_path"`
22214      new_path="$input_path"
22215    fi
22216  fi
22217
22218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22219  if test "x$test_cygdrive_prefix" = x; then
22220    # As a simple fix, exclude /usr/bin since it's not a real path.
22221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22223      # a path prefixed by /cygdrive for fixpath to work.
22224      new_path="$CYGWIN_ROOT_PATH$input_path"
22225    fi
22226  fi
22227
22228
22229  if test "x$path" != "x$new_path"; then
22230    BOOT_JDK="$new_path"
22231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22232$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22233  fi
22234
22235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22236
22237  path="$BOOT_JDK"
22238  has_colon=`$ECHO $path | $GREP ^.:`
22239  new_path="$path"
22240  if test "x$has_colon" = x; then
22241    # Not in mixed or Windows style, start by that.
22242    new_path=`cmd //c echo $path`
22243  fi
22244
22245
22246  input_path="$new_path"
22247  # Check if we need to convert this using DOS-style short mode. If the path
22248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22249  # take no chances and rewrite it.
22250  # Note: m4 eats our [], so we need to use [ and ] instead.
22251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22252  if test "x$has_forbidden_chars" != x; then
22253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22255  fi
22256
22257
22258  windows_path="$new_path"
22259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22260    unix_path=`$CYGPATH -u "$windows_path"`
22261    new_path="$unix_path"
22262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22264    new_path="$unix_path"
22265  fi
22266
22267  if test "x$path" != "x$new_path"; then
22268    BOOT_JDK="$new_path"
22269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22271  fi
22272
22273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22275
22276  else
22277    # We're on a unix platform. Hooray! :)
22278    path="$BOOT_JDK"
22279    has_space=`$ECHO "$path" | $GREP " "`
22280    if test "x$has_space" != x; then
22281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22282$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22283      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22284    fi
22285
22286    # Use eval to expand a potential ~
22287    eval path="$path"
22288    if test ! -f "$path" && test ! -d "$path"; then
22289      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22290    fi
22291
22292    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22293  fi
22294
22295            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22296$as_echo_n "checking for Boot JDK... " >&6; }
22297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22298$as_echo "$BOOT_JDK" >&6; }
22299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22300$as_echo_n "checking Boot JDK version... " >&6; }
22301            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22303$as_echo "$BOOT_JDK_VERSION" >&6; }
22304          fi # end check jdk version
22305        fi # end check javac
22306      fi # end check java
22307    fi # end check boot jdk found
22308  fi
22309
22310    done
22311  fi
22312
22313  fi
22314
22315
22316    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22317    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22318      # Do we have a bin/java?
22319      if test ! -x "$BOOT_JDK/bin/java"; then
22320        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22322        BOOT_JDK_FOUND=no
22323      else
22324        # Do we have a bin/javac?
22325        if test ! -x "$BOOT_JDK/bin/javac"; then
22326          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22328          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22329$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22330          BOOT_JDK_FOUND=no
22331        else
22332          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22333          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22334
22335          # Extra M4 quote needed to protect [] in grep expression.
22336          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22337          if test "x$FOUND_CORRECT_VERSION" = x; then
22338            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22340            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22341$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22342            BOOT_JDK_FOUND=no
22343          else
22344            # We're done! :-)
22345            BOOT_JDK_FOUND=yes
22346
22347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22348
22349  # Input might be given as Windows format, start by converting to
22350  # unix format.
22351  path="$BOOT_JDK"
22352  new_path=`$CYGPATH -u "$path"`
22353
22354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22357  # "foo.exe" is OK but "foo" is an error.
22358  #
22359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22360  # It is also a way to make sure we got the proper file name for the real test later on.
22361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22362  if test "x$test_shortpath" = x; then
22363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22366  fi
22367
22368  # Call helper function which possibly converts this using DOS-style short mode.
22369  # If so, the updated path is stored in $new_path.
22370
22371  input_path="$new_path"
22372  # Check if we need to convert this using DOS-style short mode. If the path
22373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22374  # take no chances and rewrite it.
22375  # Note: m4 eats our [], so we need to use [ and ] instead.
22376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22377  if test "x$has_forbidden_chars" != x; then
22378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22382      # Going to short mode and back again did indeed matter. Since short mode is
22383      # case insensitive, let's make it lowercase to improve readability.
22384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22385      # Now convert it back to Unix-stile (cygpath)
22386      input_path=`$CYGPATH -u "$shortmode_path"`
22387      new_path="$input_path"
22388    fi
22389  fi
22390
22391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22392  if test "x$test_cygdrive_prefix" = x; then
22393    # As a simple fix, exclude /usr/bin since it's not a real path.
22394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22396      # a path prefixed by /cygdrive for fixpath to work.
22397      new_path="$CYGWIN_ROOT_PATH$input_path"
22398    fi
22399  fi
22400
22401
22402  if test "x$path" != "x$new_path"; then
22403    BOOT_JDK="$new_path"
22404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22406  fi
22407
22408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22409
22410  path="$BOOT_JDK"
22411  has_colon=`$ECHO $path | $GREP ^.:`
22412  new_path="$path"
22413  if test "x$has_colon" = x; then
22414    # Not in mixed or Windows style, start by that.
22415    new_path=`cmd //c echo $path`
22416  fi
22417
22418
22419  input_path="$new_path"
22420  # Check if we need to convert this using DOS-style short mode. If the path
22421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22422  # take no chances and rewrite it.
22423  # Note: m4 eats our [], so we need to use [ and ] instead.
22424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22425  if test "x$has_forbidden_chars" != x; then
22426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22428  fi
22429
22430
22431  windows_path="$new_path"
22432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22433    unix_path=`$CYGPATH -u "$windows_path"`
22434    new_path="$unix_path"
22435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22437    new_path="$unix_path"
22438  fi
22439
22440  if test "x$path" != "x$new_path"; then
22441    BOOT_JDK="$new_path"
22442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22444  fi
22445
22446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22448
22449  else
22450    # We're on a unix platform. Hooray! :)
22451    path="$BOOT_JDK"
22452    has_space=`$ECHO "$path" | $GREP " "`
22453    if test "x$has_space" != x; then
22454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22456      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22457    fi
22458
22459    # Use eval to expand a potential ~
22460    eval path="$path"
22461    if test ! -f "$path" && test ! -d "$path"; then
22462      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22463    fi
22464
22465    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22466  fi
22467
22468            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22469$as_echo_n "checking for Boot JDK... " >&6; }
22470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22471$as_echo "$BOOT_JDK" >&6; }
22472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22473$as_echo_n "checking Boot JDK version... " >&6; }
22474            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22476$as_echo "$BOOT_JDK_VERSION" >&6; }
22477          fi # end check jdk version
22478        fi # end check javac
22479      fi # end check java
22480    fi # end check boot jdk found
22481  fi
22482
22483
22484  if test "x$BOOT_JDK_FOUND" = xno; then
22485    # Now execute the test
22486
22487  if test "x$PROGRAMW6432" != x; then
22488    VIRTUAL_DIR="$PROGRAMW6432/Java"
22489
22490  windows_path="$VIRTUAL_DIR"
22491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22492    unix_path=`$CYGPATH -u "$windows_path"`
22493    VIRTUAL_DIR="$unix_path"
22494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22496    VIRTUAL_DIR="$unix_path"
22497  fi
22498
22499
22500  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22501  BOOT_JDK_SUFFIX=""
22502  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22503  if test "x$ALL_JDKS_FOUND" != x; then
22504    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22505
22506  if test "x$BOOT_JDK_FOUND" = xno; then
22507    # Now execute the test
22508
22509        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22510        if test -d "$BOOT_JDK"; then
22511          BOOT_JDK_FOUND=maybe
22512          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22513$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22514        fi
22515
22516
22517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22519      # Do we have a bin/java?
22520      if test ! -x "$BOOT_JDK/bin/java"; then
22521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22523        BOOT_JDK_FOUND=no
22524      else
22525        # Do we have a bin/javac?
22526        if test ! -x "$BOOT_JDK/bin/javac"; then
22527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22531          BOOT_JDK_FOUND=no
22532        else
22533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22535
22536          # Extra M4 quote needed to protect [] in grep expression.
22537          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22538          if test "x$FOUND_CORRECT_VERSION" = x; then
22539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22543            BOOT_JDK_FOUND=no
22544          else
22545            # We're done! :-)
22546            BOOT_JDK_FOUND=yes
22547
22548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22549
22550  # Input might be given as Windows format, start by converting to
22551  # unix format.
22552  path="$BOOT_JDK"
22553  new_path=`$CYGPATH -u "$path"`
22554
22555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22558  # "foo.exe" is OK but "foo" is an error.
22559  #
22560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22561  # It is also a way to make sure we got the proper file name for the real test later on.
22562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22563  if test "x$test_shortpath" = x; then
22564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22566    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22567  fi
22568
22569  # Call helper function which possibly converts this using DOS-style short mode.
22570  # If so, the updated path is stored in $new_path.
22571
22572  input_path="$new_path"
22573  # Check if we need to convert this using DOS-style short mode. If the path
22574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22575  # take no chances and rewrite it.
22576  # Note: m4 eats our [], so we need to use [ and ] instead.
22577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22578  if test "x$has_forbidden_chars" != x; then
22579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22583      # Going to short mode and back again did indeed matter. Since short mode is
22584      # case insensitive, let's make it lowercase to improve readability.
22585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22586      # Now convert it back to Unix-stile (cygpath)
22587      input_path=`$CYGPATH -u "$shortmode_path"`
22588      new_path="$input_path"
22589    fi
22590  fi
22591
22592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22593  if test "x$test_cygdrive_prefix" = x; then
22594    # As a simple fix, exclude /usr/bin since it's not a real path.
22595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22597      # a path prefixed by /cygdrive for fixpath to work.
22598      new_path="$CYGWIN_ROOT_PATH$input_path"
22599    fi
22600  fi
22601
22602
22603  if test "x$path" != "x$new_path"; then
22604    BOOT_JDK="$new_path"
22605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22607  fi
22608
22609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22610
22611  path="$BOOT_JDK"
22612  has_colon=`$ECHO $path | $GREP ^.:`
22613  new_path="$path"
22614  if test "x$has_colon" = x; then
22615    # Not in mixed or Windows style, start by that.
22616    new_path=`cmd //c echo $path`
22617  fi
22618
22619
22620  input_path="$new_path"
22621  # Check if we need to convert this using DOS-style short mode. If the path
22622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22623  # take no chances and rewrite it.
22624  # Note: m4 eats our [], so we need to use [ and ] instead.
22625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22626  if test "x$has_forbidden_chars" != x; then
22627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22629  fi
22630
22631
22632  windows_path="$new_path"
22633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22634    unix_path=`$CYGPATH -u "$windows_path"`
22635    new_path="$unix_path"
22636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22638    new_path="$unix_path"
22639  fi
22640
22641  if test "x$path" != "x$new_path"; then
22642    BOOT_JDK="$new_path"
22643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22644$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22645  fi
22646
22647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22649
22650  else
22651    # We're on a unix platform. Hooray! :)
22652    path="$BOOT_JDK"
22653    has_space=`$ECHO "$path" | $GREP " "`
22654    if test "x$has_space" != x; then
22655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22657      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22658    fi
22659
22660    # Use eval to expand a potential ~
22661    eval path="$path"
22662    if test ! -f "$path" && test ! -d "$path"; then
22663      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22664    fi
22665
22666    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22667  fi
22668
22669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22670$as_echo_n "checking for Boot JDK... " >&6; }
22671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22672$as_echo "$BOOT_JDK" >&6; }
22673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22674$as_echo_n "checking Boot JDK version... " >&6; }
22675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22677$as_echo "$BOOT_JDK_VERSION" >&6; }
22678          fi # end check jdk version
22679        fi # end check javac
22680      fi # end check java
22681    fi # end check boot jdk found
22682  fi
22683
22684    done
22685  fi
22686
22687  fi
22688
22689
22690    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22691    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22692      # Do we have a bin/java?
22693      if test ! -x "$BOOT_JDK/bin/java"; then
22694        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22696        BOOT_JDK_FOUND=no
22697      else
22698        # Do we have a bin/javac?
22699        if test ! -x "$BOOT_JDK/bin/javac"; then
22700          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22702          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22703$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22704          BOOT_JDK_FOUND=no
22705        else
22706          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22707          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22708
22709          # Extra M4 quote needed to protect [] in grep expression.
22710          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22711          if test "x$FOUND_CORRECT_VERSION" = x; then
22712            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22714            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22715$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22716            BOOT_JDK_FOUND=no
22717          else
22718            # We're done! :-)
22719            BOOT_JDK_FOUND=yes
22720
22721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22722
22723  # Input might be given as Windows format, start by converting to
22724  # unix format.
22725  path="$BOOT_JDK"
22726  new_path=`$CYGPATH -u "$path"`
22727
22728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22731  # "foo.exe" is OK but "foo" is an error.
22732  #
22733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22734  # It is also a way to make sure we got the proper file name for the real test later on.
22735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22736  if test "x$test_shortpath" = x; then
22737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22740  fi
22741
22742  # Call helper function which possibly converts this using DOS-style short mode.
22743  # If so, the updated path is stored in $new_path.
22744
22745  input_path="$new_path"
22746  # Check if we need to convert this using DOS-style short mode. If the path
22747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22748  # take no chances and rewrite it.
22749  # Note: m4 eats our [], so we need to use [ and ] instead.
22750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22751  if test "x$has_forbidden_chars" != x; then
22752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22756      # Going to short mode and back again did indeed matter. Since short mode is
22757      # case insensitive, let's make it lowercase to improve readability.
22758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22759      # Now convert it back to Unix-stile (cygpath)
22760      input_path=`$CYGPATH -u "$shortmode_path"`
22761      new_path="$input_path"
22762    fi
22763  fi
22764
22765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22766  if test "x$test_cygdrive_prefix" = x; then
22767    # As a simple fix, exclude /usr/bin since it's not a real path.
22768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22770      # a path prefixed by /cygdrive for fixpath to work.
22771      new_path="$CYGWIN_ROOT_PATH$input_path"
22772    fi
22773  fi
22774
22775
22776  if test "x$path" != "x$new_path"; then
22777    BOOT_JDK="$new_path"
22778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22780  fi
22781
22782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22783
22784  path="$BOOT_JDK"
22785  has_colon=`$ECHO $path | $GREP ^.:`
22786  new_path="$path"
22787  if test "x$has_colon" = x; then
22788    # Not in mixed or Windows style, start by that.
22789    new_path=`cmd //c echo $path`
22790  fi
22791
22792
22793  input_path="$new_path"
22794  # Check if we need to convert this using DOS-style short mode. If the path
22795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22796  # take no chances and rewrite it.
22797  # Note: m4 eats our [], so we need to use [ and ] instead.
22798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22799  if test "x$has_forbidden_chars" != x; then
22800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22802  fi
22803
22804
22805  windows_path="$new_path"
22806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22807    unix_path=`$CYGPATH -u "$windows_path"`
22808    new_path="$unix_path"
22809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22811    new_path="$unix_path"
22812  fi
22813
22814  if test "x$path" != "x$new_path"; then
22815    BOOT_JDK="$new_path"
22816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22818  fi
22819
22820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22822
22823  else
22824    # We're on a unix platform. Hooray! :)
22825    path="$BOOT_JDK"
22826    has_space=`$ECHO "$path" | $GREP " "`
22827    if test "x$has_space" != x; then
22828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22830      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22831    fi
22832
22833    # Use eval to expand a potential ~
22834    eval path="$path"
22835    if test ! -f "$path" && test ! -d "$path"; then
22836      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22837    fi
22838
22839    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22840  fi
22841
22842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22843$as_echo_n "checking for Boot JDK... " >&6; }
22844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22845$as_echo "$BOOT_JDK" >&6; }
22846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22847$as_echo_n "checking Boot JDK version... " >&6; }
22848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22850$as_echo "$BOOT_JDK_VERSION" >&6; }
22851          fi # end check jdk version
22852        fi # end check javac
22853      fi # end check java
22854    fi # end check boot jdk found
22855  fi
22856
22857
22858  if test "x$BOOT_JDK_FOUND" = xno; then
22859    # Now execute the test
22860
22861  if test "x$PROGRAMFILES" != x; then
22862    VIRTUAL_DIR="$PROGRAMFILES/Java"
22863
22864  windows_path="$VIRTUAL_DIR"
22865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22866    unix_path=`$CYGPATH -u "$windows_path"`
22867    VIRTUAL_DIR="$unix_path"
22868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22870    VIRTUAL_DIR="$unix_path"
22871  fi
22872
22873
22874  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22875  BOOT_JDK_SUFFIX=""
22876  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22877  if test "x$ALL_JDKS_FOUND" != x; then
22878    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22879
22880  if test "x$BOOT_JDK_FOUND" = xno; then
22881    # Now execute the test
22882
22883        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22884        if test -d "$BOOT_JDK"; then
22885          BOOT_JDK_FOUND=maybe
22886          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22887$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22888        fi
22889
22890
22891    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22892    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22893      # Do we have a bin/java?
22894      if test ! -x "$BOOT_JDK/bin/java"; then
22895        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22897        BOOT_JDK_FOUND=no
22898      else
22899        # Do we have a bin/javac?
22900        if test ! -x "$BOOT_JDK/bin/javac"; then
22901          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22903          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22904$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22905          BOOT_JDK_FOUND=no
22906        else
22907          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22908          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22909
22910          # Extra M4 quote needed to protect [] in grep expression.
22911          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22912          if test "x$FOUND_CORRECT_VERSION" = x; then
22913            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22915            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22916$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22917            BOOT_JDK_FOUND=no
22918          else
22919            # We're done! :-)
22920            BOOT_JDK_FOUND=yes
22921
22922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22923
22924  # Input might be given as Windows format, start by converting to
22925  # unix format.
22926  path="$BOOT_JDK"
22927  new_path=`$CYGPATH -u "$path"`
22928
22929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22932  # "foo.exe" is OK but "foo" is an error.
22933  #
22934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22935  # It is also a way to make sure we got the proper file name for the real test later on.
22936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22937  if test "x$test_shortpath" = x; then
22938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22940    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22941  fi
22942
22943  # Call helper function which possibly converts this using DOS-style short mode.
22944  # If so, the updated path is stored in $new_path.
22945
22946  input_path="$new_path"
22947  # Check if we need to convert this using DOS-style short mode. If the path
22948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22949  # take no chances and rewrite it.
22950  # Note: m4 eats our [], so we need to use [ and ] instead.
22951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22952  if test "x$has_forbidden_chars" != x; then
22953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22957      # Going to short mode and back again did indeed matter. Since short mode is
22958      # case insensitive, let's make it lowercase to improve readability.
22959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22960      # Now convert it back to Unix-stile (cygpath)
22961      input_path=`$CYGPATH -u "$shortmode_path"`
22962      new_path="$input_path"
22963    fi
22964  fi
22965
22966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22967  if test "x$test_cygdrive_prefix" = x; then
22968    # As a simple fix, exclude /usr/bin since it's not a real path.
22969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22971      # a path prefixed by /cygdrive for fixpath to work.
22972      new_path="$CYGWIN_ROOT_PATH$input_path"
22973    fi
22974  fi
22975
22976
22977  if test "x$path" != "x$new_path"; then
22978    BOOT_JDK="$new_path"
22979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22981  fi
22982
22983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22984
22985  path="$BOOT_JDK"
22986  has_colon=`$ECHO $path | $GREP ^.:`
22987  new_path="$path"
22988  if test "x$has_colon" = x; then
22989    # Not in mixed or Windows style, start by that.
22990    new_path=`cmd //c echo $path`
22991  fi
22992
22993
22994  input_path="$new_path"
22995  # Check if we need to convert this using DOS-style short mode. If the path
22996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22997  # take no chances and rewrite it.
22998  # Note: m4 eats our [], so we need to use [ and ] instead.
22999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23000  if test "x$has_forbidden_chars" != x; then
23001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23003  fi
23004
23005
23006  windows_path="$new_path"
23007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23008    unix_path=`$CYGPATH -u "$windows_path"`
23009    new_path="$unix_path"
23010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23012    new_path="$unix_path"
23013  fi
23014
23015  if test "x$path" != "x$new_path"; then
23016    BOOT_JDK="$new_path"
23017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23019  fi
23020
23021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23023
23024  else
23025    # We're on a unix platform. Hooray! :)
23026    path="$BOOT_JDK"
23027    has_space=`$ECHO "$path" | $GREP " "`
23028    if test "x$has_space" != x; then
23029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23031      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23032    fi
23033
23034    # Use eval to expand a potential ~
23035    eval path="$path"
23036    if test ! -f "$path" && test ! -d "$path"; then
23037      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23038    fi
23039
23040    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23041  fi
23042
23043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23044$as_echo_n "checking for Boot JDK... " >&6; }
23045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23046$as_echo "$BOOT_JDK" >&6; }
23047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23048$as_echo_n "checking Boot JDK version... " >&6; }
23049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23051$as_echo "$BOOT_JDK_VERSION" >&6; }
23052          fi # end check jdk version
23053        fi # end check javac
23054      fi # end check java
23055    fi # end check boot jdk found
23056  fi
23057
23058    done
23059  fi
23060
23061  fi
23062
23063
23064    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23065    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23066      # Do we have a bin/java?
23067      if test ! -x "$BOOT_JDK/bin/java"; then
23068        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23070        BOOT_JDK_FOUND=no
23071      else
23072        # Do we have a bin/javac?
23073        if test ! -x "$BOOT_JDK/bin/javac"; then
23074          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23076          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23077$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23078          BOOT_JDK_FOUND=no
23079        else
23080          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23081          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23082
23083          # Extra M4 quote needed to protect [] in grep expression.
23084          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23085          if test "x$FOUND_CORRECT_VERSION" = x; then
23086            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23088            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23089$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23090            BOOT_JDK_FOUND=no
23091          else
23092            # We're done! :-)
23093            BOOT_JDK_FOUND=yes
23094
23095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23096
23097  # Input might be given as Windows format, start by converting to
23098  # unix format.
23099  path="$BOOT_JDK"
23100  new_path=`$CYGPATH -u "$path"`
23101
23102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23105  # "foo.exe" is OK but "foo" is an error.
23106  #
23107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23108  # It is also a way to make sure we got the proper file name for the real test later on.
23109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23110  if test "x$test_shortpath" = x; then
23111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23113    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23114  fi
23115
23116  # Call helper function which possibly converts this using DOS-style short mode.
23117  # If so, the updated path is stored in $new_path.
23118
23119  input_path="$new_path"
23120  # Check if we need to convert this using DOS-style short mode. If the path
23121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23122  # take no chances and rewrite it.
23123  # Note: m4 eats our [], so we need to use [ and ] instead.
23124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23125  if test "x$has_forbidden_chars" != x; then
23126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23130      # Going to short mode and back again did indeed matter. Since short mode is
23131      # case insensitive, let's make it lowercase to improve readability.
23132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23133      # Now convert it back to Unix-stile (cygpath)
23134      input_path=`$CYGPATH -u "$shortmode_path"`
23135      new_path="$input_path"
23136    fi
23137  fi
23138
23139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23140  if test "x$test_cygdrive_prefix" = x; then
23141    # As a simple fix, exclude /usr/bin since it's not a real path.
23142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23144      # a path prefixed by /cygdrive for fixpath to work.
23145      new_path="$CYGWIN_ROOT_PATH$input_path"
23146    fi
23147  fi
23148
23149
23150  if test "x$path" != "x$new_path"; then
23151    BOOT_JDK="$new_path"
23152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23154  fi
23155
23156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23157
23158  path="$BOOT_JDK"
23159  has_colon=`$ECHO $path | $GREP ^.:`
23160  new_path="$path"
23161  if test "x$has_colon" = x; then
23162    # Not in mixed or Windows style, start by that.
23163    new_path=`cmd //c echo $path`
23164  fi
23165
23166
23167  input_path="$new_path"
23168  # Check if we need to convert this using DOS-style short mode. If the path
23169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170  # take no chances and rewrite it.
23171  # Note: m4 eats our [], so we need to use [ and ] instead.
23172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23173  if test "x$has_forbidden_chars" != x; then
23174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23176  fi
23177
23178
23179  windows_path="$new_path"
23180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23181    unix_path=`$CYGPATH -u "$windows_path"`
23182    new_path="$unix_path"
23183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23185    new_path="$unix_path"
23186  fi
23187
23188  if test "x$path" != "x$new_path"; then
23189    BOOT_JDK="$new_path"
23190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23192  fi
23193
23194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23196
23197  else
23198    # We're on a unix platform. Hooray! :)
23199    path="$BOOT_JDK"
23200    has_space=`$ECHO "$path" | $GREP " "`
23201    if test "x$has_space" != x; then
23202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23204      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23205    fi
23206
23207    # Use eval to expand a potential ~
23208    eval path="$path"
23209    if test ! -f "$path" && test ! -d "$path"; then
23210      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23211    fi
23212
23213    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23214  fi
23215
23216            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23217$as_echo_n "checking for Boot JDK... " >&6; }
23218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23219$as_echo "$BOOT_JDK" >&6; }
23220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23221$as_echo_n "checking Boot JDK version... " >&6; }
23222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23224$as_echo "$BOOT_JDK_VERSION" >&6; }
23225          fi # end check jdk version
23226        fi # end check javac
23227      fi # end check java
23228    fi # end check boot jdk found
23229  fi
23230
23231
23232  if test "x$BOOT_JDK_FOUND" = xno; then
23233    # Now execute the test
23234
23235  if test "x$ProgramFiles" != x; then
23236    VIRTUAL_DIR="$ProgramFiles/Java"
23237
23238  windows_path="$VIRTUAL_DIR"
23239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23240    unix_path=`$CYGPATH -u "$windows_path"`
23241    VIRTUAL_DIR="$unix_path"
23242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23244    VIRTUAL_DIR="$unix_path"
23245  fi
23246
23247
23248  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23249  BOOT_JDK_SUFFIX=""
23250  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23251  if test "x$ALL_JDKS_FOUND" != x; then
23252    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23253
23254  if test "x$BOOT_JDK_FOUND" = xno; then
23255    # Now execute the test
23256
23257        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23258        if test -d "$BOOT_JDK"; then
23259          BOOT_JDK_FOUND=maybe
23260          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23261$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23262        fi
23263
23264
23265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23267      # Do we have a bin/java?
23268      if test ! -x "$BOOT_JDK/bin/java"; then
23269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23271        BOOT_JDK_FOUND=no
23272      else
23273        # Do we have a bin/javac?
23274        if test ! -x "$BOOT_JDK/bin/javac"; then
23275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23279          BOOT_JDK_FOUND=no
23280        else
23281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23283
23284          # Extra M4 quote needed to protect [] in grep expression.
23285          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23286          if test "x$FOUND_CORRECT_VERSION" = x; then
23287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23291            BOOT_JDK_FOUND=no
23292          else
23293            # We're done! :-)
23294            BOOT_JDK_FOUND=yes
23295
23296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23297
23298  # Input might be given as Windows format, start by converting to
23299  # unix format.
23300  path="$BOOT_JDK"
23301  new_path=`$CYGPATH -u "$path"`
23302
23303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23306  # "foo.exe" is OK but "foo" is an error.
23307  #
23308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23309  # It is also a way to make sure we got the proper file name for the real test later on.
23310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23311  if test "x$test_shortpath" = x; then
23312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23314    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23315  fi
23316
23317  # Call helper function which possibly converts this using DOS-style short mode.
23318  # If so, the updated path is stored in $new_path.
23319
23320  input_path="$new_path"
23321  # Check if we need to convert this using DOS-style short mode. If the path
23322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23323  # take no chances and rewrite it.
23324  # Note: m4 eats our [], so we need to use [ and ] instead.
23325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23326  if test "x$has_forbidden_chars" != x; then
23327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23331      # Going to short mode and back again did indeed matter. Since short mode is
23332      # case insensitive, let's make it lowercase to improve readability.
23333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23334      # Now convert it back to Unix-stile (cygpath)
23335      input_path=`$CYGPATH -u "$shortmode_path"`
23336      new_path="$input_path"
23337    fi
23338  fi
23339
23340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23341  if test "x$test_cygdrive_prefix" = x; then
23342    # As a simple fix, exclude /usr/bin since it's not a real path.
23343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23345      # a path prefixed by /cygdrive for fixpath to work.
23346      new_path="$CYGWIN_ROOT_PATH$input_path"
23347    fi
23348  fi
23349
23350
23351  if test "x$path" != "x$new_path"; then
23352    BOOT_JDK="$new_path"
23353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23355  fi
23356
23357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23358
23359  path="$BOOT_JDK"
23360  has_colon=`$ECHO $path | $GREP ^.:`
23361  new_path="$path"
23362  if test "x$has_colon" = x; then
23363    # Not in mixed or Windows style, start by that.
23364    new_path=`cmd //c echo $path`
23365  fi
23366
23367
23368  input_path="$new_path"
23369  # Check if we need to convert this using DOS-style short mode. If the path
23370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23371  # take no chances and rewrite it.
23372  # Note: m4 eats our [], so we need to use [ and ] instead.
23373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23374  if test "x$has_forbidden_chars" != x; then
23375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23377  fi
23378
23379
23380  windows_path="$new_path"
23381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23382    unix_path=`$CYGPATH -u "$windows_path"`
23383    new_path="$unix_path"
23384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23386    new_path="$unix_path"
23387  fi
23388
23389  if test "x$path" != "x$new_path"; then
23390    BOOT_JDK="$new_path"
23391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23393  fi
23394
23395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23397
23398  else
23399    # We're on a unix platform. Hooray! :)
23400    path="$BOOT_JDK"
23401    has_space=`$ECHO "$path" | $GREP " "`
23402    if test "x$has_space" != x; then
23403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23406    fi
23407
23408    # Use eval to expand a potential ~
23409    eval path="$path"
23410    if test ! -f "$path" && test ! -d "$path"; then
23411      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23412    fi
23413
23414    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23415  fi
23416
23417            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23418$as_echo_n "checking for Boot JDK... " >&6; }
23419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23420$as_echo "$BOOT_JDK" >&6; }
23421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23422$as_echo_n "checking Boot JDK version... " >&6; }
23423            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23425$as_echo "$BOOT_JDK_VERSION" >&6; }
23426          fi # end check jdk version
23427        fi # end check javac
23428      fi # end check java
23429    fi # end check boot jdk found
23430  fi
23431
23432    done
23433  fi
23434
23435  fi
23436
23437
23438    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23439    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23440      # Do we have a bin/java?
23441      if test ! -x "$BOOT_JDK/bin/java"; then
23442        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23444        BOOT_JDK_FOUND=no
23445      else
23446        # Do we have a bin/javac?
23447        if test ! -x "$BOOT_JDK/bin/javac"; then
23448          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23450          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23451$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23452          BOOT_JDK_FOUND=no
23453        else
23454          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23455          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23456
23457          # Extra M4 quote needed to protect [] in grep expression.
23458          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23459          if test "x$FOUND_CORRECT_VERSION" = x; then
23460            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23462            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23463$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23464            BOOT_JDK_FOUND=no
23465          else
23466            # We're done! :-)
23467            BOOT_JDK_FOUND=yes
23468
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-stile (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
23590            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23591$as_echo_n "checking for Boot JDK... " >&6; }
23592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23593$as_echo "$BOOT_JDK" >&6; }
23594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23595$as_echo_n "checking Boot JDK version... " >&6; }
23596            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23598$as_echo "$BOOT_JDK_VERSION" >&6; }
23599          fi # end check jdk version
23600        fi # end check javac
23601      fi # end check java
23602    fi # end check boot jdk found
23603  fi
23604
23605
23606  if test "x$BOOT_JDK_FOUND" = xno; then
23607    # Now execute the test
23608
23609  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23610  BOOT_JDK_SUFFIX=""
23611  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23612  if test "x$ALL_JDKS_FOUND" != x; then
23613    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23614
23615  if test "x$BOOT_JDK_FOUND" = xno; then
23616    # Now execute the test
23617
23618        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23619        if test -d "$BOOT_JDK"; then
23620          BOOT_JDK_FOUND=maybe
23621          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23622$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23623        fi
23624
23625
23626    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23627    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23628      # Do we have a bin/java?
23629      if test ! -x "$BOOT_JDK/bin/java"; then
23630        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23632        BOOT_JDK_FOUND=no
23633      else
23634        # Do we have a bin/javac?
23635        if test ! -x "$BOOT_JDK/bin/javac"; then
23636          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23638          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23639$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23640          BOOT_JDK_FOUND=no
23641        else
23642          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23643          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23644
23645          # Extra M4 quote needed to protect [] in grep expression.
23646          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23647          if test "x$FOUND_CORRECT_VERSION" = x; then
23648            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23650            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23651$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23652            BOOT_JDK_FOUND=no
23653          else
23654            # We're done! :-)
23655            BOOT_JDK_FOUND=yes
23656
23657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658
23659  # Input might be given as Windows format, start by converting to
23660  # unix format.
23661  path="$BOOT_JDK"
23662  new_path=`$CYGPATH -u "$path"`
23663
23664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23667  # "foo.exe" is OK but "foo" is an error.
23668  #
23669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23670  # It is also a way to make sure we got the proper file name for the real test later on.
23671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23672  if test "x$test_shortpath" = x; then
23673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23675    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23676  fi
23677
23678  # Call helper function which possibly converts this using DOS-style short mode.
23679  # If so, the updated path is stored in $new_path.
23680
23681  input_path="$new_path"
23682  # Check if we need to convert this using DOS-style short mode. If the path
23683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23684  # take no chances and rewrite it.
23685  # Note: m4 eats our [], so we need to use [ and ] instead.
23686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23687  if test "x$has_forbidden_chars" != x; then
23688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23692      # Going to short mode and back again did indeed matter. Since short mode is
23693      # case insensitive, let's make it lowercase to improve readability.
23694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23695      # Now convert it back to Unix-stile (cygpath)
23696      input_path=`$CYGPATH -u "$shortmode_path"`
23697      new_path="$input_path"
23698    fi
23699  fi
23700
23701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23702  if test "x$test_cygdrive_prefix" = x; then
23703    # As a simple fix, exclude /usr/bin since it's not a real path.
23704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23706      # a path prefixed by /cygdrive for fixpath to work.
23707      new_path="$CYGWIN_ROOT_PATH$input_path"
23708    fi
23709  fi
23710
23711
23712  if test "x$path" != "x$new_path"; then
23713    BOOT_JDK="$new_path"
23714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23716  fi
23717
23718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23719
23720  path="$BOOT_JDK"
23721  has_colon=`$ECHO $path | $GREP ^.:`
23722  new_path="$path"
23723  if test "x$has_colon" = x; then
23724    # Not in mixed or Windows style, start by that.
23725    new_path=`cmd //c echo $path`
23726  fi
23727
23728
23729  input_path="$new_path"
23730  # Check if we need to convert this using DOS-style short mode. If the path
23731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23732  # take no chances and rewrite it.
23733  # Note: m4 eats our [], so we need to use [ and ] instead.
23734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23735  if test "x$has_forbidden_chars" != x; then
23736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23738  fi
23739
23740
23741  windows_path="$new_path"
23742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23743    unix_path=`$CYGPATH -u "$windows_path"`
23744    new_path="$unix_path"
23745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23747    new_path="$unix_path"
23748  fi
23749
23750  if test "x$path" != "x$new_path"; then
23751    BOOT_JDK="$new_path"
23752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23754  fi
23755
23756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23758
23759  else
23760    # We're on a unix platform. Hooray! :)
23761    path="$BOOT_JDK"
23762    has_space=`$ECHO "$path" | $GREP " "`
23763    if test "x$has_space" != x; then
23764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23765$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23766      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23767    fi
23768
23769    # Use eval to expand a potential ~
23770    eval path="$path"
23771    if test ! -f "$path" && test ! -d "$path"; then
23772      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23773    fi
23774
23775    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23776  fi
23777
23778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23779$as_echo_n "checking for Boot JDK... " >&6; }
23780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23781$as_echo "$BOOT_JDK" >&6; }
23782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23783$as_echo_n "checking Boot JDK version... " >&6; }
23784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23786$as_echo "$BOOT_JDK_VERSION" >&6; }
23787          fi # end check jdk version
23788        fi # end check javac
23789      fi # end check java
23790    fi # end check boot jdk found
23791  fi
23792
23793    done
23794  fi
23795
23796
23797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23799      # Do we have a bin/java?
23800      if test ! -x "$BOOT_JDK/bin/java"; then
23801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23803        BOOT_JDK_FOUND=no
23804      else
23805        # Do we have a bin/javac?
23806        if test ! -x "$BOOT_JDK/bin/javac"; then
23807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23811          BOOT_JDK_FOUND=no
23812        else
23813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23815
23816          # Extra M4 quote needed to protect [] in grep expression.
23817          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23818          if test "x$FOUND_CORRECT_VERSION" = x; then
23819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23823            BOOT_JDK_FOUND=no
23824          else
23825            # We're done! :-)
23826            BOOT_JDK_FOUND=yes
23827
23828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23829
23830  # Input might be given as Windows format, start by converting to
23831  # unix format.
23832  path="$BOOT_JDK"
23833  new_path=`$CYGPATH -u "$path"`
23834
23835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23838  # "foo.exe" is OK but "foo" is an error.
23839  #
23840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23841  # It is also a way to make sure we got the proper file name for the real test later on.
23842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23843  if test "x$test_shortpath" = x; then
23844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23846    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23847  fi
23848
23849  # Call helper function which possibly converts this using DOS-style short mode.
23850  # If so, the updated path is stored in $new_path.
23851
23852  input_path="$new_path"
23853  # Check if we need to convert this using DOS-style short mode. If the path
23854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23855  # take no chances and rewrite it.
23856  # Note: m4 eats our [], so we need to use [ and ] instead.
23857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23858  if test "x$has_forbidden_chars" != x; then
23859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23863      # Going to short mode and back again did indeed matter. Since short mode is
23864      # case insensitive, let's make it lowercase to improve readability.
23865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23866      # Now convert it back to Unix-stile (cygpath)
23867      input_path=`$CYGPATH -u "$shortmode_path"`
23868      new_path="$input_path"
23869    fi
23870  fi
23871
23872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23873  if test "x$test_cygdrive_prefix" = x; then
23874    # As a simple fix, exclude /usr/bin since it's not a real path.
23875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23877      # a path prefixed by /cygdrive for fixpath to work.
23878      new_path="$CYGWIN_ROOT_PATH$input_path"
23879    fi
23880  fi
23881
23882
23883  if test "x$path" != "x$new_path"; then
23884    BOOT_JDK="$new_path"
23885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23887  fi
23888
23889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23890
23891  path="$BOOT_JDK"
23892  has_colon=`$ECHO $path | $GREP ^.:`
23893  new_path="$path"
23894  if test "x$has_colon" = x; then
23895    # Not in mixed or Windows style, start by that.
23896    new_path=`cmd //c echo $path`
23897  fi
23898
23899
23900  input_path="$new_path"
23901  # Check if we need to convert this using DOS-style short mode. If the path
23902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23903  # take no chances and rewrite it.
23904  # Note: m4 eats our [], so we need to use [ and ] instead.
23905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23906  if test "x$has_forbidden_chars" != x; then
23907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23909  fi
23910
23911
23912  windows_path="$new_path"
23913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23914    unix_path=`$CYGPATH -u "$windows_path"`
23915    new_path="$unix_path"
23916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23918    new_path="$unix_path"
23919  fi
23920
23921  if test "x$path" != "x$new_path"; then
23922    BOOT_JDK="$new_path"
23923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23925  fi
23926
23927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23929
23930  else
23931    # We're on a unix platform. Hooray! :)
23932    path="$BOOT_JDK"
23933    has_space=`$ECHO "$path" | $GREP " "`
23934    if test "x$has_space" != x; then
23935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23937      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23938    fi
23939
23940    # Use eval to expand a potential ~
23941    eval path="$path"
23942    if test ! -f "$path" && test ! -d "$path"; then
23943      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23944    fi
23945
23946    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23947  fi
23948
23949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23950$as_echo_n "checking for Boot JDK... " >&6; }
23951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23952$as_echo "$BOOT_JDK" >&6; }
23953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23954$as_echo_n "checking Boot JDK version... " >&6; }
23955            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23957$as_echo "$BOOT_JDK_VERSION" >&6; }
23958          fi # end check jdk version
23959        fi # end check javac
23960      fi # end check java
23961    fi # end check boot jdk found
23962  fi
23963
23964  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23965
23966  if test "x$BOOT_JDK_FOUND" = xno; then
23967    # Now execute the test
23968
23969  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23970  BOOT_JDK_SUFFIX="/Contents/Home"
23971  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23972  if test "x$ALL_JDKS_FOUND" != x; then
23973    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23974
23975  if test "x$BOOT_JDK_FOUND" = xno; then
23976    # Now execute the test
23977
23978        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23979        if test -d "$BOOT_JDK"; then
23980          BOOT_JDK_FOUND=maybe
23981          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23982$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23983        fi
23984
23985
23986    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23987    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23988      # Do we have a bin/java?
23989      if test ! -x "$BOOT_JDK/bin/java"; then
23990        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23992        BOOT_JDK_FOUND=no
23993      else
23994        # Do we have a bin/javac?
23995        if test ! -x "$BOOT_JDK/bin/javac"; then
23996          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23998          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23999$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24000          BOOT_JDK_FOUND=no
24001        else
24002          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24003          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24004
24005          # Extra M4 quote needed to protect [] in grep expression.
24006          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24007          if test "x$FOUND_CORRECT_VERSION" = x; then
24008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24010            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24011$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24012            BOOT_JDK_FOUND=no
24013          else
24014            # We're done! :-)
24015            BOOT_JDK_FOUND=yes
24016
24017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24018
24019  # Input might be given as Windows format, start by converting to
24020  # unix format.
24021  path="$BOOT_JDK"
24022  new_path=`$CYGPATH -u "$path"`
24023
24024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24027  # "foo.exe" is OK but "foo" is an error.
24028  #
24029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24030  # It is also a way to make sure we got the proper file name for the real test later on.
24031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24032  if test "x$test_shortpath" = x; then
24033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24036  fi
24037
24038  # Call helper function which possibly converts this using DOS-style short mode.
24039  # If so, the updated path is stored in $new_path.
24040
24041  input_path="$new_path"
24042  # Check if we need to convert this using DOS-style short mode. If the path
24043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24044  # take no chances and rewrite it.
24045  # Note: m4 eats our [], so we need to use [ and ] instead.
24046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24047  if test "x$has_forbidden_chars" != x; then
24048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24052      # Going to short mode and back again did indeed matter. Since short mode is
24053      # case insensitive, let's make it lowercase to improve readability.
24054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24055      # Now convert it back to Unix-stile (cygpath)
24056      input_path=`$CYGPATH -u "$shortmode_path"`
24057      new_path="$input_path"
24058    fi
24059  fi
24060
24061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24062  if test "x$test_cygdrive_prefix" = x; then
24063    # As a simple fix, exclude /usr/bin since it's not a real path.
24064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24066      # a path prefixed by /cygdrive for fixpath to work.
24067      new_path="$CYGWIN_ROOT_PATH$input_path"
24068    fi
24069  fi
24070
24071
24072  if test "x$path" != "x$new_path"; then
24073    BOOT_JDK="$new_path"
24074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24076  fi
24077
24078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24079
24080  path="$BOOT_JDK"
24081  has_colon=`$ECHO $path | $GREP ^.:`
24082  new_path="$path"
24083  if test "x$has_colon" = x; then
24084    # Not in mixed or Windows style, start by that.
24085    new_path=`cmd //c echo $path`
24086  fi
24087
24088
24089  input_path="$new_path"
24090  # Check if we need to convert this using DOS-style short mode. If the path
24091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24092  # take no chances and rewrite it.
24093  # Note: m4 eats our [], so we need to use [ and ] instead.
24094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24095  if test "x$has_forbidden_chars" != x; then
24096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24098  fi
24099
24100
24101  windows_path="$new_path"
24102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24103    unix_path=`$CYGPATH -u "$windows_path"`
24104    new_path="$unix_path"
24105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24107    new_path="$unix_path"
24108  fi
24109
24110  if test "x$path" != "x$new_path"; then
24111    BOOT_JDK="$new_path"
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24114  fi
24115
24116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24118
24119  else
24120    # We're on a unix platform. Hooray! :)
24121    path="$BOOT_JDK"
24122    has_space=`$ECHO "$path" | $GREP " "`
24123    if test "x$has_space" != x; then
24124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24126      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24127    fi
24128
24129    # Use eval to expand a potential ~
24130    eval path="$path"
24131    if test ! -f "$path" && test ! -d "$path"; then
24132      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24133    fi
24134
24135    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24136  fi
24137
24138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24139$as_echo_n "checking for Boot JDK... " >&6; }
24140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24141$as_echo "$BOOT_JDK" >&6; }
24142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24143$as_echo_n "checking Boot JDK version... " >&6; }
24144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24146$as_echo "$BOOT_JDK_VERSION" >&6; }
24147          fi # end check jdk version
24148        fi # end check javac
24149      fi # end check java
24150    fi # end check boot jdk found
24151  fi
24152
24153    done
24154  fi
24155
24156
24157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24159      # Do we have a bin/java?
24160      if test ! -x "$BOOT_JDK/bin/java"; then
24161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24163        BOOT_JDK_FOUND=no
24164      else
24165        # Do we have a bin/javac?
24166        if test ! -x "$BOOT_JDK/bin/javac"; then
24167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24171          BOOT_JDK_FOUND=no
24172        else
24173          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24174          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24175
24176          # Extra M4 quote needed to protect [] in grep expression.
24177          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24178          if test "x$FOUND_CORRECT_VERSION" = x; then
24179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24181            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24182$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24183            BOOT_JDK_FOUND=no
24184          else
24185            # We're done! :-)
24186            BOOT_JDK_FOUND=yes
24187
24188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24189
24190  # Input might be given as Windows format, start by converting to
24191  # unix format.
24192  path="$BOOT_JDK"
24193  new_path=`$CYGPATH -u "$path"`
24194
24195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24198  # "foo.exe" is OK but "foo" is an error.
24199  #
24200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24201  # It is also a way to make sure we got the proper file name for the real test later on.
24202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24203  if test "x$test_shortpath" = x; then
24204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24207  fi
24208
24209  # Call helper function which possibly converts this using DOS-style short mode.
24210  # If so, the updated path is stored in $new_path.
24211
24212  input_path="$new_path"
24213  # Check if we need to convert this using DOS-style short mode. If the path
24214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24215  # take no chances and rewrite it.
24216  # Note: m4 eats our [], so we need to use [ and ] instead.
24217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24218  if test "x$has_forbidden_chars" != x; then
24219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24223      # Going to short mode and back again did indeed matter. Since short mode is
24224      # case insensitive, let's make it lowercase to improve readability.
24225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24226      # Now convert it back to Unix-stile (cygpath)
24227      input_path=`$CYGPATH -u "$shortmode_path"`
24228      new_path="$input_path"
24229    fi
24230  fi
24231
24232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24233  if test "x$test_cygdrive_prefix" = x; then
24234    # As a simple fix, exclude /usr/bin since it's not a real path.
24235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24237      # a path prefixed by /cygdrive for fixpath to work.
24238      new_path="$CYGWIN_ROOT_PATH$input_path"
24239    fi
24240  fi
24241
24242
24243  if test "x$path" != "x$new_path"; then
24244    BOOT_JDK="$new_path"
24245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24247  fi
24248
24249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24250
24251  path="$BOOT_JDK"
24252  has_colon=`$ECHO $path | $GREP ^.:`
24253  new_path="$path"
24254  if test "x$has_colon" = x; then
24255    # Not in mixed or Windows style, start by that.
24256    new_path=`cmd //c echo $path`
24257  fi
24258
24259
24260  input_path="$new_path"
24261  # Check if we need to convert this using DOS-style short mode. If the path
24262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24263  # take no chances and rewrite it.
24264  # Note: m4 eats our [], so we need to use [ and ] instead.
24265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24266  if test "x$has_forbidden_chars" != x; then
24267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24269  fi
24270
24271
24272  windows_path="$new_path"
24273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24274    unix_path=`$CYGPATH -u "$windows_path"`
24275    new_path="$unix_path"
24276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24278    new_path="$unix_path"
24279  fi
24280
24281  if test "x$path" != "x$new_path"; then
24282    BOOT_JDK="$new_path"
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24285  fi
24286
24287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24289
24290  else
24291    # We're on a unix platform. Hooray! :)
24292    path="$BOOT_JDK"
24293    has_space=`$ECHO "$path" | $GREP " "`
24294    if test "x$has_space" != x; then
24295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24298    fi
24299
24300    # Use eval to expand a potential ~
24301    eval path="$path"
24302    if test ! -f "$path" && test ! -d "$path"; then
24303      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24304    fi
24305
24306    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24307  fi
24308
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24310$as_echo_n "checking for Boot JDK... " >&6; }
24311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24312$as_echo "$BOOT_JDK" >&6; }
24313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24314$as_echo_n "checking Boot JDK version... " >&6; }
24315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24317$as_echo "$BOOT_JDK_VERSION" >&6; }
24318          fi # end check jdk version
24319        fi # end check javac
24320      fi # end check java
24321    fi # end check boot jdk found
24322  fi
24323
24324
24325  if test "x$BOOT_JDK_FOUND" = xno; then
24326    # Now execute the test
24327
24328  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24329  BOOT_JDK_SUFFIX="/Contents/Home"
24330  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24331  if test "x$ALL_JDKS_FOUND" != x; then
24332    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24333
24334  if test "x$BOOT_JDK_FOUND" = xno; then
24335    # Now execute the test
24336
24337        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24338        if test -d "$BOOT_JDK"; then
24339          BOOT_JDK_FOUND=maybe
24340          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24341$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24342        fi
24343
24344
24345    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24346    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24347      # Do we have a bin/java?
24348      if test ! -x "$BOOT_JDK/bin/java"; then
24349        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24351        BOOT_JDK_FOUND=no
24352      else
24353        # Do we have a bin/javac?
24354        if test ! -x "$BOOT_JDK/bin/javac"; then
24355          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24357          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24358$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24359          BOOT_JDK_FOUND=no
24360        else
24361          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24362          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24363
24364          # Extra M4 quote needed to protect [] in grep expression.
24365          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24366          if test "x$FOUND_CORRECT_VERSION" = x; then
24367            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24369            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24370$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24371            BOOT_JDK_FOUND=no
24372          else
24373            # We're done! :-)
24374            BOOT_JDK_FOUND=yes
24375
24376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24377
24378  # Input might be given as Windows format, start by converting to
24379  # unix format.
24380  path="$BOOT_JDK"
24381  new_path=`$CYGPATH -u "$path"`
24382
24383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24386  # "foo.exe" is OK but "foo" is an error.
24387  #
24388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24389  # It is also a way to make sure we got the proper file name for the real test later on.
24390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24391  if test "x$test_shortpath" = x; then
24392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24394    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24395  fi
24396
24397  # Call helper function which possibly converts this using DOS-style short mode.
24398  # If so, the updated path is stored in $new_path.
24399
24400  input_path="$new_path"
24401  # Check if we need to convert this using DOS-style short mode. If the path
24402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24403  # take no chances and rewrite it.
24404  # Note: m4 eats our [], so we need to use [ and ] instead.
24405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24406  if test "x$has_forbidden_chars" != x; then
24407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24411      # Going to short mode and back again did indeed matter. Since short mode is
24412      # case insensitive, let's make it lowercase to improve readability.
24413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24414      # Now convert it back to Unix-stile (cygpath)
24415      input_path=`$CYGPATH -u "$shortmode_path"`
24416      new_path="$input_path"
24417    fi
24418  fi
24419
24420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24421  if test "x$test_cygdrive_prefix" = x; then
24422    # As a simple fix, exclude /usr/bin since it's not a real path.
24423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24425      # a path prefixed by /cygdrive for fixpath to work.
24426      new_path="$CYGWIN_ROOT_PATH$input_path"
24427    fi
24428  fi
24429
24430
24431  if test "x$path" != "x$new_path"; then
24432    BOOT_JDK="$new_path"
24433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24435  fi
24436
24437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24438
24439  path="$BOOT_JDK"
24440  has_colon=`$ECHO $path | $GREP ^.:`
24441  new_path="$path"
24442  if test "x$has_colon" = x; then
24443    # Not in mixed or Windows style, start by that.
24444    new_path=`cmd //c echo $path`
24445  fi
24446
24447
24448  input_path="$new_path"
24449  # Check if we need to convert this using DOS-style short mode. If the path
24450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24451  # take no chances and rewrite it.
24452  # Note: m4 eats our [], so we need to use [ and ] instead.
24453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24454  if test "x$has_forbidden_chars" != x; then
24455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24457  fi
24458
24459
24460  windows_path="$new_path"
24461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24462    unix_path=`$CYGPATH -u "$windows_path"`
24463    new_path="$unix_path"
24464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24466    new_path="$unix_path"
24467  fi
24468
24469  if test "x$path" != "x$new_path"; then
24470    BOOT_JDK="$new_path"
24471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24473  fi
24474
24475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24477
24478  else
24479    # We're on a unix platform. Hooray! :)
24480    path="$BOOT_JDK"
24481    has_space=`$ECHO "$path" | $GREP " "`
24482    if test "x$has_space" != x; then
24483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24485      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24486    fi
24487
24488    # Use eval to expand a potential ~
24489    eval path="$path"
24490    if test ! -f "$path" && test ! -d "$path"; then
24491      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24492    fi
24493
24494    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24495  fi
24496
24497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24498$as_echo_n "checking for Boot JDK... " >&6; }
24499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24500$as_echo "$BOOT_JDK" >&6; }
24501            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24502$as_echo_n "checking Boot JDK version... " >&6; }
24503            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24505$as_echo "$BOOT_JDK_VERSION" >&6; }
24506          fi # end check jdk version
24507        fi # end check javac
24508      fi # end check java
24509    fi # end check boot jdk found
24510  fi
24511
24512    done
24513  fi
24514
24515
24516    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24517    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24518      # Do we have a bin/java?
24519      if test ! -x "$BOOT_JDK/bin/java"; then
24520        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24522        BOOT_JDK_FOUND=no
24523      else
24524        # Do we have a bin/javac?
24525        if test ! -x "$BOOT_JDK/bin/javac"; then
24526          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24528          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24529$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24530          BOOT_JDK_FOUND=no
24531        else
24532          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24533          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24534
24535          # Extra M4 quote needed to protect [] in grep expression.
24536          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24537          if test "x$FOUND_CORRECT_VERSION" = x; then
24538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24540            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24542            BOOT_JDK_FOUND=no
24543          else
24544            # We're done! :-)
24545            BOOT_JDK_FOUND=yes
24546
24547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24548
24549  # Input might be given as Windows format, start by converting to
24550  # unix format.
24551  path="$BOOT_JDK"
24552  new_path=`$CYGPATH -u "$path"`
24553
24554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24557  # "foo.exe" is OK but "foo" is an error.
24558  #
24559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24560  # It is also a way to make sure we got the proper file name for the real test later on.
24561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24562  if test "x$test_shortpath" = x; then
24563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24565    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24566  fi
24567
24568  # Call helper function which possibly converts this using DOS-style short mode.
24569  # If so, the updated path is stored in $new_path.
24570
24571  input_path="$new_path"
24572  # Check if we need to convert this using DOS-style short mode. If the path
24573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24574  # take no chances and rewrite it.
24575  # Note: m4 eats our [], so we need to use [ and ] instead.
24576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24577  if test "x$has_forbidden_chars" != x; then
24578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24582      # Going to short mode and back again did indeed matter. Since short mode is
24583      # case insensitive, let's make it lowercase to improve readability.
24584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24585      # Now convert it back to Unix-stile (cygpath)
24586      input_path=`$CYGPATH -u "$shortmode_path"`
24587      new_path="$input_path"
24588    fi
24589  fi
24590
24591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24592  if test "x$test_cygdrive_prefix" = x; then
24593    # As a simple fix, exclude /usr/bin since it's not a real path.
24594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24596      # a path prefixed by /cygdrive for fixpath to work.
24597      new_path="$CYGWIN_ROOT_PATH$input_path"
24598    fi
24599  fi
24600
24601
24602  if test "x$path" != "x$new_path"; then
24603    BOOT_JDK="$new_path"
24604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24605$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24606  fi
24607
24608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24609
24610  path="$BOOT_JDK"
24611  has_colon=`$ECHO $path | $GREP ^.:`
24612  new_path="$path"
24613  if test "x$has_colon" = x; then
24614    # Not in mixed or Windows style, start by that.
24615    new_path=`cmd //c echo $path`
24616  fi
24617
24618
24619  input_path="$new_path"
24620  # Check if we need to convert this using DOS-style short mode. If the path
24621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24622  # take no chances and rewrite it.
24623  # Note: m4 eats our [], so we need to use [ and ] instead.
24624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24625  if test "x$has_forbidden_chars" != x; then
24626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24628  fi
24629
24630
24631  windows_path="$new_path"
24632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24633    unix_path=`$CYGPATH -u "$windows_path"`
24634    new_path="$unix_path"
24635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24637    new_path="$unix_path"
24638  fi
24639
24640  if test "x$path" != "x$new_path"; then
24641    BOOT_JDK="$new_path"
24642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24644  fi
24645
24646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24648
24649  else
24650    # We're on a unix platform. Hooray! :)
24651    path="$BOOT_JDK"
24652    has_space=`$ECHO "$path" | $GREP " "`
24653    if test "x$has_space" != x; then
24654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24656      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24657    fi
24658
24659    # Use eval to expand a potential ~
24660    eval path="$path"
24661    if test ! -f "$path" && test ! -d "$path"; then
24662      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24663    fi
24664
24665    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24666  fi
24667
24668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24669$as_echo_n "checking for Boot JDK... " >&6; }
24670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24671$as_echo "$BOOT_JDK" >&6; }
24672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24673$as_echo_n "checking Boot JDK version... " >&6; }
24674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24676$as_echo "$BOOT_JDK_VERSION" >&6; }
24677          fi # end check jdk version
24678        fi # end check javac
24679      fi # end check java
24680    fi # end check boot jdk found
24681  fi
24682
24683  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24684
24685  if test "x$BOOT_JDK_FOUND" = xno; then
24686    # Now execute the test
24687
24688  BOOT_JDK_PREFIX="/usr/lib/jvm"
24689  BOOT_JDK_SUFFIX=""
24690  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24691  if test "x$ALL_JDKS_FOUND" != x; then
24692    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24693
24694  if test "x$BOOT_JDK_FOUND" = xno; then
24695    # Now execute the test
24696
24697        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24698        if test -d "$BOOT_JDK"; then
24699          BOOT_JDK_FOUND=maybe
24700          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24701$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24702        fi
24703
24704
24705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24707      # Do we have a bin/java?
24708      if test ! -x "$BOOT_JDK/bin/java"; then
24709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24711        BOOT_JDK_FOUND=no
24712      else
24713        # Do we have a bin/javac?
24714        if test ! -x "$BOOT_JDK/bin/javac"; then
24715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24719          BOOT_JDK_FOUND=no
24720        else
24721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24723
24724          # Extra M4 quote needed to protect [] in grep expression.
24725          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24726          if test "x$FOUND_CORRECT_VERSION" = x; then
24727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24731            BOOT_JDK_FOUND=no
24732          else
24733            # We're done! :-)
24734            BOOT_JDK_FOUND=yes
24735
24736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24737
24738  # Input might be given as Windows format, start by converting to
24739  # unix format.
24740  path="$BOOT_JDK"
24741  new_path=`$CYGPATH -u "$path"`
24742
24743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24746  # "foo.exe" is OK but "foo" is an error.
24747  #
24748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24749  # It is also a way to make sure we got the proper file name for the real test later on.
24750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24751  if test "x$test_shortpath" = x; then
24752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24754    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24755  fi
24756
24757  # Call helper function which possibly converts this using DOS-style short mode.
24758  # If so, the updated path is stored in $new_path.
24759
24760  input_path="$new_path"
24761  # Check if we need to convert this using DOS-style short mode. If the path
24762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24763  # take no chances and rewrite it.
24764  # Note: m4 eats our [], so we need to use [ and ] instead.
24765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24766  if test "x$has_forbidden_chars" != x; then
24767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24771      # Going to short mode and back again did indeed matter. Since short mode is
24772      # case insensitive, let's make it lowercase to improve readability.
24773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24774      # Now convert it back to Unix-stile (cygpath)
24775      input_path=`$CYGPATH -u "$shortmode_path"`
24776      new_path="$input_path"
24777    fi
24778  fi
24779
24780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24781  if test "x$test_cygdrive_prefix" = x; then
24782    # As a simple fix, exclude /usr/bin since it's not a real path.
24783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24785      # a path prefixed by /cygdrive for fixpath to work.
24786      new_path="$CYGWIN_ROOT_PATH$input_path"
24787    fi
24788  fi
24789
24790
24791  if test "x$path" != "x$new_path"; then
24792    BOOT_JDK="$new_path"
24793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24795  fi
24796
24797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24798
24799  path="$BOOT_JDK"
24800  has_colon=`$ECHO $path | $GREP ^.:`
24801  new_path="$path"
24802  if test "x$has_colon" = x; then
24803    # Not in mixed or Windows style, start by that.
24804    new_path=`cmd //c echo $path`
24805  fi
24806
24807
24808  input_path="$new_path"
24809  # Check if we need to convert this using DOS-style short mode. If the path
24810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24811  # take no chances and rewrite it.
24812  # Note: m4 eats our [], so we need to use [ and ] instead.
24813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24814  if test "x$has_forbidden_chars" != x; then
24815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24817  fi
24818
24819
24820  windows_path="$new_path"
24821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822    unix_path=`$CYGPATH -u "$windows_path"`
24823    new_path="$unix_path"
24824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24826    new_path="$unix_path"
24827  fi
24828
24829  if test "x$path" != "x$new_path"; then
24830    BOOT_JDK="$new_path"
24831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24833  fi
24834
24835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24837
24838  else
24839    # We're on a unix platform. Hooray! :)
24840    path="$BOOT_JDK"
24841    has_space=`$ECHO "$path" | $GREP " "`
24842    if test "x$has_space" != x; then
24843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24845      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24846    fi
24847
24848    # Use eval to expand a potential ~
24849    eval path="$path"
24850    if test ! -f "$path" && test ! -d "$path"; then
24851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24852    fi
24853
24854    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24855  fi
24856
24857            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24858$as_echo_n "checking for Boot JDK... " >&6; }
24859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24860$as_echo "$BOOT_JDK" >&6; }
24861            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24862$as_echo_n "checking Boot JDK version... " >&6; }
24863            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24865$as_echo "$BOOT_JDK_VERSION" >&6; }
24866          fi # end check jdk version
24867        fi # end check javac
24868      fi # end check java
24869    fi # end check boot jdk found
24870  fi
24871
24872    done
24873  fi
24874
24875
24876    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24877    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24878      # Do we have a bin/java?
24879      if test ! -x "$BOOT_JDK/bin/java"; then
24880        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24882        BOOT_JDK_FOUND=no
24883      else
24884        # Do we have a bin/javac?
24885        if test ! -x "$BOOT_JDK/bin/javac"; then
24886          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24888          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24889$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24890          BOOT_JDK_FOUND=no
24891        else
24892          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24893          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24894
24895          # Extra M4 quote needed to protect [] in grep expression.
24896          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24897          if test "x$FOUND_CORRECT_VERSION" = x; then
24898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24900            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24901$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24902            BOOT_JDK_FOUND=no
24903          else
24904            # We're done! :-)
24905            BOOT_JDK_FOUND=yes
24906
24907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908
24909  # Input might be given as Windows format, start by converting to
24910  # unix format.
24911  path="$BOOT_JDK"
24912  new_path=`$CYGPATH -u "$path"`
24913
24914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24917  # "foo.exe" is OK but "foo" is an error.
24918  #
24919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24920  # It is also a way to make sure we got the proper file name for the real test later on.
24921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24922  if test "x$test_shortpath" = x; then
24923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24926  fi
24927
24928  # Call helper function which possibly converts this using DOS-style short mode.
24929  # If so, the updated path is stored in $new_path.
24930
24931  input_path="$new_path"
24932  # Check if we need to convert this using DOS-style short mode. If the path
24933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24934  # take no chances and rewrite it.
24935  # Note: m4 eats our [], so we need to use [ and ] instead.
24936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24937  if test "x$has_forbidden_chars" != x; then
24938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24942      # Going to short mode and back again did indeed matter. Since short mode is
24943      # case insensitive, let's make it lowercase to improve readability.
24944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24945      # Now convert it back to Unix-stile (cygpath)
24946      input_path=`$CYGPATH -u "$shortmode_path"`
24947      new_path="$input_path"
24948    fi
24949  fi
24950
24951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24952  if test "x$test_cygdrive_prefix" = x; then
24953    # As a simple fix, exclude /usr/bin since it's not a real path.
24954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24956      # a path prefixed by /cygdrive for fixpath to work.
24957      new_path="$CYGWIN_ROOT_PATH$input_path"
24958    fi
24959  fi
24960
24961
24962  if test "x$path" != "x$new_path"; then
24963    BOOT_JDK="$new_path"
24964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24966  fi
24967
24968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24969
24970  path="$BOOT_JDK"
24971  has_colon=`$ECHO $path | $GREP ^.:`
24972  new_path="$path"
24973  if test "x$has_colon" = x; then
24974    # Not in mixed or Windows style, start by that.
24975    new_path=`cmd //c echo $path`
24976  fi
24977
24978
24979  input_path="$new_path"
24980  # Check if we need to convert this using DOS-style short mode. If the path
24981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24982  # take no chances and rewrite it.
24983  # Note: m4 eats our [], so we need to use [ and ] instead.
24984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24985  if test "x$has_forbidden_chars" != x; then
24986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24988  fi
24989
24990
24991  windows_path="$new_path"
24992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24993    unix_path=`$CYGPATH -u "$windows_path"`
24994    new_path="$unix_path"
24995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24997    new_path="$unix_path"
24998  fi
24999
25000  if test "x$path" != "x$new_path"; then
25001    BOOT_JDK="$new_path"
25002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25004  fi
25005
25006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25008
25009  else
25010    # We're on a unix platform. Hooray! :)
25011    path="$BOOT_JDK"
25012    has_space=`$ECHO "$path" | $GREP " "`
25013    if test "x$has_space" != x; then
25014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25016      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25017    fi
25018
25019    # Use eval to expand a potential ~
25020    eval path="$path"
25021    if test ! -f "$path" && test ! -d "$path"; then
25022      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25023    fi
25024
25025    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25026  fi
25027
25028            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25029$as_echo_n "checking for Boot JDK... " >&6; }
25030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25031$as_echo "$BOOT_JDK" >&6; }
25032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25033$as_echo_n "checking Boot JDK version... " >&6; }
25034            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25036$as_echo "$BOOT_JDK_VERSION" >&6; }
25037          fi # end check jdk version
25038        fi # end check javac
25039      fi # end check java
25040    fi # end check boot jdk found
25041  fi
25042
25043  fi
25044
25045
25046    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25047    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25048      # Do we have a bin/java?
25049      if test ! -x "$BOOT_JDK/bin/java"; then
25050        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25052        BOOT_JDK_FOUND=no
25053      else
25054        # Do we have a bin/javac?
25055        if test ! -x "$BOOT_JDK/bin/javac"; then
25056          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25058          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25059$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25060          BOOT_JDK_FOUND=no
25061        else
25062          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25063          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25064
25065          # Extra M4 quote needed to protect [] in grep expression.
25066          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25067          if test "x$FOUND_CORRECT_VERSION" = x; then
25068            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25070            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25071$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25072            BOOT_JDK_FOUND=no
25073          else
25074            # We're done! :-)
25075            BOOT_JDK_FOUND=yes
25076
25077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25078
25079  # Input might be given as Windows format, start by converting to
25080  # unix format.
25081  path="$BOOT_JDK"
25082  new_path=`$CYGPATH -u "$path"`
25083
25084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25087  # "foo.exe" is OK but "foo" is an error.
25088  #
25089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25090  # It is also a way to make sure we got the proper file name for the real test later on.
25091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25092  if test "x$test_shortpath" = x; then
25093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25095    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25096  fi
25097
25098  # Call helper function which possibly converts this using DOS-style short mode.
25099  # If so, the updated path is stored in $new_path.
25100
25101  input_path="$new_path"
25102  # Check if we need to convert this using DOS-style short mode. If the path
25103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25104  # take no chances and rewrite it.
25105  # Note: m4 eats our [], so we need to use [ and ] instead.
25106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25107  if test "x$has_forbidden_chars" != x; then
25108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25112      # Going to short mode and back again did indeed matter. Since short mode is
25113      # case insensitive, let's make it lowercase to improve readability.
25114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25115      # Now convert it back to Unix-stile (cygpath)
25116      input_path=`$CYGPATH -u "$shortmode_path"`
25117      new_path="$input_path"
25118    fi
25119  fi
25120
25121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25122  if test "x$test_cygdrive_prefix" = x; then
25123    # As a simple fix, exclude /usr/bin since it's not a real path.
25124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25126      # a path prefixed by /cygdrive for fixpath to work.
25127      new_path="$CYGWIN_ROOT_PATH$input_path"
25128    fi
25129  fi
25130
25131
25132  if test "x$path" != "x$new_path"; then
25133    BOOT_JDK="$new_path"
25134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25136  fi
25137
25138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25139
25140  path="$BOOT_JDK"
25141  has_colon=`$ECHO $path | $GREP ^.:`
25142  new_path="$path"
25143  if test "x$has_colon" = x; then
25144    # Not in mixed or Windows style, start by that.
25145    new_path=`cmd //c echo $path`
25146  fi
25147
25148
25149  input_path="$new_path"
25150  # Check if we need to convert this using DOS-style short mode. If the path
25151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25152  # take no chances and rewrite it.
25153  # Note: m4 eats our [], so we need to use [ and ] instead.
25154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25155  if test "x$has_forbidden_chars" != x; then
25156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25158  fi
25159
25160
25161  windows_path="$new_path"
25162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25163    unix_path=`$CYGPATH -u "$windows_path"`
25164    new_path="$unix_path"
25165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25167    new_path="$unix_path"
25168  fi
25169
25170  if test "x$path" != "x$new_path"; then
25171    BOOT_JDK="$new_path"
25172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25173$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25174  fi
25175
25176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25178
25179  else
25180    # We're on a unix platform. Hooray! :)
25181    path="$BOOT_JDK"
25182    has_space=`$ECHO "$path" | $GREP " "`
25183    if test "x$has_space" != x; then
25184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25186      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25187    fi
25188
25189    # Use eval to expand a potential ~
25190    eval path="$path"
25191    if test ! -f "$path" && test ! -d "$path"; then
25192      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25193    fi
25194
25195    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25196  fi
25197
25198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25199$as_echo_n "checking for Boot JDK... " >&6; }
25200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25201$as_echo "$BOOT_JDK" >&6; }
25202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25203$as_echo_n "checking Boot JDK version... " >&6; }
25204            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25206$as_echo "$BOOT_JDK_VERSION" >&6; }
25207          fi # end check jdk version
25208        fi # end check javac
25209      fi # end check java
25210    fi # end check boot jdk found
25211  fi
25212
25213
25214  # If we haven't found anything yet, we've truly lost. Give up.
25215  if test "x$BOOT_JDK_FOUND" = xno; then
25216
25217  # Print a helpful message on how to acquire the necessary build dependency.
25218  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25219  MISSING_DEPENDENCY=openjdk
25220
25221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25222    cygwin_help $MISSING_DEPENDENCY
25223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25224    msys_help $MISSING_DEPENDENCY
25225  else
25226    PKGHANDLER_COMMAND=
25227
25228    case $PKGHANDLER in
25229      apt-get)
25230        apt_help     $MISSING_DEPENDENCY ;;
25231      yum)
25232        yum_help     $MISSING_DEPENDENCY ;;
25233      port)
25234        port_help    $MISSING_DEPENDENCY ;;
25235      pkgutil)
25236        pkgutil_help $MISSING_DEPENDENCY ;;
25237      pkgadd)
25238        pkgadd_help  $MISSING_DEPENDENCY ;;
25239    esac
25240
25241    if test "x$PKGHANDLER_COMMAND" != x; then
25242      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25243    fi
25244  fi
25245
25246    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25247$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25248    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25249$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25250    as_fn_error $? "Cannot continue" "$LINENO" 5
25251  fi
25252
25253
25254
25255  # Setup tools from the Boot JDK.
25256
25257  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25258
25259  # Publish this variable in the help.
25260
25261
25262  if test "x$JAVA" = x; then
25263    # The variable is not set by user, try to locate tool using the code snippet
25264
25265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25266$as_echo_n "checking for java in Boot JDK... " >&6; }
25267      JAVA=$BOOT_JDK/bin/java
25268      if test ! -x $JAVA; then
25269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25270$as_echo "not found" >&6; }
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25272$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25273        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25274      fi
25275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25276$as_echo "ok" >&6; }
25277
25278
25279  else
25280    # The variable is set, but is it from the command line or the environment?
25281
25282    # Try to remove the string !JAVA! from our list.
25283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25285      # If it failed, the variable was not from the command line. Ignore it,
25286      # but warn the user (except for BASH, which is always set by the calling BASH).
25287      if test "xJAVA" != xBASH; then
25288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25289$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25290      fi
25291      # Try to locate tool using the code snippet
25292
25293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25294$as_echo_n "checking for java in Boot JDK... " >&6; }
25295      JAVA=$BOOT_JDK/bin/java
25296      if test ! -x $JAVA; then
25297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25298$as_echo "not found" >&6; }
25299        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25300$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25301        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25302      fi
25303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25304$as_echo "ok" >&6; }
25305
25306
25307    else
25308      # If it succeeded, then it was overridden by the user. We will use it
25309      # for the tool.
25310
25311      # First remove it from the list of overridden variables, so we can test
25312      # for unknown variables in the end.
25313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25314
25315      # Check if the provided tool contains a complete path.
25316      tool_specified="$JAVA"
25317      tool_basename="${tool_specified##*/}"
25318      if test "x$tool_basename" = "x$tool_specified"; then
25319        # A command without a complete path is provided, search $PATH.
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25321$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25322        # Extract the first word of "$tool_basename", so it can be a program name with args.
25323set dummy $tool_basename; ac_word=$2
25324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25325$as_echo_n "checking for $ac_word... " >&6; }
25326if ${ac_cv_path_JAVA+:} false; then :
25327  $as_echo_n "(cached) " >&6
25328else
25329  case $JAVA in
25330  [\\/]* | ?:[\\/]*)
25331  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25332  ;;
25333  *)
25334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25335for as_dir in $PATH
25336do
25337  IFS=$as_save_IFS
25338  test -z "$as_dir" && as_dir=.
25339    for ac_exec_ext in '' $ac_executable_extensions; do
25340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25341    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25343    break 2
25344  fi
25345done
25346  done
25347IFS=$as_save_IFS
25348
25349  ;;
25350esac
25351fi
25352JAVA=$ac_cv_path_JAVA
25353if test -n "$JAVA"; then
25354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25355$as_echo "$JAVA" >&6; }
25356else
25357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25358$as_echo "no" >&6; }
25359fi
25360
25361
25362        if test "x$JAVA" = x; then
25363          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25364        fi
25365      else
25366        # Otherwise we believe it is a complete path. Use it as it is.
25367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25368$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25370$as_echo_n "checking for JAVA... " >&6; }
25371        if test ! -x "$tool_specified"; then
25372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25373$as_echo "not found" >&6; }
25374          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25375        fi
25376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25377$as_echo "$tool_specified" >&6; }
25378      fi
25379    fi
25380  fi
25381
25382
25383
25384  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25385
25386  # Publish this variable in the help.
25387
25388
25389  if test "x$JAVAC" = x; then
25390    # The variable is not set by user, try to locate tool using the code snippet
25391
25392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25393$as_echo_n "checking for javac in Boot JDK... " >&6; }
25394      JAVAC=$BOOT_JDK/bin/javac
25395      if test ! -x $JAVAC; then
25396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25397$as_echo "not found" >&6; }
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25399$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25400        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25401      fi
25402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25403$as_echo "ok" >&6; }
25404
25405
25406  else
25407    # The variable is set, but is it from the command line or the environment?
25408
25409    # Try to remove the string !JAVAC! from our list.
25410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25412      # If it failed, the variable was not from the command line. Ignore it,
25413      # but warn the user (except for BASH, which is always set by the calling BASH).
25414      if test "xJAVAC" != xBASH; then
25415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25416$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25417      fi
25418      # Try to locate tool using the code snippet
25419
25420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25421$as_echo_n "checking for javac in Boot JDK... " >&6; }
25422      JAVAC=$BOOT_JDK/bin/javac
25423      if test ! -x $JAVAC; then
25424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25425$as_echo "not found" >&6; }
25426        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25427$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25428        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25429      fi
25430      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25431$as_echo "ok" >&6; }
25432
25433
25434    else
25435      # If it succeeded, then it was overridden by the user. We will use it
25436      # for the tool.
25437
25438      # First remove it from the list of overridden variables, so we can test
25439      # for unknown variables in the end.
25440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25441
25442      # Check if the provided tool contains a complete path.
25443      tool_specified="$JAVAC"
25444      tool_basename="${tool_specified##*/}"
25445      if test "x$tool_basename" = "x$tool_specified"; then
25446        # A command without a complete path is provided, search $PATH.
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25448$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25449        # Extract the first word of "$tool_basename", so it can be a program name with args.
25450set dummy $tool_basename; ac_word=$2
25451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25452$as_echo_n "checking for $ac_word... " >&6; }
25453if ${ac_cv_path_JAVAC+:} false; then :
25454  $as_echo_n "(cached) " >&6
25455else
25456  case $JAVAC in
25457  [\\/]* | ?:[\\/]*)
25458  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25459  ;;
25460  *)
25461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25462for as_dir in $PATH
25463do
25464  IFS=$as_save_IFS
25465  test -z "$as_dir" && as_dir=.
25466    for ac_exec_ext in '' $ac_executable_extensions; do
25467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25468    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25470    break 2
25471  fi
25472done
25473  done
25474IFS=$as_save_IFS
25475
25476  ;;
25477esac
25478fi
25479JAVAC=$ac_cv_path_JAVAC
25480if test -n "$JAVAC"; then
25481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25482$as_echo "$JAVAC" >&6; }
25483else
25484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25485$as_echo "no" >&6; }
25486fi
25487
25488
25489        if test "x$JAVAC" = x; then
25490          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25491        fi
25492      else
25493        # Otherwise we believe it is a complete path. Use it as it is.
25494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25495$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25497$as_echo_n "checking for JAVAC... " >&6; }
25498        if test ! -x "$tool_specified"; then
25499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25500$as_echo "not found" >&6; }
25501          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25502        fi
25503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25504$as_echo "$tool_specified" >&6; }
25505      fi
25506    fi
25507  fi
25508
25509
25510
25511  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25512
25513  # Publish this variable in the help.
25514
25515
25516  if test "x$JAVAH" = x; then
25517    # The variable is not set by user, try to locate tool using the code snippet
25518
25519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25520$as_echo_n "checking for javah in Boot JDK... " >&6; }
25521      JAVAH=$BOOT_JDK/bin/javah
25522      if test ! -x $JAVAH; then
25523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25524$as_echo "not found" >&6; }
25525        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25526$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25527        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25528      fi
25529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25530$as_echo "ok" >&6; }
25531
25532
25533  else
25534    # The variable is set, but is it from the command line or the environment?
25535
25536    # Try to remove the string !JAVAH! from our list.
25537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25539      # If it failed, the variable was not from the command line. Ignore it,
25540      # but warn the user (except for BASH, which is always set by the calling BASH).
25541      if test "xJAVAH" != xBASH; then
25542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25543$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25544      fi
25545      # Try to locate tool using the code snippet
25546
25547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25548$as_echo_n "checking for javah in Boot JDK... " >&6; }
25549      JAVAH=$BOOT_JDK/bin/javah
25550      if test ! -x $JAVAH; then
25551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25552$as_echo "not found" >&6; }
25553        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25554$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25555        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25556      fi
25557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25558$as_echo "ok" >&6; }
25559
25560
25561    else
25562      # If it succeeded, then it was overridden by the user. We will use it
25563      # for the tool.
25564
25565      # First remove it from the list of overridden variables, so we can test
25566      # for unknown variables in the end.
25567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25568
25569      # Check if the provided tool contains a complete path.
25570      tool_specified="$JAVAH"
25571      tool_basename="${tool_specified##*/}"
25572      if test "x$tool_basename" = "x$tool_specified"; then
25573        # A command without a complete path is provided, search $PATH.
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25575$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25576        # Extract the first word of "$tool_basename", so it can be a program name with args.
25577set dummy $tool_basename; ac_word=$2
25578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25579$as_echo_n "checking for $ac_word... " >&6; }
25580if ${ac_cv_path_JAVAH+:} false; then :
25581  $as_echo_n "(cached) " >&6
25582else
25583  case $JAVAH in
25584  [\\/]* | ?:[\\/]*)
25585  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25586  ;;
25587  *)
25588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25589for as_dir in $PATH
25590do
25591  IFS=$as_save_IFS
25592  test -z "$as_dir" && as_dir=.
25593    for ac_exec_ext in '' $ac_executable_extensions; do
25594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25595    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25597    break 2
25598  fi
25599done
25600  done
25601IFS=$as_save_IFS
25602
25603  ;;
25604esac
25605fi
25606JAVAH=$ac_cv_path_JAVAH
25607if test -n "$JAVAH"; then
25608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25609$as_echo "$JAVAH" >&6; }
25610else
25611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25612$as_echo "no" >&6; }
25613fi
25614
25615
25616        if test "x$JAVAH" = x; then
25617          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25618        fi
25619      else
25620        # Otherwise we believe it is a complete path. Use it as it is.
25621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25622$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25624$as_echo_n "checking for JAVAH... " >&6; }
25625        if test ! -x "$tool_specified"; then
25626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25627$as_echo "not found" >&6; }
25628          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25629        fi
25630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25631$as_echo "$tool_specified" >&6; }
25632      fi
25633    fi
25634  fi
25635
25636
25637
25638  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25639
25640  # Publish this variable in the help.
25641
25642
25643  if test "x$JAR" = x; then
25644    # The variable is not set by user, try to locate tool using the code snippet
25645
25646      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25647$as_echo_n "checking for jar in Boot JDK... " >&6; }
25648      JAR=$BOOT_JDK/bin/jar
25649      if test ! -x $JAR; then
25650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25651$as_echo "not found" >&6; }
25652        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25653$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25654        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25655      fi
25656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25657$as_echo "ok" >&6; }
25658
25659
25660  else
25661    # The variable is set, but is it from the command line or the environment?
25662
25663    # Try to remove the string !JAR! from our list.
25664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25666      # If it failed, the variable was not from the command line. Ignore it,
25667      # but warn the user (except for BASH, which is always set by the calling BASH).
25668      if test "xJAR" != xBASH; then
25669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25670$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25671      fi
25672      # Try to locate tool using the code snippet
25673
25674      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25675$as_echo_n "checking for jar in Boot JDK... " >&6; }
25676      JAR=$BOOT_JDK/bin/jar
25677      if test ! -x $JAR; then
25678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25679$as_echo "not found" >&6; }
25680        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25681$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25682        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25683      fi
25684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25685$as_echo "ok" >&6; }
25686
25687
25688    else
25689      # If it succeeded, then it was overridden by the user. We will use it
25690      # for the tool.
25691
25692      # First remove it from the list of overridden variables, so we can test
25693      # for unknown variables in the end.
25694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25695
25696      # Check if the provided tool contains a complete path.
25697      tool_specified="$JAR"
25698      tool_basename="${tool_specified##*/}"
25699      if test "x$tool_basename" = "x$tool_specified"; then
25700        # A command without a complete path is provided, search $PATH.
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25702$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25703        # Extract the first word of "$tool_basename", so it can be a program name with args.
25704set dummy $tool_basename; ac_word=$2
25705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25706$as_echo_n "checking for $ac_word... " >&6; }
25707if ${ac_cv_path_JAR+:} false; then :
25708  $as_echo_n "(cached) " >&6
25709else
25710  case $JAR in
25711  [\\/]* | ?:[\\/]*)
25712  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25713  ;;
25714  *)
25715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25716for as_dir in $PATH
25717do
25718  IFS=$as_save_IFS
25719  test -z "$as_dir" && as_dir=.
25720    for ac_exec_ext in '' $ac_executable_extensions; do
25721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25722    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25724    break 2
25725  fi
25726done
25727  done
25728IFS=$as_save_IFS
25729
25730  ;;
25731esac
25732fi
25733JAR=$ac_cv_path_JAR
25734if test -n "$JAR"; then
25735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25736$as_echo "$JAR" >&6; }
25737else
25738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25739$as_echo "no" >&6; }
25740fi
25741
25742
25743        if test "x$JAR" = x; then
25744          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25745        fi
25746      else
25747        # Otherwise we believe it is a complete path. Use it as it is.
25748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25749$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25751$as_echo_n "checking for JAR... " >&6; }
25752        if test ! -x "$tool_specified"; then
25753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25754$as_echo "not found" >&6; }
25755          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25756        fi
25757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25758$as_echo "$tool_specified" >&6; }
25759      fi
25760    fi
25761  fi
25762
25763
25764
25765  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25766
25767  # Publish this variable in the help.
25768
25769
25770  if test "x$NATIVE2ASCII" = x; then
25771    # The variable is not set by user, try to locate tool using the code snippet
25772
25773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25774$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25775      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25776      if test ! -x $NATIVE2ASCII; then
25777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25778$as_echo "not found" >&6; }
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25780$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25781        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25782      fi
25783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25784$as_echo "ok" >&6; }
25785
25786
25787  else
25788    # The variable is set, but is it from the command line or the environment?
25789
25790    # Try to remove the string !NATIVE2ASCII! from our list.
25791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25793      # If it failed, the variable was not from the command line. Ignore it,
25794      # but warn the user (except for BASH, which is always set by the calling BASH).
25795      if test "xNATIVE2ASCII" != xBASH; then
25796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25797$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25798      fi
25799      # Try to locate tool using the code snippet
25800
25801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25802$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25803      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25804      if test ! -x $NATIVE2ASCII; then
25805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25806$as_echo "not found" >&6; }
25807        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25808$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25809        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25810      fi
25811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25812$as_echo "ok" >&6; }
25813
25814
25815    else
25816      # If it succeeded, then it was overridden by the user. We will use it
25817      # for the tool.
25818
25819      # First remove it from the list of overridden variables, so we can test
25820      # for unknown variables in the end.
25821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25822
25823      # Check if the provided tool contains a complete path.
25824      tool_specified="$NATIVE2ASCII"
25825      tool_basename="${tool_specified##*/}"
25826      if test "x$tool_basename" = "x$tool_specified"; then
25827        # A command without a complete path is provided, search $PATH.
25828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25829$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25830        # Extract the first word of "$tool_basename", so it can be a program name with args.
25831set dummy $tool_basename; ac_word=$2
25832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25833$as_echo_n "checking for $ac_word... " >&6; }
25834if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25835  $as_echo_n "(cached) " >&6
25836else
25837  case $NATIVE2ASCII in
25838  [\\/]* | ?:[\\/]*)
25839  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25840  ;;
25841  *)
25842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25843for as_dir in $PATH
25844do
25845  IFS=$as_save_IFS
25846  test -z "$as_dir" && as_dir=.
25847    for ac_exec_ext in '' $ac_executable_extensions; do
25848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25849    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25851    break 2
25852  fi
25853done
25854  done
25855IFS=$as_save_IFS
25856
25857  ;;
25858esac
25859fi
25860NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25861if test -n "$NATIVE2ASCII"; then
25862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25863$as_echo "$NATIVE2ASCII" >&6; }
25864else
25865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25866$as_echo "no" >&6; }
25867fi
25868
25869
25870        if test "x$NATIVE2ASCII" = x; then
25871          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25872        fi
25873      else
25874        # Otherwise we believe it is a complete path. Use it as it is.
25875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25876$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25877        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25878$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25879        if test ! -x "$tool_specified"; then
25880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25881$as_echo "not found" >&6; }
25882          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25883        fi
25884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25885$as_echo "$tool_specified" >&6; }
25886      fi
25887    fi
25888  fi
25889
25890
25891
25892  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25893
25894  # Publish this variable in the help.
25895
25896
25897  if test "x$JARSIGNER" = x; then
25898    # The variable is not set by user, try to locate tool using the code snippet
25899
25900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25901$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25902      JARSIGNER=$BOOT_JDK/bin/jarsigner
25903      if test ! -x $JARSIGNER; then
25904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25905$as_echo "not found" >&6; }
25906        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25907$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25908        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25909      fi
25910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25911$as_echo "ok" >&6; }
25912
25913
25914  else
25915    # The variable is set, but is it from the command line or the environment?
25916
25917    # Try to remove the string !JARSIGNER! from our list.
25918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25920      # If it failed, the variable was not from the command line. Ignore it,
25921      # but warn the user (except for BASH, which is always set by the calling BASH).
25922      if test "xJARSIGNER" != xBASH; then
25923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25924$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25925      fi
25926      # Try to locate tool using the code snippet
25927
25928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25929$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25930      JARSIGNER=$BOOT_JDK/bin/jarsigner
25931      if test ! -x $JARSIGNER; then
25932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25933$as_echo "not found" >&6; }
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25935$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25936        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25937      fi
25938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25939$as_echo "ok" >&6; }
25940
25941
25942    else
25943      # If it succeeded, then it was overridden by the user. We will use it
25944      # for the tool.
25945
25946      # First remove it from the list of overridden variables, so we can test
25947      # for unknown variables in the end.
25948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25949
25950      # Check if the provided tool contains a complete path.
25951      tool_specified="$JARSIGNER"
25952      tool_basename="${tool_specified##*/}"
25953      if test "x$tool_basename" = "x$tool_specified"; then
25954        # A command without a complete path is provided, search $PATH.
25955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25956$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25957        # Extract the first word of "$tool_basename", so it can be a program name with args.
25958set dummy $tool_basename; ac_word=$2
25959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25960$as_echo_n "checking for $ac_word... " >&6; }
25961if ${ac_cv_path_JARSIGNER+:} false; then :
25962  $as_echo_n "(cached) " >&6
25963else
25964  case $JARSIGNER in
25965  [\\/]* | ?:[\\/]*)
25966  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25967  ;;
25968  *)
25969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25970for as_dir in $PATH
25971do
25972  IFS=$as_save_IFS
25973  test -z "$as_dir" && as_dir=.
25974    for ac_exec_ext in '' $ac_executable_extensions; do
25975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25976    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25978    break 2
25979  fi
25980done
25981  done
25982IFS=$as_save_IFS
25983
25984  ;;
25985esac
25986fi
25987JARSIGNER=$ac_cv_path_JARSIGNER
25988if test -n "$JARSIGNER"; then
25989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25990$as_echo "$JARSIGNER" >&6; }
25991else
25992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25993$as_echo "no" >&6; }
25994fi
25995
25996
25997        if test "x$JARSIGNER" = x; then
25998          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25999        fi
26000      else
26001        # Otherwise we believe it is a complete path. Use it as it is.
26002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26003$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26005$as_echo_n "checking for JARSIGNER... " >&6; }
26006        if test ! -x "$tool_specified"; then
26007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26008$as_echo "not found" >&6; }
26009          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26010        fi
26011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26012$as_echo "$tool_specified" >&6; }
26013      fi
26014    fi
26015  fi
26016
26017
26018
26019  # Finally, set some other options...
26020
26021  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26022  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26023
26024
26025
26026
26027###############################################################################
26028#
26029# Configure the sources to use. We can add or override individual directories.
26030#
26031###############################################################################
26032
26033
26034  # Where are the sources. Any of these can be overridden
26035  # using --with-override-corba and the likes.
26036  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26037  CORBA_TOPDIR="$SRC_ROOT/corba"
26038  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26039  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26040  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26041  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26042  JDK_TOPDIR="$SRC_ROOT/jdk"
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053  ###############################################################################
26054  #
26055  # Pickup additional source for a component from outside of the source root
26056  # or override source for a component.
26057  #
26058
26059# Check whether --with-add-source-root was given.
26060if test "${with_add_source_root+set}" = set; then :
26061  withval=$with_add_source_root;
26062fi
26063
26064
26065
26066# Check whether --with-override-source-root was given.
26067if test "${with_override_source_root+set}" = set; then :
26068  withval=$with_override_source_root;
26069fi
26070
26071
26072
26073# Check whether --with-adds-and-overrides was given.
26074if test "${with_adds_and_overrides+set}" = set; then :
26075  withval=$with_adds_and_overrides;
26076fi
26077
26078
26079  if test "x$with_adds_and_overrides" != x; then
26080    with_add_source_root="$with_adds_and_overrides/adds"
26081    with_override_source_root="$with_adds_and_overrides/overrides"
26082  fi
26083
26084  if test "x$with_add_source_root" != x; then
26085    if ! test -d $with_add_source_root; then
26086      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26087    fi
26088    CURDIR="$PWD"
26089    cd "$with_add_source_root"
26090    ADD_SRC_ROOT="`pwd`"
26091    cd "$CURDIR"
26092    # Verify that the addon source root does not have any root makefiles.
26093    # If it does, then it is usually an error, prevent this.
26094    if test -f $with_add_source_root/langtools/make/Makefile; then
26095      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
26096    fi
26097    if test -f $with_add_source_root/corba/make/Makefile; then
26098      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
26099    fi
26100    if test -f $with_add_source_root/jaxp/make/Makefile; then
26101      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
26102    fi
26103    if test -f $with_add_source_root/jaxws/make/Makefile; then
26104      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
26105    fi
26106    if test -f $with_add_source_root/hotspot/make/Makefile; then
26107      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
26108    fi
26109    if test -f $with_add_source_root/nashorn/make/Makefile; then
26110      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
26111    fi
26112    if test -f $with_add_source_root/jdk/make/Makefile; then
26113      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
26114    fi
26115  fi
26116
26117
26118  if test "x$with_override_source_root" != x; then
26119    if ! test -d $with_override_source_root; then
26120      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26121    fi
26122    CURDIR="$PWD"
26123    cd "$with_override_source_root"
26124    OVERRIDE_SRC_ROOT="`pwd`"
26125    cd "$CURDIR"
26126    if test -f $with_override_source_root/langtools/make/Makefile; then
26127      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
26128    fi
26129    if test -f $with_override_source_root/corba/make/Makefile; then
26130      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
26131    fi
26132    if test -f $with_override_source_root/jaxp/make/Makefile; then
26133      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
26134    fi
26135    if test -f $with_override_source_root/jaxws/make/Makefile; then
26136      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
26137    fi
26138    if test -f $with_override_source_root/hotspot/make/Makefile; then
26139      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
26140    fi
26141    if test -f $with_override_source_root/nashorn/make/Makefile; then
26142      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
26143    fi
26144    if test -f $with_override_source_root/jdk/make/Makefile; then
26145      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
26146    fi
26147  fi
26148
26149
26150  ###############################################################################
26151  #
26152  # Override a repo completely, this is used for example when you have 3 small
26153  # development sandboxes of the langtools sources and want to avoid having 3 full
26154  # OpenJDK sources checked out on disk.
26155  #
26156  # Assuming that the 3 langtools sandboxes are located here:
26157  # /home/fredrik/sandbox1/langtools
26158  # /home/fredrik/sandbox2/langtools
26159  # /home/fredrik/sandbox3/langtools
26160  #
26161  # From the source root you create build subdirs manually:
26162  #     mkdir -p build1 build2 build3
26163  # in each build directory run:
26164  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26165  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26166  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26167  #
26168
26169
26170# Check whether --with-override-langtools was given.
26171if test "${with_override_langtools+set}" = set; then :
26172  withval=$with_override_langtools;
26173fi
26174
26175
26176
26177# Check whether --with-override-corba was given.
26178if test "${with_override_corba+set}" = set; then :
26179  withval=$with_override_corba;
26180fi
26181
26182
26183
26184# Check whether --with-override-jaxp was given.
26185if test "${with_override_jaxp+set}" = set; then :
26186  withval=$with_override_jaxp;
26187fi
26188
26189
26190
26191# Check whether --with-override-jaxws was given.
26192if test "${with_override_jaxws+set}" = set; then :
26193  withval=$with_override_jaxws;
26194fi
26195
26196
26197
26198# Check whether --with-override-hotspot was given.
26199if test "${with_override_hotspot+set}" = set; then :
26200  withval=$with_override_hotspot;
26201fi
26202
26203
26204
26205# Check whether --with-override-nashorn was given.
26206if test "${with_override_nashorn+set}" = set; then :
26207  withval=$with_override_nashorn;
26208fi
26209
26210
26211
26212# Check whether --with-override-jdk was given.
26213if test "${with_override_jdk+set}" = set; then :
26214  withval=$with_override_jdk;
26215fi
26216
26217
26218  if test "x$with_override_langtools" != x; then
26219    CURDIR="$PWD"
26220    cd "$with_override_langtools"
26221    LANGTOOLS_TOPDIR="`pwd`"
26222    cd "$CURDIR"
26223    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26224      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26225    fi
26226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26227$as_echo_n "checking if langtools should be overridden... " >&6; }
26228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26229$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26230  fi
26231  if test "x$with_override_corba" != x; then
26232    CURDIR="$PWD"
26233    cd "$with_override_corba"
26234    CORBA_TOPDIR="`pwd`"
26235    cd "$CURDIR"
26236    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26237      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26238    fi
26239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26240$as_echo_n "checking if corba should be overridden... " >&6; }
26241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26242$as_echo "yes with $CORBA_TOPDIR" >&6; }
26243  fi
26244  if test "x$with_override_jaxp" != x; then
26245    CURDIR="$PWD"
26246    cd "$with_override_jaxp"
26247    JAXP_TOPDIR="`pwd`"
26248    cd "$CURDIR"
26249    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26250      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26251    fi
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26253$as_echo_n "checking if jaxp should be overridden... " >&6; }
26254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26255$as_echo "yes with $JAXP_TOPDIR" >&6; }
26256  fi
26257  if test "x$with_override_jaxws" != x; then
26258    CURDIR="$PWD"
26259    cd "$with_override_jaxws"
26260    JAXWS_TOPDIR="`pwd`"
26261    cd "$CURDIR"
26262    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26263      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26264    fi
26265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26266$as_echo_n "checking if jaxws should be overridden... " >&6; }
26267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26268$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26269  fi
26270  if test "x$with_override_hotspot" != x; then
26271    CURDIR="$PWD"
26272    cd "$with_override_hotspot"
26273    HOTSPOT_TOPDIR="`pwd`"
26274    cd "$CURDIR"
26275    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26276      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26277    fi
26278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26279$as_echo_n "checking if hotspot should be overridden... " >&6; }
26280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26281$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26282  fi
26283  if test "x$with_override_nashorn" != x; then
26284    CURDIR="$PWD"
26285    cd "$with_override_nashorn"
26286    NASHORN_TOPDIR="`pwd`"
26287    cd "$CURDIR"
26288    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26289      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26290    fi
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26292$as_echo_n "checking if nashorn should be overridden... " >&6; }
26293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26294$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26295  fi
26296  if test "x$with_override_jdk" != x; then
26297    CURDIR="$PWD"
26298    cd "$with_override_jdk"
26299    JDK_TOPDIR="`pwd`"
26300    cd "$CURDIR"
26301    if ! test -f $JDK_TOPDIR/make/Makefile; then
26302      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26303    fi
26304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26305$as_echo_n "checking if JDK should be overridden... " >&6; }
26306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26307$as_echo "yes with $JDK_TOPDIR" >&6; }
26308  fi
26309
26310
26311  BUILD_OUTPUT="$OUTPUT_ROOT"
26312
26313
26314  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26315  BUILD_HOTSPOT=true
26316
26317
26318
26319# Check whether --with-import-hotspot was given.
26320if test "${with_import_hotspot+set}" = set; then :
26321  withval=$with_import_hotspot;
26322fi
26323
26324  if test "x$with_import_hotspot" != x; then
26325    CURDIR="$PWD"
26326    cd "$with_import_hotspot"
26327    HOTSPOT_DIST="`pwd`"
26328    cd "$CURDIR"
26329    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26330      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26331    fi
26332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26333$as_echo_n "checking if hotspot should be imported... " >&6; }
26334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26335$as_echo "yes from $HOTSPOT_DIST" >&6; }
26336    BUILD_HOTSPOT=false
26337  fi
26338
26339  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26340
26341
26342###############################################################################
26343#
26344# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26345# native code.
26346#
26347###############################################################################
26348
26349# First determine the toolchain type (compiler family)
26350
26351
26352# Check whether --with-toolchain-type was given.
26353if test "${with_toolchain_type+set}" = set; then :
26354  withval=$with_toolchain_type;
26355fi
26356
26357
26358  # Use indirect variable referencing
26359  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26360  VALID_TOOLCHAINS=${!toolchain_var_name}
26361
26362  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26363    if test -n "$XCODEBUILD"; then
26364      # On Mac OS X, default toolchain to clang after Xcode 5
26365      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26366      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26367      if test $? -ne 0; then
26368        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26369      fi
26370      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26371          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26372          $CUT -f 1 -d .`
26373      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26374$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26375      if test $XCODE_MAJOR_VERSION -ge 5; then
26376          DEFAULT_TOOLCHAIN="clang"
26377      else
26378          DEFAULT_TOOLCHAIN="gcc"
26379      fi
26380    else
26381      # If Xcode is not installed, but the command line tools are
26382      # then we can't run xcodebuild. On these systems we should
26383      # default to clang
26384      DEFAULT_TOOLCHAIN="clang"
26385    fi
26386  else
26387    # First toolchain type in the list is the default
26388    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26389  fi
26390
26391  if test "x$with_toolchain_type" = xlist; then
26392    # List all toolchains
26393    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26394$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26395    for toolchain in $VALID_TOOLCHAINS; do
26396      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26397      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26398      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26399    done
26400
26401    exit 0
26402  elif test "x$with_toolchain_type" != x; then
26403    # User override; check that it is valid
26404    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26405      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26406$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26407      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26408$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26409      as_fn_error $? "Cannot continue." "$LINENO" 5
26410    fi
26411    TOOLCHAIN_TYPE=$with_toolchain_type
26412  else
26413    # No flag given, use default
26414    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26415  fi
26416
26417
26418  TOOLCHAIN_CC_BINARY_clang="clang"
26419  TOOLCHAIN_CC_BINARY_gcc="gcc"
26420  TOOLCHAIN_CC_BINARY_microsoft="cl"
26421  TOOLCHAIN_CC_BINARY_solstudio="cc"
26422  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26423
26424  TOOLCHAIN_CXX_BINARY_clang="clang++"
26425  TOOLCHAIN_CXX_BINARY_gcc="g++"
26426  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26427  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26428  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26429
26430  # Use indirect variable referencing
26431  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26432  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26433  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26434  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26435  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26436  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26437
26438
26439  # Define filename patterns
26440  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26441    LIBRARY_PREFIX=
26442    SHARED_LIBRARY_SUFFIX='.dll'
26443    STATIC_LIBRARY_SUFFIX='.lib'
26444    SHARED_LIBRARY='$1.dll'
26445    STATIC_LIBRARY='$1.lib'
26446    OBJ_SUFFIX='.obj'
26447    EXE_SUFFIX='.exe'
26448  else
26449    LIBRARY_PREFIX=lib
26450    SHARED_LIBRARY_SUFFIX='.so'
26451    STATIC_LIBRARY_SUFFIX='.a'
26452    SHARED_LIBRARY='lib$1.so'
26453    STATIC_LIBRARY='lib$1.a'
26454    OBJ_SUFFIX='.o'
26455    EXE_SUFFIX=''
26456    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26457      SHARED_LIBRARY='lib$1.dylib'
26458      SHARED_LIBRARY_SUFFIX='.dylib'
26459    fi
26460  fi
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26472    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26473$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26474  else
26475    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26476$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26477  fi
26478
26479
26480# Then detect the actual binaries needed
26481
26482  # FIXME: Is this needed?
26483  ac_ext=cpp
26484ac_cpp='$CXXCPP $CPPFLAGS'
26485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26488
26489
26490  # Store the CFLAGS etc passed to the configure script.
26491  ORG_CFLAGS="$CFLAGS"
26492  ORG_CXXFLAGS="$CXXFLAGS"
26493  ORG_OBJCFLAGS="$OBJCFLAGS"
26494
26495  # On Windows, we need to detect the visual studio installation first.
26496  # This will change the PATH, but we need to keep that new PATH even
26497  # after toolchain detection is done, since the compiler (on x86) uses
26498  # it for DLL resolution in runtime.
26499  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26500
26501  # Store path to cygwin link.exe to help excluding it when searching for
26502  # VS linker. This must be done before changing the PATH when looking for VS.
26503  # Extract the first word of "link", so it can be a program name with args.
26504set dummy link; ac_word=$2
26505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26506$as_echo_n "checking for $ac_word... " >&6; }
26507if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26508  $as_echo_n "(cached) " >&6
26509else
26510  case $CYGWIN_LINK in
26511  [\\/]* | ?:[\\/]*)
26512  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26513  ;;
26514  *)
26515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26516for as_dir in $PATH
26517do
26518  IFS=$as_save_IFS
26519  test -z "$as_dir" && as_dir=.
26520    for ac_exec_ext in '' $ac_executable_extensions; do
26521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26522    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26524    break 2
26525  fi
26526done
26527  done
26528IFS=$as_save_IFS
26529
26530  ;;
26531esac
26532fi
26533CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26534if test -n "$CYGWIN_LINK"; then
26535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26536$as_echo "$CYGWIN_LINK" >&6; }
26537else
26538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26539$as_echo "no" >&6; }
26540fi
26541
26542
26543  if test "x$CYGWIN_LINK" != x; then
26544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26545$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26546    "$CYGWIN_LINK" --version > /dev/null
26547    if test $? -eq 0 ; then
26548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26549$as_echo "yes" >&6; }
26550    else
26551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26552$as_echo "no" >&6; }
26553      # This might be the VS linker. Don't exclude it later on.
26554      CYGWIN_LINK=""
26555    fi
26556  fi
26557
26558  # First-hand choice is to locate and run the vsvars bat file.
26559
26560
26561# Check whether --with-toolchain-version was given.
26562if test "${with_toolchain_version+set}" = set; then :
26563  withval=$with_toolchain_version;
26564fi
26565
26566
26567  if test "x$with_toolchain_version" = xlist; then
26568    # List all toolchains
26569    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26570$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26571    for version in $VALID_VS_VERSIONS; do
26572      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26573      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26574    done
26575
26576    exit 0
26577  elif test "x$with_toolchain_version" != x; then
26578    # User override; check that it is valid
26579    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26580      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26581$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26582      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26583$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26584      as_fn_error $? "Cannot continue." "$LINENO" 5
26585    fi
26586    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26587  else
26588    # No flag given, use default
26589    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26590  fi
26591
26592  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26593
26594  VS_VERSION="$VS_VERSION"
26595  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26596  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26597  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26598  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26599
26600  # When using --with-tools-dir, assume it points to the correct and default
26601  # version of Visual Studio or that --with-toolchain-version was also set.
26602  if test "x$with_tools_dir" != x; then
26603
26604  if test "x$VS_ENV_CMD" = x; then
26605    VS_VERSION="${VS_VERSION}"
26606    VS_BASE="$with_tools_dir/../.."
26607    METHOD="--with-tools-dir"
26608
26609    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26610      VCVARSFILE="vc/bin/vcvars32.bat"
26611    else
26612      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26613    fi
26614
26615
26616  windows_path="$VS_BASE"
26617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26618    unix_path=`$CYGPATH -u "$windows_path"`
26619    VS_BASE="$unix_path"
26620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26622    VS_BASE="$unix_path"
26623  fi
26624
26625    if test -d "$VS_BASE"; then
26626      if test -f "$VS_BASE/$VCVARSFILE"; then
26627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26628$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26629        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26630        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26631        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26632        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26633      else
26634        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26635$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26636        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26637$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26638      fi
26639    fi
26640  fi
26641
26642
26643  if test "x$VS_ENV_CMD" = x; then
26644    VS_VERSION="${VS_VERSION}"
26645    VS_BASE="$with_tools_dir/../../.."
26646    METHOD="--with-tools-dir"
26647
26648    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26649      VCVARSFILE="vc/bin/vcvars32.bat"
26650    else
26651      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26652    fi
26653
26654
26655  windows_path="$VS_BASE"
26656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26657    unix_path=`$CYGPATH -u "$windows_path"`
26658    VS_BASE="$unix_path"
26659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26661    VS_BASE="$unix_path"
26662  fi
26663
26664    if test -d "$VS_BASE"; then
26665      if test -f "$VS_BASE/$VCVARSFILE"; then
26666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26667$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26668        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26669        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26670        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26671        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26672      else
26673        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26674$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26675        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26676$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26677      fi
26678    fi
26679  fi
26680
26681    if test "x$VS_ENV_CMD" = x; then
26682      # Having specified an argument which is incorrect will produce an instant failure;
26683      # we should not go on looking
26684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26685$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26686      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26687$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26688      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26689$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26690      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26691    fi
26692  fi
26693
26694  VS_ENV_CMD=""
26695  VS_ENV_ARGS=""
26696
26697  if test "x$VS_COMNTOOLS" != x; then
26698
26699  if test "x$VS_ENV_CMD" = x; then
26700    VS_VERSION="${VS_VERSION}"
26701    VS_BASE="$VS_COMNTOOLS/../.."
26702    METHOD="$VS_COMNTOOLS_VAR variable"
26703
26704    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26705      VCVARSFILE="vc/bin/vcvars32.bat"
26706    else
26707      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26708    fi
26709
26710
26711  windows_path="$VS_BASE"
26712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26713    unix_path=`$CYGPATH -u "$windows_path"`
26714    VS_BASE="$unix_path"
26715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26717    VS_BASE="$unix_path"
26718  fi
26719
26720    if test -d "$VS_BASE"; then
26721      if test -f "$VS_BASE/$VCVARSFILE"; then
26722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26723$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26724        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26725        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26726        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26727        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26728      else
26729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26730$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26732$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26733      fi
26734    fi
26735  fi
26736
26737  fi
26738  if test "x$PROGRAMFILES" != x; then
26739
26740  if test "x$VS_ENV_CMD" = x; then
26741    VS_VERSION="${VS_VERSION}"
26742    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26743    METHOD="well-known name"
26744
26745    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26746      VCVARSFILE="vc/bin/vcvars32.bat"
26747    else
26748      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26749    fi
26750
26751
26752  windows_path="$VS_BASE"
26753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26754    unix_path=`$CYGPATH -u "$windows_path"`
26755    VS_BASE="$unix_path"
26756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26758    VS_BASE="$unix_path"
26759  fi
26760
26761    if test -d "$VS_BASE"; then
26762      if test -f "$VS_BASE/$VCVARSFILE"; then
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26764$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26765        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26766        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26767        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26768        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26769      else
26770        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26771$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26772        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26773$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26774      fi
26775    fi
26776  fi
26777
26778  fi
26779  # Work around the insanely named ProgramFiles(x86) env variable
26780  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26781  if test "x$PROGRAMFILES_X86" != x; then
26782
26783  if test "x$VS_ENV_CMD" = x; then
26784    VS_VERSION="${VS_VERSION}"
26785    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26786    METHOD="well-known name"
26787
26788    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26789      VCVARSFILE="vc/bin/vcvars32.bat"
26790    else
26791      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26792    fi
26793
26794
26795  windows_path="$VS_BASE"
26796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26797    unix_path=`$CYGPATH -u "$windows_path"`
26798    VS_BASE="$unix_path"
26799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26801    VS_BASE="$unix_path"
26802  fi
26803
26804    if test -d "$VS_BASE"; then
26805      if test -f "$VS_BASE/$VCVARSFILE"; then
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26807$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26808        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26809        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26810        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26811        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26812      else
26813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26814$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26815        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26816$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26817      fi
26818    fi
26819  fi
26820
26821  fi
26822
26823  if test "x$VS_ENV_CMD" = x; then
26824    VS_VERSION="${VS_VERSION}"
26825    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26826    METHOD="well-known name"
26827
26828    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26829      VCVARSFILE="vc/bin/vcvars32.bat"
26830    else
26831      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26832    fi
26833
26834
26835  windows_path="$VS_BASE"
26836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26837    unix_path=`$CYGPATH -u "$windows_path"`
26838    VS_BASE="$unix_path"
26839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26841    VS_BASE="$unix_path"
26842  fi
26843
26844    if test -d "$VS_BASE"; then
26845      if test -f "$VS_BASE/$VCVARSFILE"; then
26846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26847$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26848        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26849        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26850        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26851        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26852      else
26853        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26854$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26855        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26856$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26857      fi
26858    fi
26859  fi
26860
26861
26862  if test "x$VS_ENV_CMD" = x; then
26863    VS_VERSION="${VS_VERSION}"
26864    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
26865    METHOD="well-known name"
26866
26867    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26868      VCVARSFILE="vc/bin/vcvars32.bat"
26869    else
26870      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26871    fi
26872
26873
26874  windows_path="$VS_BASE"
26875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26876    unix_path=`$CYGPATH -u "$windows_path"`
26877    VS_BASE="$unix_path"
26878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26880    VS_BASE="$unix_path"
26881  fi
26882
26883    if test -d "$VS_BASE"; then
26884      if test -f "$VS_BASE/$VCVARSFILE"; then
26885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26886$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26887        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26888        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26889        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26890        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26891      else
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26893$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26895$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26896      fi
26897    fi
26898  fi
26899
26900
26901  if test "x$SDK_INSTALL_DIR" != x; then
26902    if test "x$ProgramW6432" != x; then
26903
26904  if test "x$VS_ENV_CMD" = x; then
26905    VS_VERSION="${VS_VERSION}"
26906    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
26907    METHOD="well-known name"
26908
26909  windows_path="$WIN_SDK_BASE"
26910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26911    unix_path=`$CYGPATH -u "$windows_path"`
26912    WIN_SDK_BASE="$unix_path"
26913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26915    WIN_SDK_BASE="$unix_path"
26916  fi
26917
26918    if test -d "$WIN_SDK_BASE"; then
26919      # There have been cases of partial or broken SDK installations. A missing
26920      # lib dir is not going to work.
26921      if test ! -d "$WIN_SDK_BASE/lib"; then
26922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26923$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26924        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26925$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26926      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26928$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26929        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26930        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26931          VS_ENV_ARGS="/x86"
26932        else
26933          VS_ENV_ARGS="/x64"
26934        fi
26935        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26936        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26937        # TODO: improve detection for other versions of SDK
26938        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26939      else
26940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26941$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26942        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26943$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26944      fi
26945    fi
26946  fi
26947
26948    fi
26949    if test "x$PROGRAMW6432" != x; then
26950
26951  if test "x$VS_ENV_CMD" = x; then
26952    VS_VERSION="${VS_VERSION}"
26953    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26954    METHOD="well-known name"
26955
26956  windows_path="$WIN_SDK_BASE"
26957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26958    unix_path=`$CYGPATH -u "$windows_path"`
26959    WIN_SDK_BASE="$unix_path"
26960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26962    WIN_SDK_BASE="$unix_path"
26963  fi
26964
26965    if test -d "$WIN_SDK_BASE"; then
26966      # There have been cases of partial or broken SDK installations. A missing
26967      # lib dir is not going to work.
26968      if test ! -d "$WIN_SDK_BASE/lib"; then
26969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26970$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26971        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26972$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26973      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26975$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26976        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26977        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26978          VS_ENV_ARGS="/x86"
26979        else
26980          VS_ENV_ARGS="/x64"
26981        fi
26982        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26983        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26984        # TODO: improve detection for other versions of SDK
26985        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26986      else
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26988$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26989        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26990$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26991      fi
26992    fi
26993  fi
26994
26995    fi
26996    if test "x$PROGRAMFILES" != x; then
26997
26998  if test "x$VS_ENV_CMD" = x; then
26999    VS_VERSION="${VS_VERSION}"
27000    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27001    METHOD="well-known name"
27002
27003  windows_path="$WIN_SDK_BASE"
27004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27005    unix_path=`$CYGPATH -u "$windows_path"`
27006    WIN_SDK_BASE="$unix_path"
27007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27009    WIN_SDK_BASE="$unix_path"
27010  fi
27011
27012    if test -d "$WIN_SDK_BASE"; then
27013      # There have been cases of partial or broken SDK installations. A missing
27014      # lib dir is not going to work.
27015      if test ! -d "$WIN_SDK_BASE/lib"; then
27016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27017$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27019$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27020      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27023        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27024        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27025          VS_ENV_ARGS="/x86"
27026        else
27027          VS_ENV_ARGS="/x64"
27028        fi
27029        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27030        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27031        # TODO: improve detection for other versions of SDK
27032        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27033      else
27034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27035$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27036        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27037$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27038      fi
27039    fi
27040  fi
27041
27042    fi
27043
27044  if test "x$VS_ENV_CMD" = x; then
27045    VS_VERSION="${VS_VERSION}"
27046    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27047    METHOD="well-known name"
27048
27049  windows_path="$WIN_SDK_BASE"
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051    unix_path=`$CYGPATH -u "$windows_path"`
27052    WIN_SDK_BASE="$unix_path"
27053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055    WIN_SDK_BASE="$unix_path"
27056  fi
27057
27058    if test -d "$WIN_SDK_BASE"; then
27059      # There have been cases of partial or broken SDK installations. A missing
27060      # lib dir is not going to work.
27061      if test ! -d "$WIN_SDK_BASE/lib"; then
27062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27064        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27065$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27066      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27069        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27070        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27071          VS_ENV_ARGS="/x86"
27072        else
27073          VS_ENV_ARGS="/x64"
27074        fi
27075        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27076        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27077        # TODO: improve detection for other versions of SDK
27078        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27079      else
27080        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27081$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27082        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27083$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27084      fi
27085    fi
27086  fi
27087
27088
27089  if test "x$VS_ENV_CMD" = x; then
27090    VS_VERSION="${VS_VERSION}"
27091    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27092    METHOD="well-known name"
27093
27094  windows_path="$WIN_SDK_BASE"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    WIN_SDK_BASE="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    WIN_SDK_BASE="$unix_path"
27101  fi
27102
27103    if test -d "$WIN_SDK_BASE"; then
27104      # There have been cases of partial or broken SDK installations. A missing
27105      # lib dir is not going to work.
27106      if test ! -d "$WIN_SDK_BASE/lib"; then
27107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27108$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27110$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27111      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27113$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27114        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27115        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27116          VS_ENV_ARGS="/x86"
27117        else
27118          VS_ENV_ARGS="/x64"
27119        fi
27120        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27121        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27122        # TODO: improve detection for other versions of SDK
27123        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27124      else
27125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27128$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27129      fi
27130    fi
27131  fi
27132
27133  fi
27134
27135    if test "x$VS_ENV_CMD" != x; then
27136      TOOLCHAIN_VERSION=$VS_VERSION
27137      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27138      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27139      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27140      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27141      # The rest of the variables are already evaled while probing
27142      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27143$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27144      break
27145    fi
27146  done
27147
27148
27149  if test "x$VS_ENV_CMD" != x; then
27150    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27151
27152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27153
27154  # First separate the path from the arguments. This will split at the first
27155  # space.
27156  complete="$VS_ENV_CMD"
27157  path="${complete%% *}"
27158  tmp="$complete EOL"
27159  arguments="${tmp#* }"
27160
27161  # Input might be given as Windows format, start by converting to
27162  # unix format.
27163  new_path=`$CYGPATH -u "$path"`
27164
27165  # Now try to locate executable using which
27166  new_path=`$WHICH "$new_path" 2> /dev/null`
27167  # bat and cmd files are not always considered executable in cygwin causing which
27168  # to not find them
27169  if test "x$new_path" = x \
27170      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27171      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27172    new_path=`$CYGPATH -u "$path"`
27173  fi
27174  if test "x$new_path" = x; then
27175    # Oops. Which didn't find the executable.
27176    # The splitting of arguments from the executable at a space might have been incorrect,
27177    # since paths with space are more likely in Windows. Give it another try with the whole
27178    # argument.
27179    path="$complete"
27180    arguments="EOL"
27181    new_path=`$CYGPATH -u "$path"`
27182    new_path=`$WHICH "$new_path" 2> /dev/null`
27183    # bat and cmd files are not always considered executable in cygwin causing which
27184    # to not find them
27185    if test "x$new_path" = x \
27186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27188      new_path=`$CYGPATH -u "$path"`
27189    fi
27190    if test "x$new_path" = x; then
27191      # It's still not found. Now this is an unrecoverable error.
27192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27193$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27194      has_space=`$ECHO "$complete" | $GREP " "`
27195      if test "x$has_space" != x; then
27196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27198      fi
27199      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27200    fi
27201  fi
27202
27203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27206  # "foo.exe" is OK but "foo" is an error.
27207  #
27208  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27209  # It is also a way to make sure we got the proper file name for the real test later on.
27210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27211  if test "x$test_shortpath" = x; then
27212    # Short path failed, file does not exist as specified.
27213    # Try adding .exe or .cmd
27214    if test -f "${new_path}.exe"; then
27215      input_to_shortpath="${new_path}.exe"
27216    elif test -f "${new_path}.cmd"; then
27217      input_to_shortpath="${new_path}.cmd"
27218    else
27219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27220$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27223      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27224    fi
27225  else
27226    input_to_shortpath="$new_path"
27227  fi
27228
27229  # Call helper function which possibly converts this using DOS-style short mode.
27230  # If so, the updated path is stored in $new_path.
27231  new_path="$input_to_shortpath"
27232
27233  input_path="$input_to_shortpath"
27234  # Check if we need to convert this using DOS-style short mode. If the path
27235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27236  # take no chances and rewrite it.
27237  # Note: m4 eats our [], so we need to use [ and ] instead.
27238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27239  if test "x$has_forbidden_chars" != x; then
27240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27244      # Going to short mode and back again did indeed matter. Since short mode is
27245      # case insensitive, let's make it lowercase to improve readability.
27246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27247      # Now convert it back to Unix-stile (cygpath)
27248      input_path=`$CYGPATH -u "$shortmode_path"`
27249      new_path="$input_path"
27250    fi
27251  fi
27252
27253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27254  if test "x$test_cygdrive_prefix" = x; then
27255    # As a simple fix, exclude /usr/bin since it's not a real path.
27256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27258      # a path prefixed by /cygdrive for fixpath to work.
27259      new_path="$CYGWIN_ROOT_PATH$input_path"
27260    fi
27261  fi
27262
27263  # remove trailing .exe if any
27264  new_path="${new_path/%.exe/}"
27265
27266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27267
27268  # First separate the path from the arguments. This will split at the first
27269  # space.
27270  complete="$VS_ENV_CMD"
27271  path="${complete%% *}"
27272  tmp="$complete EOL"
27273  arguments="${tmp#* }"
27274
27275  # Input might be given as Windows format, start by converting to
27276  # unix format.
27277  new_path="$path"
27278
27279  windows_path="$new_path"
27280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27281    unix_path=`$CYGPATH -u "$windows_path"`
27282    new_path="$unix_path"
27283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27285    new_path="$unix_path"
27286  fi
27287
27288
27289  # Now try to locate executable using which
27290  new_path=`$WHICH "$new_path" 2> /dev/null`
27291
27292  if test "x$new_path" = x; then
27293    # Oops. Which didn't find the executable.
27294    # The splitting of arguments from the executable at a space might have been incorrect,
27295    # since paths with space are more likely in Windows. Give it another try with the whole
27296    # argument.
27297    path="$complete"
27298    arguments="EOL"
27299    new_path="$path"
27300
27301  windows_path="$new_path"
27302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27303    unix_path=`$CYGPATH -u "$windows_path"`
27304    new_path="$unix_path"
27305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27307    new_path="$unix_path"
27308  fi
27309
27310
27311    new_path=`$WHICH "$new_path" 2> /dev/null`
27312    # bat and cmd files are not always considered executable in MSYS causing which
27313    # to not find them
27314    if test "x$new_path" = x \
27315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27317      new_path="$path"
27318
27319  windows_path="$new_path"
27320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27321    unix_path=`$CYGPATH -u "$windows_path"`
27322    new_path="$unix_path"
27323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27325    new_path="$unix_path"
27326  fi
27327
27328    fi
27329
27330    if test "x$new_path" = x; then
27331      # It's still not found. Now this is an unrecoverable error.
27332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27333$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27334      has_space=`$ECHO "$complete" | $GREP " "`
27335      if test "x$has_space" != x; then
27336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27338      fi
27339      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27340    fi
27341  fi
27342
27343  # Now new_path has a complete unix path to the binary
27344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27345    # Keep paths in /bin as-is, but remove trailing .exe if any
27346    new_path="${new_path/%.exe/}"
27347    # Do not save /bin paths to all_fixpath_prefixes!
27348  else
27349    # Not in mixed or Windows style, start by that.
27350    new_path=`cmd //c echo $new_path`
27351
27352  input_path="$new_path"
27353  # Check if we need to convert this using DOS-style short mode. If the path
27354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27355  # take no chances and rewrite it.
27356  # Note: m4 eats our [], so we need to use [ and ] instead.
27357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27358  if test "x$has_forbidden_chars" != x; then
27359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27361  fi
27362
27363    # Output is in $new_path
27364
27365  windows_path="$new_path"
27366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27367    unix_path=`$CYGPATH -u "$windows_path"`
27368    new_path="$unix_path"
27369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27371    new_path="$unix_path"
27372  fi
27373
27374    # remove trailing .exe if any
27375    new_path="${new_path/%.exe/}"
27376
27377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27379  fi
27380
27381  else
27382    # We're on a unix platform. Hooray! :)
27383    # First separate the path from the arguments. This will split at the first
27384    # space.
27385    complete="$VS_ENV_CMD"
27386    path="${complete%% *}"
27387    tmp="$complete EOL"
27388    arguments="${tmp#* }"
27389
27390    # Cannot rely on the command "which" here since it doesn't always work.
27391    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27392    if test -z "$is_absolute_path"; then
27393      # Path to executable is not absolute. Find it.
27394      IFS_save="$IFS"
27395      IFS=:
27396      for p in $PATH; do
27397        if test -f "$p/$path" && test -x "$p/$path"; then
27398          new_path="$p/$path"
27399          break
27400        fi
27401      done
27402      IFS="$IFS_save"
27403    else
27404      # This is an absolute path, we can use it without further modifications.
27405      new_path="$path"
27406    fi
27407
27408    if test "x$new_path" = x; then
27409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27410$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27411      has_space=`$ECHO "$complete" | $GREP " "`
27412      if test "x$has_space" != x; then
27413        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27415      fi
27416      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27417    fi
27418  fi
27419
27420  # Now join together the path and the arguments once again
27421  if test "x$arguments" != xEOL; then
27422    new_complete="$new_path ${arguments% *}"
27423  else
27424    new_complete="$new_path"
27425  fi
27426
27427  if test "x$complete" != "x$new_complete"; then
27428    VS_ENV_CMD="$new_complete"
27429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27430$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27431  fi
27432
27433
27434    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27435    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27436$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27437
27438    # We need to create a couple of temporary files.
27439    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27440    $MKDIR -p $VS_ENV_TMP_DIR
27441
27442    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27443    # Instead create a shell script which will set the relevant variables when run.
27444    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27445
27446  unix_path="$WINPATH_VS_ENV_CMD"
27447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27448    windows_path=`$CYGPATH -m "$unix_path"`
27449    WINPATH_VS_ENV_CMD="$windows_path"
27450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27451    windows_path=`cmd //c echo $unix_path`
27452    WINPATH_VS_ENV_CMD="$windows_path"
27453  fi
27454
27455    WINPATH_BASH="$BASH"
27456
27457  unix_path="$WINPATH_BASH"
27458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27459    windows_path=`$CYGPATH -m "$unix_path"`
27460    WINPATH_BASH="$windows_path"
27461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27462    windows_path=`cmd //c echo $unix_path`
27463    WINPATH_BASH="$windows_path"
27464  fi
27465
27466
27467    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27468    # script (executable by bash) that will setup the important variables.
27469    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27470    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27471    # This will end up something like:
27472    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27473    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27474    # These will end up something like:
27475    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27476    # The trailing space for everyone except PATH is no typo, but is needed due
27477    # to trailing \ in the Windows paths. These will be stripped later.
27478    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27479    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27480    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27481    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27482    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27483    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27484
27485    # Now execute the newly created bat file.
27486    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27487    # Change directory so we don't need to mess with Windows paths in redirects.
27488    cd $VS_ENV_TMP_DIR
27489    cmd /c extract-vs-env.bat | $CAT
27490    cd $CURDIR
27491
27492    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27493      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27494$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27495      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27496$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27497      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27498$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27499      as_fn_error $? "Cannot continue" "$LINENO" 5
27500    fi
27501
27502    # Now set all paths and other env variables. This will allow the rest of
27503    # the configure script to find and run the compiler in the proper way.
27504    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27505$as_echo "$as_me: Setting extracted environment variables" >&6;}
27506    . $VS_ENV_TMP_DIR/set-vs-env.sh
27507    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27508    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27509  else
27510    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27511    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27512$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27513  fi
27514
27515  # At this point, we should have correct variables in the environment, or we can't continue.
27516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27517$as_echo_n "checking for Visual Studio variables... " >&6; }
27518
27519  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27520    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27522$as_echo "present but broken" >&6; }
27523      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27524    else
27525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27526$as_echo "ok" >&6; }
27527      # Remove any trailing "\" and " " from the variables.
27528      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27529      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27530      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27531      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27532      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27533      # Remove any paths containing # (typically F#) as that messes up make. This
27534      # is needed if visual studio was installed with F# support.
27535      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27536
27537
27538
27539
27540    fi
27541  else
27542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27543$as_echo "not found" >&6; }
27544
27545    if test "x$VS_ENV_CMD" = x; then
27546      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27547$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27548      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27549$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27550    else
27551      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27552$as_echo "$as_me: Running the extraction script failed." >&6;}
27553    fi
27554    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27555$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27556    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27557$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27558    as_fn_error $? "Cannot continue" "$LINENO" 5
27559  fi
27560
27561    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27562    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27563    PATH="$VS_PATH"
27564    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27565    export INCLUDE="$VS_INCLUDE"
27566    export LIB="$VS_LIB"
27567  fi
27568
27569  # autoconf magic only relies on PATH, so update it if tools dir is specified
27570  OLD_PATH="$PATH"
27571
27572  # For solaris we really need solaris tools, and not the GNU equivalent.
27573  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27574  # so add that to path before starting to probe.
27575  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27576  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27577    PATH="/usr/ccs/bin:$PATH"
27578  fi
27579
27580  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27581  # override all other locations.
27582  if test "x$TOOLCHAIN_PATH" != x; then
27583    PATH=$TOOLCHAIN_PATH:$PATH
27584  fi
27585
27586
27587  #
27588  # Setup the compilers (CC and CXX)
27589  #
27590
27591  COMPILER_NAME=C
27592  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27593
27594  if test "x$CC" != x; then
27595    # User has supplied compiler name already, always let that override.
27596    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27597$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27598    if test "x`basename $CC`" = "x$CC"; then
27599      # A command without a complete path is provided, search $PATH.
27600
27601      for ac_prog in $CC
27602do
27603  # Extract the first word of "$ac_prog", so it can be a program name with args.
27604set dummy $ac_prog; ac_word=$2
27605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27606$as_echo_n "checking for $ac_word... " >&6; }
27607if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27608  $as_echo_n "(cached) " >&6
27609else
27610  case $POTENTIAL_CC in
27611  [\\/]* | ?:[\\/]*)
27612  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27613  ;;
27614  *)
27615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27616for as_dir in $PATH
27617do
27618  IFS=$as_save_IFS
27619  test -z "$as_dir" && as_dir=.
27620    for ac_exec_ext in '' $ac_executable_extensions; do
27621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27622    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27624    break 2
27625  fi
27626done
27627  done
27628IFS=$as_save_IFS
27629
27630  ;;
27631esac
27632fi
27633POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27634if test -n "$POTENTIAL_CC"; then
27635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27636$as_echo "$POTENTIAL_CC" >&6; }
27637else
27638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27639$as_echo "no" >&6; }
27640fi
27641
27642
27643  test -n "$POTENTIAL_CC" && break
27644done
27645
27646      if test "x$POTENTIAL_CC" != x; then
27647        CC=$POTENTIAL_CC
27648      else
27649        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27650      fi
27651    else
27652      # Otherwise it might already be a complete path
27653      if test ! -x "$CC"; then
27654        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27655      fi
27656    fi
27657  else
27658    # No user supplied value. Locate compiler ourselves.
27659
27660    # If we are cross compiling, assume cross compilation tools follows the
27661    # cross compilation standard where they are prefixed with the autoconf
27662    # standard name for the target. For example the binary
27663    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27664    # If we are not cross compiling, then the default compiler name will be
27665    # used.
27666
27667    CC=
27668    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27669    # before checking the rest of the PATH.
27670    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27671    # step, this should not be necessary.
27672    if test -n "$TOOLCHAIN_PATH"; then
27673      PATH_save="$PATH"
27674      PATH="$TOOLCHAIN_PATH"
27675      for ac_prog in $SEARCH_LIST
27676do
27677  # Extract the first word of "$ac_prog", so it can be a program name with args.
27678set dummy $ac_prog; ac_word=$2
27679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27680$as_echo_n "checking for $ac_word... " >&6; }
27681if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27682  $as_echo_n "(cached) " >&6
27683else
27684  case $TOOLCHAIN_PATH_CC in
27685  [\\/]* | ?:[\\/]*)
27686  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27687  ;;
27688  *)
27689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27690for as_dir in $PATH
27691do
27692  IFS=$as_save_IFS
27693  test -z "$as_dir" && as_dir=.
27694    for ac_exec_ext in '' $ac_executable_extensions; do
27695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27696    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27698    break 2
27699  fi
27700done
27701  done
27702IFS=$as_save_IFS
27703
27704  ;;
27705esac
27706fi
27707TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27708if test -n "$TOOLCHAIN_PATH_CC"; then
27709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27710$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27711else
27712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27713$as_echo "no" >&6; }
27714fi
27715
27716
27717  test -n "$TOOLCHAIN_PATH_CC" && break
27718done
27719
27720      CC=$TOOLCHAIN_PATH_CC
27721      PATH="$PATH_save"
27722    fi
27723
27724    # AC_PATH_PROGS can't be run multiple times with the same variable,
27725    # so create a new name for this run.
27726    if test "x$CC" = x; then
27727      for ac_prog in $SEARCH_LIST
27728do
27729  # Extract the first word of "$ac_prog", so it can be a program name with args.
27730set dummy $ac_prog; ac_word=$2
27731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27732$as_echo_n "checking for $ac_word... " >&6; }
27733if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27734  $as_echo_n "(cached) " >&6
27735else
27736  case $POTENTIAL_CC in
27737  [\\/]* | ?:[\\/]*)
27738  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27739  ;;
27740  *)
27741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27742for as_dir in $PATH
27743do
27744  IFS=$as_save_IFS
27745  test -z "$as_dir" && as_dir=.
27746    for ac_exec_ext in '' $ac_executable_extensions; do
27747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27748    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27750    break 2
27751  fi
27752done
27753  done
27754IFS=$as_save_IFS
27755
27756  ;;
27757esac
27758fi
27759POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27760if test -n "$POTENTIAL_CC"; then
27761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27762$as_echo "$POTENTIAL_CC" >&6; }
27763else
27764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27765$as_echo "no" >&6; }
27766fi
27767
27768
27769  test -n "$POTENTIAL_CC" && break
27770done
27771
27772      CC=$POTENTIAL_CC
27773    fi
27774
27775    if test "x$CC" = x; then
27776
27777  # Print a helpful message on how to acquire the necessary build dependency.
27778  # devkit is the help tag: freetype, cups, pulse, alsa etc
27779  MISSING_DEPENDENCY=devkit
27780
27781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27782    cygwin_help $MISSING_DEPENDENCY
27783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27784    msys_help $MISSING_DEPENDENCY
27785  else
27786    PKGHANDLER_COMMAND=
27787
27788    case $PKGHANDLER in
27789      apt-get)
27790        apt_help     $MISSING_DEPENDENCY ;;
27791      yum)
27792        yum_help     $MISSING_DEPENDENCY ;;
27793      port)
27794        port_help    $MISSING_DEPENDENCY ;;
27795      pkgutil)
27796        pkgutil_help $MISSING_DEPENDENCY ;;
27797      pkgadd)
27798        pkgadd_help  $MISSING_DEPENDENCY ;;
27799    esac
27800
27801    if test "x$PKGHANDLER_COMMAND" != x; then
27802      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27803    fi
27804  fi
27805
27806      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27807    fi
27808  fi
27809
27810  # Now we have a compiler binary in CC. Make sure it's okay.
27811
27812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27813
27814  # First separate the path from the arguments. This will split at the first
27815  # space.
27816  complete="$CC"
27817  path="${complete%% *}"
27818  tmp="$complete EOL"
27819  arguments="${tmp#* }"
27820
27821  # Input might be given as Windows format, start by converting to
27822  # unix format.
27823  new_path=`$CYGPATH -u "$path"`
27824
27825  # Now try to locate executable using which
27826  new_path=`$WHICH "$new_path" 2> /dev/null`
27827  # bat and cmd files are not always considered executable in cygwin causing which
27828  # to not find them
27829  if test "x$new_path" = x \
27830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27832    new_path=`$CYGPATH -u "$path"`
27833  fi
27834  if test "x$new_path" = x; then
27835    # Oops. Which didn't find the executable.
27836    # The splitting of arguments from the executable at a space might have been incorrect,
27837    # since paths with space are more likely in Windows. Give it another try with the whole
27838    # argument.
27839    path="$complete"
27840    arguments="EOL"
27841    new_path=`$CYGPATH -u "$path"`
27842    new_path=`$WHICH "$new_path" 2> /dev/null`
27843    # bat and cmd files are not always considered executable in cygwin causing which
27844    # to not find them
27845    if test "x$new_path" = x \
27846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27848      new_path=`$CYGPATH -u "$path"`
27849    fi
27850    if test "x$new_path" = x; then
27851      # It's still not found. Now this is an unrecoverable error.
27852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27853$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27854      has_space=`$ECHO "$complete" | $GREP " "`
27855      if test "x$has_space" != x; then
27856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27858      fi
27859      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27860    fi
27861  fi
27862
27863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27866  # "foo.exe" is OK but "foo" is an error.
27867  #
27868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27869  # It is also a way to make sure we got the proper file name for the real test later on.
27870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27871  if test "x$test_shortpath" = x; then
27872    # Short path failed, file does not exist as specified.
27873    # Try adding .exe or .cmd
27874    if test -f "${new_path}.exe"; then
27875      input_to_shortpath="${new_path}.exe"
27876    elif test -f "${new_path}.cmd"; then
27877      input_to_shortpath="${new_path}.cmd"
27878    else
27879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27880$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27883      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27884    fi
27885  else
27886    input_to_shortpath="$new_path"
27887  fi
27888
27889  # Call helper function which possibly converts this using DOS-style short mode.
27890  # If so, the updated path is stored in $new_path.
27891  new_path="$input_to_shortpath"
27892
27893  input_path="$input_to_shortpath"
27894  # Check if we need to convert this using DOS-style short mode. If the path
27895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27896  # take no chances and rewrite it.
27897  # Note: m4 eats our [], so we need to use [ and ] instead.
27898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27899  if test "x$has_forbidden_chars" != x; then
27900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27904      # Going to short mode and back again did indeed matter. Since short mode is
27905      # case insensitive, let's make it lowercase to improve readability.
27906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27907      # Now convert it back to Unix-stile (cygpath)
27908      input_path=`$CYGPATH -u "$shortmode_path"`
27909      new_path="$input_path"
27910    fi
27911  fi
27912
27913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27914  if test "x$test_cygdrive_prefix" = x; then
27915    # As a simple fix, exclude /usr/bin since it's not a real path.
27916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27918      # a path prefixed by /cygdrive for fixpath to work.
27919      new_path="$CYGWIN_ROOT_PATH$input_path"
27920    fi
27921  fi
27922
27923  # remove trailing .exe if any
27924  new_path="${new_path/%.exe/}"
27925
27926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27927
27928  # First separate the path from the arguments. This will split at the first
27929  # space.
27930  complete="$CC"
27931  path="${complete%% *}"
27932  tmp="$complete EOL"
27933  arguments="${tmp#* }"
27934
27935  # Input might be given as Windows format, start by converting to
27936  # unix format.
27937  new_path="$path"
27938
27939  windows_path="$new_path"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    new_path="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    new_path="$unix_path"
27946  fi
27947
27948
27949  # Now try to locate executable using which
27950  new_path=`$WHICH "$new_path" 2> /dev/null`
27951
27952  if test "x$new_path" = x; then
27953    # Oops. Which didn't find the executable.
27954    # The splitting of arguments from the executable at a space might have been incorrect,
27955    # since paths with space are more likely in Windows. Give it another try with the whole
27956    # argument.
27957    path="$complete"
27958    arguments="EOL"
27959    new_path="$path"
27960
27961  windows_path="$new_path"
27962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27963    unix_path=`$CYGPATH -u "$windows_path"`
27964    new_path="$unix_path"
27965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27967    new_path="$unix_path"
27968  fi
27969
27970
27971    new_path=`$WHICH "$new_path" 2> /dev/null`
27972    # bat and cmd files are not always considered executable in MSYS causing which
27973    # to not find them
27974    if test "x$new_path" = x \
27975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27977      new_path="$path"
27978
27979  windows_path="$new_path"
27980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27981    unix_path=`$CYGPATH -u "$windows_path"`
27982    new_path="$unix_path"
27983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27985    new_path="$unix_path"
27986  fi
27987
27988    fi
27989
27990    if test "x$new_path" = x; then
27991      # It's still not found. Now this is an unrecoverable error.
27992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27993$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27994      has_space=`$ECHO "$complete" | $GREP " "`
27995      if test "x$has_space" != x; then
27996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27998      fi
27999      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28000    fi
28001  fi
28002
28003  # Now new_path has a complete unix path to the binary
28004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28005    # Keep paths in /bin as-is, but remove trailing .exe if any
28006    new_path="${new_path/%.exe/}"
28007    # Do not save /bin paths to all_fixpath_prefixes!
28008  else
28009    # Not in mixed or Windows style, start by that.
28010    new_path=`cmd //c echo $new_path`
28011
28012  input_path="$new_path"
28013  # Check if we need to convert this using DOS-style short mode. If the path
28014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28015  # take no chances and rewrite it.
28016  # Note: m4 eats our [], so we need to use [ and ] instead.
28017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28018  if test "x$has_forbidden_chars" != x; then
28019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28021  fi
28022
28023    # Output is in $new_path
28024
28025  windows_path="$new_path"
28026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28027    unix_path=`$CYGPATH -u "$windows_path"`
28028    new_path="$unix_path"
28029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28031    new_path="$unix_path"
28032  fi
28033
28034    # remove trailing .exe if any
28035    new_path="${new_path/%.exe/}"
28036
28037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28039  fi
28040
28041  else
28042    # We're on a unix platform. Hooray! :)
28043    # First separate the path from the arguments. This will split at the first
28044    # space.
28045    complete="$CC"
28046    path="${complete%% *}"
28047    tmp="$complete EOL"
28048    arguments="${tmp#* }"
28049
28050    # Cannot rely on the command "which" here since it doesn't always work.
28051    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28052    if test -z "$is_absolute_path"; then
28053      # Path to executable is not absolute. Find it.
28054      IFS_save="$IFS"
28055      IFS=:
28056      for p in $PATH; do
28057        if test -f "$p/$path" && test -x "$p/$path"; then
28058          new_path="$p/$path"
28059          break
28060        fi
28061      done
28062      IFS="$IFS_save"
28063    else
28064      # This is an absolute path, we can use it without further modifications.
28065      new_path="$path"
28066    fi
28067
28068    if test "x$new_path" = x; then
28069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28070$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28071      has_space=`$ECHO "$complete" | $GREP " "`
28072      if test "x$has_space" != x; then
28073        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28075      fi
28076      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28077    fi
28078  fi
28079
28080  # Now join together the path and the arguments once again
28081  if test "x$arguments" != xEOL; then
28082    new_complete="$new_path ${arguments% *}"
28083  else
28084    new_complete="$new_path"
28085  fi
28086
28087  if test "x$complete" != "x$new_complete"; then
28088    CC="$new_complete"
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28090$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28091  fi
28092
28093  TEST_COMPILER="$CC"
28094  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28095  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28096  if test "x$OPENJDK_BUILD_OS" != xaix; then
28097    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28099$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28100
28101  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28102    # Follow a chain of symbolic links. Use readlink
28103    # where it exists, else fall back to horribly
28104    # complicated shell code.
28105    if test "x$READLINK_TESTED" != yes; then
28106      # On MacOSX there is a readlink tool with a different
28107      # purpose than the GNU readlink tool. Check the found readlink.
28108      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28109      if test "x$ISGNU" = x; then
28110        # A readlink that we do not know how to use.
28111        # Are there other non-GNU readlinks out there?
28112        READLINK_TESTED=yes
28113        READLINK=
28114      fi
28115    fi
28116
28117    if test "x$READLINK" != x; then
28118      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28119    else
28120      # Save the current directory for restoring afterwards
28121      STARTDIR=$PWD
28122      COUNTER=0
28123      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28124      sym_link_file=`$BASENAME $TEST_COMPILER`
28125      cd $sym_link_dir
28126      # Use -P flag to resolve symlinks in directories.
28127      cd `$THEPWDCMD -P`
28128      sym_link_dir=`$THEPWDCMD -P`
28129      # Resolve file symlinks
28130      while test $COUNTER -lt 20; do
28131        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28132        if test "x$ISLINK" == x; then
28133          # This is not a symbolic link! We are done!
28134          break
28135        fi
28136        # Again resolve directory symlinks since the target of the just found
28137        # link could be in a different directory
28138        cd `$DIRNAME $ISLINK`
28139        sym_link_dir=`$THEPWDCMD -P`
28140        sym_link_file=`$BASENAME $ISLINK`
28141        let COUNTER=COUNTER+1
28142      done
28143      cd $STARTDIR
28144      TEST_COMPILER=$sym_link_dir/$sym_link_file
28145    fi
28146  fi
28147
28148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28149$as_echo "$TEST_COMPILER" >&6; }
28150  fi
28151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28152$as_echo_n "checking if CC is disguised ccache... " >&6; }
28153
28154  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28155  if test "x$COMPILER_BASENAME" = "xccache"; then
28156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28157$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28158    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28159    # We want to control ccache invocation ourselves, so ignore this cc and try
28160    # searching again.
28161
28162    # Remove the path to the fake ccache cc from the PATH
28163    RETRY_COMPILER_SAVED_PATH="$PATH"
28164    COMPILER_DIRNAME=`$DIRNAME $CC`
28165    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28166
28167    # Try again looking for our compiler
28168    if test -n "$ac_tool_prefix"; then
28169  for ac_prog in $TOOLCHAIN_CC_BINARY
28170  do
28171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28174$as_echo_n "checking for $ac_word... " >&6; }
28175if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28176  $as_echo_n "(cached) " >&6
28177else
28178  if test -n "$PROPER_COMPILER_CC"; then
28179  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28180else
28181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28182for as_dir in $PATH
28183do
28184  IFS=$as_save_IFS
28185  test -z "$as_dir" && as_dir=.
28186    for ac_exec_ext in '' $ac_executable_extensions; do
28187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28188    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28190    break 2
28191  fi
28192done
28193  done
28194IFS=$as_save_IFS
28195
28196fi
28197fi
28198PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28199if test -n "$PROPER_COMPILER_CC"; then
28200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28201$as_echo "$PROPER_COMPILER_CC" >&6; }
28202else
28203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28204$as_echo "no" >&6; }
28205fi
28206
28207
28208    test -n "$PROPER_COMPILER_CC" && break
28209  done
28210fi
28211if test -z "$PROPER_COMPILER_CC"; then
28212  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28213  for ac_prog in $TOOLCHAIN_CC_BINARY
28214do
28215  # Extract the first word of "$ac_prog", so it can be a program name with args.
28216set dummy $ac_prog; ac_word=$2
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28218$as_echo_n "checking for $ac_word... " >&6; }
28219if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28220  $as_echo_n "(cached) " >&6
28221else
28222  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28223  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28224else
28225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28226for as_dir in $PATH
28227do
28228  IFS=$as_save_IFS
28229  test -z "$as_dir" && as_dir=.
28230    for ac_exec_ext in '' $ac_executable_extensions; do
28231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28232    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28234    break 2
28235  fi
28236done
28237  done
28238IFS=$as_save_IFS
28239
28240fi
28241fi
28242ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28243if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28245$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28246else
28247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28248$as_echo "no" >&6; }
28249fi
28250
28251
28252  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28253done
28254
28255  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28256    PROPER_COMPILER_CC=""
28257  else
28258    case $cross_compiling:$ac_tool_warned in
28259yes:)
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28262ac_tool_warned=yes ;;
28263esac
28264    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28265  fi
28266fi
28267
28268
28269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28270
28271  # First separate the path from the arguments. This will split at the first
28272  # space.
28273  complete="$PROPER_COMPILER_CC"
28274  path="${complete%% *}"
28275  tmp="$complete EOL"
28276  arguments="${tmp#* }"
28277
28278  # Input might be given as Windows format, start by converting to
28279  # unix format.
28280  new_path=`$CYGPATH -u "$path"`
28281
28282  # Now try to locate executable using which
28283  new_path=`$WHICH "$new_path" 2> /dev/null`
28284  # bat and cmd files are not always considered executable in cygwin causing which
28285  # to not find them
28286  if test "x$new_path" = x \
28287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28289    new_path=`$CYGPATH -u "$path"`
28290  fi
28291  if test "x$new_path" = x; then
28292    # Oops. Which didn't find the executable.
28293    # The splitting of arguments from the executable at a space might have been incorrect,
28294    # since paths with space are more likely in Windows. Give it another try with the whole
28295    # argument.
28296    path="$complete"
28297    arguments="EOL"
28298    new_path=`$CYGPATH -u "$path"`
28299    new_path=`$WHICH "$new_path" 2> /dev/null`
28300    # bat and cmd files are not always considered executable in cygwin causing which
28301    # to not find them
28302    if test "x$new_path" = x \
28303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28305      new_path=`$CYGPATH -u "$path"`
28306    fi
28307    if test "x$new_path" = x; then
28308      # It's still not found. Now this is an unrecoverable error.
28309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28310$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28311      has_space=`$ECHO "$complete" | $GREP " "`
28312      if test "x$has_space" != x; then
28313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28315      fi
28316      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28317    fi
28318  fi
28319
28320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28323  # "foo.exe" is OK but "foo" is an error.
28324  #
28325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28326  # It is also a way to make sure we got the proper file name for the real test later on.
28327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28328  if test "x$test_shortpath" = x; then
28329    # Short path failed, file does not exist as specified.
28330    # Try adding .exe or .cmd
28331    if test -f "${new_path}.exe"; then
28332      input_to_shortpath="${new_path}.exe"
28333    elif test -f "${new_path}.cmd"; then
28334      input_to_shortpath="${new_path}.cmd"
28335    else
28336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28337$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28340      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28341    fi
28342  else
28343    input_to_shortpath="$new_path"
28344  fi
28345
28346  # Call helper function which possibly converts this using DOS-style short mode.
28347  # If so, the updated path is stored in $new_path.
28348  new_path="$input_to_shortpath"
28349
28350  input_path="$input_to_shortpath"
28351  # Check if we need to convert this using DOS-style short mode. If the path
28352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28353  # take no chances and rewrite it.
28354  # Note: m4 eats our [], so we need to use [ and ] instead.
28355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28356  if test "x$has_forbidden_chars" != x; then
28357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28361      # Going to short mode and back again did indeed matter. Since short mode is
28362      # case insensitive, let's make it lowercase to improve readability.
28363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28364      # Now convert it back to Unix-stile (cygpath)
28365      input_path=`$CYGPATH -u "$shortmode_path"`
28366      new_path="$input_path"
28367    fi
28368  fi
28369
28370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28371  if test "x$test_cygdrive_prefix" = x; then
28372    # As a simple fix, exclude /usr/bin since it's not a real path.
28373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28375      # a path prefixed by /cygdrive for fixpath to work.
28376      new_path="$CYGWIN_ROOT_PATH$input_path"
28377    fi
28378  fi
28379
28380  # remove trailing .exe if any
28381  new_path="${new_path/%.exe/}"
28382
28383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28384
28385  # First separate the path from the arguments. This will split at the first
28386  # space.
28387  complete="$PROPER_COMPILER_CC"
28388  path="${complete%% *}"
28389  tmp="$complete EOL"
28390  arguments="${tmp#* }"
28391
28392  # Input might be given as Windows format, start by converting to
28393  # unix format.
28394  new_path="$path"
28395
28396  windows_path="$new_path"
28397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28398    unix_path=`$CYGPATH -u "$windows_path"`
28399    new_path="$unix_path"
28400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28402    new_path="$unix_path"
28403  fi
28404
28405
28406  # Now try to locate executable using which
28407  new_path=`$WHICH "$new_path" 2> /dev/null`
28408
28409  if test "x$new_path" = x; then
28410    # Oops. Which didn't find the executable.
28411    # The splitting of arguments from the executable at a space might have been incorrect,
28412    # since paths with space are more likely in Windows. Give it another try with the whole
28413    # argument.
28414    path="$complete"
28415    arguments="EOL"
28416    new_path="$path"
28417
28418  windows_path="$new_path"
28419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28420    unix_path=`$CYGPATH -u "$windows_path"`
28421    new_path="$unix_path"
28422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28424    new_path="$unix_path"
28425  fi
28426
28427
28428    new_path=`$WHICH "$new_path" 2> /dev/null`
28429    # bat and cmd files are not always considered executable in MSYS causing which
28430    # to not find them
28431    if test "x$new_path" = x \
28432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28434      new_path="$path"
28435
28436  windows_path="$new_path"
28437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28438    unix_path=`$CYGPATH -u "$windows_path"`
28439    new_path="$unix_path"
28440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28442    new_path="$unix_path"
28443  fi
28444
28445    fi
28446
28447    if test "x$new_path" = x; then
28448      # It's still not found. Now this is an unrecoverable error.
28449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28450$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28451      has_space=`$ECHO "$complete" | $GREP " "`
28452      if test "x$has_space" != x; then
28453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28455      fi
28456      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28457    fi
28458  fi
28459
28460  # Now new_path has a complete unix path to the binary
28461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28462    # Keep paths in /bin as-is, but remove trailing .exe if any
28463    new_path="${new_path/%.exe/}"
28464    # Do not save /bin paths to all_fixpath_prefixes!
28465  else
28466    # Not in mixed or Windows style, start by that.
28467    new_path=`cmd //c echo $new_path`
28468
28469  input_path="$new_path"
28470  # Check if we need to convert this using DOS-style short mode. If the path
28471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28472  # take no chances and rewrite it.
28473  # Note: m4 eats our [], so we need to use [ and ] instead.
28474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28475  if test "x$has_forbidden_chars" != x; then
28476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28478  fi
28479
28480    # Output is in $new_path
28481
28482  windows_path="$new_path"
28483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28484    unix_path=`$CYGPATH -u "$windows_path"`
28485    new_path="$unix_path"
28486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28488    new_path="$unix_path"
28489  fi
28490
28491    # remove trailing .exe if any
28492    new_path="${new_path/%.exe/}"
28493
28494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28496  fi
28497
28498  else
28499    # We're on a unix platform. Hooray! :)
28500    # First separate the path from the arguments. This will split at the first
28501    # space.
28502    complete="$PROPER_COMPILER_CC"
28503    path="${complete%% *}"
28504    tmp="$complete EOL"
28505    arguments="${tmp#* }"
28506
28507    # Cannot rely on the command "which" here since it doesn't always work.
28508    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28509    if test -z "$is_absolute_path"; then
28510      # Path to executable is not absolute. Find it.
28511      IFS_save="$IFS"
28512      IFS=:
28513      for p in $PATH; do
28514        if test -f "$p/$path" && test -x "$p/$path"; then
28515          new_path="$p/$path"
28516          break
28517        fi
28518      done
28519      IFS="$IFS_save"
28520    else
28521      # This is an absolute path, we can use it without further modifications.
28522      new_path="$path"
28523    fi
28524
28525    if test "x$new_path" = x; then
28526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28527$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28528      has_space=`$ECHO "$complete" | $GREP " "`
28529      if test "x$has_space" != x; then
28530        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28532      fi
28533      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28534    fi
28535  fi
28536
28537  # Now join together the path and the arguments once again
28538  if test "x$arguments" != xEOL; then
28539    new_complete="$new_path ${arguments% *}"
28540  else
28541    new_complete="$new_path"
28542  fi
28543
28544  if test "x$complete" != "x$new_complete"; then
28545    PROPER_COMPILER_CC="$new_complete"
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28547$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28548  fi
28549
28550    PATH="$RETRY_COMPILER_SAVED_PATH"
28551
28552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28553$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28554
28555  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28556    # Follow a chain of symbolic links. Use readlink
28557    # where it exists, else fall back to horribly
28558    # complicated shell code.
28559    if test "x$READLINK_TESTED" != yes; then
28560      # On MacOSX there is a readlink tool with a different
28561      # purpose than the GNU readlink tool. Check the found readlink.
28562      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28563      if test "x$ISGNU" = x; then
28564        # A readlink that we do not know how to use.
28565        # Are there other non-GNU readlinks out there?
28566        READLINK_TESTED=yes
28567        READLINK=
28568      fi
28569    fi
28570
28571    if test "x$READLINK" != x; then
28572      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28573    else
28574      # Save the current directory for restoring afterwards
28575      STARTDIR=$PWD
28576      COUNTER=0
28577      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28578      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28579      cd $sym_link_dir
28580      # Use -P flag to resolve symlinks in directories.
28581      cd `$THEPWDCMD -P`
28582      sym_link_dir=`$THEPWDCMD -P`
28583      # Resolve file symlinks
28584      while test $COUNTER -lt 20; do
28585        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28586        if test "x$ISLINK" == x; then
28587          # This is not a symbolic link! We are done!
28588          break
28589        fi
28590        # Again resolve directory symlinks since the target of the just found
28591        # link could be in a different directory
28592        cd `$DIRNAME $ISLINK`
28593        sym_link_dir=`$THEPWDCMD -P`
28594        sym_link_file=`$BASENAME $ISLINK`
28595        let COUNTER=COUNTER+1
28596      done
28597      cd $STARTDIR
28598      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28599    fi
28600  fi
28601
28602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28603$as_echo "$PROPER_COMPILER_CC" >&6; }
28604    CC="$PROPER_COMPILER_CC"
28605  else
28606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28607$as_echo "no, keeping CC" >&6; }
28608  fi
28609
28610
28611  COMPILER=$CC
28612  COMPILER_NAME=$COMPILER_NAME
28613
28614  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28615    # cc -V output typically looks like
28616    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28617    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28618    # Check that this is likely to be the Solaris Studio cc.
28619    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28620    if test $? -ne 0; then
28621      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28622      { $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
28623$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28624      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28625$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28626      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28627$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28628      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28629    fi
28630    # Remove usage instructions (if present), and
28631    # collapse compiler output into a single line
28632    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28633        $SED -e 's/ *[Uu]sage:.*//'`
28634    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28635        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28636  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28637    # xlc -qversion output typically looks like
28638    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28639    #     Version: 11.01.0000.0015
28640    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28641    # Check that this is likely to be the IBM XL C compiler.
28642    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28643    if test $? -ne 0; then
28644      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28645      { $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
28646$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28648$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28649      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28650$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28651      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28652    fi
28653    # Collapse compiler output into a single line
28654    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28655    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28656        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28657  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28658    # There is no specific version flag, but all output starts with a version string.
28659    # First line typically looks something like:
28660    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28661    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28662    # Check that this is likely to be Microsoft CL.EXE.
28663    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28664    if test $? -ne 0; then
28665      { $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
28666$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28667      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28668$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28669      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28670    fi
28671    # Collapse compiler output into a single line
28672    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28673    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28674        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28675  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28676    # gcc --version output typically looks like
28677    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28678    #     Copyright (C) 2013 Free Software Foundation, Inc.
28679    #     This is free software; see the source for copying conditions.  There is NO
28680    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28681    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28682    # Check that this is likely to be GCC.
28683    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28684    if test $? -ne 0; then
28685      { $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
28686$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28687      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28688$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28689      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28690    fi
28691    # Remove Copyright and legalese from version string, and
28692    # collapse into a single line
28693    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28694        $SED -e 's/ *Copyright .*//'`
28695    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28696        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28697  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28698    # clang --version output typically looks like
28699    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28700    #    clang version 3.3 (tags/RELEASE_33/final)
28701    # or
28702    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28703    #    Target: x86_64-pc-linux-gnu
28704    #    Thread model: posix
28705    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28706    # Check that this is likely to be clang
28707    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28708    if test $? -ne 0; then
28709      { $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
28710$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28711      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28712$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28713      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28714    fi
28715    # Collapse compiler output into a single line
28716    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28717    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28718        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28719  else
28720      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28721  fi
28722  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28723  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28724  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28725  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28726
28727  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28728$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28729
28730
28731  # Now that we have resolved CC ourself, let autoconf have its go at it
28732  ac_ext=c
28733ac_cpp='$CPP $CPPFLAGS'
28734ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28735ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28736ac_compiler_gnu=$ac_cv_c_compiler_gnu
28737if test -n "$ac_tool_prefix"; then
28738  for ac_prog in $CC
28739  do
28740    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28741set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28743$as_echo_n "checking for $ac_word... " >&6; }
28744if ${ac_cv_prog_CC+:} false; then :
28745  $as_echo_n "(cached) " >&6
28746else
28747  if test -n "$CC"; then
28748  ac_cv_prog_CC="$CC" # Let the user override the test.
28749else
28750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28751for as_dir in $PATH
28752do
28753  IFS=$as_save_IFS
28754  test -z "$as_dir" && as_dir=.
28755    for ac_exec_ext in '' $ac_executable_extensions; do
28756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28757    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28759    break 2
28760  fi
28761done
28762  done
28763IFS=$as_save_IFS
28764
28765fi
28766fi
28767CC=$ac_cv_prog_CC
28768if test -n "$CC"; then
28769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28770$as_echo "$CC" >&6; }
28771else
28772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28773$as_echo "no" >&6; }
28774fi
28775
28776
28777    test -n "$CC" && break
28778  done
28779fi
28780if test -z "$CC"; then
28781  ac_ct_CC=$CC
28782  for ac_prog in $CC
28783do
28784  # Extract the first word of "$ac_prog", so it can be a program name with args.
28785set dummy $ac_prog; ac_word=$2
28786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28787$as_echo_n "checking for $ac_word... " >&6; }
28788if ${ac_cv_prog_ac_ct_CC+:} false; then :
28789  $as_echo_n "(cached) " >&6
28790else
28791  if test -n "$ac_ct_CC"; then
28792  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28793else
28794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28795for as_dir in $PATH
28796do
28797  IFS=$as_save_IFS
28798  test -z "$as_dir" && as_dir=.
28799    for ac_exec_ext in '' $ac_executable_extensions; do
28800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28801    ac_cv_prog_ac_ct_CC="$ac_prog"
28802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28803    break 2
28804  fi
28805done
28806  done
28807IFS=$as_save_IFS
28808
28809fi
28810fi
28811ac_ct_CC=$ac_cv_prog_ac_ct_CC
28812if test -n "$ac_ct_CC"; then
28813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28814$as_echo "$ac_ct_CC" >&6; }
28815else
28816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28817$as_echo "no" >&6; }
28818fi
28819
28820
28821  test -n "$ac_ct_CC" && break
28822done
28823
28824  if test "x$ac_ct_CC" = x; then
28825    CC=""
28826  else
28827    case $cross_compiling:$ac_tool_warned in
28828yes:)
28829{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28830$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28831ac_tool_warned=yes ;;
28832esac
28833    CC=$ac_ct_CC
28834  fi
28835fi
28836
28837
28838test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28840as_fn_error $? "no acceptable C compiler found in \$PATH
28841See \`config.log' for more details" "$LINENO" 5; }
28842
28843# Provide some information about the compiler.
28844$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28845set X $ac_compile
28846ac_compiler=$2
28847for ac_option in --version -v -V -qversion; do
28848  { { ac_try="$ac_compiler $ac_option >&5"
28849case "(($ac_try" in
28850  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28851  *) ac_try_echo=$ac_try;;
28852esac
28853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28854$as_echo "$ac_try_echo"; } >&5
28855  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28856  ac_status=$?
28857  if test -s conftest.err; then
28858    sed '10a\
28859... rest of stderr output deleted ...
28860         10q' conftest.err >conftest.er1
28861    cat conftest.er1 >&5
28862  fi
28863  rm -f conftest.er1 conftest.err
28864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28865  test $ac_status = 0; }
28866done
28867
28868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28869/* end confdefs.h.  */
28870
28871int
28872main ()
28873{
28874
28875  ;
28876  return 0;
28877}
28878_ACEOF
28879ac_clean_files_save=$ac_clean_files
28880ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28881# Try to create an executable without -o first, disregard a.out.
28882# It will help us diagnose broken compilers, and finding out an intuition
28883# of exeext.
28884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28885$as_echo_n "checking whether the C compiler works... " >&6; }
28886ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28887
28888# The possible output files:
28889ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28890
28891ac_rmfiles=
28892for ac_file in $ac_files
28893do
28894  case $ac_file in
28895    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28896    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28897  esac
28898done
28899rm -f $ac_rmfiles
28900
28901if { { ac_try="$ac_link_default"
28902case "(($ac_try" in
28903  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28904  *) ac_try_echo=$ac_try;;
28905esac
28906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28907$as_echo "$ac_try_echo"; } >&5
28908  (eval "$ac_link_default") 2>&5
28909  ac_status=$?
28910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28911  test $ac_status = 0; }; then :
28912  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28913# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28914# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28915# so that the user can short-circuit this test for compilers unknown to
28916# Autoconf.
28917for ac_file in $ac_files ''
28918do
28919  test -f "$ac_file" || continue
28920  case $ac_file in
28921    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28922	;;
28923    [ab].out )
28924	# We found the default executable, but exeext='' is most
28925	# certainly right.
28926	break;;
28927    *.* )
28928	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28929	then :; else
28930	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28931	fi
28932	# We set ac_cv_exeext here because the later test for it is not
28933	# safe: cross compilers may not add the suffix if given an `-o'
28934	# argument, so we may need to know it at that point already.
28935	# Even if this section looks crufty: it has the advantage of
28936	# actually working.
28937	break;;
28938    * )
28939	break;;
28940  esac
28941done
28942test "$ac_cv_exeext" = no && ac_cv_exeext=
28943
28944else
28945  ac_file=''
28946fi
28947if test -z "$ac_file"; then :
28948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28949$as_echo "no" >&6; }
28950$as_echo "$as_me: failed program was:" >&5
28951sed 's/^/| /' conftest.$ac_ext >&5
28952
28953{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28955as_fn_error 77 "C compiler cannot create executables
28956See \`config.log' for more details" "$LINENO" 5; }
28957else
28958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28959$as_echo "yes" >&6; }
28960fi
28961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28962$as_echo_n "checking for C compiler default output file name... " >&6; }
28963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28964$as_echo "$ac_file" >&6; }
28965ac_exeext=$ac_cv_exeext
28966
28967rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28968ac_clean_files=$ac_clean_files_save
28969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28970$as_echo_n "checking for suffix of executables... " >&6; }
28971if { { ac_try="$ac_link"
28972case "(($ac_try" in
28973  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28974  *) ac_try_echo=$ac_try;;
28975esac
28976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28977$as_echo "$ac_try_echo"; } >&5
28978  (eval "$ac_link") 2>&5
28979  ac_status=$?
28980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28981  test $ac_status = 0; }; then :
28982  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28983# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28984# work properly (i.e., refer to `conftest.exe'), while it won't with
28985# `rm'.
28986for ac_file in conftest.exe conftest conftest.*; do
28987  test -f "$ac_file" || continue
28988  case $ac_file in
28989    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28990    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28991	  break;;
28992    * ) break;;
28993  esac
28994done
28995else
28996  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28998as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28999See \`config.log' for more details" "$LINENO" 5; }
29000fi
29001rm -f conftest conftest$ac_cv_exeext
29002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29003$as_echo "$ac_cv_exeext" >&6; }
29004
29005rm -f conftest.$ac_ext
29006EXEEXT=$ac_cv_exeext
29007ac_exeext=$EXEEXT
29008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29009/* end confdefs.h.  */
29010#include <stdio.h>
29011int
29012main ()
29013{
29014FILE *f = fopen ("conftest.out", "w");
29015 return ferror (f) || fclose (f) != 0;
29016
29017  ;
29018  return 0;
29019}
29020_ACEOF
29021ac_clean_files="$ac_clean_files conftest.out"
29022# Check that the compiler produces executables we can run.  If not, either
29023# the compiler is broken, or we cross compile.
29024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29025$as_echo_n "checking whether we are cross compiling... " >&6; }
29026if test "$cross_compiling" != yes; then
29027  { { ac_try="$ac_link"
29028case "(($ac_try" in
29029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29030  *) ac_try_echo=$ac_try;;
29031esac
29032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29033$as_echo "$ac_try_echo"; } >&5
29034  (eval "$ac_link") 2>&5
29035  ac_status=$?
29036  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29037  test $ac_status = 0; }
29038  if { ac_try='./conftest$ac_cv_exeext'
29039  { { case "(($ac_try" in
29040  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29041  *) ac_try_echo=$ac_try;;
29042esac
29043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29044$as_echo "$ac_try_echo"; } >&5
29045  (eval "$ac_try") 2>&5
29046  ac_status=$?
29047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29048  test $ac_status = 0; }; }; then
29049    cross_compiling=no
29050  else
29051    if test "$cross_compiling" = maybe; then
29052	cross_compiling=yes
29053    else
29054	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29056as_fn_error $? "cannot run C compiled programs.
29057If you meant to cross compile, use \`--host'.
29058See \`config.log' for more details" "$LINENO" 5; }
29059    fi
29060  fi
29061fi
29062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29063$as_echo "$cross_compiling" >&6; }
29064
29065rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29066ac_clean_files=$ac_clean_files_save
29067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29068$as_echo_n "checking for suffix of object files... " >&6; }
29069if ${ac_cv_objext+:} false; then :
29070  $as_echo_n "(cached) " >&6
29071else
29072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29073/* end confdefs.h.  */
29074
29075int
29076main ()
29077{
29078
29079  ;
29080  return 0;
29081}
29082_ACEOF
29083rm -f conftest.o conftest.obj
29084if { { ac_try="$ac_compile"
29085case "(($ac_try" in
29086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29087  *) ac_try_echo=$ac_try;;
29088esac
29089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29090$as_echo "$ac_try_echo"; } >&5
29091  (eval "$ac_compile") 2>&5
29092  ac_status=$?
29093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29094  test $ac_status = 0; }; then :
29095  for ac_file in conftest.o conftest.obj conftest.*; do
29096  test -f "$ac_file" || continue;
29097  case $ac_file in
29098    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29099    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29100       break;;
29101  esac
29102done
29103else
29104  $as_echo "$as_me: failed program was:" >&5
29105sed 's/^/| /' conftest.$ac_ext >&5
29106
29107{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29109as_fn_error $? "cannot compute suffix of object files: cannot compile
29110See \`config.log' for more details" "$LINENO" 5; }
29111fi
29112rm -f conftest.$ac_cv_objext conftest.$ac_ext
29113fi
29114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29115$as_echo "$ac_cv_objext" >&6; }
29116OBJEXT=$ac_cv_objext
29117ac_objext=$OBJEXT
29118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29119$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29120if ${ac_cv_c_compiler_gnu+:} false; then :
29121  $as_echo_n "(cached) " >&6
29122else
29123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124/* end confdefs.h.  */
29125
29126int
29127main ()
29128{
29129#ifndef __GNUC__
29130       choke me
29131#endif
29132
29133  ;
29134  return 0;
29135}
29136_ACEOF
29137if ac_fn_c_try_compile "$LINENO"; then :
29138  ac_compiler_gnu=yes
29139else
29140  ac_compiler_gnu=no
29141fi
29142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29143ac_cv_c_compiler_gnu=$ac_compiler_gnu
29144
29145fi
29146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29147$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29148if test $ac_compiler_gnu = yes; then
29149  GCC=yes
29150else
29151  GCC=
29152fi
29153ac_test_CFLAGS=${CFLAGS+set}
29154ac_save_CFLAGS=$CFLAGS
29155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29156$as_echo_n "checking whether $CC accepts -g... " >&6; }
29157if ${ac_cv_prog_cc_g+:} false; then :
29158  $as_echo_n "(cached) " >&6
29159else
29160  ac_save_c_werror_flag=$ac_c_werror_flag
29161   ac_c_werror_flag=yes
29162   ac_cv_prog_cc_g=no
29163   CFLAGS="-g"
29164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29165/* end confdefs.h.  */
29166
29167int
29168main ()
29169{
29170
29171  ;
29172  return 0;
29173}
29174_ACEOF
29175if ac_fn_c_try_compile "$LINENO"; then :
29176  ac_cv_prog_cc_g=yes
29177else
29178  CFLAGS=""
29179      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29180/* end confdefs.h.  */
29181
29182int
29183main ()
29184{
29185
29186  ;
29187  return 0;
29188}
29189_ACEOF
29190if ac_fn_c_try_compile "$LINENO"; then :
29191
29192else
29193  ac_c_werror_flag=$ac_save_c_werror_flag
29194	 CFLAGS="-g"
29195	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29196/* end confdefs.h.  */
29197
29198int
29199main ()
29200{
29201
29202  ;
29203  return 0;
29204}
29205_ACEOF
29206if ac_fn_c_try_compile "$LINENO"; then :
29207  ac_cv_prog_cc_g=yes
29208fi
29209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29210fi
29211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29212fi
29213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29214   ac_c_werror_flag=$ac_save_c_werror_flag
29215fi
29216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29217$as_echo "$ac_cv_prog_cc_g" >&6; }
29218if test "$ac_test_CFLAGS" = set; then
29219  CFLAGS=$ac_save_CFLAGS
29220elif test $ac_cv_prog_cc_g = yes; then
29221  if test "$GCC" = yes; then
29222    CFLAGS="-g -O2"
29223  else
29224    CFLAGS="-g"
29225  fi
29226else
29227  if test "$GCC" = yes; then
29228    CFLAGS="-O2"
29229  else
29230    CFLAGS=
29231  fi
29232fi
29233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29234$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29235if ${ac_cv_prog_cc_c89+:} false; then :
29236  $as_echo_n "(cached) " >&6
29237else
29238  ac_cv_prog_cc_c89=no
29239ac_save_CC=$CC
29240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29241/* end confdefs.h.  */
29242#include <stdarg.h>
29243#include <stdio.h>
29244struct stat;
29245/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29246struct buf { int x; };
29247FILE * (*rcsopen) (struct buf *, struct stat *, int);
29248static char *e (p, i)
29249     char **p;
29250     int i;
29251{
29252  return p[i];
29253}
29254static char *f (char * (*g) (char **, int), char **p, ...)
29255{
29256  char *s;
29257  va_list v;
29258  va_start (v,p);
29259  s = g (p, va_arg (v,int));
29260  va_end (v);
29261  return s;
29262}
29263
29264/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29265   function prototypes and stuff, but not '\xHH' hex character constants.
29266   These don't provoke an error unfortunately, instead are silently treated
29267   as 'x'.  The following induces an error, until -std is added to get
29268   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29269   array size at least.  It's necessary to write '\x00'==0 to get something
29270   that's true only with -std.  */
29271int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29272
29273/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29274   inside strings and character constants.  */
29275#define FOO(x) 'x'
29276int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29277
29278int test (int i, double x);
29279struct s1 {int (*f) (int a);};
29280struct s2 {int (*f) (double a);};
29281int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29282int argc;
29283char **argv;
29284int
29285main ()
29286{
29287return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29288  ;
29289  return 0;
29290}
29291_ACEOF
29292for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29293	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29294do
29295  CC="$ac_save_CC $ac_arg"
29296  if ac_fn_c_try_compile "$LINENO"; then :
29297  ac_cv_prog_cc_c89=$ac_arg
29298fi
29299rm -f core conftest.err conftest.$ac_objext
29300  test "x$ac_cv_prog_cc_c89" != "xno" && break
29301done
29302rm -f conftest.$ac_ext
29303CC=$ac_save_CC
29304
29305fi
29306# AC_CACHE_VAL
29307case "x$ac_cv_prog_cc_c89" in
29308  x)
29309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29310$as_echo "none needed" >&6; } ;;
29311  xno)
29312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29313$as_echo "unsupported" >&6; } ;;
29314  *)
29315    CC="$CC $ac_cv_prog_cc_c89"
29316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29317$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29318esac
29319if test "x$ac_cv_prog_cc_c89" != xno; then :
29320
29321fi
29322
29323ac_ext=cpp
29324ac_cpp='$CXXCPP $CPPFLAGS'
29325ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29326ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29327ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29328
29329
29330
29331  COMPILER_NAME=C++
29332  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29333
29334  if test "x$CXX" != x; then
29335    # User has supplied compiler name already, always let that override.
29336    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29337$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29338    if test "x`basename $CXX`" = "x$CXX"; then
29339      # A command without a complete path is provided, search $PATH.
29340
29341      for ac_prog in $CXX
29342do
29343  # Extract the first word of "$ac_prog", so it can be a program name with args.
29344set dummy $ac_prog; ac_word=$2
29345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29346$as_echo_n "checking for $ac_word... " >&6; }
29347if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29348  $as_echo_n "(cached) " >&6
29349else
29350  case $POTENTIAL_CXX in
29351  [\\/]* | ?:[\\/]*)
29352  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29353  ;;
29354  *)
29355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29356for as_dir in $PATH
29357do
29358  IFS=$as_save_IFS
29359  test -z "$as_dir" && as_dir=.
29360    for ac_exec_ext in '' $ac_executable_extensions; do
29361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29362    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29364    break 2
29365  fi
29366done
29367  done
29368IFS=$as_save_IFS
29369
29370  ;;
29371esac
29372fi
29373POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29374if test -n "$POTENTIAL_CXX"; then
29375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29376$as_echo "$POTENTIAL_CXX" >&6; }
29377else
29378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29379$as_echo "no" >&6; }
29380fi
29381
29382
29383  test -n "$POTENTIAL_CXX" && break
29384done
29385
29386      if test "x$POTENTIAL_CXX" != x; then
29387        CXX=$POTENTIAL_CXX
29388      else
29389        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29390      fi
29391    else
29392      # Otherwise it might already be a complete path
29393      if test ! -x "$CXX"; then
29394        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29395      fi
29396    fi
29397  else
29398    # No user supplied value. Locate compiler ourselves.
29399
29400    # If we are cross compiling, assume cross compilation tools follows the
29401    # cross compilation standard where they are prefixed with the autoconf
29402    # standard name for the target. For example the binary
29403    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29404    # If we are not cross compiling, then the default compiler name will be
29405    # used.
29406
29407    CXX=
29408    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29409    # before checking the rest of the PATH.
29410    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29411    # step, this should not be necessary.
29412    if test -n "$TOOLCHAIN_PATH"; then
29413      PATH_save="$PATH"
29414      PATH="$TOOLCHAIN_PATH"
29415      for ac_prog in $SEARCH_LIST
29416do
29417  # Extract the first word of "$ac_prog", so it can be a program name with args.
29418set dummy $ac_prog; ac_word=$2
29419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29420$as_echo_n "checking for $ac_word... " >&6; }
29421if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29422  $as_echo_n "(cached) " >&6
29423else
29424  case $TOOLCHAIN_PATH_CXX in
29425  [\\/]* | ?:[\\/]*)
29426  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29427  ;;
29428  *)
29429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29430for as_dir in $PATH
29431do
29432  IFS=$as_save_IFS
29433  test -z "$as_dir" && as_dir=.
29434    for ac_exec_ext in '' $ac_executable_extensions; do
29435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29436    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29438    break 2
29439  fi
29440done
29441  done
29442IFS=$as_save_IFS
29443
29444  ;;
29445esac
29446fi
29447TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29448if test -n "$TOOLCHAIN_PATH_CXX"; then
29449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29450$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29451else
29452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29453$as_echo "no" >&6; }
29454fi
29455
29456
29457  test -n "$TOOLCHAIN_PATH_CXX" && break
29458done
29459
29460      CXX=$TOOLCHAIN_PATH_CXX
29461      PATH="$PATH_save"
29462    fi
29463
29464    # AC_PATH_PROGS can't be run multiple times with the same variable,
29465    # so create a new name for this run.
29466    if test "x$CXX" = x; then
29467      for ac_prog in $SEARCH_LIST
29468do
29469  # Extract the first word of "$ac_prog", so it can be a program name with args.
29470set dummy $ac_prog; ac_word=$2
29471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29472$as_echo_n "checking for $ac_word... " >&6; }
29473if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29474  $as_echo_n "(cached) " >&6
29475else
29476  case $POTENTIAL_CXX in
29477  [\\/]* | ?:[\\/]*)
29478  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29479  ;;
29480  *)
29481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29482for as_dir in $PATH
29483do
29484  IFS=$as_save_IFS
29485  test -z "$as_dir" && as_dir=.
29486    for ac_exec_ext in '' $ac_executable_extensions; do
29487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29488    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29490    break 2
29491  fi
29492done
29493  done
29494IFS=$as_save_IFS
29495
29496  ;;
29497esac
29498fi
29499POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29500if test -n "$POTENTIAL_CXX"; then
29501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29502$as_echo "$POTENTIAL_CXX" >&6; }
29503else
29504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29505$as_echo "no" >&6; }
29506fi
29507
29508
29509  test -n "$POTENTIAL_CXX" && break
29510done
29511
29512      CXX=$POTENTIAL_CXX
29513    fi
29514
29515    if test "x$CXX" = x; then
29516
29517  # Print a helpful message on how to acquire the necessary build dependency.
29518  # devkit is the help tag: freetype, cups, pulse, alsa etc
29519  MISSING_DEPENDENCY=devkit
29520
29521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29522    cygwin_help $MISSING_DEPENDENCY
29523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29524    msys_help $MISSING_DEPENDENCY
29525  else
29526    PKGHANDLER_COMMAND=
29527
29528    case $PKGHANDLER in
29529      apt-get)
29530        apt_help     $MISSING_DEPENDENCY ;;
29531      yum)
29532        yum_help     $MISSING_DEPENDENCY ;;
29533      port)
29534        port_help    $MISSING_DEPENDENCY ;;
29535      pkgutil)
29536        pkgutil_help $MISSING_DEPENDENCY ;;
29537      pkgadd)
29538        pkgadd_help  $MISSING_DEPENDENCY ;;
29539    esac
29540
29541    if test "x$PKGHANDLER_COMMAND" != x; then
29542      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29543    fi
29544  fi
29545
29546      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29547    fi
29548  fi
29549
29550  # Now we have a compiler binary in CXX. Make sure it's okay.
29551
29552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29553
29554  # First separate the path from the arguments. This will split at the first
29555  # space.
29556  complete="$CXX"
29557  path="${complete%% *}"
29558  tmp="$complete EOL"
29559  arguments="${tmp#* }"
29560
29561  # Input might be given as Windows format, start by converting to
29562  # unix format.
29563  new_path=`$CYGPATH -u "$path"`
29564
29565  # Now try to locate executable using which
29566  new_path=`$WHICH "$new_path" 2> /dev/null`
29567  # bat and cmd files are not always considered executable in cygwin causing which
29568  # to not find them
29569  if test "x$new_path" = x \
29570      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29571      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29572    new_path=`$CYGPATH -u "$path"`
29573  fi
29574  if test "x$new_path" = x; then
29575    # Oops. Which didn't find the executable.
29576    # The splitting of arguments from the executable at a space might have been incorrect,
29577    # since paths with space are more likely in Windows. Give it another try with the whole
29578    # argument.
29579    path="$complete"
29580    arguments="EOL"
29581    new_path=`$CYGPATH -u "$path"`
29582    new_path=`$WHICH "$new_path" 2> /dev/null`
29583    # bat and cmd files are not always considered executable in cygwin causing which
29584    # to not find them
29585    if test "x$new_path" = x \
29586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29588      new_path=`$CYGPATH -u "$path"`
29589    fi
29590    if test "x$new_path" = x; then
29591      # It's still not found. Now this is an unrecoverable error.
29592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29593$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29594      has_space=`$ECHO "$complete" | $GREP " "`
29595      if test "x$has_space" != x; then
29596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29598      fi
29599      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29600    fi
29601  fi
29602
29603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29606  # "foo.exe" is OK but "foo" is an error.
29607  #
29608  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29609  # It is also a way to make sure we got the proper file name for the real test later on.
29610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29611  if test "x$test_shortpath" = x; then
29612    # Short path failed, file does not exist as specified.
29613    # Try adding .exe or .cmd
29614    if test -f "${new_path}.exe"; then
29615      input_to_shortpath="${new_path}.exe"
29616    elif test -f "${new_path}.cmd"; then
29617      input_to_shortpath="${new_path}.cmd"
29618    else
29619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29620$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29623      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29624    fi
29625  else
29626    input_to_shortpath="$new_path"
29627  fi
29628
29629  # Call helper function which possibly converts this using DOS-style short mode.
29630  # If so, the updated path is stored in $new_path.
29631  new_path="$input_to_shortpath"
29632
29633  input_path="$input_to_shortpath"
29634  # Check if we need to convert this using DOS-style short mode. If the path
29635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29636  # take no chances and rewrite it.
29637  # Note: m4 eats our [], so we need to use [ and ] instead.
29638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29639  if test "x$has_forbidden_chars" != x; then
29640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29644      # Going to short mode and back again did indeed matter. Since short mode is
29645      # case insensitive, let's make it lowercase to improve readability.
29646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29647      # Now convert it back to Unix-stile (cygpath)
29648      input_path=`$CYGPATH -u "$shortmode_path"`
29649      new_path="$input_path"
29650    fi
29651  fi
29652
29653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29654  if test "x$test_cygdrive_prefix" = x; then
29655    # As a simple fix, exclude /usr/bin since it's not a real path.
29656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29658      # a path prefixed by /cygdrive for fixpath to work.
29659      new_path="$CYGWIN_ROOT_PATH$input_path"
29660    fi
29661  fi
29662
29663  # remove trailing .exe if any
29664  new_path="${new_path/%.exe/}"
29665
29666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29667
29668  # First separate the path from the arguments. This will split at the first
29669  # space.
29670  complete="$CXX"
29671  path="${complete%% *}"
29672  tmp="$complete EOL"
29673  arguments="${tmp#* }"
29674
29675  # Input might be given as Windows format, start by converting to
29676  # unix format.
29677  new_path="$path"
29678
29679  windows_path="$new_path"
29680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29681    unix_path=`$CYGPATH -u "$windows_path"`
29682    new_path="$unix_path"
29683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29685    new_path="$unix_path"
29686  fi
29687
29688
29689  # Now try to locate executable using which
29690  new_path=`$WHICH "$new_path" 2> /dev/null`
29691
29692  if test "x$new_path" = x; then
29693    # Oops. Which didn't find the executable.
29694    # The splitting of arguments from the executable at a space might have been incorrect,
29695    # since paths with space are more likely in Windows. Give it another try with the whole
29696    # argument.
29697    path="$complete"
29698    arguments="EOL"
29699    new_path="$path"
29700
29701  windows_path="$new_path"
29702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29703    unix_path=`$CYGPATH -u "$windows_path"`
29704    new_path="$unix_path"
29705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29707    new_path="$unix_path"
29708  fi
29709
29710
29711    new_path=`$WHICH "$new_path" 2> /dev/null`
29712    # bat and cmd files are not always considered executable in MSYS causing which
29713    # to not find them
29714    if test "x$new_path" = x \
29715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29717      new_path="$path"
29718
29719  windows_path="$new_path"
29720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29721    unix_path=`$CYGPATH -u "$windows_path"`
29722    new_path="$unix_path"
29723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29725    new_path="$unix_path"
29726  fi
29727
29728    fi
29729
29730    if test "x$new_path" = x; then
29731      # It's still not found. Now this is an unrecoverable error.
29732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29733$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29734      has_space=`$ECHO "$complete" | $GREP " "`
29735      if test "x$has_space" != x; then
29736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29738      fi
29739      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29740    fi
29741  fi
29742
29743  # Now new_path has a complete unix path to the binary
29744  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29745    # Keep paths in /bin as-is, but remove trailing .exe if any
29746    new_path="${new_path/%.exe/}"
29747    # Do not save /bin paths to all_fixpath_prefixes!
29748  else
29749    # Not in mixed or Windows style, start by that.
29750    new_path=`cmd //c echo $new_path`
29751
29752  input_path="$new_path"
29753  # Check if we need to convert this using DOS-style short mode. If the path
29754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29755  # take no chances and rewrite it.
29756  # Note: m4 eats our [], so we need to use [ and ] instead.
29757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29758  if test "x$has_forbidden_chars" != x; then
29759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29761  fi
29762
29763    # Output is in $new_path
29764
29765  windows_path="$new_path"
29766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29767    unix_path=`$CYGPATH -u "$windows_path"`
29768    new_path="$unix_path"
29769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29771    new_path="$unix_path"
29772  fi
29773
29774    # remove trailing .exe if any
29775    new_path="${new_path/%.exe/}"
29776
29777    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29778    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29779  fi
29780
29781  else
29782    # We're on a unix platform. Hooray! :)
29783    # First separate the path from the arguments. This will split at the first
29784    # space.
29785    complete="$CXX"
29786    path="${complete%% *}"
29787    tmp="$complete EOL"
29788    arguments="${tmp#* }"
29789
29790    # Cannot rely on the command "which" here since it doesn't always work.
29791    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29792    if test -z "$is_absolute_path"; then
29793      # Path to executable is not absolute. Find it.
29794      IFS_save="$IFS"
29795      IFS=:
29796      for p in $PATH; do
29797        if test -f "$p/$path" && test -x "$p/$path"; then
29798          new_path="$p/$path"
29799          break
29800        fi
29801      done
29802      IFS="$IFS_save"
29803    else
29804      # This is an absolute path, we can use it without further modifications.
29805      new_path="$path"
29806    fi
29807
29808    if test "x$new_path" = x; then
29809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29810$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29811      has_space=`$ECHO "$complete" | $GREP " "`
29812      if test "x$has_space" != x; then
29813        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29814$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29815      fi
29816      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29817    fi
29818  fi
29819
29820  # Now join together the path and the arguments once again
29821  if test "x$arguments" != xEOL; then
29822    new_complete="$new_path ${arguments% *}"
29823  else
29824    new_complete="$new_path"
29825  fi
29826
29827  if test "x$complete" != "x$new_complete"; then
29828    CXX="$new_complete"
29829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29830$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29831  fi
29832
29833  TEST_COMPILER="$CXX"
29834  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29835  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29836  if test "x$OPENJDK_BUILD_OS" != xaix; then
29837    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29839$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29840
29841  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29842    # Follow a chain of symbolic links. Use readlink
29843    # where it exists, else fall back to horribly
29844    # complicated shell code.
29845    if test "x$READLINK_TESTED" != yes; then
29846      # On MacOSX there is a readlink tool with a different
29847      # purpose than the GNU readlink tool. Check the found readlink.
29848      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29849      if test "x$ISGNU" = x; then
29850        # A readlink that we do not know how to use.
29851        # Are there other non-GNU readlinks out there?
29852        READLINK_TESTED=yes
29853        READLINK=
29854      fi
29855    fi
29856
29857    if test "x$READLINK" != x; then
29858      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29859    else
29860      # Save the current directory for restoring afterwards
29861      STARTDIR=$PWD
29862      COUNTER=0
29863      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29864      sym_link_file=`$BASENAME $TEST_COMPILER`
29865      cd $sym_link_dir
29866      # Use -P flag to resolve symlinks in directories.
29867      cd `$THEPWDCMD -P`
29868      sym_link_dir=`$THEPWDCMD -P`
29869      # Resolve file symlinks
29870      while test $COUNTER -lt 20; do
29871        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29872        if test "x$ISLINK" == x; then
29873          # This is not a symbolic link! We are done!
29874          break
29875        fi
29876        # Again resolve directory symlinks since the target of the just found
29877        # link could be in a different directory
29878        cd `$DIRNAME $ISLINK`
29879        sym_link_dir=`$THEPWDCMD -P`
29880        sym_link_file=`$BASENAME $ISLINK`
29881        let COUNTER=COUNTER+1
29882      done
29883      cd $STARTDIR
29884      TEST_COMPILER=$sym_link_dir/$sym_link_file
29885    fi
29886  fi
29887
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29889$as_echo "$TEST_COMPILER" >&6; }
29890  fi
29891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29892$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29893
29894  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29895  if test "x$COMPILER_BASENAME" = "xccache"; then
29896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29897$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29898    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29899    # We want to control ccache invocation ourselves, so ignore this cc and try
29900    # searching again.
29901
29902    # Remove the path to the fake ccache cc from the PATH
29903    RETRY_COMPILER_SAVED_PATH="$PATH"
29904    COMPILER_DIRNAME=`$DIRNAME $CXX`
29905    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29906
29907    # Try again looking for our compiler
29908    if test -n "$ac_tool_prefix"; then
29909  for ac_prog in $TOOLCHAIN_CXX_BINARY
29910  do
29911    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29912set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29914$as_echo_n "checking for $ac_word... " >&6; }
29915if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29916  $as_echo_n "(cached) " >&6
29917else
29918  if test -n "$PROPER_COMPILER_CXX"; then
29919  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29920else
29921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29922for as_dir in $PATH
29923do
29924  IFS=$as_save_IFS
29925  test -z "$as_dir" && as_dir=.
29926    for ac_exec_ext in '' $ac_executable_extensions; do
29927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29928    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29930    break 2
29931  fi
29932done
29933  done
29934IFS=$as_save_IFS
29935
29936fi
29937fi
29938PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29939if test -n "$PROPER_COMPILER_CXX"; then
29940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29941$as_echo "$PROPER_COMPILER_CXX" >&6; }
29942else
29943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29944$as_echo "no" >&6; }
29945fi
29946
29947
29948    test -n "$PROPER_COMPILER_CXX" && break
29949  done
29950fi
29951if test -z "$PROPER_COMPILER_CXX"; then
29952  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29953  for ac_prog in $TOOLCHAIN_CXX_BINARY
29954do
29955  # Extract the first word of "$ac_prog", so it can be a program name with args.
29956set dummy $ac_prog; ac_word=$2
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29958$as_echo_n "checking for $ac_word... " >&6; }
29959if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29960  $as_echo_n "(cached) " >&6
29961else
29962  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29963  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29964else
29965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29966for as_dir in $PATH
29967do
29968  IFS=$as_save_IFS
29969  test -z "$as_dir" && as_dir=.
29970    for ac_exec_ext in '' $ac_executable_extensions; do
29971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29972    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29974    break 2
29975  fi
29976done
29977  done
29978IFS=$as_save_IFS
29979
29980fi
29981fi
29982ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29983if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29985$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29986else
29987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29988$as_echo "no" >&6; }
29989fi
29990
29991
29992  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29993done
29994
29995  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29996    PROPER_COMPILER_CXX=""
29997  else
29998    case $cross_compiling:$ac_tool_warned in
29999yes:)
30000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30002ac_tool_warned=yes ;;
30003esac
30004    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30005  fi
30006fi
30007
30008
30009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30010
30011  # First separate the path from the arguments. This will split at the first
30012  # space.
30013  complete="$PROPER_COMPILER_CXX"
30014  path="${complete%% *}"
30015  tmp="$complete EOL"
30016  arguments="${tmp#* }"
30017
30018  # Input might be given as Windows format, start by converting to
30019  # unix format.
30020  new_path=`$CYGPATH -u "$path"`
30021
30022  # Now try to locate executable using which
30023  new_path=`$WHICH "$new_path" 2> /dev/null`
30024  # bat and cmd files are not always considered executable in cygwin causing which
30025  # to not find them
30026  if test "x$new_path" = x \
30027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30029    new_path=`$CYGPATH -u "$path"`
30030  fi
30031  if test "x$new_path" = x; then
30032    # Oops. Which didn't find the executable.
30033    # The splitting of arguments from the executable at a space might have been incorrect,
30034    # since paths with space are more likely in Windows. Give it another try with the whole
30035    # argument.
30036    path="$complete"
30037    arguments="EOL"
30038    new_path=`$CYGPATH -u "$path"`
30039    new_path=`$WHICH "$new_path" 2> /dev/null`
30040    # bat and cmd files are not always considered executable in cygwin causing which
30041    # to not find them
30042    if test "x$new_path" = x \
30043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30045      new_path=`$CYGPATH -u "$path"`
30046    fi
30047    if test "x$new_path" = x; then
30048      # It's still not found. Now this is an unrecoverable error.
30049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30050$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30051      has_space=`$ECHO "$complete" | $GREP " "`
30052      if test "x$has_space" != x; then
30053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30055      fi
30056      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30057    fi
30058  fi
30059
30060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30063  # "foo.exe" is OK but "foo" is an error.
30064  #
30065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30066  # It is also a way to make sure we got the proper file name for the real test later on.
30067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30068  if test "x$test_shortpath" = x; then
30069    # Short path failed, file does not exist as specified.
30070    # Try adding .exe or .cmd
30071    if test -f "${new_path}.exe"; then
30072      input_to_shortpath="${new_path}.exe"
30073    elif test -f "${new_path}.cmd"; then
30074      input_to_shortpath="${new_path}.cmd"
30075    else
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30077$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30080      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30081    fi
30082  else
30083    input_to_shortpath="$new_path"
30084  fi
30085
30086  # Call helper function which possibly converts this using DOS-style short mode.
30087  # If so, the updated path is stored in $new_path.
30088  new_path="$input_to_shortpath"
30089
30090  input_path="$input_to_shortpath"
30091  # Check if we need to convert this using DOS-style short mode. If the path
30092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30093  # take no chances and rewrite it.
30094  # Note: m4 eats our [], so we need to use [ and ] instead.
30095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30096  if test "x$has_forbidden_chars" != x; then
30097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30101      # Going to short mode and back again did indeed matter. Since short mode is
30102      # case insensitive, let's make it lowercase to improve readability.
30103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30104      # Now convert it back to Unix-stile (cygpath)
30105      input_path=`$CYGPATH -u "$shortmode_path"`
30106      new_path="$input_path"
30107    fi
30108  fi
30109
30110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30111  if test "x$test_cygdrive_prefix" = x; then
30112    # As a simple fix, exclude /usr/bin since it's not a real path.
30113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30115      # a path prefixed by /cygdrive for fixpath to work.
30116      new_path="$CYGWIN_ROOT_PATH$input_path"
30117    fi
30118  fi
30119
30120  # remove trailing .exe if any
30121  new_path="${new_path/%.exe/}"
30122
30123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30124
30125  # First separate the path from the arguments. This will split at the first
30126  # space.
30127  complete="$PROPER_COMPILER_CXX"
30128  path="${complete%% *}"
30129  tmp="$complete EOL"
30130  arguments="${tmp#* }"
30131
30132  # Input might be given as Windows format, start by converting to
30133  # unix format.
30134  new_path="$path"
30135
30136  windows_path="$new_path"
30137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30138    unix_path=`$CYGPATH -u "$windows_path"`
30139    new_path="$unix_path"
30140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30142    new_path="$unix_path"
30143  fi
30144
30145
30146  # Now try to locate executable using which
30147  new_path=`$WHICH "$new_path" 2> /dev/null`
30148
30149  if test "x$new_path" = x; then
30150    # Oops. Which didn't find the executable.
30151    # The splitting of arguments from the executable at a space might have been incorrect,
30152    # since paths with space are more likely in Windows. Give it another try with the whole
30153    # argument.
30154    path="$complete"
30155    arguments="EOL"
30156    new_path="$path"
30157
30158  windows_path="$new_path"
30159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30160    unix_path=`$CYGPATH -u "$windows_path"`
30161    new_path="$unix_path"
30162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30164    new_path="$unix_path"
30165  fi
30166
30167
30168    new_path=`$WHICH "$new_path" 2> /dev/null`
30169    # bat and cmd files are not always considered executable in MSYS causing which
30170    # to not find them
30171    if test "x$new_path" = x \
30172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30174      new_path="$path"
30175
30176  windows_path="$new_path"
30177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30178    unix_path=`$CYGPATH -u "$windows_path"`
30179    new_path="$unix_path"
30180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30182    new_path="$unix_path"
30183  fi
30184
30185    fi
30186
30187    if test "x$new_path" = x; then
30188      # It's still not found. Now this is an unrecoverable error.
30189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30190$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30191      has_space=`$ECHO "$complete" | $GREP " "`
30192      if test "x$has_space" != x; then
30193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30195      fi
30196      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30197    fi
30198  fi
30199
30200  # Now new_path has a complete unix path to the binary
30201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30202    # Keep paths in /bin as-is, but remove trailing .exe if any
30203    new_path="${new_path/%.exe/}"
30204    # Do not save /bin paths to all_fixpath_prefixes!
30205  else
30206    # Not in mixed or Windows style, start by that.
30207    new_path=`cmd //c echo $new_path`
30208
30209  input_path="$new_path"
30210  # Check if we need to convert this using DOS-style short mode. If the path
30211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30212  # take no chances and rewrite it.
30213  # Note: m4 eats our [], so we need to use [ and ] instead.
30214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30215  if test "x$has_forbidden_chars" != x; then
30216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30218  fi
30219
30220    # Output is in $new_path
30221
30222  windows_path="$new_path"
30223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30224    unix_path=`$CYGPATH -u "$windows_path"`
30225    new_path="$unix_path"
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30228    new_path="$unix_path"
30229  fi
30230
30231    # remove trailing .exe if any
30232    new_path="${new_path/%.exe/}"
30233
30234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30236  fi
30237
30238  else
30239    # We're on a unix platform. Hooray! :)
30240    # First separate the path from the arguments. This will split at the first
30241    # space.
30242    complete="$PROPER_COMPILER_CXX"
30243    path="${complete%% *}"
30244    tmp="$complete EOL"
30245    arguments="${tmp#* }"
30246
30247    # Cannot rely on the command "which" here since it doesn't always work.
30248    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30249    if test -z "$is_absolute_path"; then
30250      # Path to executable is not absolute. Find it.
30251      IFS_save="$IFS"
30252      IFS=:
30253      for p in $PATH; do
30254        if test -f "$p/$path" && test -x "$p/$path"; then
30255          new_path="$p/$path"
30256          break
30257        fi
30258      done
30259      IFS="$IFS_save"
30260    else
30261      # This is an absolute path, we can use it without further modifications.
30262      new_path="$path"
30263    fi
30264
30265    if test "x$new_path" = x; then
30266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30267$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30268      has_space=`$ECHO "$complete" | $GREP " "`
30269      if test "x$has_space" != x; then
30270        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30272      fi
30273      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30274    fi
30275  fi
30276
30277  # Now join together the path and the arguments once again
30278  if test "x$arguments" != xEOL; then
30279    new_complete="$new_path ${arguments% *}"
30280  else
30281    new_complete="$new_path"
30282  fi
30283
30284  if test "x$complete" != "x$new_complete"; then
30285    PROPER_COMPILER_CXX="$new_complete"
30286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30287$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30288  fi
30289
30290    PATH="$RETRY_COMPILER_SAVED_PATH"
30291
30292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30293$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30294
30295  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30296    # Follow a chain of symbolic links. Use readlink
30297    # where it exists, else fall back to horribly
30298    # complicated shell code.
30299    if test "x$READLINK_TESTED" != yes; then
30300      # On MacOSX there is a readlink tool with a different
30301      # purpose than the GNU readlink tool. Check the found readlink.
30302      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30303      if test "x$ISGNU" = x; then
30304        # A readlink that we do not know how to use.
30305        # Are there other non-GNU readlinks out there?
30306        READLINK_TESTED=yes
30307        READLINK=
30308      fi
30309    fi
30310
30311    if test "x$READLINK" != x; then
30312      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30313    else
30314      # Save the current directory for restoring afterwards
30315      STARTDIR=$PWD
30316      COUNTER=0
30317      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30318      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30319      cd $sym_link_dir
30320      # Use -P flag to resolve symlinks in directories.
30321      cd `$THEPWDCMD -P`
30322      sym_link_dir=`$THEPWDCMD -P`
30323      # Resolve file symlinks
30324      while test $COUNTER -lt 20; do
30325        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30326        if test "x$ISLINK" == x; then
30327          # This is not a symbolic link! We are done!
30328          break
30329        fi
30330        # Again resolve directory symlinks since the target of the just found
30331        # link could be in a different directory
30332        cd `$DIRNAME $ISLINK`
30333        sym_link_dir=`$THEPWDCMD -P`
30334        sym_link_file=`$BASENAME $ISLINK`
30335        let COUNTER=COUNTER+1
30336      done
30337      cd $STARTDIR
30338      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30339    fi
30340  fi
30341
30342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30343$as_echo "$PROPER_COMPILER_CXX" >&6; }
30344    CXX="$PROPER_COMPILER_CXX"
30345  else
30346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30347$as_echo "no, keeping CXX" >&6; }
30348  fi
30349
30350
30351  COMPILER=$CXX
30352  COMPILER_NAME=$COMPILER_NAME
30353
30354  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30355    # cc -V output typically looks like
30356    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30357    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30358    # Check that this is likely to be the Solaris Studio cc.
30359    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30360    if test $? -ne 0; then
30361      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30362      { $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
30363$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30364      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30365$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30366      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30367$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30368      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30369    fi
30370    # Remove usage instructions (if present), and
30371    # collapse compiler output into a single line
30372    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30373        $SED -e 's/ *[Uu]sage:.*//'`
30374    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30375        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30376  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30377    # xlc -qversion output typically looks like
30378    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30379    #     Version: 11.01.0000.0015
30380    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30381    # Check that this is likely to be the IBM XL C compiler.
30382    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30383    if test $? -ne 0; then
30384      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30385      { $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
30386$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30387      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30388$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30389      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30390$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30391      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30392    fi
30393    # Collapse compiler output into a single line
30394    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30395    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30396        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30397  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30398    # There is no specific version flag, but all output starts with a version string.
30399    # First line typically looks something like:
30400    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30401    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30402    # Check that this is likely to be Microsoft CL.EXE.
30403    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30404    if test $? -ne 0; then
30405      { $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
30406$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30407      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30408$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30409      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30410    fi
30411    # Collapse compiler output into a single line
30412    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30413    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30414        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30415  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30416    # gcc --version output typically looks like
30417    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30418    #     Copyright (C) 2013 Free Software Foundation, Inc.
30419    #     This is free software; see the source for copying conditions.  There is NO
30420    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30421    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30422    # Check that this is likely to be GCC.
30423    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30424    if test $? -ne 0; then
30425      { $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
30426$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30427      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30428$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30429      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30430    fi
30431    # Remove Copyright and legalese from version string, and
30432    # collapse into a single line
30433    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30434        $SED -e 's/ *Copyright .*//'`
30435    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30436        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30437  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30438    # clang --version output typically looks like
30439    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30440    #    clang version 3.3 (tags/RELEASE_33/final)
30441    # or
30442    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30443    #    Target: x86_64-pc-linux-gnu
30444    #    Thread model: posix
30445    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30446    # Check that this is likely to be clang
30447    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30448    if test $? -ne 0; then
30449      { $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
30450$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30451      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30452$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30453      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30454    fi
30455    # Collapse compiler output into a single line
30456    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30457    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30458        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30459  else
30460      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30461  fi
30462  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30463  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30464  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30465  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30466
30467  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30468$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30469
30470
30471  # Now that we have resolved CXX ourself, let autoconf have its go at it
30472  ac_ext=cpp
30473ac_cpp='$CXXCPP $CPPFLAGS'
30474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30477if test -z "$CXX"; then
30478  if test -n "$CCC"; then
30479    CXX=$CCC
30480  else
30481    if test -n "$ac_tool_prefix"; then
30482  for ac_prog in $CXX
30483  do
30484    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30485set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30487$as_echo_n "checking for $ac_word... " >&6; }
30488if ${ac_cv_prog_CXX+:} false; then :
30489  $as_echo_n "(cached) " >&6
30490else
30491  if test -n "$CXX"; then
30492  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30493else
30494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30495for as_dir in $PATH
30496do
30497  IFS=$as_save_IFS
30498  test -z "$as_dir" && as_dir=.
30499    for ac_exec_ext in '' $ac_executable_extensions; do
30500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30501    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30503    break 2
30504  fi
30505done
30506  done
30507IFS=$as_save_IFS
30508
30509fi
30510fi
30511CXX=$ac_cv_prog_CXX
30512if test -n "$CXX"; then
30513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30514$as_echo "$CXX" >&6; }
30515else
30516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30517$as_echo "no" >&6; }
30518fi
30519
30520
30521    test -n "$CXX" && break
30522  done
30523fi
30524if test -z "$CXX"; then
30525  ac_ct_CXX=$CXX
30526  for ac_prog in $CXX
30527do
30528  # Extract the first word of "$ac_prog", so it can be a program name with args.
30529set dummy $ac_prog; ac_word=$2
30530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30531$as_echo_n "checking for $ac_word... " >&6; }
30532if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30533  $as_echo_n "(cached) " >&6
30534else
30535  if test -n "$ac_ct_CXX"; then
30536  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30537else
30538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30539for as_dir in $PATH
30540do
30541  IFS=$as_save_IFS
30542  test -z "$as_dir" && as_dir=.
30543    for ac_exec_ext in '' $ac_executable_extensions; do
30544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30545    ac_cv_prog_ac_ct_CXX="$ac_prog"
30546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30547    break 2
30548  fi
30549done
30550  done
30551IFS=$as_save_IFS
30552
30553fi
30554fi
30555ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30556if test -n "$ac_ct_CXX"; then
30557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30558$as_echo "$ac_ct_CXX" >&6; }
30559else
30560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30561$as_echo "no" >&6; }
30562fi
30563
30564
30565  test -n "$ac_ct_CXX" && break
30566done
30567
30568  if test "x$ac_ct_CXX" = x; then
30569    CXX="g++"
30570  else
30571    case $cross_compiling:$ac_tool_warned in
30572yes:)
30573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30575ac_tool_warned=yes ;;
30576esac
30577    CXX=$ac_ct_CXX
30578  fi
30579fi
30580
30581  fi
30582fi
30583# Provide some information about the compiler.
30584$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30585set X $ac_compile
30586ac_compiler=$2
30587for ac_option in --version -v -V -qversion; do
30588  { { ac_try="$ac_compiler $ac_option >&5"
30589case "(($ac_try" in
30590  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30591  *) ac_try_echo=$ac_try;;
30592esac
30593eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30594$as_echo "$ac_try_echo"; } >&5
30595  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30596  ac_status=$?
30597  if test -s conftest.err; then
30598    sed '10a\
30599... rest of stderr output deleted ...
30600         10q' conftest.err >conftest.er1
30601    cat conftest.er1 >&5
30602  fi
30603  rm -f conftest.er1 conftest.err
30604  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30605  test $ac_status = 0; }
30606done
30607
30608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30609$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30610if ${ac_cv_cxx_compiler_gnu+:} false; then :
30611  $as_echo_n "(cached) " >&6
30612else
30613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30614/* end confdefs.h.  */
30615
30616int
30617main ()
30618{
30619#ifndef __GNUC__
30620       choke me
30621#endif
30622
30623  ;
30624  return 0;
30625}
30626_ACEOF
30627if ac_fn_cxx_try_compile "$LINENO"; then :
30628  ac_compiler_gnu=yes
30629else
30630  ac_compiler_gnu=no
30631fi
30632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30633ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30634
30635fi
30636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30637$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30638if test $ac_compiler_gnu = yes; then
30639  GXX=yes
30640else
30641  GXX=
30642fi
30643ac_test_CXXFLAGS=${CXXFLAGS+set}
30644ac_save_CXXFLAGS=$CXXFLAGS
30645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30646$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30647if ${ac_cv_prog_cxx_g+:} false; then :
30648  $as_echo_n "(cached) " >&6
30649else
30650  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30651   ac_cxx_werror_flag=yes
30652   ac_cv_prog_cxx_g=no
30653   CXXFLAGS="-g"
30654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30655/* end confdefs.h.  */
30656
30657int
30658main ()
30659{
30660
30661  ;
30662  return 0;
30663}
30664_ACEOF
30665if ac_fn_cxx_try_compile "$LINENO"; then :
30666  ac_cv_prog_cxx_g=yes
30667else
30668  CXXFLAGS=""
30669      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30670/* end confdefs.h.  */
30671
30672int
30673main ()
30674{
30675
30676  ;
30677  return 0;
30678}
30679_ACEOF
30680if ac_fn_cxx_try_compile "$LINENO"; then :
30681
30682else
30683  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30684	 CXXFLAGS="-g"
30685	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30686/* end confdefs.h.  */
30687
30688int
30689main ()
30690{
30691
30692  ;
30693  return 0;
30694}
30695_ACEOF
30696if ac_fn_cxx_try_compile "$LINENO"; then :
30697  ac_cv_prog_cxx_g=yes
30698fi
30699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30700fi
30701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30702fi
30703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30704   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30705fi
30706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30707$as_echo "$ac_cv_prog_cxx_g" >&6; }
30708if test "$ac_test_CXXFLAGS" = set; then
30709  CXXFLAGS=$ac_save_CXXFLAGS
30710elif test $ac_cv_prog_cxx_g = yes; then
30711  if test "$GXX" = yes; then
30712    CXXFLAGS="-g -O2"
30713  else
30714    CXXFLAGS="-g"
30715  fi
30716else
30717  if test "$GXX" = yes; then
30718    CXXFLAGS="-O2"
30719  else
30720    CXXFLAGS=
30721  fi
30722fi
30723ac_ext=cpp
30724ac_cpp='$CXXCPP $CPPFLAGS'
30725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30728
30729
30730  #
30731  # Setup the preprocessor (CPP and CXXCPP)
30732  #
30733  ac_ext=c
30734ac_cpp='$CPP $CPPFLAGS'
30735ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30736ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30737ac_compiler_gnu=$ac_cv_c_compiler_gnu
30738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30739$as_echo_n "checking how to run the C preprocessor... " >&6; }
30740# On Suns, sometimes $CPP names a directory.
30741if test -n "$CPP" && test -d "$CPP"; then
30742  CPP=
30743fi
30744if test -z "$CPP"; then
30745  if ${ac_cv_prog_CPP+:} false; then :
30746  $as_echo_n "(cached) " >&6
30747else
30748      # Double quotes because CPP needs to be expanded
30749    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30750    do
30751      ac_preproc_ok=false
30752for ac_c_preproc_warn_flag in '' yes
30753do
30754  # Use a header file that comes with gcc, so configuring glibc
30755  # with a fresh cross-compiler works.
30756  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30757  # <limits.h> exists even on freestanding compilers.
30758  # On the NeXT, cc -E runs the code through the compiler's parser,
30759  # not just through cpp. "Syntax error" is here to catch this case.
30760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30761/* end confdefs.h.  */
30762#ifdef __STDC__
30763# include <limits.h>
30764#else
30765# include <assert.h>
30766#endif
30767		     Syntax error
30768_ACEOF
30769if ac_fn_c_try_cpp "$LINENO"; then :
30770
30771else
30772  # Broken: fails on valid input.
30773continue
30774fi
30775rm -f conftest.err conftest.i conftest.$ac_ext
30776
30777  # OK, works on sane cases.  Now check whether nonexistent headers
30778  # can be detected and how.
30779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30780/* end confdefs.h.  */
30781#include <ac_nonexistent.h>
30782_ACEOF
30783if ac_fn_c_try_cpp "$LINENO"; then :
30784  # Broken: success on invalid input.
30785continue
30786else
30787  # Passes both tests.
30788ac_preproc_ok=:
30789break
30790fi
30791rm -f conftest.err conftest.i conftest.$ac_ext
30792
30793done
30794# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30795rm -f conftest.i conftest.err conftest.$ac_ext
30796if $ac_preproc_ok; then :
30797  break
30798fi
30799
30800    done
30801    ac_cv_prog_CPP=$CPP
30802
30803fi
30804  CPP=$ac_cv_prog_CPP
30805else
30806  ac_cv_prog_CPP=$CPP
30807fi
30808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30809$as_echo "$CPP" >&6; }
30810ac_preproc_ok=false
30811for ac_c_preproc_warn_flag in '' yes
30812do
30813  # Use a header file that comes with gcc, so configuring glibc
30814  # with a fresh cross-compiler works.
30815  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30816  # <limits.h> exists even on freestanding compilers.
30817  # On the NeXT, cc -E runs the code through the compiler's parser,
30818  # not just through cpp. "Syntax error" is here to catch this case.
30819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30820/* end confdefs.h.  */
30821#ifdef __STDC__
30822# include <limits.h>
30823#else
30824# include <assert.h>
30825#endif
30826		     Syntax error
30827_ACEOF
30828if ac_fn_c_try_cpp "$LINENO"; then :
30829
30830else
30831  # Broken: fails on valid input.
30832continue
30833fi
30834rm -f conftest.err conftest.i conftest.$ac_ext
30835
30836  # OK, works on sane cases.  Now check whether nonexistent headers
30837  # can be detected and how.
30838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30839/* end confdefs.h.  */
30840#include <ac_nonexistent.h>
30841_ACEOF
30842if ac_fn_c_try_cpp "$LINENO"; then :
30843  # Broken: success on invalid input.
30844continue
30845else
30846  # Passes both tests.
30847ac_preproc_ok=:
30848break
30849fi
30850rm -f conftest.err conftest.i conftest.$ac_ext
30851
30852done
30853# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30854rm -f conftest.i conftest.err conftest.$ac_ext
30855if $ac_preproc_ok; then :
30856
30857else
30858  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30860as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30861See \`config.log' for more details" "$LINENO" 5; }
30862fi
30863
30864ac_ext=cpp
30865ac_cpp='$CXXCPP $CPPFLAGS'
30866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30869
30870
30871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30872
30873  # First separate the path from the arguments. This will split at the first
30874  # space.
30875  complete="$CPP"
30876  path="${complete%% *}"
30877  tmp="$complete EOL"
30878  arguments="${tmp#* }"
30879
30880  # Input might be given as Windows format, start by converting to
30881  # unix format.
30882  new_path=`$CYGPATH -u "$path"`
30883
30884  # Now try to locate executable using which
30885  new_path=`$WHICH "$new_path" 2> /dev/null`
30886  # bat and cmd files are not always considered executable in cygwin causing which
30887  # to not find them
30888  if test "x$new_path" = x \
30889      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30890      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30891    new_path=`$CYGPATH -u "$path"`
30892  fi
30893  if test "x$new_path" = x; then
30894    # Oops. Which didn't find the executable.
30895    # The splitting of arguments from the executable at a space might have been incorrect,
30896    # since paths with space are more likely in Windows. Give it another try with the whole
30897    # argument.
30898    path="$complete"
30899    arguments="EOL"
30900    new_path=`$CYGPATH -u "$path"`
30901    new_path=`$WHICH "$new_path" 2> /dev/null`
30902    # bat and cmd files are not always considered executable in cygwin causing which
30903    # to not find them
30904    if test "x$new_path" = x \
30905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30907      new_path=`$CYGPATH -u "$path"`
30908    fi
30909    if test "x$new_path" = x; then
30910      # It's still not found. Now this is an unrecoverable error.
30911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30912$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30913      has_space=`$ECHO "$complete" | $GREP " "`
30914      if test "x$has_space" != x; then
30915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30917      fi
30918      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30919    fi
30920  fi
30921
30922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30925  # "foo.exe" is OK but "foo" is an error.
30926  #
30927  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30928  # It is also a way to make sure we got the proper file name for the real test later on.
30929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30930  if test "x$test_shortpath" = x; then
30931    # Short path failed, file does not exist as specified.
30932    # Try adding .exe or .cmd
30933    if test -f "${new_path}.exe"; then
30934      input_to_shortpath="${new_path}.exe"
30935    elif test -f "${new_path}.cmd"; then
30936      input_to_shortpath="${new_path}.cmd"
30937    else
30938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30939$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30942      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30943    fi
30944  else
30945    input_to_shortpath="$new_path"
30946  fi
30947
30948  # Call helper function which possibly converts this using DOS-style short mode.
30949  # If so, the updated path is stored in $new_path.
30950  new_path="$input_to_shortpath"
30951
30952  input_path="$input_to_shortpath"
30953  # Check if we need to convert this using DOS-style short mode. If the path
30954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30955  # take no chances and rewrite it.
30956  # Note: m4 eats our [], so we need to use [ and ] instead.
30957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30958  if test "x$has_forbidden_chars" != x; then
30959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30963      # Going to short mode and back again did indeed matter. Since short mode is
30964      # case insensitive, let's make it lowercase to improve readability.
30965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30966      # Now convert it back to Unix-stile (cygpath)
30967      input_path=`$CYGPATH -u "$shortmode_path"`
30968      new_path="$input_path"
30969    fi
30970  fi
30971
30972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30973  if test "x$test_cygdrive_prefix" = x; then
30974    # As a simple fix, exclude /usr/bin since it's not a real path.
30975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30977      # a path prefixed by /cygdrive for fixpath to work.
30978      new_path="$CYGWIN_ROOT_PATH$input_path"
30979    fi
30980  fi
30981
30982  # remove trailing .exe if any
30983  new_path="${new_path/%.exe/}"
30984
30985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30986
30987  # First separate the path from the arguments. This will split at the first
30988  # space.
30989  complete="$CPP"
30990  path="${complete%% *}"
30991  tmp="$complete EOL"
30992  arguments="${tmp#* }"
30993
30994  # Input might be given as Windows format, start by converting to
30995  # unix format.
30996  new_path="$path"
30997
30998  windows_path="$new_path"
30999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31000    unix_path=`$CYGPATH -u "$windows_path"`
31001    new_path="$unix_path"
31002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31004    new_path="$unix_path"
31005  fi
31006
31007
31008  # Now try to locate executable using which
31009  new_path=`$WHICH "$new_path" 2> /dev/null`
31010
31011  if test "x$new_path" = x; then
31012    # Oops. Which didn't find the executable.
31013    # The splitting of arguments from the executable at a space might have been incorrect,
31014    # since paths with space are more likely in Windows. Give it another try with the whole
31015    # argument.
31016    path="$complete"
31017    arguments="EOL"
31018    new_path="$path"
31019
31020  windows_path="$new_path"
31021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31022    unix_path=`$CYGPATH -u "$windows_path"`
31023    new_path="$unix_path"
31024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31026    new_path="$unix_path"
31027  fi
31028
31029
31030    new_path=`$WHICH "$new_path" 2> /dev/null`
31031    # bat and cmd files are not always considered executable in MSYS causing which
31032    # to not find them
31033    if test "x$new_path" = x \
31034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31036      new_path="$path"
31037
31038  windows_path="$new_path"
31039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31040    unix_path=`$CYGPATH -u "$windows_path"`
31041    new_path="$unix_path"
31042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31044    new_path="$unix_path"
31045  fi
31046
31047    fi
31048
31049    if test "x$new_path" = x; then
31050      # It's still not found. Now this is an unrecoverable error.
31051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31052$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31053      has_space=`$ECHO "$complete" | $GREP " "`
31054      if test "x$has_space" != x; then
31055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31057      fi
31058      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31059    fi
31060  fi
31061
31062  # Now new_path has a complete unix path to the binary
31063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31064    # Keep paths in /bin as-is, but remove trailing .exe if any
31065    new_path="${new_path/%.exe/}"
31066    # Do not save /bin paths to all_fixpath_prefixes!
31067  else
31068    # Not in mixed or Windows style, start by that.
31069    new_path=`cmd //c echo $new_path`
31070
31071  input_path="$new_path"
31072  # Check if we need to convert this using DOS-style short mode. If the path
31073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31074  # take no chances and rewrite it.
31075  # Note: m4 eats our [], so we need to use [ and ] instead.
31076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31077  if test "x$has_forbidden_chars" != x; then
31078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31080  fi
31081
31082    # Output is in $new_path
31083
31084  windows_path="$new_path"
31085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31086    unix_path=`$CYGPATH -u "$windows_path"`
31087    new_path="$unix_path"
31088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31090    new_path="$unix_path"
31091  fi
31092
31093    # remove trailing .exe if any
31094    new_path="${new_path/%.exe/}"
31095
31096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31098  fi
31099
31100  else
31101    # We're on a unix platform. Hooray! :)
31102    # First separate the path from the arguments. This will split at the first
31103    # space.
31104    complete="$CPP"
31105    path="${complete%% *}"
31106    tmp="$complete EOL"
31107    arguments="${tmp#* }"
31108
31109    # Cannot rely on the command "which" here since it doesn't always work.
31110    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31111    if test -z "$is_absolute_path"; then
31112      # Path to executable is not absolute. Find it.
31113      IFS_save="$IFS"
31114      IFS=:
31115      for p in $PATH; do
31116        if test -f "$p/$path" && test -x "$p/$path"; then
31117          new_path="$p/$path"
31118          break
31119        fi
31120      done
31121      IFS="$IFS_save"
31122    else
31123      # This is an absolute path, we can use it without further modifications.
31124      new_path="$path"
31125    fi
31126
31127    if test "x$new_path" = x; then
31128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31129$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31130      has_space=`$ECHO "$complete" | $GREP " "`
31131      if test "x$has_space" != x; then
31132        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31134      fi
31135      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31136    fi
31137  fi
31138
31139  # Now join together the path and the arguments once again
31140  if test "x$arguments" != xEOL; then
31141    new_complete="$new_path ${arguments% *}"
31142  else
31143    new_complete="$new_path"
31144  fi
31145
31146  if test "x$complete" != "x$new_complete"; then
31147    CPP="$new_complete"
31148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31149$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31150  fi
31151
31152  ac_ext=cpp
31153ac_cpp='$CXXCPP $CPPFLAGS'
31154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31158$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31159if test -z "$CXXCPP"; then
31160  if ${ac_cv_prog_CXXCPP+:} false; then :
31161  $as_echo_n "(cached) " >&6
31162else
31163      # Double quotes because CXXCPP needs to be expanded
31164    for CXXCPP in "$CXX -E" "/lib/cpp"
31165    do
31166      ac_preproc_ok=false
31167for ac_cxx_preproc_warn_flag in '' yes
31168do
31169  # Use a header file that comes with gcc, so configuring glibc
31170  # with a fresh cross-compiler works.
31171  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31172  # <limits.h> exists even on freestanding compilers.
31173  # On the NeXT, cc -E runs the code through the compiler's parser,
31174  # not just through cpp. "Syntax error" is here to catch this case.
31175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31176/* end confdefs.h.  */
31177#ifdef __STDC__
31178# include <limits.h>
31179#else
31180# include <assert.h>
31181#endif
31182		     Syntax error
31183_ACEOF
31184if ac_fn_cxx_try_cpp "$LINENO"; then :
31185
31186else
31187  # Broken: fails on valid input.
31188continue
31189fi
31190rm -f conftest.err conftest.i conftest.$ac_ext
31191
31192  # OK, works on sane cases.  Now check whether nonexistent headers
31193  # can be detected and how.
31194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31195/* end confdefs.h.  */
31196#include <ac_nonexistent.h>
31197_ACEOF
31198if ac_fn_cxx_try_cpp "$LINENO"; then :
31199  # Broken: success on invalid input.
31200continue
31201else
31202  # Passes both tests.
31203ac_preproc_ok=:
31204break
31205fi
31206rm -f conftest.err conftest.i conftest.$ac_ext
31207
31208done
31209# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31210rm -f conftest.i conftest.err conftest.$ac_ext
31211if $ac_preproc_ok; then :
31212  break
31213fi
31214
31215    done
31216    ac_cv_prog_CXXCPP=$CXXCPP
31217
31218fi
31219  CXXCPP=$ac_cv_prog_CXXCPP
31220else
31221  ac_cv_prog_CXXCPP=$CXXCPP
31222fi
31223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31224$as_echo "$CXXCPP" >&6; }
31225ac_preproc_ok=false
31226for ac_cxx_preproc_warn_flag in '' yes
31227do
31228  # Use a header file that comes with gcc, so configuring glibc
31229  # with a fresh cross-compiler works.
31230  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31231  # <limits.h> exists even on freestanding compilers.
31232  # On the NeXT, cc -E runs the code through the compiler's parser,
31233  # not just through cpp. "Syntax error" is here to catch this case.
31234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31235/* end confdefs.h.  */
31236#ifdef __STDC__
31237# include <limits.h>
31238#else
31239# include <assert.h>
31240#endif
31241		     Syntax error
31242_ACEOF
31243if ac_fn_cxx_try_cpp "$LINENO"; then :
31244
31245else
31246  # Broken: fails on valid input.
31247continue
31248fi
31249rm -f conftest.err conftest.i conftest.$ac_ext
31250
31251  # OK, works on sane cases.  Now check whether nonexistent headers
31252  # can be detected and how.
31253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31254/* end confdefs.h.  */
31255#include <ac_nonexistent.h>
31256_ACEOF
31257if ac_fn_cxx_try_cpp "$LINENO"; then :
31258  # Broken: success on invalid input.
31259continue
31260else
31261  # Passes both tests.
31262ac_preproc_ok=:
31263break
31264fi
31265rm -f conftest.err conftest.i conftest.$ac_ext
31266
31267done
31268# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31269rm -f conftest.i conftest.err conftest.$ac_ext
31270if $ac_preproc_ok; then :
31271
31272else
31273  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31275as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31276See \`config.log' for more details" "$LINENO" 5; }
31277fi
31278
31279ac_ext=cpp
31280ac_cpp='$CXXCPP $CPPFLAGS'
31281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31284
31285
31286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31287
31288  # First separate the path from the arguments. This will split at the first
31289  # space.
31290  complete="$CXXCPP"
31291  path="${complete%% *}"
31292  tmp="$complete EOL"
31293  arguments="${tmp#* }"
31294
31295  # Input might be given as Windows format, start by converting to
31296  # unix format.
31297  new_path=`$CYGPATH -u "$path"`
31298
31299  # Now try to locate executable using which
31300  new_path=`$WHICH "$new_path" 2> /dev/null`
31301  # bat and cmd files are not always considered executable in cygwin causing which
31302  # to not find them
31303  if test "x$new_path" = x \
31304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31306    new_path=`$CYGPATH -u "$path"`
31307  fi
31308  if test "x$new_path" = x; then
31309    # Oops. Which didn't find the executable.
31310    # The splitting of arguments from the executable at a space might have been incorrect,
31311    # since paths with space are more likely in Windows. Give it another try with the whole
31312    # argument.
31313    path="$complete"
31314    arguments="EOL"
31315    new_path=`$CYGPATH -u "$path"`
31316    new_path=`$WHICH "$new_path" 2> /dev/null`
31317    # bat and cmd files are not always considered executable in cygwin causing which
31318    # to not find them
31319    if test "x$new_path" = x \
31320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31322      new_path=`$CYGPATH -u "$path"`
31323    fi
31324    if test "x$new_path" = x; then
31325      # It's still not found. Now this is an unrecoverable error.
31326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31327$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31328      has_space=`$ECHO "$complete" | $GREP " "`
31329      if test "x$has_space" != x; then
31330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31332      fi
31333      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31334    fi
31335  fi
31336
31337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31340  # "foo.exe" is OK but "foo" is an error.
31341  #
31342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31343  # It is also a way to make sure we got the proper file name for the real test later on.
31344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31345  if test "x$test_shortpath" = x; then
31346    # Short path failed, file does not exist as specified.
31347    # Try adding .exe or .cmd
31348    if test -f "${new_path}.exe"; then
31349      input_to_shortpath="${new_path}.exe"
31350    elif test -f "${new_path}.cmd"; then
31351      input_to_shortpath="${new_path}.cmd"
31352    else
31353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31354$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31357      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31358    fi
31359  else
31360    input_to_shortpath="$new_path"
31361  fi
31362
31363  # Call helper function which possibly converts this using DOS-style short mode.
31364  # If so, the updated path is stored in $new_path.
31365  new_path="$input_to_shortpath"
31366
31367  input_path="$input_to_shortpath"
31368  # Check if we need to convert this using DOS-style short mode. If the path
31369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31370  # take no chances and rewrite it.
31371  # Note: m4 eats our [], so we need to use [ and ] instead.
31372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31373  if test "x$has_forbidden_chars" != x; then
31374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31378      # Going to short mode and back again did indeed matter. Since short mode is
31379      # case insensitive, let's make it lowercase to improve readability.
31380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31381      # Now convert it back to Unix-stile (cygpath)
31382      input_path=`$CYGPATH -u "$shortmode_path"`
31383      new_path="$input_path"
31384    fi
31385  fi
31386
31387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31388  if test "x$test_cygdrive_prefix" = x; then
31389    # As a simple fix, exclude /usr/bin since it's not a real path.
31390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31392      # a path prefixed by /cygdrive for fixpath to work.
31393      new_path="$CYGWIN_ROOT_PATH$input_path"
31394    fi
31395  fi
31396
31397  # remove trailing .exe if any
31398  new_path="${new_path/%.exe/}"
31399
31400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31401
31402  # First separate the path from the arguments. This will split at the first
31403  # space.
31404  complete="$CXXCPP"
31405  path="${complete%% *}"
31406  tmp="$complete EOL"
31407  arguments="${tmp#* }"
31408
31409  # Input might be given as Windows format, start by converting to
31410  # unix format.
31411  new_path="$path"
31412
31413  windows_path="$new_path"
31414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31415    unix_path=`$CYGPATH -u "$windows_path"`
31416    new_path="$unix_path"
31417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31419    new_path="$unix_path"
31420  fi
31421
31422
31423  # Now try to locate executable using which
31424  new_path=`$WHICH "$new_path" 2> /dev/null`
31425
31426  if test "x$new_path" = x; then
31427    # Oops. Which didn't find the executable.
31428    # The splitting of arguments from the executable at a space might have been incorrect,
31429    # since paths with space are more likely in Windows. Give it another try with the whole
31430    # argument.
31431    path="$complete"
31432    arguments="EOL"
31433    new_path="$path"
31434
31435  windows_path="$new_path"
31436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31437    unix_path=`$CYGPATH -u "$windows_path"`
31438    new_path="$unix_path"
31439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31441    new_path="$unix_path"
31442  fi
31443
31444
31445    new_path=`$WHICH "$new_path" 2> /dev/null`
31446    # bat and cmd files are not always considered executable in MSYS causing which
31447    # to not find them
31448    if test "x$new_path" = x \
31449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31451      new_path="$path"
31452
31453  windows_path="$new_path"
31454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31455    unix_path=`$CYGPATH -u "$windows_path"`
31456    new_path="$unix_path"
31457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31459    new_path="$unix_path"
31460  fi
31461
31462    fi
31463
31464    if test "x$new_path" = x; then
31465      # It's still not found. Now this is an unrecoverable error.
31466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31467$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31468      has_space=`$ECHO "$complete" | $GREP " "`
31469      if test "x$has_space" != x; then
31470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31472      fi
31473      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31474    fi
31475  fi
31476
31477  # Now new_path has a complete unix path to the binary
31478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31479    # Keep paths in /bin as-is, but remove trailing .exe if any
31480    new_path="${new_path/%.exe/}"
31481    # Do not save /bin paths to all_fixpath_prefixes!
31482  else
31483    # Not in mixed or Windows style, start by that.
31484    new_path=`cmd //c echo $new_path`
31485
31486  input_path="$new_path"
31487  # Check if we need to convert this using DOS-style short mode. If the path
31488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31489  # take no chances and rewrite it.
31490  # Note: m4 eats our [], so we need to use [ and ] instead.
31491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31492  if test "x$has_forbidden_chars" != x; then
31493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31495  fi
31496
31497    # Output is in $new_path
31498
31499  windows_path="$new_path"
31500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31501    unix_path=`$CYGPATH -u "$windows_path"`
31502    new_path="$unix_path"
31503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31505    new_path="$unix_path"
31506  fi
31507
31508    # remove trailing .exe if any
31509    new_path="${new_path/%.exe/}"
31510
31511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31513  fi
31514
31515  else
31516    # We're on a unix platform. Hooray! :)
31517    # First separate the path from the arguments. This will split at the first
31518    # space.
31519    complete="$CXXCPP"
31520    path="${complete%% *}"
31521    tmp="$complete EOL"
31522    arguments="${tmp#* }"
31523
31524    # Cannot rely on the command "which" here since it doesn't always work.
31525    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31526    if test -z "$is_absolute_path"; then
31527      # Path to executable is not absolute. Find it.
31528      IFS_save="$IFS"
31529      IFS=:
31530      for p in $PATH; do
31531        if test -f "$p/$path" && test -x "$p/$path"; then
31532          new_path="$p/$path"
31533          break
31534        fi
31535      done
31536      IFS="$IFS_save"
31537    else
31538      # This is an absolute path, we can use it without further modifications.
31539      new_path="$path"
31540    fi
31541
31542    if test "x$new_path" = x; then
31543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31544$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31545      has_space=`$ECHO "$complete" | $GREP " "`
31546      if test "x$has_space" != x; then
31547        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31549      fi
31550      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31551    fi
31552  fi
31553
31554  # Now join together the path and the arguments once again
31555  if test "x$arguments" != xEOL; then
31556    new_complete="$new_path ${arguments% *}"
31557  else
31558    new_complete="$new_path"
31559  fi
31560
31561  if test "x$complete" != "x$new_complete"; then
31562    CXXCPP="$new_complete"
31563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31564$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31565  fi
31566
31567
31568  #
31569  # Setup the linker (LD)
31570  #
31571  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31572    # In the Microsoft toolchain we have a separate LD command "link".
31573    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31574    # a cygwin program for something completely different.
31575    # Extract the first word of "link", so it can be a program name with args.
31576set dummy link; ac_word=$2
31577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31578$as_echo_n "checking for $ac_word... " >&6; }
31579if ${ac_cv_prog_LD+:} false; then :
31580  $as_echo_n "(cached) " >&6
31581else
31582  if test -n "$LD"; then
31583  ac_cv_prog_LD="$LD" # Let the user override the test.
31584else
31585  ac_prog_rejected=no
31586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31587for as_dir in $PATH
31588do
31589  IFS=$as_save_IFS
31590  test -z "$as_dir" && as_dir=.
31591    for ac_exec_ext in '' $ac_executable_extensions; do
31592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31593    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31594       ac_prog_rejected=yes
31595       continue
31596     fi
31597    ac_cv_prog_LD="link"
31598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31599    break 2
31600  fi
31601done
31602  done
31603IFS=$as_save_IFS
31604
31605if test $ac_prog_rejected = yes; then
31606  # We found a bogon in the path, so make sure we never use it.
31607  set dummy $ac_cv_prog_LD
31608  shift
31609  if test $# != 0; then
31610    # We chose a different compiler from the bogus one.
31611    # However, it has the same basename, so the bogon will be chosen
31612    # first if we set LD to just the basename; use the full file name.
31613    shift
31614    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31615  fi
31616fi
31617fi
31618fi
31619LD=$ac_cv_prog_LD
31620if test -n "$LD"; then
31621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31622$as_echo "$LD" >&6; }
31623else
31624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31625$as_echo "no" >&6; }
31626fi
31627
31628
31629
31630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31631
31632  # First separate the path from the arguments. This will split at the first
31633  # space.
31634  complete="$LD"
31635  path="${complete%% *}"
31636  tmp="$complete EOL"
31637  arguments="${tmp#* }"
31638
31639  # Input might be given as Windows format, start by converting to
31640  # unix format.
31641  new_path=`$CYGPATH -u "$path"`
31642
31643  # Now try to locate executable using which
31644  new_path=`$WHICH "$new_path" 2> /dev/null`
31645  # bat and cmd files are not always considered executable in cygwin causing which
31646  # to not find them
31647  if test "x$new_path" = x \
31648      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31649      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31650    new_path=`$CYGPATH -u "$path"`
31651  fi
31652  if test "x$new_path" = x; then
31653    # Oops. Which didn't find the executable.
31654    # The splitting of arguments from the executable at a space might have been incorrect,
31655    # since paths with space are more likely in Windows. Give it another try with the whole
31656    # argument.
31657    path="$complete"
31658    arguments="EOL"
31659    new_path=`$CYGPATH -u "$path"`
31660    new_path=`$WHICH "$new_path" 2> /dev/null`
31661    # bat and cmd files are not always considered executable in cygwin causing which
31662    # to not find them
31663    if test "x$new_path" = x \
31664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31666      new_path=`$CYGPATH -u "$path"`
31667    fi
31668    if test "x$new_path" = x; then
31669      # It's still not found. Now this is an unrecoverable error.
31670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31671$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31672      has_space=`$ECHO "$complete" | $GREP " "`
31673      if test "x$has_space" != x; then
31674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31676      fi
31677      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31678    fi
31679  fi
31680
31681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31684  # "foo.exe" is OK but "foo" is an error.
31685  #
31686  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31687  # It is also a way to make sure we got the proper file name for the real test later on.
31688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31689  if test "x$test_shortpath" = x; then
31690    # Short path failed, file does not exist as specified.
31691    # Try adding .exe or .cmd
31692    if test -f "${new_path}.exe"; then
31693      input_to_shortpath="${new_path}.exe"
31694    elif test -f "${new_path}.cmd"; then
31695      input_to_shortpath="${new_path}.cmd"
31696    else
31697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31698$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31701      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31702    fi
31703  else
31704    input_to_shortpath="$new_path"
31705  fi
31706
31707  # Call helper function which possibly converts this using DOS-style short mode.
31708  # If so, the updated path is stored in $new_path.
31709  new_path="$input_to_shortpath"
31710
31711  input_path="$input_to_shortpath"
31712  # Check if we need to convert this using DOS-style short mode. If the path
31713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31714  # take no chances and rewrite it.
31715  # Note: m4 eats our [], so we need to use [ and ] instead.
31716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31717  if test "x$has_forbidden_chars" != x; then
31718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31722      # Going to short mode and back again did indeed matter. Since short mode is
31723      # case insensitive, let's make it lowercase to improve readability.
31724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31725      # Now convert it back to Unix-stile (cygpath)
31726      input_path=`$CYGPATH -u "$shortmode_path"`
31727      new_path="$input_path"
31728    fi
31729  fi
31730
31731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31732  if test "x$test_cygdrive_prefix" = x; then
31733    # As a simple fix, exclude /usr/bin since it's not a real path.
31734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31736      # a path prefixed by /cygdrive for fixpath to work.
31737      new_path="$CYGWIN_ROOT_PATH$input_path"
31738    fi
31739  fi
31740
31741  # remove trailing .exe if any
31742  new_path="${new_path/%.exe/}"
31743
31744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31745
31746  # First separate the path from the arguments. This will split at the first
31747  # space.
31748  complete="$LD"
31749  path="${complete%% *}"
31750  tmp="$complete EOL"
31751  arguments="${tmp#* }"
31752
31753  # Input might be given as Windows format, start by converting to
31754  # unix format.
31755  new_path="$path"
31756
31757  windows_path="$new_path"
31758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31759    unix_path=`$CYGPATH -u "$windows_path"`
31760    new_path="$unix_path"
31761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31763    new_path="$unix_path"
31764  fi
31765
31766
31767  # Now try to locate executable using which
31768  new_path=`$WHICH "$new_path" 2> /dev/null`
31769
31770  if test "x$new_path" = x; then
31771    # Oops. Which didn't find the executable.
31772    # The splitting of arguments from the executable at a space might have been incorrect,
31773    # since paths with space are more likely in Windows. Give it another try with the whole
31774    # argument.
31775    path="$complete"
31776    arguments="EOL"
31777    new_path="$path"
31778
31779  windows_path="$new_path"
31780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31781    unix_path=`$CYGPATH -u "$windows_path"`
31782    new_path="$unix_path"
31783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31785    new_path="$unix_path"
31786  fi
31787
31788
31789    new_path=`$WHICH "$new_path" 2> /dev/null`
31790    # bat and cmd files are not always considered executable in MSYS causing which
31791    # to not find them
31792    if test "x$new_path" = x \
31793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31795      new_path="$path"
31796
31797  windows_path="$new_path"
31798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31799    unix_path=`$CYGPATH -u "$windows_path"`
31800    new_path="$unix_path"
31801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31803    new_path="$unix_path"
31804  fi
31805
31806    fi
31807
31808    if test "x$new_path" = x; then
31809      # It's still not found. Now this is an unrecoverable error.
31810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31811$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31812      has_space=`$ECHO "$complete" | $GREP " "`
31813      if test "x$has_space" != x; then
31814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31816      fi
31817      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31818    fi
31819  fi
31820
31821  # Now new_path has a complete unix path to the binary
31822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31823    # Keep paths in /bin as-is, but remove trailing .exe if any
31824    new_path="${new_path/%.exe/}"
31825    # Do not save /bin paths to all_fixpath_prefixes!
31826  else
31827    # Not in mixed or Windows style, start by that.
31828    new_path=`cmd //c echo $new_path`
31829
31830  input_path="$new_path"
31831  # Check if we need to convert this using DOS-style short mode. If the path
31832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31833  # take no chances and rewrite it.
31834  # Note: m4 eats our [], so we need to use [ and ] instead.
31835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31836  if test "x$has_forbidden_chars" != x; then
31837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31839  fi
31840
31841    # Output is in $new_path
31842
31843  windows_path="$new_path"
31844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31845    unix_path=`$CYGPATH -u "$windows_path"`
31846    new_path="$unix_path"
31847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31849    new_path="$unix_path"
31850  fi
31851
31852    # remove trailing .exe if any
31853    new_path="${new_path/%.exe/}"
31854
31855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31857  fi
31858
31859  else
31860    # We're on a unix platform. Hooray! :)
31861    # First separate the path from the arguments. This will split at the first
31862    # space.
31863    complete="$LD"
31864    path="${complete%% *}"
31865    tmp="$complete EOL"
31866    arguments="${tmp#* }"
31867
31868    # Cannot rely on the command "which" here since it doesn't always work.
31869    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31870    if test -z "$is_absolute_path"; then
31871      # Path to executable is not absolute. Find it.
31872      IFS_save="$IFS"
31873      IFS=:
31874      for p in $PATH; do
31875        if test -f "$p/$path" && test -x "$p/$path"; then
31876          new_path="$p/$path"
31877          break
31878        fi
31879      done
31880      IFS="$IFS_save"
31881    else
31882      # This is an absolute path, we can use it without further modifications.
31883      new_path="$path"
31884    fi
31885
31886    if test "x$new_path" = x; then
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31888$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31889      has_space=`$ECHO "$complete" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31893      fi
31894      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31895    fi
31896  fi
31897
31898  # Now join together the path and the arguments once again
31899  if test "x$arguments" != xEOL; then
31900    new_complete="$new_path ${arguments% *}"
31901  else
31902    new_complete="$new_path"
31903  fi
31904
31905  if test "x$complete" != "x$new_complete"; then
31906    LD="$new_complete"
31907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31908$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31909  fi
31910
31911    # Verify that we indeed succeeded with this trick.
31912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31913$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31914    "$LD" --version > /dev/null
31915    if test $? -eq 0 ; then
31916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31917$as_echo "no" >&6; }
31918      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31919    else
31920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31921$as_echo "yes" >&6; }
31922    fi
31923    LDCXX="$LD"
31924  else
31925    # All other toolchains use the compiler to link.
31926    LD="$CC"
31927    LDCXX="$CXX"
31928  fi
31929
31930  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31931
31932
31933  #
31934  # Setup the assembler (AS)
31935  #
31936  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31937    # FIXME: should this really be solaris, or solstudio?
31938
31939
31940  # Publish this variable in the help.
31941
31942
31943  if test "x$AS" = x; then
31944    # The variable is not set by user, try to locate tool using the code snippet
31945    for ac_prog in as
31946do
31947  # Extract the first word of "$ac_prog", so it can be a program name with args.
31948set dummy $ac_prog; ac_word=$2
31949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31950$as_echo_n "checking for $ac_word... " >&6; }
31951if ${ac_cv_path_AS+:} false; then :
31952  $as_echo_n "(cached) " >&6
31953else
31954  case $AS in
31955  [\\/]* | ?:[\\/]*)
31956  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31957  ;;
31958  *)
31959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31960for as_dir in $PATH
31961do
31962  IFS=$as_save_IFS
31963  test -z "$as_dir" && as_dir=.
31964    for ac_exec_ext in '' $ac_executable_extensions; do
31965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31966    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31968    break 2
31969  fi
31970done
31971  done
31972IFS=$as_save_IFS
31973
31974  ;;
31975esac
31976fi
31977AS=$ac_cv_path_AS
31978if test -n "$AS"; then
31979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31980$as_echo "$AS" >&6; }
31981else
31982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31983$as_echo "no" >&6; }
31984fi
31985
31986
31987  test -n "$AS" && break
31988done
31989
31990  else
31991    # The variable is set, but is it from the command line or the environment?
31992
31993    # Try to remove the string !AS! from our list.
31994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31996      # If it failed, the variable was not from the command line. Ignore it,
31997      # but warn the user (except for BASH, which is always set by the calling BASH).
31998      if test "xAS" != xBASH; then
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32000$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32001      fi
32002      # Try to locate tool using the code snippet
32003      for ac_prog in as
32004do
32005  # Extract the first word of "$ac_prog", so it can be a program name with args.
32006set dummy $ac_prog; ac_word=$2
32007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32008$as_echo_n "checking for $ac_word... " >&6; }
32009if ${ac_cv_path_AS+:} false; then :
32010  $as_echo_n "(cached) " >&6
32011else
32012  case $AS in
32013  [\\/]* | ?:[\\/]*)
32014  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32015  ;;
32016  *)
32017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32018for as_dir in $PATH
32019do
32020  IFS=$as_save_IFS
32021  test -z "$as_dir" && as_dir=.
32022    for ac_exec_ext in '' $ac_executable_extensions; do
32023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32024    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32026    break 2
32027  fi
32028done
32029  done
32030IFS=$as_save_IFS
32031
32032  ;;
32033esac
32034fi
32035AS=$ac_cv_path_AS
32036if test -n "$AS"; then
32037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32038$as_echo "$AS" >&6; }
32039else
32040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32041$as_echo "no" >&6; }
32042fi
32043
32044
32045  test -n "$AS" && break
32046done
32047
32048    else
32049      # If it succeeded, then it was overridden by the user. We will use it
32050      # for the tool.
32051
32052      # First remove it from the list of overridden variables, so we can test
32053      # for unknown variables in the end.
32054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32055
32056      # Check if the provided tool contains a complete path.
32057      tool_specified="$AS"
32058      tool_basename="${tool_specified##*/}"
32059      if test "x$tool_basename" = "x$tool_specified"; then
32060        # A command without a complete path is provided, search $PATH.
32061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32062$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32063        # Extract the first word of "$tool_basename", so it can be a program name with args.
32064set dummy $tool_basename; ac_word=$2
32065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32066$as_echo_n "checking for $ac_word... " >&6; }
32067if ${ac_cv_path_AS+:} false; then :
32068  $as_echo_n "(cached) " >&6
32069else
32070  case $AS in
32071  [\\/]* | ?:[\\/]*)
32072  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32073  ;;
32074  *)
32075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32076for as_dir in $PATH
32077do
32078  IFS=$as_save_IFS
32079  test -z "$as_dir" && as_dir=.
32080    for ac_exec_ext in '' $ac_executable_extensions; do
32081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32082    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32084    break 2
32085  fi
32086done
32087  done
32088IFS=$as_save_IFS
32089
32090  ;;
32091esac
32092fi
32093AS=$ac_cv_path_AS
32094if test -n "$AS"; then
32095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32096$as_echo "$AS" >&6; }
32097else
32098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32099$as_echo "no" >&6; }
32100fi
32101
32102
32103        if test "x$AS" = x; then
32104          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32105        fi
32106      else
32107        # Otherwise we believe it is a complete path. Use it as it is.
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32109$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32111$as_echo_n "checking for AS... " >&6; }
32112        if test ! -x "$tool_specified"; then
32113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32114$as_echo "not found" >&6; }
32115          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32116        fi
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32118$as_echo "$tool_specified" >&6; }
32119      fi
32120    fi
32121  fi
32122
32123
32124
32125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32126
32127  # First separate the path from the arguments. This will split at the first
32128  # space.
32129  complete="$AS"
32130  path="${complete%% *}"
32131  tmp="$complete EOL"
32132  arguments="${tmp#* }"
32133
32134  # Input might be given as Windows format, start by converting to
32135  # unix format.
32136  new_path=`$CYGPATH -u "$path"`
32137
32138  # Now try to locate executable using which
32139  new_path=`$WHICH "$new_path" 2> /dev/null`
32140  # bat and cmd files are not always considered executable in cygwin causing which
32141  # to not find them
32142  if test "x$new_path" = x \
32143      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32144      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32145    new_path=`$CYGPATH -u "$path"`
32146  fi
32147  if test "x$new_path" = x; then
32148    # Oops. Which didn't find the executable.
32149    # The splitting of arguments from the executable at a space might have been incorrect,
32150    # since paths with space are more likely in Windows. Give it another try with the whole
32151    # argument.
32152    path="$complete"
32153    arguments="EOL"
32154    new_path=`$CYGPATH -u "$path"`
32155    new_path=`$WHICH "$new_path" 2> /dev/null`
32156    # bat and cmd files are not always considered executable in cygwin causing which
32157    # to not find them
32158    if test "x$new_path" = x \
32159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32161      new_path=`$CYGPATH -u "$path"`
32162    fi
32163    if test "x$new_path" = x; then
32164      # It's still not found. Now this is an unrecoverable error.
32165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32166$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32167      has_space=`$ECHO "$complete" | $GREP " "`
32168      if test "x$has_space" != x; then
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32171      fi
32172      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32173    fi
32174  fi
32175
32176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32179  # "foo.exe" is OK but "foo" is an error.
32180  #
32181  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32182  # It is also a way to make sure we got the proper file name for the real test later on.
32183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32184  if test "x$test_shortpath" = x; then
32185    # Short path failed, file does not exist as specified.
32186    # Try adding .exe or .cmd
32187    if test -f "${new_path}.exe"; then
32188      input_to_shortpath="${new_path}.exe"
32189    elif test -f "${new_path}.cmd"; then
32190      input_to_shortpath="${new_path}.cmd"
32191    else
32192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32193$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32194      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32195$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32196      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32197    fi
32198  else
32199    input_to_shortpath="$new_path"
32200  fi
32201
32202  # Call helper function which possibly converts this using DOS-style short mode.
32203  # If so, the updated path is stored in $new_path.
32204  new_path="$input_to_shortpath"
32205
32206  input_path="$input_to_shortpath"
32207  # Check if we need to convert this using DOS-style short mode. If the path
32208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32209  # take no chances and rewrite it.
32210  # Note: m4 eats our [], so we need to use [ and ] instead.
32211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32212  if test "x$has_forbidden_chars" != x; then
32213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32217      # Going to short mode and back again did indeed matter. Since short mode is
32218      # case insensitive, let's make it lowercase to improve readability.
32219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32220      # Now convert it back to Unix-stile (cygpath)
32221      input_path=`$CYGPATH -u "$shortmode_path"`
32222      new_path="$input_path"
32223    fi
32224  fi
32225
32226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32227  if test "x$test_cygdrive_prefix" = x; then
32228    # As a simple fix, exclude /usr/bin since it's not a real path.
32229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32231      # a path prefixed by /cygdrive for fixpath to work.
32232      new_path="$CYGWIN_ROOT_PATH$input_path"
32233    fi
32234  fi
32235
32236  # remove trailing .exe if any
32237  new_path="${new_path/%.exe/}"
32238
32239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32240
32241  # First separate the path from the arguments. This will split at the first
32242  # space.
32243  complete="$AS"
32244  path="${complete%% *}"
32245  tmp="$complete EOL"
32246  arguments="${tmp#* }"
32247
32248  # Input might be given as Windows format, start by converting to
32249  # unix format.
32250  new_path="$path"
32251
32252  windows_path="$new_path"
32253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32254    unix_path=`$CYGPATH -u "$windows_path"`
32255    new_path="$unix_path"
32256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32258    new_path="$unix_path"
32259  fi
32260
32261
32262  # Now try to locate executable using which
32263  new_path=`$WHICH "$new_path" 2> /dev/null`
32264
32265  if test "x$new_path" = x; then
32266    # Oops. Which didn't find the executable.
32267    # The splitting of arguments from the executable at a space might have been incorrect,
32268    # since paths with space are more likely in Windows. Give it another try with the whole
32269    # argument.
32270    path="$complete"
32271    arguments="EOL"
32272    new_path="$path"
32273
32274  windows_path="$new_path"
32275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32276    unix_path=`$CYGPATH -u "$windows_path"`
32277    new_path="$unix_path"
32278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32280    new_path="$unix_path"
32281  fi
32282
32283
32284    new_path=`$WHICH "$new_path" 2> /dev/null`
32285    # bat and cmd files are not always considered executable in MSYS causing which
32286    # to not find them
32287    if test "x$new_path" = x \
32288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32290      new_path="$path"
32291
32292  windows_path="$new_path"
32293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32294    unix_path=`$CYGPATH -u "$windows_path"`
32295    new_path="$unix_path"
32296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32298    new_path="$unix_path"
32299  fi
32300
32301    fi
32302
32303    if test "x$new_path" = x; then
32304      # It's still not found. Now this is an unrecoverable error.
32305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32306$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32307      has_space=`$ECHO "$complete" | $GREP " "`
32308      if test "x$has_space" != x; then
32309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32311      fi
32312      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32313    fi
32314  fi
32315
32316  # Now new_path has a complete unix path to the binary
32317  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32318    # Keep paths in /bin as-is, but remove trailing .exe if any
32319    new_path="${new_path/%.exe/}"
32320    # Do not save /bin paths to all_fixpath_prefixes!
32321  else
32322    # Not in mixed or Windows style, start by that.
32323    new_path=`cmd //c echo $new_path`
32324
32325  input_path="$new_path"
32326  # Check if we need to convert this using DOS-style short mode. If the path
32327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32328  # take no chances and rewrite it.
32329  # Note: m4 eats our [], so we need to use [ and ] instead.
32330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32331  if test "x$has_forbidden_chars" != x; then
32332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32334  fi
32335
32336    # Output is in $new_path
32337
32338  windows_path="$new_path"
32339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32340    unix_path=`$CYGPATH -u "$windows_path"`
32341    new_path="$unix_path"
32342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32344    new_path="$unix_path"
32345  fi
32346
32347    # remove trailing .exe if any
32348    new_path="${new_path/%.exe/}"
32349
32350    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32351    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32352  fi
32353
32354  else
32355    # We're on a unix platform. Hooray! :)
32356    # First separate the path from the arguments. This will split at the first
32357    # space.
32358    complete="$AS"
32359    path="${complete%% *}"
32360    tmp="$complete EOL"
32361    arguments="${tmp#* }"
32362
32363    # Cannot rely on the command "which" here since it doesn't always work.
32364    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32365    if test -z "$is_absolute_path"; then
32366      # Path to executable is not absolute. Find it.
32367      IFS_save="$IFS"
32368      IFS=:
32369      for p in $PATH; do
32370        if test -f "$p/$path" && test -x "$p/$path"; then
32371          new_path="$p/$path"
32372          break
32373        fi
32374      done
32375      IFS="$IFS_save"
32376    else
32377      # This is an absolute path, we can use it without further modifications.
32378      new_path="$path"
32379    fi
32380
32381    if test "x$new_path" = x; then
32382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32383$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32384      has_space=`$ECHO "$complete" | $GREP " "`
32385      if test "x$has_space" != x; then
32386        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32388      fi
32389      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32390    fi
32391  fi
32392
32393  # Now join together the path and the arguments once again
32394  if test "x$arguments" != xEOL; then
32395    new_complete="$new_path ${arguments% *}"
32396  else
32397    new_complete="$new_path"
32398  fi
32399
32400  if test "x$complete" != "x$new_complete"; then
32401    AS="$new_complete"
32402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32403$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32404  fi
32405
32406  else
32407    # FIXME: is this correct for microsoft?
32408    AS="$CC -c"
32409  fi
32410
32411
32412  #
32413  # Setup the archiver (AR)
32414  #
32415  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32416    # The corresponding ar tool is lib.exe (used to create static libraries)
32417    # Extract the first word of "lib", so it can be a program name with args.
32418set dummy lib; ac_word=$2
32419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32420$as_echo_n "checking for $ac_word... " >&6; }
32421if ${ac_cv_prog_AR+:} false; then :
32422  $as_echo_n "(cached) " >&6
32423else
32424  if test -n "$AR"; then
32425  ac_cv_prog_AR="$AR" # Let the user override the test.
32426else
32427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32428for as_dir in $PATH
32429do
32430  IFS=$as_save_IFS
32431  test -z "$as_dir" && as_dir=.
32432    for ac_exec_ext in '' $ac_executable_extensions; do
32433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32434    ac_cv_prog_AR="lib"
32435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32436    break 2
32437  fi
32438done
32439  done
32440IFS=$as_save_IFS
32441
32442fi
32443fi
32444AR=$ac_cv_prog_AR
32445if test -n "$AR"; then
32446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32447$as_echo "$AR" >&6; }
32448else
32449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32450$as_echo "no" >&6; }
32451fi
32452
32453
32454  else
32455
32456
32457  # Publish this variable in the help.
32458
32459
32460  if test "x$AR" = x; then
32461    # The variable is not set by user, try to locate tool using the code snippet
32462    if test -n "$ac_tool_prefix"; then
32463  for ac_prog in ar
32464  do
32465    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32466set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32468$as_echo_n "checking for $ac_word... " >&6; }
32469if ${ac_cv_prog_AR+:} false; then :
32470  $as_echo_n "(cached) " >&6
32471else
32472  if test -n "$AR"; then
32473  ac_cv_prog_AR="$AR" # Let the user override the test.
32474else
32475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32476for as_dir in $PATH
32477do
32478  IFS=$as_save_IFS
32479  test -z "$as_dir" && as_dir=.
32480    for ac_exec_ext in '' $ac_executable_extensions; do
32481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32482    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32484    break 2
32485  fi
32486done
32487  done
32488IFS=$as_save_IFS
32489
32490fi
32491fi
32492AR=$ac_cv_prog_AR
32493if test -n "$AR"; then
32494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32495$as_echo "$AR" >&6; }
32496else
32497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32498$as_echo "no" >&6; }
32499fi
32500
32501
32502    test -n "$AR" && break
32503  done
32504fi
32505if test -z "$AR"; then
32506  ac_ct_AR=$AR
32507  for ac_prog in ar
32508do
32509  # Extract the first word of "$ac_prog", so it can be a program name with args.
32510set dummy $ac_prog; ac_word=$2
32511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32512$as_echo_n "checking for $ac_word... " >&6; }
32513if ${ac_cv_prog_ac_ct_AR+:} false; then :
32514  $as_echo_n "(cached) " >&6
32515else
32516  if test -n "$ac_ct_AR"; then
32517  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32518else
32519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32520for as_dir in $PATH
32521do
32522  IFS=$as_save_IFS
32523  test -z "$as_dir" && as_dir=.
32524    for ac_exec_ext in '' $ac_executable_extensions; do
32525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32526    ac_cv_prog_ac_ct_AR="$ac_prog"
32527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32528    break 2
32529  fi
32530done
32531  done
32532IFS=$as_save_IFS
32533
32534fi
32535fi
32536ac_ct_AR=$ac_cv_prog_ac_ct_AR
32537if test -n "$ac_ct_AR"; then
32538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32539$as_echo "$ac_ct_AR" >&6; }
32540else
32541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32542$as_echo "no" >&6; }
32543fi
32544
32545
32546  test -n "$ac_ct_AR" && break
32547done
32548
32549  if test "x$ac_ct_AR" = x; then
32550    AR=""
32551  else
32552    case $cross_compiling:$ac_tool_warned in
32553yes:)
32554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32556ac_tool_warned=yes ;;
32557esac
32558    AR=$ac_ct_AR
32559  fi
32560fi
32561
32562  else
32563    # The variable is set, but is it from the command line or the environment?
32564
32565    # Try to remove the string !AR! from our list.
32566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32568      # If it failed, the variable was not from the command line. Ignore it,
32569      # but warn the user (except for BASH, which is always set by the calling BASH).
32570      if test "xAR" != xBASH; then
32571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32572$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32573      fi
32574      # Try to locate tool using the code snippet
32575      if test -n "$ac_tool_prefix"; then
32576  for ac_prog in ar
32577  do
32578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32581$as_echo_n "checking for $ac_word... " >&6; }
32582if ${ac_cv_prog_AR+:} false; then :
32583  $as_echo_n "(cached) " >&6
32584else
32585  if test -n "$AR"; then
32586  ac_cv_prog_AR="$AR" # Let the user override the test.
32587else
32588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32589for as_dir in $PATH
32590do
32591  IFS=$as_save_IFS
32592  test -z "$as_dir" && as_dir=.
32593    for ac_exec_ext in '' $ac_executable_extensions; do
32594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32595    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32597    break 2
32598  fi
32599done
32600  done
32601IFS=$as_save_IFS
32602
32603fi
32604fi
32605AR=$ac_cv_prog_AR
32606if test -n "$AR"; then
32607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32608$as_echo "$AR" >&6; }
32609else
32610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32611$as_echo "no" >&6; }
32612fi
32613
32614
32615    test -n "$AR" && break
32616  done
32617fi
32618if test -z "$AR"; then
32619  ac_ct_AR=$AR
32620  for ac_prog in ar
32621do
32622  # Extract the first word of "$ac_prog", so it can be a program name with args.
32623set dummy $ac_prog; ac_word=$2
32624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32625$as_echo_n "checking for $ac_word... " >&6; }
32626if ${ac_cv_prog_ac_ct_AR+:} false; then :
32627  $as_echo_n "(cached) " >&6
32628else
32629  if test -n "$ac_ct_AR"; then
32630  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32631else
32632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32633for as_dir in $PATH
32634do
32635  IFS=$as_save_IFS
32636  test -z "$as_dir" && as_dir=.
32637    for ac_exec_ext in '' $ac_executable_extensions; do
32638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32639    ac_cv_prog_ac_ct_AR="$ac_prog"
32640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32641    break 2
32642  fi
32643done
32644  done
32645IFS=$as_save_IFS
32646
32647fi
32648fi
32649ac_ct_AR=$ac_cv_prog_ac_ct_AR
32650if test -n "$ac_ct_AR"; then
32651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32652$as_echo "$ac_ct_AR" >&6; }
32653else
32654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32655$as_echo "no" >&6; }
32656fi
32657
32658
32659  test -n "$ac_ct_AR" && break
32660done
32661
32662  if test "x$ac_ct_AR" = x; then
32663    AR=""
32664  else
32665    case $cross_compiling:$ac_tool_warned in
32666yes:)
32667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32669ac_tool_warned=yes ;;
32670esac
32671    AR=$ac_ct_AR
32672  fi
32673fi
32674
32675    else
32676      # If it succeeded, then it was overridden by the user. We will use it
32677      # for the tool.
32678
32679      # First remove it from the list of overridden variables, so we can test
32680      # for unknown variables in the end.
32681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32682
32683      # Check if the provided tool contains a complete path.
32684      tool_specified="$AR"
32685      tool_basename="${tool_specified##*/}"
32686      if test "x$tool_basename" = "x$tool_specified"; then
32687        # A command without a complete path is provided, search $PATH.
32688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32689$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32690        # Extract the first word of "$tool_basename", so it can be a program name with args.
32691set dummy $tool_basename; ac_word=$2
32692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32693$as_echo_n "checking for $ac_word... " >&6; }
32694if ${ac_cv_path_AR+:} false; then :
32695  $as_echo_n "(cached) " >&6
32696else
32697  case $AR in
32698  [\\/]* | ?:[\\/]*)
32699  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32700  ;;
32701  *)
32702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32703for as_dir in $PATH
32704do
32705  IFS=$as_save_IFS
32706  test -z "$as_dir" && as_dir=.
32707    for ac_exec_ext in '' $ac_executable_extensions; do
32708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32709    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32711    break 2
32712  fi
32713done
32714  done
32715IFS=$as_save_IFS
32716
32717  ;;
32718esac
32719fi
32720AR=$ac_cv_path_AR
32721if test -n "$AR"; then
32722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32723$as_echo "$AR" >&6; }
32724else
32725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32726$as_echo "no" >&6; }
32727fi
32728
32729
32730        if test "x$AR" = x; then
32731          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32732        fi
32733      else
32734        # Otherwise we believe it is a complete path. Use it as it is.
32735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32736$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32738$as_echo_n "checking for AR... " >&6; }
32739        if test ! -x "$tool_specified"; then
32740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32741$as_echo "not found" >&6; }
32742          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32743        fi
32744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32745$as_echo "$tool_specified" >&6; }
32746      fi
32747    fi
32748  fi
32749
32750
32751  fi
32752
32753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32754
32755  # First separate the path from the arguments. This will split at the first
32756  # space.
32757  complete="$AR"
32758  path="${complete%% *}"
32759  tmp="$complete EOL"
32760  arguments="${tmp#* }"
32761
32762  # Input might be given as Windows format, start by converting to
32763  # unix format.
32764  new_path=`$CYGPATH -u "$path"`
32765
32766  # Now try to locate executable using which
32767  new_path=`$WHICH "$new_path" 2> /dev/null`
32768  # bat and cmd files are not always considered executable in cygwin causing which
32769  # to not find them
32770  if test "x$new_path" = x \
32771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32773    new_path=`$CYGPATH -u "$path"`
32774  fi
32775  if test "x$new_path" = x; then
32776    # Oops. Which didn't find the executable.
32777    # The splitting of arguments from the executable at a space might have been incorrect,
32778    # since paths with space are more likely in Windows. Give it another try with the whole
32779    # argument.
32780    path="$complete"
32781    arguments="EOL"
32782    new_path=`$CYGPATH -u "$path"`
32783    new_path=`$WHICH "$new_path" 2> /dev/null`
32784    # bat and cmd files are not always considered executable in cygwin causing which
32785    # to not find them
32786    if test "x$new_path" = x \
32787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32789      new_path=`$CYGPATH -u "$path"`
32790    fi
32791    if test "x$new_path" = x; then
32792      # It's still not found. Now this is an unrecoverable error.
32793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32794$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32795      has_space=`$ECHO "$complete" | $GREP " "`
32796      if test "x$has_space" != x; then
32797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32799      fi
32800      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32801    fi
32802  fi
32803
32804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32807  # "foo.exe" is OK but "foo" is an error.
32808  #
32809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32810  # It is also a way to make sure we got the proper file name for the real test later on.
32811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32812  if test "x$test_shortpath" = x; then
32813    # Short path failed, file does not exist as specified.
32814    # Try adding .exe or .cmd
32815    if test -f "${new_path}.exe"; then
32816      input_to_shortpath="${new_path}.exe"
32817    elif test -f "${new_path}.cmd"; then
32818      input_to_shortpath="${new_path}.cmd"
32819    else
32820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32821$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32824      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32825    fi
32826  else
32827    input_to_shortpath="$new_path"
32828  fi
32829
32830  # Call helper function which possibly converts this using DOS-style short mode.
32831  # If so, the updated path is stored in $new_path.
32832  new_path="$input_to_shortpath"
32833
32834  input_path="$input_to_shortpath"
32835  # Check if we need to convert this using DOS-style short mode. If the path
32836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32837  # take no chances and rewrite it.
32838  # Note: m4 eats our [], so we need to use [ and ] instead.
32839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32840  if test "x$has_forbidden_chars" != x; then
32841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32845      # Going to short mode and back again did indeed matter. Since short mode is
32846      # case insensitive, let's make it lowercase to improve readability.
32847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32848      # Now convert it back to Unix-stile (cygpath)
32849      input_path=`$CYGPATH -u "$shortmode_path"`
32850      new_path="$input_path"
32851    fi
32852  fi
32853
32854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32855  if test "x$test_cygdrive_prefix" = x; then
32856    # As a simple fix, exclude /usr/bin since it's not a real path.
32857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32859      # a path prefixed by /cygdrive for fixpath to work.
32860      new_path="$CYGWIN_ROOT_PATH$input_path"
32861    fi
32862  fi
32863
32864  # remove trailing .exe if any
32865  new_path="${new_path/%.exe/}"
32866
32867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32868
32869  # First separate the path from the arguments. This will split at the first
32870  # space.
32871  complete="$AR"
32872  path="${complete%% *}"
32873  tmp="$complete EOL"
32874  arguments="${tmp#* }"
32875
32876  # Input might be given as Windows format, start by converting to
32877  # unix format.
32878  new_path="$path"
32879
32880  windows_path="$new_path"
32881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32882    unix_path=`$CYGPATH -u "$windows_path"`
32883    new_path="$unix_path"
32884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32886    new_path="$unix_path"
32887  fi
32888
32889
32890  # Now try to locate executable using which
32891  new_path=`$WHICH "$new_path" 2> /dev/null`
32892
32893  if test "x$new_path" = x; then
32894    # Oops. Which didn't find the executable.
32895    # The splitting of arguments from the executable at a space might have been incorrect,
32896    # since paths with space are more likely in Windows. Give it another try with the whole
32897    # argument.
32898    path="$complete"
32899    arguments="EOL"
32900    new_path="$path"
32901
32902  windows_path="$new_path"
32903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32904    unix_path=`$CYGPATH -u "$windows_path"`
32905    new_path="$unix_path"
32906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32908    new_path="$unix_path"
32909  fi
32910
32911
32912    new_path=`$WHICH "$new_path" 2> /dev/null`
32913    # bat and cmd files are not always considered executable in MSYS 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="$path"
32919
32920  windows_path="$new_path"
32921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32922    unix_path=`$CYGPATH -u "$windows_path"`
32923    new_path="$unix_path"
32924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32926    new_path="$unix_path"
32927  fi
32928
32929    fi
32930
32931    if test "x$new_path" = x; then
32932      # It's still not found. Now this is an unrecoverable error.
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32934$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32935      has_space=`$ECHO "$complete" | $GREP " "`
32936      if test "x$has_space" != x; then
32937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32939      fi
32940      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32941    fi
32942  fi
32943
32944  # Now new_path has a complete unix path to the binary
32945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32946    # Keep paths in /bin as-is, but remove trailing .exe if any
32947    new_path="${new_path/%.exe/}"
32948    # Do not save /bin paths to all_fixpath_prefixes!
32949  else
32950    # Not in mixed or Windows style, start by that.
32951    new_path=`cmd //c echo $new_path`
32952
32953  input_path="$new_path"
32954  # Check if we need to convert this using DOS-style short mode. If the path
32955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32956  # take no chances and rewrite it.
32957  # Note: m4 eats our [], so we need to use [ and ] instead.
32958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32959  if test "x$has_forbidden_chars" != x; then
32960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32962  fi
32963
32964    # Output is in $new_path
32965
32966  windows_path="$new_path"
32967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32968    unix_path=`$CYGPATH -u "$windows_path"`
32969    new_path="$unix_path"
32970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32972    new_path="$unix_path"
32973  fi
32974
32975    # remove trailing .exe if any
32976    new_path="${new_path/%.exe/}"
32977
32978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32980  fi
32981
32982  else
32983    # We're on a unix platform. Hooray! :)
32984    # First separate the path from the arguments. This will split at the first
32985    # space.
32986    complete="$AR"
32987    path="${complete%% *}"
32988    tmp="$complete EOL"
32989    arguments="${tmp#* }"
32990
32991    # Cannot rely on the command "which" here since it doesn't always work.
32992    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32993    if test -z "$is_absolute_path"; then
32994      # Path to executable is not absolute. Find it.
32995      IFS_save="$IFS"
32996      IFS=:
32997      for p in $PATH; do
32998        if test -f "$p/$path" && test -x "$p/$path"; then
32999          new_path="$p/$path"
33000          break
33001        fi
33002      done
33003      IFS="$IFS_save"
33004    else
33005      # This is an absolute path, we can use it without further modifications.
33006      new_path="$path"
33007    fi
33008
33009    if test "x$new_path" = x; then
33010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33011$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33012      has_space=`$ECHO "$complete" | $GREP " "`
33013      if test "x$has_space" != x; then
33014        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33016      fi
33017      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33018    fi
33019  fi
33020
33021  # Now join together the path and the arguments once again
33022  if test "x$arguments" != xEOL; then
33023    new_complete="$new_path ${arguments% *}"
33024  else
33025    new_complete="$new_path"
33026  fi
33027
33028  if test "x$complete" != "x$new_complete"; then
33029    AR="$new_complete"
33030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33031$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33032  fi
33033
33034
33035
33036  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33037    ac_ext=m
33038ac_cpp='$OBJCPP $CPPFLAGS'
33039ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33040ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33041ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33042if test -n "$ac_tool_prefix"; then
33043  for ac_prog in gcc objcc objc cc CC
33044  do
33045    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33048$as_echo_n "checking for $ac_word... " >&6; }
33049if ${ac_cv_prog_OBJC+:} false; then :
33050  $as_echo_n "(cached) " >&6
33051else
33052  if test -n "$OBJC"; then
33053  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33054else
33055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33056for as_dir in $PATH
33057do
33058  IFS=$as_save_IFS
33059  test -z "$as_dir" && as_dir=.
33060    for ac_exec_ext in '' $ac_executable_extensions; do
33061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33062    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33064    break 2
33065  fi
33066done
33067  done
33068IFS=$as_save_IFS
33069
33070fi
33071fi
33072OBJC=$ac_cv_prog_OBJC
33073if test -n "$OBJC"; then
33074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33075$as_echo "$OBJC" >&6; }
33076else
33077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33078$as_echo "no" >&6; }
33079fi
33080
33081
33082    test -n "$OBJC" && break
33083  done
33084fi
33085if test -z "$OBJC"; then
33086  ac_ct_OBJC=$OBJC
33087  for ac_prog in gcc objcc objc cc CC
33088do
33089  # Extract the first word of "$ac_prog", so it can be a program name with args.
33090set dummy $ac_prog; ac_word=$2
33091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33092$as_echo_n "checking for $ac_word... " >&6; }
33093if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33094  $as_echo_n "(cached) " >&6
33095else
33096  if test -n "$ac_ct_OBJC"; then
33097  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33098else
33099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33100for as_dir in $PATH
33101do
33102  IFS=$as_save_IFS
33103  test -z "$as_dir" && as_dir=.
33104    for ac_exec_ext in '' $ac_executable_extensions; do
33105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33106    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33108    break 2
33109  fi
33110done
33111  done
33112IFS=$as_save_IFS
33113
33114fi
33115fi
33116ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33117if test -n "$ac_ct_OBJC"; then
33118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33119$as_echo "$ac_ct_OBJC" >&6; }
33120else
33121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33122$as_echo "no" >&6; }
33123fi
33124
33125
33126  test -n "$ac_ct_OBJC" && break
33127done
33128
33129  if test "x$ac_ct_OBJC" = x; then
33130    OBJC="gcc"
33131  else
33132    case $cross_compiling:$ac_tool_warned in
33133yes:)
33134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33136ac_tool_warned=yes ;;
33137esac
33138    OBJC=$ac_ct_OBJC
33139  fi
33140fi
33141
33142# Provide some information about the compiler.
33143$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33144set X $ac_compile
33145ac_compiler=$2
33146for ac_option in --version -v -V -qversion; do
33147  { { ac_try="$ac_compiler $ac_option >&5"
33148case "(($ac_try" in
33149  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33150  *) ac_try_echo=$ac_try;;
33151esac
33152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33153$as_echo "$ac_try_echo"; } >&5
33154  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33155  ac_status=$?
33156  if test -s conftest.err; then
33157    sed '10a\
33158... rest of stderr output deleted ...
33159         10q' conftest.err >conftest.er1
33160    cat conftest.er1 >&5
33161  fi
33162  rm -f conftest.er1 conftest.err
33163  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33164  test $ac_status = 0; }
33165done
33166
33167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33168$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33169if ${ac_cv_objc_compiler_gnu+:} false; then :
33170  $as_echo_n "(cached) " >&6
33171else
33172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33173/* end confdefs.h.  */
33174
33175int
33176main ()
33177{
33178#ifndef __GNUC__
33179       choke me
33180#endif
33181
33182  ;
33183  return 0;
33184}
33185_ACEOF
33186if ac_fn_objc_try_compile "$LINENO"; then :
33187  ac_compiler_gnu=yes
33188else
33189  ac_compiler_gnu=no
33190fi
33191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33192ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33193
33194fi
33195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33196$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33197if test $ac_compiler_gnu = yes; then
33198  GOBJC=yes
33199else
33200  GOBJC=
33201fi
33202ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33203ac_save_OBJCFLAGS=$OBJCFLAGS
33204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33205$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33206if ${ac_cv_prog_objc_g+:} false; then :
33207  $as_echo_n "(cached) " >&6
33208else
33209  ac_save_objc_werror_flag=$ac_objc_werror_flag
33210   ac_objc_werror_flag=yes
33211   ac_cv_prog_objc_g=no
33212   OBJCFLAGS="-g"
33213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33214/* end confdefs.h.  */
33215
33216int
33217main ()
33218{
33219
33220  ;
33221  return 0;
33222}
33223_ACEOF
33224if ac_fn_objc_try_compile "$LINENO"; then :
33225  ac_cv_prog_objc_g=yes
33226else
33227  OBJCFLAGS=""
33228      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33229/* end confdefs.h.  */
33230
33231int
33232main ()
33233{
33234
33235  ;
33236  return 0;
33237}
33238_ACEOF
33239if ac_fn_objc_try_compile "$LINENO"; then :
33240
33241else
33242  ac_objc_werror_flag=$ac_save_objc_werror_flag
33243	 OBJCFLAGS="-g"
33244	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33245/* end confdefs.h.  */
33246
33247int
33248main ()
33249{
33250
33251  ;
33252  return 0;
33253}
33254_ACEOF
33255if ac_fn_objc_try_compile "$LINENO"; then :
33256  ac_cv_prog_objc_g=yes
33257fi
33258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33259fi
33260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33261fi
33262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33263   ac_objc_werror_flag=$ac_save_objc_werror_flag
33264fi
33265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33266$as_echo "$ac_cv_prog_objc_g" >&6; }
33267if test "$ac_test_OBJCFLAGS" = set; then
33268  OBJCFLAGS=$ac_save_OBJCFLAGS
33269elif test $ac_cv_prog_objc_g = yes; then
33270  if test "$GOBJC" = yes; then
33271    OBJCFLAGS="-g -O2"
33272  else
33273    OBJCFLAGS="-g"
33274  fi
33275else
33276  if test "$GOBJC" = yes; then
33277    OBJCFLAGS="-O2"
33278  else
33279    OBJCFLAGS=
33280  fi
33281fi
33282ac_ext=cpp
33283ac_cpp='$CXXCPP $CPPFLAGS'
33284ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33285ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33286ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33287
33288
33289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33290
33291  # First separate the path from the arguments. This will split at the first
33292  # space.
33293  complete="$OBJC"
33294  path="${complete%% *}"
33295  tmp="$complete EOL"
33296  arguments="${tmp#* }"
33297
33298  # Input might be given as Windows format, start by converting to
33299  # unix format.
33300  new_path=`$CYGPATH -u "$path"`
33301
33302  # Now try to locate executable using which
33303  new_path=`$WHICH "$new_path" 2> /dev/null`
33304  # bat and cmd files are not always considered executable in cygwin causing which
33305  # to not find them
33306  if test "x$new_path" = x \
33307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33309    new_path=`$CYGPATH -u "$path"`
33310  fi
33311  if test "x$new_path" = x; then
33312    # Oops. Which didn't find the executable.
33313    # The splitting of arguments from the executable at a space might have been incorrect,
33314    # since paths with space are more likely in Windows. Give it another try with the whole
33315    # argument.
33316    path="$complete"
33317    arguments="EOL"
33318    new_path=`$CYGPATH -u "$path"`
33319    new_path=`$WHICH "$new_path" 2> /dev/null`
33320    # bat and cmd files are not always considered executable in cygwin causing which
33321    # to not find them
33322    if test "x$new_path" = x \
33323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33325      new_path=`$CYGPATH -u "$path"`
33326    fi
33327    if test "x$new_path" = x; then
33328      # It's still not found. Now this is an unrecoverable error.
33329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33330$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33331      has_space=`$ECHO "$complete" | $GREP " "`
33332      if test "x$has_space" != x; then
33333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33335      fi
33336      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33337    fi
33338  fi
33339
33340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33343  # "foo.exe" is OK but "foo" is an error.
33344  #
33345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33346  # It is also a way to make sure we got the proper file name for the real test later on.
33347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33348  if test "x$test_shortpath" = x; then
33349    # Short path failed, file does not exist as specified.
33350    # Try adding .exe or .cmd
33351    if test -f "${new_path}.exe"; then
33352      input_to_shortpath="${new_path}.exe"
33353    elif test -f "${new_path}.cmd"; then
33354      input_to_shortpath="${new_path}.cmd"
33355    else
33356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33357$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33360      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33361    fi
33362  else
33363    input_to_shortpath="$new_path"
33364  fi
33365
33366  # Call helper function which possibly converts this using DOS-style short mode.
33367  # If so, the updated path is stored in $new_path.
33368  new_path="$input_to_shortpath"
33369
33370  input_path="$input_to_shortpath"
33371  # Check if we need to convert this using DOS-style short mode. If the path
33372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33373  # take no chances and rewrite it.
33374  # Note: m4 eats our [], so we need to use [ and ] instead.
33375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33376  if test "x$has_forbidden_chars" != x; then
33377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33381      # Going to short mode and back again did indeed matter. Since short mode is
33382      # case insensitive, let's make it lowercase to improve readability.
33383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33384      # Now convert it back to Unix-stile (cygpath)
33385      input_path=`$CYGPATH -u "$shortmode_path"`
33386      new_path="$input_path"
33387    fi
33388  fi
33389
33390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33391  if test "x$test_cygdrive_prefix" = x; then
33392    # As a simple fix, exclude /usr/bin since it's not a real path.
33393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33395      # a path prefixed by /cygdrive for fixpath to work.
33396      new_path="$CYGWIN_ROOT_PATH$input_path"
33397    fi
33398  fi
33399
33400  # remove trailing .exe if any
33401  new_path="${new_path/%.exe/}"
33402
33403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33404
33405  # First separate the path from the arguments. This will split at the first
33406  # space.
33407  complete="$OBJC"
33408  path="${complete%% *}"
33409  tmp="$complete EOL"
33410  arguments="${tmp#* }"
33411
33412  # Input might be given as Windows format, start by converting to
33413  # unix format.
33414  new_path="$path"
33415
33416  windows_path="$new_path"
33417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33418    unix_path=`$CYGPATH -u "$windows_path"`
33419    new_path="$unix_path"
33420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33422    new_path="$unix_path"
33423  fi
33424
33425
33426  # Now try to locate executable using which
33427  new_path=`$WHICH "$new_path" 2> /dev/null`
33428
33429  if test "x$new_path" = x; then
33430    # Oops. Which didn't find the executable.
33431    # The splitting of arguments from the executable at a space might have been incorrect,
33432    # since paths with space are more likely in Windows. Give it another try with the whole
33433    # argument.
33434    path="$complete"
33435    arguments="EOL"
33436    new_path="$path"
33437
33438  windows_path="$new_path"
33439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33440    unix_path=`$CYGPATH -u "$windows_path"`
33441    new_path="$unix_path"
33442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33444    new_path="$unix_path"
33445  fi
33446
33447
33448    new_path=`$WHICH "$new_path" 2> /dev/null`
33449    # bat and cmd files are not always considered executable in MSYS causing which
33450    # to not find them
33451    if test "x$new_path" = x \
33452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33454      new_path="$path"
33455
33456  windows_path="$new_path"
33457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33458    unix_path=`$CYGPATH -u "$windows_path"`
33459    new_path="$unix_path"
33460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33462    new_path="$unix_path"
33463  fi
33464
33465    fi
33466
33467    if test "x$new_path" = x; then
33468      # It's still not found. Now this is an unrecoverable error.
33469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33470$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33471      has_space=`$ECHO "$complete" | $GREP " "`
33472      if test "x$has_space" != x; then
33473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33475      fi
33476      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33477    fi
33478  fi
33479
33480  # Now new_path has a complete unix path to the binary
33481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33482    # Keep paths in /bin as-is, but remove trailing .exe if any
33483    new_path="${new_path/%.exe/}"
33484    # Do not save /bin paths to all_fixpath_prefixes!
33485  else
33486    # Not in mixed or Windows style, start by that.
33487    new_path=`cmd //c echo $new_path`
33488
33489  input_path="$new_path"
33490  # Check if we need to convert this using DOS-style short mode. If the path
33491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33492  # take no chances and rewrite it.
33493  # Note: m4 eats our [], so we need to use [ and ] instead.
33494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33495  if test "x$has_forbidden_chars" != x; then
33496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33498  fi
33499
33500    # Output is in $new_path
33501
33502  windows_path="$new_path"
33503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33504    unix_path=`$CYGPATH -u "$windows_path"`
33505    new_path="$unix_path"
33506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33508    new_path="$unix_path"
33509  fi
33510
33511    # remove trailing .exe if any
33512    new_path="${new_path/%.exe/}"
33513
33514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33516  fi
33517
33518  else
33519    # We're on a unix platform. Hooray! :)
33520    # First separate the path from the arguments. This will split at the first
33521    # space.
33522    complete="$OBJC"
33523    path="${complete%% *}"
33524    tmp="$complete EOL"
33525    arguments="${tmp#* }"
33526
33527    # Cannot rely on the command "which" here since it doesn't always work.
33528    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33529    if test -z "$is_absolute_path"; then
33530      # Path to executable is not absolute. Find it.
33531      IFS_save="$IFS"
33532      IFS=:
33533      for p in $PATH; do
33534        if test -f "$p/$path" && test -x "$p/$path"; then
33535          new_path="$p/$path"
33536          break
33537        fi
33538      done
33539      IFS="$IFS_save"
33540    else
33541      # This is an absolute path, we can use it without further modifications.
33542      new_path="$path"
33543    fi
33544
33545    if test "x$new_path" = x; then
33546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33547$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33548      has_space=`$ECHO "$complete" | $GREP " "`
33549      if test "x$has_space" != x; then
33550        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33552      fi
33553      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33554    fi
33555  fi
33556
33557  # Now join together the path and the arguments once again
33558  if test "x$arguments" != xEOL; then
33559    new_complete="$new_path ${arguments% *}"
33560  else
33561    new_complete="$new_path"
33562  fi
33563
33564  if test "x$complete" != "x$new_complete"; then
33565    OBJC="$new_complete"
33566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33567$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33568  fi
33569
33570
33571
33572  # Publish this variable in the help.
33573
33574
33575  if test "x$LIPO" = x; then
33576    # The variable is not set by user, try to locate tool using the code snippet
33577    for ac_prog in lipo
33578do
33579  # Extract the first word of "$ac_prog", so it can be a program name with args.
33580set dummy $ac_prog; ac_word=$2
33581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33582$as_echo_n "checking for $ac_word... " >&6; }
33583if ${ac_cv_path_LIPO+:} false; then :
33584  $as_echo_n "(cached) " >&6
33585else
33586  case $LIPO in
33587  [\\/]* | ?:[\\/]*)
33588  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33589  ;;
33590  *)
33591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33592for as_dir in $PATH
33593do
33594  IFS=$as_save_IFS
33595  test -z "$as_dir" && as_dir=.
33596    for ac_exec_ext in '' $ac_executable_extensions; do
33597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33598    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33600    break 2
33601  fi
33602done
33603  done
33604IFS=$as_save_IFS
33605
33606  ;;
33607esac
33608fi
33609LIPO=$ac_cv_path_LIPO
33610if test -n "$LIPO"; then
33611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33612$as_echo "$LIPO" >&6; }
33613else
33614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33615$as_echo "no" >&6; }
33616fi
33617
33618
33619  test -n "$LIPO" && break
33620done
33621
33622  else
33623    # The variable is set, but is it from the command line or the environment?
33624
33625    # Try to remove the string !LIPO! from our list.
33626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33628      # If it failed, the variable was not from the command line. Ignore it,
33629      # but warn the user (except for BASH, which is always set by the calling BASH).
33630      if test "xLIPO" != xBASH; then
33631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33632$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33633      fi
33634      # Try to locate tool using the code snippet
33635      for ac_prog in lipo
33636do
33637  # Extract the first word of "$ac_prog", so it can be a program name with args.
33638set dummy $ac_prog; ac_word=$2
33639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33640$as_echo_n "checking for $ac_word... " >&6; }
33641if ${ac_cv_path_LIPO+:} false; then :
33642  $as_echo_n "(cached) " >&6
33643else
33644  case $LIPO in
33645  [\\/]* | ?:[\\/]*)
33646  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33647  ;;
33648  *)
33649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33650for as_dir in $PATH
33651do
33652  IFS=$as_save_IFS
33653  test -z "$as_dir" && as_dir=.
33654    for ac_exec_ext in '' $ac_executable_extensions; do
33655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33656    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33658    break 2
33659  fi
33660done
33661  done
33662IFS=$as_save_IFS
33663
33664  ;;
33665esac
33666fi
33667LIPO=$ac_cv_path_LIPO
33668if test -n "$LIPO"; then
33669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33670$as_echo "$LIPO" >&6; }
33671else
33672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33673$as_echo "no" >&6; }
33674fi
33675
33676
33677  test -n "$LIPO" && break
33678done
33679
33680    else
33681      # If it succeeded, then it was overridden by the user. We will use it
33682      # for the tool.
33683
33684      # First remove it from the list of overridden variables, so we can test
33685      # for unknown variables in the end.
33686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33687
33688      # Check if the provided tool contains a complete path.
33689      tool_specified="$LIPO"
33690      tool_basename="${tool_specified##*/}"
33691      if test "x$tool_basename" = "x$tool_specified"; then
33692        # A command without a complete path is provided, search $PATH.
33693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33694$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33695        # Extract the first word of "$tool_basename", so it can be a program name with args.
33696set dummy $tool_basename; ac_word=$2
33697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33698$as_echo_n "checking for $ac_word... " >&6; }
33699if ${ac_cv_path_LIPO+:} false; then :
33700  $as_echo_n "(cached) " >&6
33701else
33702  case $LIPO in
33703  [\\/]* | ?:[\\/]*)
33704  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33705  ;;
33706  *)
33707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33708for as_dir in $PATH
33709do
33710  IFS=$as_save_IFS
33711  test -z "$as_dir" && as_dir=.
33712    for ac_exec_ext in '' $ac_executable_extensions; do
33713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33714    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33716    break 2
33717  fi
33718done
33719  done
33720IFS=$as_save_IFS
33721
33722  ;;
33723esac
33724fi
33725LIPO=$ac_cv_path_LIPO
33726if test -n "$LIPO"; then
33727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33728$as_echo "$LIPO" >&6; }
33729else
33730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33731$as_echo "no" >&6; }
33732fi
33733
33734
33735        if test "x$LIPO" = x; then
33736          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33737        fi
33738      else
33739        # Otherwise we believe it is a complete path. Use it as it is.
33740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33741$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33743$as_echo_n "checking for LIPO... " >&6; }
33744        if test ! -x "$tool_specified"; then
33745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33746$as_echo "not found" >&6; }
33747          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33748        fi
33749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33750$as_echo "$tool_specified" >&6; }
33751      fi
33752    fi
33753  fi
33754
33755
33756
33757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33758
33759  # First separate the path from the arguments. This will split at the first
33760  # space.
33761  complete="$LIPO"
33762  path="${complete%% *}"
33763  tmp="$complete EOL"
33764  arguments="${tmp#* }"
33765
33766  # Input might be given as Windows format, start by converting to
33767  # unix format.
33768  new_path=`$CYGPATH -u "$path"`
33769
33770  # Now try to locate executable using which
33771  new_path=`$WHICH "$new_path" 2> /dev/null`
33772  # bat and cmd files are not always considered executable in cygwin causing which
33773  # to not find them
33774  if test "x$new_path" = x \
33775      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33776      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33777    new_path=`$CYGPATH -u "$path"`
33778  fi
33779  if test "x$new_path" = x; then
33780    # Oops. Which didn't find the executable.
33781    # The splitting of arguments from the executable at a space might have been incorrect,
33782    # since paths with space are more likely in Windows. Give it another try with the whole
33783    # argument.
33784    path="$complete"
33785    arguments="EOL"
33786    new_path=`$CYGPATH -u "$path"`
33787    new_path=`$WHICH "$new_path" 2> /dev/null`
33788    # bat and cmd files are not always considered executable in cygwin causing which
33789    # to not find them
33790    if test "x$new_path" = x \
33791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33793      new_path=`$CYGPATH -u "$path"`
33794    fi
33795    if test "x$new_path" = x; then
33796      # It's still not found. Now this is an unrecoverable error.
33797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33798$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33799      has_space=`$ECHO "$complete" | $GREP " "`
33800      if test "x$has_space" != x; then
33801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33803      fi
33804      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33805    fi
33806  fi
33807
33808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33811  # "foo.exe" is OK but "foo" is an error.
33812  #
33813  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33814  # It is also a way to make sure we got the proper file name for the real test later on.
33815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33816  if test "x$test_shortpath" = x; then
33817    # Short path failed, file does not exist as specified.
33818    # Try adding .exe or .cmd
33819    if test -f "${new_path}.exe"; then
33820      input_to_shortpath="${new_path}.exe"
33821    elif test -f "${new_path}.cmd"; then
33822      input_to_shortpath="${new_path}.cmd"
33823    else
33824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33825$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33826      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33828      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33829    fi
33830  else
33831    input_to_shortpath="$new_path"
33832  fi
33833
33834  # Call helper function which possibly converts this using DOS-style short mode.
33835  # If so, the updated path is stored in $new_path.
33836  new_path="$input_to_shortpath"
33837
33838  input_path="$input_to_shortpath"
33839  # Check if we need to convert this using DOS-style short mode. If the path
33840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33841  # take no chances and rewrite it.
33842  # Note: m4 eats our [], so we need to use [ and ] instead.
33843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33844  if test "x$has_forbidden_chars" != x; then
33845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33849      # Going to short mode and back again did indeed matter. Since short mode is
33850      # case insensitive, let's make it lowercase to improve readability.
33851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33852      # Now convert it back to Unix-stile (cygpath)
33853      input_path=`$CYGPATH -u "$shortmode_path"`
33854      new_path="$input_path"
33855    fi
33856  fi
33857
33858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33859  if test "x$test_cygdrive_prefix" = x; then
33860    # As a simple fix, exclude /usr/bin since it's not a real path.
33861    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33863      # a path prefixed by /cygdrive for fixpath to work.
33864      new_path="$CYGWIN_ROOT_PATH$input_path"
33865    fi
33866  fi
33867
33868  # remove trailing .exe if any
33869  new_path="${new_path/%.exe/}"
33870
33871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33872
33873  # First separate the path from the arguments. This will split at the first
33874  # space.
33875  complete="$LIPO"
33876  path="${complete%% *}"
33877  tmp="$complete EOL"
33878  arguments="${tmp#* }"
33879
33880  # Input might be given as Windows format, start by converting to
33881  # unix format.
33882  new_path="$path"
33883
33884  windows_path="$new_path"
33885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33886    unix_path=`$CYGPATH -u "$windows_path"`
33887    new_path="$unix_path"
33888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33890    new_path="$unix_path"
33891  fi
33892
33893
33894  # Now try to locate executable using which
33895  new_path=`$WHICH "$new_path" 2> /dev/null`
33896
33897  if test "x$new_path" = x; then
33898    # Oops. Which didn't find the executable.
33899    # The splitting of arguments from the executable at a space might have been incorrect,
33900    # since paths with space are more likely in Windows. Give it another try with the whole
33901    # argument.
33902    path="$complete"
33903    arguments="EOL"
33904    new_path="$path"
33905
33906  windows_path="$new_path"
33907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33908    unix_path=`$CYGPATH -u "$windows_path"`
33909    new_path="$unix_path"
33910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33912    new_path="$unix_path"
33913  fi
33914
33915
33916    new_path=`$WHICH "$new_path" 2> /dev/null`
33917    # bat and cmd files are not always considered executable in MSYS causing which
33918    # to not find them
33919    if test "x$new_path" = x \
33920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33922      new_path="$path"
33923
33924  windows_path="$new_path"
33925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33926    unix_path=`$CYGPATH -u "$windows_path"`
33927    new_path="$unix_path"
33928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33930    new_path="$unix_path"
33931  fi
33932
33933    fi
33934
33935    if test "x$new_path" = x; then
33936      # It's still not found. Now this is an unrecoverable error.
33937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33938$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33939      has_space=`$ECHO "$complete" | $GREP " "`
33940      if test "x$has_space" != x; then
33941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33943      fi
33944      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33945    fi
33946  fi
33947
33948  # Now new_path has a complete unix path to the binary
33949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33950    # Keep paths in /bin as-is, but remove trailing .exe if any
33951    new_path="${new_path/%.exe/}"
33952    # Do not save /bin paths to all_fixpath_prefixes!
33953  else
33954    # Not in mixed or Windows style, start by that.
33955    new_path=`cmd //c echo $new_path`
33956
33957  input_path="$new_path"
33958  # Check if we need to convert this using DOS-style short mode. If the path
33959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33960  # take no chances and rewrite it.
33961  # Note: m4 eats our [], so we need to use [ and ] instead.
33962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33963  if test "x$has_forbidden_chars" != x; then
33964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33966  fi
33967
33968    # Output is in $new_path
33969
33970  windows_path="$new_path"
33971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33972    unix_path=`$CYGPATH -u "$windows_path"`
33973    new_path="$unix_path"
33974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33976    new_path="$unix_path"
33977  fi
33978
33979    # remove trailing .exe if any
33980    new_path="${new_path/%.exe/}"
33981
33982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33984  fi
33985
33986  else
33987    # We're on a unix platform. Hooray! :)
33988    # First separate the path from the arguments. This will split at the first
33989    # space.
33990    complete="$LIPO"
33991    path="${complete%% *}"
33992    tmp="$complete EOL"
33993    arguments="${tmp#* }"
33994
33995    # Cannot rely on the command "which" here since it doesn't always work.
33996    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33997    if test -z "$is_absolute_path"; then
33998      # Path to executable is not absolute. Find it.
33999      IFS_save="$IFS"
34000      IFS=:
34001      for p in $PATH; do
34002        if test -f "$p/$path" && test -x "$p/$path"; then
34003          new_path="$p/$path"
34004          break
34005        fi
34006      done
34007      IFS="$IFS_save"
34008    else
34009      # This is an absolute path, we can use it without further modifications.
34010      new_path="$path"
34011    fi
34012
34013    if test "x$new_path" = x; then
34014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34015$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34016      has_space=`$ECHO "$complete" | $GREP " "`
34017      if test "x$has_space" != x; then
34018        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34020      fi
34021      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34022    fi
34023  fi
34024
34025  # Now join together the path and the arguments once again
34026  if test "x$arguments" != xEOL; then
34027    new_complete="$new_path ${arguments% *}"
34028  else
34029    new_complete="$new_path"
34030  fi
34031
34032  if test "x$complete" != "x$new_complete"; then
34033    LIPO="$new_complete"
34034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34035$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34036  fi
34037
34038  else
34039    OBJC=
34040  fi
34041
34042  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34043    # Extract the first word of "mt", so it can be a program name with args.
34044set dummy mt; ac_word=$2
34045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34046$as_echo_n "checking for $ac_word... " >&6; }
34047if ${ac_cv_prog_MT+:} false; then :
34048  $as_echo_n "(cached) " >&6
34049else
34050  if test -n "$MT"; then
34051  ac_cv_prog_MT="$MT" # Let the user override the test.
34052else
34053  ac_prog_rejected=no
34054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34055for as_dir in $PATH
34056do
34057  IFS=$as_save_IFS
34058  test -z "$as_dir" && as_dir=.
34059    for ac_exec_ext in '' $ac_executable_extensions; do
34060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34061    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34062       ac_prog_rejected=yes
34063       continue
34064     fi
34065    ac_cv_prog_MT="mt"
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
34073if test $ac_prog_rejected = yes; then
34074  # We found a bogon in the path, so make sure we never use it.
34075  set dummy $ac_cv_prog_MT
34076  shift
34077  if test $# != 0; then
34078    # We chose a different compiler from the bogus one.
34079    # However, it has the same basename, so the bogon will be chosen
34080    # first if we set MT to just the basename; use the full file name.
34081    shift
34082    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34083  fi
34084fi
34085fi
34086fi
34087MT=$ac_cv_prog_MT
34088if test -n "$MT"; then
34089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34090$as_echo "$MT" >&6; }
34091else
34092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34093$as_echo "no" >&6; }
34094fi
34095
34096
34097
34098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34099
34100  # First separate the path from the arguments. This will split at the first
34101  # space.
34102  complete="$MT"
34103  path="${complete%% *}"
34104  tmp="$complete EOL"
34105  arguments="${tmp#* }"
34106
34107  # Input might be given as Windows format, start by converting to
34108  # unix format.
34109  new_path=`$CYGPATH -u "$path"`
34110
34111  # Now try to locate executable using which
34112  new_path=`$WHICH "$new_path" 2> /dev/null`
34113  # bat and cmd files are not always considered executable in cygwin causing which
34114  # to not find them
34115  if test "x$new_path" = x \
34116      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34117      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34118    new_path=`$CYGPATH -u "$path"`
34119  fi
34120  if test "x$new_path" = x; then
34121    # Oops. Which didn't find the executable.
34122    # The splitting of arguments from the executable at a space might have been incorrect,
34123    # since paths with space are more likely in Windows. Give it another try with the whole
34124    # argument.
34125    path="$complete"
34126    arguments="EOL"
34127    new_path=`$CYGPATH -u "$path"`
34128    new_path=`$WHICH "$new_path" 2> /dev/null`
34129    # bat and cmd files are not always considered executable in cygwin causing which
34130    # to not find them
34131    if test "x$new_path" = x \
34132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34134      new_path=`$CYGPATH -u "$path"`
34135    fi
34136    if test "x$new_path" = x; then
34137      # It's still not found. Now this is an unrecoverable error.
34138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34139$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34140      has_space=`$ECHO "$complete" | $GREP " "`
34141      if test "x$has_space" != x; then
34142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34144      fi
34145      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34146    fi
34147  fi
34148
34149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34152  # "foo.exe" is OK but "foo" is an error.
34153  #
34154  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34155  # It is also a way to make sure we got the proper file name for the real test later on.
34156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34157  if test "x$test_shortpath" = x; then
34158    # Short path failed, file does not exist as specified.
34159    # Try adding .exe or .cmd
34160    if test -f "${new_path}.exe"; then
34161      input_to_shortpath="${new_path}.exe"
34162    elif test -f "${new_path}.cmd"; then
34163      input_to_shortpath="${new_path}.cmd"
34164    else
34165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34166$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34167      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34168$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34169      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34170    fi
34171  else
34172    input_to_shortpath="$new_path"
34173  fi
34174
34175  # Call helper function which possibly converts this using DOS-style short mode.
34176  # If so, the updated path is stored in $new_path.
34177  new_path="$input_to_shortpath"
34178
34179  input_path="$input_to_shortpath"
34180  # Check if we need to convert this using DOS-style short mode. If the path
34181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34182  # take no chances and rewrite it.
34183  # Note: m4 eats our [], so we need to use [ and ] instead.
34184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34185  if test "x$has_forbidden_chars" != x; then
34186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34190      # Going to short mode and back again did indeed matter. Since short mode is
34191      # case insensitive, let's make it lowercase to improve readability.
34192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34193      # Now convert it back to Unix-stile (cygpath)
34194      input_path=`$CYGPATH -u "$shortmode_path"`
34195      new_path="$input_path"
34196    fi
34197  fi
34198
34199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34200  if test "x$test_cygdrive_prefix" = x; then
34201    # As a simple fix, exclude /usr/bin since it's not a real path.
34202    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34204      # a path prefixed by /cygdrive for fixpath to work.
34205      new_path="$CYGWIN_ROOT_PATH$input_path"
34206    fi
34207  fi
34208
34209  # remove trailing .exe if any
34210  new_path="${new_path/%.exe/}"
34211
34212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34213
34214  # First separate the path from the arguments. This will split at the first
34215  # space.
34216  complete="$MT"
34217  path="${complete%% *}"
34218  tmp="$complete EOL"
34219  arguments="${tmp#* }"
34220
34221  # Input might be given as Windows format, start by converting to
34222  # unix format.
34223  new_path="$path"
34224
34225  windows_path="$new_path"
34226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34227    unix_path=`$CYGPATH -u "$windows_path"`
34228    new_path="$unix_path"
34229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34231    new_path="$unix_path"
34232  fi
34233
34234
34235  # Now try to locate executable using which
34236  new_path=`$WHICH "$new_path" 2> /dev/null`
34237
34238  if test "x$new_path" = x; then
34239    # Oops. Which didn't find the executable.
34240    # The splitting of arguments from the executable at a space might have been incorrect,
34241    # since paths with space are more likely in Windows. Give it another try with the whole
34242    # argument.
34243    path="$complete"
34244    arguments="EOL"
34245    new_path="$path"
34246
34247  windows_path="$new_path"
34248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34249    unix_path=`$CYGPATH -u "$windows_path"`
34250    new_path="$unix_path"
34251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34253    new_path="$unix_path"
34254  fi
34255
34256
34257    new_path=`$WHICH "$new_path" 2> /dev/null`
34258    # bat and cmd files are not always considered executable in MSYS causing which
34259    # to not find them
34260    if test "x$new_path" = x \
34261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34263      new_path="$path"
34264
34265  windows_path="$new_path"
34266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34267    unix_path=`$CYGPATH -u "$windows_path"`
34268    new_path="$unix_path"
34269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34271    new_path="$unix_path"
34272  fi
34273
34274    fi
34275
34276    if test "x$new_path" = x; then
34277      # It's still not found. Now this is an unrecoverable error.
34278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34279$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34280      has_space=`$ECHO "$complete" | $GREP " "`
34281      if test "x$has_space" != x; then
34282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34284      fi
34285      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34286    fi
34287  fi
34288
34289  # Now new_path has a complete unix path to the binary
34290  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34291    # Keep paths in /bin as-is, but remove trailing .exe if any
34292    new_path="${new_path/%.exe/}"
34293    # Do not save /bin paths to all_fixpath_prefixes!
34294  else
34295    # Not in mixed or Windows style, start by that.
34296    new_path=`cmd //c echo $new_path`
34297
34298  input_path="$new_path"
34299  # Check if we need to convert this using DOS-style short mode. If the path
34300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34301  # take no chances and rewrite it.
34302  # Note: m4 eats our [], so we need to use [ and ] instead.
34303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34304  if test "x$has_forbidden_chars" != x; then
34305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34307  fi
34308
34309    # Output is in $new_path
34310
34311  windows_path="$new_path"
34312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34313    unix_path=`$CYGPATH -u "$windows_path"`
34314    new_path="$unix_path"
34315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34317    new_path="$unix_path"
34318  fi
34319
34320    # remove trailing .exe if any
34321    new_path="${new_path/%.exe/}"
34322
34323    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34324    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34325  fi
34326
34327  else
34328    # We're on a unix platform. Hooray! :)
34329    # First separate the path from the arguments. This will split at the first
34330    # space.
34331    complete="$MT"
34332    path="${complete%% *}"
34333    tmp="$complete EOL"
34334    arguments="${tmp#* }"
34335
34336    # Cannot rely on the command "which" here since it doesn't always work.
34337    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34338    if test -z "$is_absolute_path"; then
34339      # Path to executable is not absolute. Find it.
34340      IFS_save="$IFS"
34341      IFS=:
34342      for p in $PATH; do
34343        if test -f "$p/$path" && test -x "$p/$path"; then
34344          new_path="$p/$path"
34345          break
34346        fi
34347      done
34348      IFS="$IFS_save"
34349    else
34350      # This is an absolute path, we can use it without further modifications.
34351      new_path="$path"
34352    fi
34353
34354    if test "x$new_path" = x; then
34355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34356$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34357      has_space=`$ECHO "$complete" | $GREP " "`
34358      if test "x$has_space" != x; then
34359        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34361      fi
34362      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34363    fi
34364  fi
34365
34366  # Now join together the path and the arguments once again
34367  if test "x$arguments" != xEOL; then
34368    new_complete="$new_path ${arguments% *}"
34369  else
34370    new_complete="$new_path"
34371  fi
34372
34373  if test "x$complete" != "x$new_complete"; then
34374    MT="$new_complete"
34375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34376$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34377  fi
34378
34379    # Setup the resource compiler (RC)
34380    # Extract the first word of "rc", so it can be a program name with args.
34381set dummy rc; ac_word=$2
34382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34383$as_echo_n "checking for $ac_word... " >&6; }
34384if ${ac_cv_prog_RC+:} false; then :
34385  $as_echo_n "(cached) " >&6
34386else
34387  if test -n "$RC"; then
34388  ac_cv_prog_RC="$RC" # Let the user override the test.
34389else
34390  ac_prog_rejected=no
34391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34392for as_dir in $PATH
34393do
34394  IFS=$as_save_IFS
34395  test -z "$as_dir" && as_dir=.
34396    for ac_exec_ext in '' $ac_executable_extensions; do
34397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34398    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34399       ac_prog_rejected=yes
34400       continue
34401     fi
34402    ac_cv_prog_RC="rc"
34403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34404    break 2
34405  fi
34406done
34407  done
34408IFS=$as_save_IFS
34409
34410if test $ac_prog_rejected = yes; then
34411  # We found a bogon in the path, so make sure we never use it.
34412  set dummy $ac_cv_prog_RC
34413  shift
34414  if test $# != 0; then
34415    # We chose a different compiler from the bogus one.
34416    # However, it has the same basename, so the bogon will be chosen
34417    # first if we set RC to just the basename; use the full file name.
34418    shift
34419    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34420  fi
34421fi
34422fi
34423fi
34424RC=$ac_cv_prog_RC
34425if test -n "$RC"; then
34426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34427$as_echo "$RC" >&6; }
34428else
34429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34430$as_echo "no" >&6; }
34431fi
34432
34433
34434
34435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34436
34437  # First separate the path from the arguments. This will split at the first
34438  # space.
34439  complete="$RC"
34440  path="${complete%% *}"
34441  tmp="$complete EOL"
34442  arguments="${tmp#* }"
34443
34444  # Input might be given as Windows format, start by converting to
34445  # unix format.
34446  new_path=`$CYGPATH -u "$path"`
34447
34448  # Now try to locate executable using which
34449  new_path=`$WHICH "$new_path" 2> /dev/null`
34450  # bat and cmd files are not always considered executable in cygwin causing which
34451  # to not find them
34452  if test "x$new_path" = x \
34453      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34454      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34455    new_path=`$CYGPATH -u "$path"`
34456  fi
34457  if test "x$new_path" = x; then
34458    # Oops. Which didn't find the executable.
34459    # The splitting of arguments from the executable at a space might have been incorrect,
34460    # since paths with space are more likely in Windows. Give it another try with the whole
34461    # argument.
34462    path="$complete"
34463    arguments="EOL"
34464    new_path=`$CYGPATH -u "$path"`
34465    new_path=`$WHICH "$new_path" 2> /dev/null`
34466    # bat and cmd files are not always considered executable in cygwin causing which
34467    # to not find them
34468    if test "x$new_path" = x \
34469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34471      new_path=`$CYGPATH -u "$path"`
34472    fi
34473    if test "x$new_path" = x; then
34474      # It's still not found. Now this is an unrecoverable error.
34475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34476$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34477      has_space=`$ECHO "$complete" | $GREP " "`
34478      if test "x$has_space" != x; then
34479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34481      fi
34482      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34483    fi
34484  fi
34485
34486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34489  # "foo.exe" is OK but "foo" is an error.
34490  #
34491  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34492  # It is also a way to make sure we got the proper file name for the real test later on.
34493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34494  if test "x$test_shortpath" = x; then
34495    # Short path failed, file does not exist as specified.
34496    # Try adding .exe or .cmd
34497    if test -f "${new_path}.exe"; then
34498      input_to_shortpath="${new_path}.exe"
34499    elif test -f "${new_path}.cmd"; then
34500      input_to_shortpath="${new_path}.cmd"
34501    else
34502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34503$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34504      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34505$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34506      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34507    fi
34508  else
34509    input_to_shortpath="$new_path"
34510  fi
34511
34512  # Call helper function which possibly converts this using DOS-style short mode.
34513  # If so, the updated path is stored in $new_path.
34514  new_path="$input_to_shortpath"
34515
34516  input_path="$input_to_shortpath"
34517  # Check if we need to convert this using DOS-style short mode. If the path
34518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34519  # take no chances and rewrite it.
34520  # Note: m4 eats our [], so we need to use [ and ] instead.
34521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34522  if test "x$has_forbidden_chars" != x; then
34523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34527      # Going to short mode and back again did indeed matter. Since short mode is
34528      # case insensitive, let's make it lowercase to improve readability.
34529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34530      # Now convert it back to Unix-stile (cygpath)
34531      input_path=`$CYGPATH -u "$shortmode_path"`
34532      new_path="$input_path"
34533    fi
34534  fi
34535
34536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34537  if test "x$test_cygdrive_prefix" = x; then
34538    # As a simple fix, exclude /usr/bin since it's not a real path.
34539    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34541      # a path prefixed by /cygdrive for fixpath to work.
34542      new_path="$CYGWIN_ROOT_PATH$input_path"
34543    fi
34544  fi
34545
34546  # remove trailing .exe if any
34547  new_path="${new_path/%.exe/}"
34548
34549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34550
34551  # First separate the path from the arguments. This will split at the first
34552  # space.
34553  complete="$RC"
34554  path="${complete%% *}"
34555  tmp="$complete EOL"
34556  arguments="${tmp#* }"
34557
34558  # Input might be given as Windows format, start by converting to
34559  # unix format.
34560  new_path="$path"
34561
34562  windows_path="$new_path"
34563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34564    unix_path=`$CYGPATH -u "$windows_path"`
34565    new_path="$unix_path"
34566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34568    new_path="$unix_path"
34569  fi
34570
34571
34572  # Now try to locate executable using which
34573  new_path=`$WHICH "$new_path" 2> /dev/null`
34574
34575  if test "x$new_path" = x; then
34576    # Oops. Which didn't find the executable.
34577    # The splitting of arguments from the executable at a space might have been incorrect,
34578    # since paths with space are more likely in Windows. Give it another try with the whole
34579    # argument.
34580    path="$complete"
34581    arguments="EOL"
34582    new_path="$path"
34583
34584  windows_path="$new_path"
34585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34586    unix_path=`$CYGPATH -u "$windows_path"`
34587    new_path="$unix_path"
34588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34590    new_path="$unix_path"
34591  fi
34592
34593
34594    new_path=`$WHICH "$new_path" 2> /dev/null`
34595    # bat and cmd files are not always considered executable in MSYS causing which
34596    # to not find them
34597    if test "x$new_path" = x \
34598        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34599        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34600      new_path="$path"
34601
34602  windows_path="$new_path"
34603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34604    unix_path=`$CYGPATH -u "$windows_path"`
34605    new_path="$unix_path"
34606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34608    new_path="$unix_path"
34609  fi
34610
34611    fi
34612
34613    if test "x$new_path" = x; then
34614      # It's still not found. Now this is an unrecoverable error.
34615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34616$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34617      has_space=`$ECHO "$complete" | $GREP " "`
34618      if test "x$has_space" != x; then
34619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34621      fi
34622      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34623    fi
34624  fi
34625
34626  # Now new_path has a complete unix path to the binary
34627  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34628    # Keep paths in /bin as-is, but remove trailing .exe if any
34629    new_path="${new_path/%.exe/}"
34630    # Do not save /bin paths to all_fixpath_prefixes!
34631  else
34632    # Not in mixed or Windows style, start by that.
34633    new_path=`cmd //c echo $new_path`
34634
34635  input_path="$new_path"
34636  # Check if we need to convert this using DOS-style short mode. If the path
34637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34638  # take no chances and rewrite it.
34639  # Note: m4 eats our [], so we need to use [ and ] instead.
34640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34641  if test "x$has_forbidden_chars" != x; then
34642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34644  fi
34645
34646    # Output is in $new_path
34647
34648  windows_path="$new_path"
34649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34650    unix_path=`$CYGPATH -u "$windows_path"`
34651    new_path="$unix_path"
34652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34654    new_path="$unix_path"
34655  fi
34656
34657    # remove trailing .exe if any
34658    new_path="${new_path/%.exe/}"
34659
34660    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34661    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34662  fi
34663
34664  else
34665    # We're on a unix platform. Hooray! :)
34666    # First separate the path from the arguments. This will split at the first
34667    # space.
34668    complete="$RC"
34669    path="${complete%% *}"
34670    tmp="$complete EOL"
34671    arguments="${tmp#* }"
34672
34673    # Cannot rely on the command "which" here since it doesn't always work.
34674    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34675    if test -z "$is_absolute_path"; then
34676      # Path to executable is not absolute. Find it.
34677      IFS_save="$IFS"
34678      IFS=:
34679      for p in $PATH; do
34680        if test -f "$p/$path" && test -x "$p/$path"; then
34681          new_path="$p/$path"
34682          break
34683        fi
34684      done
34685      IFS="$IFS_save"
34686    else
34687      # This is an absolute path, we can use it without further modifications.
34688      new_path="$path"
34689    fi
34690
34691    if test "x$new_path" = x; then
34692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34693$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34694      has_space=`$ECHO "$complete" | $GREP " "`
34695      if test "x$has_space" != x; then
34696        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34697$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34698      fi
34699      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34700    fi
34701  fi
34702
34703  # Now join together the path and the arguments once again
34704  if test "x$arguments" != xEOL; then
34705    new_complete="$new_path ${arguments% *}"
34706  else
34707    new_complete="$new_path"
34708  fi
34709
34710  if test "x$complete" != "x$new_complete"; then
34711    RC="$new_complete"
34712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34713$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34714  fi
34715
34716    # Extract the first word of "dumpbin", so it can be a program name with args.
34717set dummy dumpbin; ac_word=$2
34718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34719$as_echo_n "checking for $ac_word... " >&6; }
34720if ${ac_cv_prog_DUMPBIN+:} false; then :
34721  $as_echo_n "(cached) " >&6
34722else
34723  if test -n "$DUMPBIN"; then
34724  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34725else
34726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34727for as_dir in $PATH
34728do
34729  IFS=$as_save_IFS
34730  test -z "$as_dir" && as_dir=.
34731    for ac_exec_ext in '' $ac_executable_extensions; do
34732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34733    ac_cv_prog_DUMPBIN="dumpbin"
34734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34735    break 2
34736  fi
34737done
34738  done
34739IFS=$as_save_IFS
34740
34741fi
34742fi
34743DUMPBIN=$ac_cv_prog_DUMPBIN
34744if test -n "$DUMPBIN"; then
34745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34746$as_echo "$DUMPBIN" >&6; }
34747else
34748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34749$as_echo "no" >&6; }
34750fi
34751
34752
34753
34754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34755
34756  # First separate the path from the arguments. This will split at the first
34757  # space.
34758  complete="$DUMPBIN"
34759  path="${complete%% *}"
34760  tmp="$complete EOL"
34761  arguments="${tmp#* }"
34762
34763  # Input might be given as Windows format, start by converting to
34764  # unix format.
34765  new_path=`$CYGPATH -u "$path"`
34766
34767  # Now try to locate executable using which
34768  new_path=`$WHICH "$new_path" 2> /dev/null`
34769  # bat and cmd files are not always considered executable in cygwin causing which
34770  # to not find them
34771  if test "x$new_path" = x \
34772      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34773      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34774    new_path=`$CYGPATH -u "$path"`
34775  fi
34776  if test "x$new_path" = x; then
34777    # Oops. Which didn't find the executable.
34778    # The splitting of arguments from the executable at a space might have been incorrect,
34779    # since paths with space are more likely in Windows. Give it another try with the whole
34780    # argument.
34781    path="$complete"
34782    arguments="EOL"
34783    new_path=`$CYGPATH -u "$path"`
34784    new_path=`$WHICH "$new_path" 2> /dev/null`
34785    # bat and cmd files are not always considered executable in cygwin causing which
34786    # to not find them
34787    if test "x$new_path" = x \
34788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34790      new_path=`$CYGPATH -u "$path"`
34791    fi
34792    if test "x$new_path" = x; then
34793      # It's still not found. Now this is an unrecoverable error.
34794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34795$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34796      has_space=`$ECHO "$complete" | $GREP " "`
34797      if test "x$has_space" != x; then
34798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34800      fi
34801      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34802    fi
34803  fi
34804
34805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34808  # "foo.exe" is OK but "foo" is an error.
34809  #
34810  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34811  # It is also a way to make sure we got the proper file name for the real test later on.
34812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34813  if test "x$test_shortpath" = x; then
34814    # Short path failed, file does not exist as specified.
34815    # Try adding .exe or .cmd
34816    if test -f "${new_path}.exe"; then
34817      input_to_shortpath="${new_path}.exe"
34818    elif test -f "${new_path}.cmd"; then
34819      input_to_shortpath="${new_path}.cmd"
34820    else
34821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34822$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34823      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34824$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34825      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34826    fi
34827  else
34828    input_to_shortpath="$new_path"
34829  fi
34830
34831  # Call helper function which possibly converts this using DOS-style short mode.
34832  # If so, the updated path is stored in $new_path.
34833  new_path="$input_to_shortpath"
34834
34835  input_path="$input_to_shortpath"
34836  # Check if we need to convert this using DOS-style short mode. If the path
34837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34838  # take no chances and rewrite it.
34839  # Note: m4 eats our [], so we need to use [ and ] instead.
34840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34841  if test "x$has_forbidden_chars" != x; then
34842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34846      # Going to short mode and back again did indeed matter. Since short mode is
34847      # case insensitive, let's make it lowercase to improve readability.
34848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34849      # Now convert it back to Unix-stile (cygpath)
34850      input_path=`$CYGPATH -u "$shortmode_path"`
34851      new_path="$input_path"
34852    fi
34853  fi
34854
34855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34856  if test "x$test_cygdrive_prefix" = x; then
34857    # As a simple fix, exclude /usr/bin since it's not a real path.
34858    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34860      # a path prefixed by /cygdrive for fixpath to work.
34861      new_path="$CYGWIN_ROOT_PATH$input_path"
34862    fi
34863  fi
34864
34865  # remove trailing .exe if any
34866  new_path="${new_path/%.exe/}"
34867
34868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34869
34870  # First separate the path from the arguments. This will split at the first
34871  # space.
34872  complete="$DUMPBIN"
34873  path="${complete%% *}"
34874  tmp="$complete EOL"
34875  arguments="${tmp#* }"
34876
34877  # Input might be given as Windows format, start by converting to
34878  # unix format.
34879  new_path="$path"
34880
34881  windows_path="$new_path"
34882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34883    unix_path=`$CYGPATH -u "$windows_path"`
34884    new_path="$unix_path"
34885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34887    new_path="$unix_path"
34888  fi
34889
34890
34891  # Now try to locate executable using which
34892  new_path=`$WHICH "$new_path" 2> /dev/null`
34893
34894  if test "x$new_path" = x; then
34895    # Oops. Which didn't find the executable.
34896    # The splitting of arguments from the executable at a space might have been incorrect,
34897    # since paths with space are more likely in Windows. Give it another try with the whole
34898    # argument.
34899    path="$complete"
34900    arguments="EOL"
34901    new_path="$path"
34902
34903  windows_path="$new_path"
34904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34905    unix_path=`$CYGPATH -u "$windows_path"`
34906    new_path="$unix_path"
34907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34909    new_path="$unix_path"
34910  fi
34911
34912
34913    new_path=`$WHICH "$new_path" 2> /dev/null`
34914    # bat and cmd files are not always considered executable in MSYS causing which
34915    # to not find them
34916    if test "x$new_path" = x \
34917        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34918        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34919      new_path="$path"
34920
34921  windows_path="$new_path"
34922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34923    unix_path=`$CYGPATH -u "$windows_path"`
34924    new_path="$unix_path"
34925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34927    new_path="$unix_path"
34928  fi
34929
34930    fi
34931
34932    if test "x$new_path" = x; then
34933      # It's still not found. Now this is an unrecoverable error.
34934      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34935$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34936      has_space=`$ECHO "$complete" | $GREP " "`
34937      if test "x$has_space" != x; then
34938        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34939$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34940      fi
34941      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34942    fi
34943  fi
34944
34945  # Now new_path has a complete unix path to the binary
34946  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34947    # Keep paths in /bin as-is, but remove trailing .exe if any
34948    new_path="${new_path/%.exe/}"
34949    # Do not save /bin paths to all_fixpath_prefixes!
34950  else
34951    # Not in mixed or Windows style, start by that.
34952    new_path=`cmd //c echo $new_path`
34953
34954  input_path="$new_path"
34955  # Check if we need to convert this using DOS-style short mode. If the path
34956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34957  # take no chances and rewrite it.
34958  # Note: m4 eats our [], so we need to use [ and ] instead.
34959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34960  if test "x$has_forbidden_chars" != x; then
34961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34963  fi
34964
34965    # Output is in $new_path
34966
34967  windows_path="$new_path"
34968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34969    unix_path=`$CYGPATH -u "$windows_path"`
34970    new_path="$unix_path"
34971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34973    new_path="$unix_path"
34974  fi
34975
34976    # remove trailing .exe if any
34977    new_path="${new_path/%.exe/}"
34978
34979    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34980    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34981  fi
34982
34983  else
34984    # We're on a unix platform. Hooray! :)
34985    # First separate the path from the arguments. This will split at the first
34986    # space.
34987    complete="$DUMPBIN"
34988    path="${complete%% *}"
34989    tmp="$complete EOL"
34990    arguments="${tmp#* }"
34991
34992    # Cannot rely on the command "which" here since it doesn't always work.
34993    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34994    if test -z "$is_absolute_path"; then
34995      # Path to executable is not absolute. Find it.
34996      IFS_save="$IFS"
34997      IFS=:
34998      for p in $PATH; do
34999        if test -f "$p/$path" && test -x "$p/$path"; then
35000          new_path="$p/$path"
35001          break
35002        fi
35003      done
35004      IFS="$IFS_save"
35005    else
35006      # This is an absolute path, we can use it without further modifications.
35007      new_path="$path"
35008    fi
35009
35010    if test "x$new_path" = x; then
35011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35012$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35013      has_space=`$ECHO "$complete" | $GREP " "`
35014      if test "x$has_space" != x; then
35015        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35016$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35017      fi
35018      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35019    fi
35020  fi
35021
35022  # Now join together the path and the arguments once again
35023  if test "x$arguments" != xEOL; then
35024    new_complete="$new_path ${arguments% *}"
35025  else
35026    new_complete="$new_path"
35027  fi
35028
35029  if test "x$complete" != "x$new_complete"; then
35030    DUMPBIN="$new_complete"
35031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35032$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35033  fi
35034
35035    # We need to check for 'msbuild.exe' because at the place where we expect to
35036    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35037    # won't find the 'msbuild.exe' executable in that case (and the
35038    # 'ac_executable_extensions' is unusable due to performance reasons).
35039    # Notice that we intentionally don't fix up the path to MSBUILD because we
35040    # will call it in a DOS shell during freetype detection on Windows (see
35041    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35042    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35043set dummy msbuild.exe; ac_word=$2
35044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35045$as_echo_n "checking for $ac_word... " >&6; }
35046if ${ac_cv_prog_MSBUILD+:} false; then :
35047  $as_echo_n "(cached) " >&6
35048else
35049  if test -n "$MSBUILD"; then
35050  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35051else
35052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35053for as_dir in $PATH
35054do
35055  IFS=$as_save_IFS
35056  test -z "$as_dir" && as_dir=.
35057    for ac_exec_ext in '' $ac_executable_extensions; do
35058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35059    ac_cv_prog_MSBUILD="msbuild.exe"
35060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35061    break 2
35062  fi
35063done
35064  done
35065IFS=$as_save_IFS
35066
35067fi
35068fi
35069MSBUILD=$ac_cv_prog_MSBUILD
35070if test -n "$MSBUILD"; then
35071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35072$as_echo "$MSBUILD" >&6; }
35073else
35074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35075$as_echo "no" >&6; }
35076fi
35077
35078
35079  fi
35080
35081  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35082
35083
35084  # Publish this variable in the help.
35085
35086
35087  if test "x$STRIP" = x; then
35088    # The variable is not set by user, try to locate tool using the code snippet
35089    for ac_prog in strip
35090do
35091  # Extract the first word of "$ac_prog", so it can be a program name with args.
35092set dummy $ac_prog; ac_word=$2
35093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35094$as_echo_n "checking for $ac_word... " >&6; }
35095if ${ac_cv_path_STRIP+:} false; then :
35096  $as_echo_n "(cached) " >&6
35097else
35098  case $STRIP in
35099  [\\/]* | ?:[\\/]*)
35100  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35101  ;;
35102  *)
35103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35104for as_dir in $PATH
35105do
35106  IFS=$as_save_IFS
35107  test -z "$as_dir" && as_dir=.
35108    for ac_exec_ext in '' $ac_executable_extensions; do
35109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35110    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35112    break 2
35113  fi
35114done
35115  done
35116IFS=$as_save_IFS
35117
35118  ;;
35119esac
35120fi
35121STRIP=$ac_cv_path_STRIP
35122if test -n "$STRIP"; then
35123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35124$as_echo "$STRIP" >&6; }
35125else
35126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35127$as_echo "no" >&6; }
35128fi
35129
35130
35131  test -n "$STRIP" && break
35132done
35133
35134  else
35135    # The variable is set, but is it from the command line or the environment?
35136
35137    # Try to remove the string !STRIP! from our list.
35138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35140      # If it failed, the variable was not from the command line. Ignore it,
35141      # but warn the user (except for BASH, which is always set by the calling BASH).
35142      if test "xSTRIP" != xBASH; then
35143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35144$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35145      fi
35146      # Try to locate tool using the code snippet
35147      for ac_prog in strip
35148do
35149  # Extract the first word of "$ac_prog", so it can be a program name with args.
35150set dummy $ac_prog; ac_word=$2
35151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35152$as_echo_n "checking for $ac_word... " >&6; }
35153if ${ac_cv_path_STRIP+:} false; then :
35154  $as_echo_n "(cached) " >&6
35155else
35156  case $STRIP in
35157  [\\/]* | ?:[\\/]*)
35158  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35159  ;;
35160  *)
35161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35162for as_dir in $PATH
35163do
35164  IFS=$as_save_IFS
35165  test -z "$as_dir" && as_dir=.
35166    for ac_exec_ext in '' $ac_executable_extensions; do
35167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35168    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35170    break 2
35171  fi
35172done
35173  done
35174IFS=$as_save_IFS
35175
35176  ;;
35177esac
35178fi
35179STRIP=$ac_cv_path_STRIP
35180if test -n "$STRIP"; then
35181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35182$as_echo "$STRIP" >&6; }
35183else
35184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35185$as_echo "no" >&6; }
35186fi
35187
35188
35189  test -n "$STRIP" && break
35190done
35191
35192    else
35193      # If it succeeded, then it was overridden by the user. We will use it
35194      # for the tool.
35195
35196      # First remove it from the list of overridden variables, so we can test
35197      # for unknown variables in the end.
35198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35199
35200      # Check if the provided tool contains a complete path.
35201      tool_specified="$STRIP"
35202      tool_basename="${tool_specified##*/}"
35203      if test "x$tool_basename" = "x$tool_specified"; then
35204        # A command without a complete path is provided, search $PATH.
35205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35206$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35207        # Extract the first word of "$tool_basename", so it can be a program name with args.
35208set dummy $tool_basename; ac_word=$2
35209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35210$as_echo_n "checking for $ac_word... " >&6; }
35211if ${ac_cv_path_STRIP+:} false; then :
35212  $as_echo_n "(cached) " >&6
35213else
35214  case $STRIP in
35215  [\\/]* | ?:[\\/]*)
35216  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35217  ;;
35218  *)
35219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35220for as_dir in $PATH
35221do
35222  IFS=$as_save_IFS
35223  test -z "$as_dir" && as_dir=.
35224    for ac_exec_ext in '' $ac_executable_extensions; do
35225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35226    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35228    break 2
35229  fi
35230done
35231  done
35232IFS=$as_save_IFS
35233
35234  ;;
35235esac
35236fi
35237STRIP=$ac_cv_path_STRIP
35238if test -n "$STRIP"; then
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35240$as_echo "$STRIP" >&6; }
35241else
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35243$as_echo "no" >&6; }
35244fi
35245
35246
35247        if test "x$STRIP" = x; then
35248          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35249        fi
35250      else
35251        # Otherwise we believe it is a complete path. Use it as it is.
35252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35253$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35255$as_echo_n "checking for STRIP... " >&6; }
35256        if test ! -x "$tool_specified"; then
35257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35258$as_echo "not found" >&6; }
35259          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35260        fi
35261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35262$as_echo "$tool_specified" >&6; }
35263      fi
35264    fi
35265  fi
35266
35267
35268
35269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35270
35271  # First separate the path from the arguments. This will split at the first
35272  # space.
35273  complete="$STRIP"
35274  path="${complete%% *}"
35275  tmp="$complete EOL"
35276  arguments="${tmp#* }"
35277
35278  # Input might be given as Windows format, start by converting to
35279  # unix format.
35280  new_path=`$CYGPATH -u "$path"`
35281
35282  # Now try to locate executable using which
35283  new_path=`$WHICH "$new_path" 2> /dev/null`
35284  # bat and cmd files are not always considered executable in cygwin causing which
35285  # to not find them
35286  if test "x$new_path" = x \
35287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35289    new_path=`$CYGPATH -u "$path"`
35290  fi
35291  if test "x$new_path" = x; then
35292    # Oops. Which didn't find the executable.
35293    # The splitting of arguments from the executable at a space might have been incorrect,
35294    # since paths with space are more likely in Windows. Give it another try with the whole
35295    # argument.
35296    path="$complete"
35297    arguments="EOL"
35298    new_path=`$CYGPATH -u "$path"`
35299    new_path=`$WHICH "$new_path" 2> /dev/null`
35300    # bat and cmd files are not always considered executable in cygwin causing which
35301    # to not find them
35302    if test "x$new_path" = x \
35303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35305      new_path=`$CYGPATH -u "$path"`
35306    fi
35307    if test "x$new_path" = x; then
35308      # It's still not found. Now this is an unrecoverable error.
35309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35310$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35311      has_space=`$ECHO "$complete" | $GREP " "`
35312      if test "x$has_space" != x; then
35313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35315      fi
35316      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35317    fi
35318  fi
35319
35320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35323  # "foo.exe" is OK but "foo" is an error.
35324  #
35325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35326  # It is also a way to make sure we got the proper file name for the real test later on.
35327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35328  if test "x$test_shortpath" = x; then
35329    # Short path failed, file does not exist as specified.
35330    # Try adding .exe or .cmd
35331    if test -f "${new_path}.exe"; then
35332      input_to_shortpath="${new_path}.exe"
35333    elif test -f "${new_path}.cmd"; then
35334      input_to_shortpath="${new_path}.cmd"
35335    else
35336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35337$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35340      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35341    fi
35342  else
35343    input_to_shortpath="$new_path"
35344  fi
35345
35346  # Call helper function which possibly converts this using DOS-style short mode.
35347  # If so, the updated path is stored in $new_path.
35348  new_path="$input_to_shortpath"
35349
35350  input_path="$input_to_shortpath"
35351  # Check if we need to convert this using DOS-style short mode. If the path
35352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35353  # take no chances and rewrite it.
35354  # Note: m4 eats our [], so we need to use [ and ] instead.
35355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35356  if test "x$has_forbidden_chars" != x; then
35357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35361      # Going to short mode and back again did indeed matter. Since short mode is
35362      # case insensitive, let's make it lowercase to improve readability.
35363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35364      # Now convert it back to Unix-stile (cygpath)
35365      input_path=`$CYGPATH -u "$shortmode_path"`
35366      new_path="$input_path"
35367    fi
35368  fi
35369
35370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35371  if test "x$test_cygdrive_prefix" = x; then
35372    # As a simple fix, exclude /usr/bin since it's not a real path.
35373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35375      # a path prefixed by /cygdrive for fixpath to work.
35376      new_path="$CYGWIN_ROOT_PATH$input_path"
35377    fi
35378  fi
35379
35380  # remove trailing .exe if any
35381  new_path="${new_path/%.exe/}"
35382
35383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35384
35385  # First separate the path from the arguments. This will split at the first
35386  # space.
35387  complete="$STRIP"
35388  path="${complete%% *}"
35389  tmp="$complete EOL"
35390  arguments="${tmp#* }"
35391
35392  # Input might be given as Windows format, start by converting to
35393  # unix format.
35394  new_path="$path"
35395
35396  windows_path="$new_path"
35397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35398    unix_path=`$CYGPATH -u "$windows_path"`
35399    new_path="$unix_path"
35400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35402    new_path="$unix_path"
35403  fi
35404
35405
35406  # Now try to locate executable using which
35407  new_path=`$WHICH "$new_path" 2> /dev/null`
35408
35409  if test "x$new_path" = x; then
35410    # Oops. Which didn't find the executable.
35411    # The splitting of arguments from the executable at a space might have been incorrect,
35412    # since paths with space are more likely in Windows. Give it another try with the whole
35413    # argument.
35414    path="$complete"
35415    arguments="EOL"
35416    new_path="$path"
35417
35418  windows_path="$new_path"
35419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35420    unix_path=`$CYGPATH -u "$windows_path"`
35421    new_path="$unix_path"
35422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35424    new_path="$unix_path"
35425  fi
35426
35427
35428    new_path=`$WHICH "$new_path" 2> /dev/null`
35429    # bat and cmd files are not always considered executable in MSYS causing which
35430    # to not find them
35431    if test "x$new_path" = x \
35432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35434      new_path="$path"
35435
35436  windows_path="$new_path"
35437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35438    unix_path=`$CYGPATH -u "$windows_path"`
35439    new_path="$unix_path"
35440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35442    new_path="$unix_path"
35443  fi
35444
35445    fi
35446
35447    if test "x$new_path" = x; then
35448      # It's still not found. Now this is an unrecoverable error.
35449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35450$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35451      has_space=`$ECHO "$complete" | $GREP " "`
35452      if test "x$has_space" != x; then
35453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35455      fi
35456      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35457    fi
35458  fi
35459
35460  # Now new_path has a complete unix path to the binary
35461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35462    # Keep paths in /bin as-is, but remove trailing .exe if any
35463    new_path="${new_path/%.exe/}"
35464    # Do not save /bin paths to all_fixpath_prefixes!
35465  else
35466    # Not in mixed or Windows style, start by that.
35467    new_path=`cmd //c echo $new_path`
35468
35469  input_path="$new_path"
35470  # Check if we need to convert this using DOS-style short mode. If the path
35471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35472  # take no chances and rewrite it.
35473  # Note: m4 eats our [], so we need to use [ and ] instead.
35474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35475  if test "x$has_forbidden_chars" != x; then
35476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35478  fi
35479
35480    # Output is in $new_path
35481
35482  windows_path="$new_path"
35483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35484    unix_path=`$CYGPATH -u "$windows_path"`
35485    new_path="$unix_path"
35486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35488    new_path="$unix_path"
35489  fi
35490
35491    # remove trailing .exe if any
35492    new_path="${new_path/%.exe/}"
35493
35494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35496  fi
35497
35498  else
35499    # We're on a unix platform. Hooray! :)
35500    # First separate the path from the arguments. This will split at the first
35501    # space.
35502    complete="$STRIP"
35503    path="${complete%% *}"
35504    tmp="$complete EOL"
35505    arguments="${tmp#* }"
35506
35507    # Cannot rely on the command "which" here since it doesn't always work.
35508    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35509    if test -z "$is_absolute_path"; then
35510      # Path to executable is not absolute. Find it.
35511      IFS_save="$IFS"
35512      IFS=:
35513      for p in $PATH; do
35514        if test -f "$p/$path" && test -x "$p/$path"; then
35515          new_path="$p/$path"
35516          break
35517        fi
35518      done
35519      IFS="$IFS_save"
35520    else
35521      # This is an absolute path, we can use it without further modifications.
35522      new_path="$path"
35523    fi
35524
35525    if test "x$new_path" = x; then
35526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35527$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35528      has_space=`$ECHO "$complete" | $GREP " "`
35529      if test "x$has_space" != x; then
35530        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35532      fi
35533      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35534    fi
35535  fi
35536
35537  # Now join together the path and the arguments once again
35538  if test "x$arguments" != xEOL; then
35539    new_complete="$new_path ${arguments% *}"
35540  else
35541    new_complete="$new_path"
35542  fi
35543
35544  if test "x$complete" != "x$new_complete"; then
35545    STRIP="$new_complete"
35546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35547$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35548  fi
35549
35550
35551
35552  # Publish this variable in the help.
35553
35554
35555  if test "x$NM" = x; then
35556    # The variable is not set by user, try to locate tool using the code snippet
35557    for ac_prog in nm
35558do
35559  # Extract the first word of "$ac_prog", so it can be a program name with args.
35560set dummy $ac_prog; ac_word=$2
35561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35562$as_echo_n "checking for $ac_word... " >&6; }
35563if ${ac_cv_path_NM+:} false; then :
35564  $as_echo_n "(cached) " >&6
35565else
35566  case $NM in
35567  [\\/]* | ?:[\\/]*)
35568  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35569  ;;
35570  *)
35571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35572for as_dir in $PATH
35573do
35574  IFS=$as_save_IFS
35575  test -z "$as_dir" && as_dir=.
35576    for ac_exec_ext in '' $ac_executable_extensions; do
35577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35578    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35580    break 2
35581  fi
35582done
35583  done
35584IFS=$as_save_IFS
35585
35586  ;;
35587esac
35588fi
35589NM=$ac_cv_path_NM
35590if test -n "$NM"; then
35591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35592$as_echo "$NM" >&6; }
35593else
35594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35595$as_echo "no" >&6; }
35596fi
35597
35598
35599  test -n "$NM" && break
35600done
35601
35602  else
35603    # The variable is set, but is it from the command line or the environment?
35604
35605    # Try to remove the string !NM! from our list.
35606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35608      # If it failed, the variable was not from the command line. Ignore it,
35609      # but warn the user (except for BASH, which is always set by the calling BASH).
35610      if test "xNM" != xBASH; then
35611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35612$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35613      fi
35614      # Try to locate tool using the code snippet
35615      for ac_prog in nm
35616do
35617  # Extract the first word of "$ac_prog", so it can be a program name with args.
35618set dummy $ac_prog; ac_word=$2
35619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35620$as_echo_n "checking for $ac_word... " >&6; }
35621if ${ac_cv_path_NM+:} false; then :
35622  $as_echo_n "(cached) " >&6
35623else
35624  case $NM in
35625  [\\/]* | ?:[\\/]*)
35626  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35627  ;;
35628  *)
35629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35630for as_dir in $PATH
35631do
35632  IFS=$as_save_IFS
35633  test -z "$as_dir" && as_dir=.
35634    for ac_exec_ext in '' $ac_executable_extensions; do
35635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35636    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35638    break 2
35639  fi
35640done
35641  done
35642IFS=$as_save_IFS
35643
35644  ;;
35645esac
35646fi
35647NM=$ac_cv_path_NM
35648if test -n "$NM"; then
35649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35650$as_echo "$NM" >&6; }
35651else
35652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35653$as_echo "no" >&6; }
35654fi
35655
35656
35657  test -n "$NM" && break
35658done
35659
35660    else
35661      # If it succeeded, then it was overridden by the user. We will use it
35662      # for the tool.
35663
35664      # First remove it from the list of overridden variables, so we can test
35665      # for unknown variables in the end.
35666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35667
35668      # Check if the provided tool contains a complete path.
35669      tool_specified="$NM"
35670      tool_basename="${tool_specified##*/}"
35671      if test "x$tool_basename" = "x$tool_specified"; then
35672        # A command without a complete path is provided, search $PATH.
35673        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35674$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35675        # Extract the first word of "$tool_basename", so it can be a program name with args.
35676set dummy $tool_basename; ac_word=$2
35677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35678$as_echo_n "checking for $ac_word... " >&6; }
35679if ${ac_cv_path_NM+:} false; then :
35680  $as_echo_n "(cached) " >&6
35681else
35682  case $NM in
35683  [\\/]* | ?:[\\/]*)
35684  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35685  ;;
35686  *)
35687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35688for as_dir in $PATH
35689do
35690  IFS=$as_save_IFS
35691  test -z "$as_dir" && as_dir=.
35692    for ac_exec_ext in '' $ac_executable_extensions; do
35693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35694    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35696    break 2
35697  fi
35698done
35699  done
35700IFS=$as_save_IFS
35701
35702  ;;
35703esac
35704fi
35705NM=$ac_cv_path_NM
35706if test -n "$NM"; then
35707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35708$as_echo "$NM" >&6; }
35709else
35710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35711$as_echo "no" >&6; }
35712fi
35713
35714
35715        if test "x$NM" = x; then
35716          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35717        fi
35718      else
35719        # Otherwise we believe it is a complete path. Use it as it is.
35720        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35721$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35723$as_echo_n "checking for NM... " >&6; }
35724        if test ! -x "$tool_specified"; then
35725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35726$as_echo "not found" >&6; }
35727          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35728        fi
35729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35730$as_echo "$tool_specified" >&6; }
35731      fi
35732    fi
35733  fi
35734
35735
35736
35737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35738
35739  # First separate the path from the arguments. This will split at the first
35740  # space.
35741  complete="$NM"
35742  path="${complete%% *}"
35743  tmp="$complete EOL"
35744  arguments="${tmp#* }"
35745
35746  # Input might be given as Windows format, start by converting to
35747  # unix format.
35748  new_path=`$CYGPATH -u "$path"`
35749
35750  # Now try to locate executable using which
35751  new_path=`$WHICH "$new_path" 2> /dev/null`
35752  # bat and cmd files are not always considered executable in cygwin causing which
35753  # to not find them
35754  if test "x$new_path" = x \
35755      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35756      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35757    new_path=`$CYGPATH -u "$path"`
35758  fi
35759  if test "x$new_path" = x; then
35760    # Oops. Which didn't find the executable.
35761    # The splitting of arguments from the executable at a space might have been incorrect,
35762    # since paths with space are more likely in Windows. Give it another try with the whole
35763    # argument.
35764    path="$complete"
35765    arguments="EOL"
35766    new_path=`$CYGPATH -u "$path"`
35767    new_path=`$WHICH "$new_path" 2> /dev/null`
35768    # bat and cmd files are not always considered executable in cygwin causing which
35769    # to not find them
35770    if test "x$new_path" = x \
35771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35773      new_path=`$CYGPATH -u "$path"`
35774    fi
35775    if test "x$new_path" = x; then
35776      # It's still not found. Now this is an unrecoverable error.
35777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35778$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35779      has_space=`$ECHO "$complete" | $GREP " "`
35780      if test "x$has_space" != x; then
35781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35783      fi
35784      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35785    fi
35786  fi
35787
35788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35791  # "foo.exe" is OK but "foo" is an error.
35792  #
35793  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35794  # It is also a way to make sure we got the proper file name for the real test later on.
35795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35796  if test "x$test_shortpath" = x; then
35797    # Short path failed, file does not exist as specified.
35798    # Try adding .exe or .cmd
35799    if test -f "${new_path}.exe"; then
35800      input_to_shortpath="${new_path}.exe"
35801    elif test -f "${new_path}.cmd"; then
35802      input_to_shortpath="${new_path}.cmd"
35803    else
35804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35805$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35806      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35807$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35808      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35809    fi
35810  else
35811    input_to_shortpath="$new_path"
35812  fi
35813
35814  # Call helper function which possibly converts this using DOS-style short mode.
35815  # If so, the updated path is stored in $new_path.
35816  new_path="$input_to_shortpath"
35817
35818  input_path="$input_to_shortpath"
35819  # Check if we need to convert this using DOS-style short mode. If the path
35820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35821  # take no chances and rewrite it.
35822  # Note: m4 eats our [], so we need to use [ and ] instead.
35823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35824  if test "x$has_forbidden_chars" != x; then
35825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35829      # Going to short mode and back again did indeed matter. Since short mode is
35830      # case insensitive, let's make it lowercase to improve readability.
35831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35832      # Now convert it back to Unix-stile (cygpath)
35833      input_path=`$CYGPATH -u "$shortmode_path"`
35834      new_path="$input_path"
35835    fi
35836  fi
35837
35838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35839  if test "x$test_cygdrive_prefix" = x; then
35840    # As a simple fix, exclude /usr/bin since it's not a real path.
35841    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35843      # a path prefixed by /cygdrive for fixpath to work.
35844      new_path="$CYGWIN_ROOT_PATH$input_path"
35845    fi
35846  fi
35847
35848  # remove trailing .exe if any
35849  new_path="${new_path/%.exe/}"
35850
35851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35852
35853  # First separate the path from the arguments. This will split at the first
35854  # space.
35855  complete="$NM"
35856  path="${complete%% *}"
35857  tmp="$complete EOL"
35858  arguments="${tmp#* }"
35859
35860  # Input might be given as Windows format, start by converting to
35861  # unix format.
35862  new_path="$path"
35863
35864  windows_path="$new_path"
35865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35866    unix_path=`$CYGPATH -u "$windows_path"`
35867    new_path="$unix_path"
35868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35870    new_path="$unix_path"
35871  fi
35872
35873
35874  # Now try to locate executable using which
35875  new_path=`$WHICH "$new_path" 2> /dev/null`
35876
35877  if test "x$new_path" = x; then
35878    # Oops. Which didn't find the executable.
35879    # The splitting of arguments from the executable at a space might have been incorrect,
35880    # since paths with space are more likely in Windows. Give it another try with the whole
35881    # argument.
35882    path="$complete"
35883    arguments="EOL"
35884    new_path="$path"
35885
35886  windows_path="$new_path"
35887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35888    unix_path=`$CYGPATH -u "$windows_path"`
35889    new_path="$unix_path"
35890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35892    new_path="$unix_path"
35893  fi
35894
35895
35896    new_path=`$WHICH "$new_path" 2> /dev/null`
35897    # bat and cmd files are not always considered executable in MSYS causing which
35898    # to not find them
35899    if test "x$new_path" = x \
35900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35902      new_path="$path"
35903
35904  windows_path="$new_path"
35905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35906    unix_path=`$CYGPATH -u "$windows_path"`
35907    new_path="$unix_path"
35908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35910    new_path="$unix_path"
35911  fi
35912
35913    fi
35914
35915    if test "x$new_path" = x; then
35916      # It's still not found. Now this is an unrecoverable error.
35917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35918$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35919      has_space=`$ECHO "$complete" | $GREP " "`
35920      if test "x$has_space" != x; then
35921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35923      fi
35924      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35925    fi
35926  fi
35927
35928  # Now new_path has a complete unix path to the binary
35929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35930    # Keep paths in /bin as-is, but remove trailing .exe if any
35931    new_path="${new_path/%.exe/}"
35932    # Do not save /bin paths to all_fixpath_prefixes!
35933  else
35934    # Not in mixed or Windows style, start by that.
35935    new_path=`cmd //c echo $new_path`
35936
35937  input_path="$new_path"
35938  # Check if we need to convert this using DOS-style short mode. If the path
35939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35940  # take no chances and rewrite it.
35941  # Note: m4 eats our [], so we need to use [ and ] instead.
35942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35943  if test "x$has_forbidden_chars" != x; then
35944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35946  fi
35947
35948    # Output is in $new_path
35949
35950  windows_path="$new_path"
35951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35952    unix_path=`$CYGPATH -u "$windows_path"`
35953    new_path="$unix_path"
35954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35956    new_path="$unix_path"
35957  fi
35958
35959    # remove trailing .exe if any
35960    new_path="${new_path/%.exe/}"
35961
35962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35964  fi
35965
35966  else
35967    # We're on a unix platform. Hooray! :)
35968    # First separate the path from the arguments. This will split at the first
35969    # space.
35970    complete="$NM"
35971    path="${complete%% *}"
35972    tmp="$complete EOL"
35973    arguments="${tmp#* }"
35974
35975    # Cannot rely on the command "which" here since it doesn't always work.
35976    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35977    if test -z "$is_absolute_path"; then
35978      # Path to executable is not absolute. Find it.
35979      IFS_save="$IFS"
35980      IFS=:
35981      for p in $PATH; do
35982        if test -f "$p/$path" && test -x "$p/$path"; then
35983          new_path="$p/$path"
35984          break
35985        fi
35986      done
35987      IFS="$IFS_save"
35988    else
35989      # This is an absolute path, we can use it without further modifications.
35990      new_path="$path"
35991    fi
35992
35993    if test "x$new_path" = x; then
35994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35995$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35996      has_space=`$ECHO "$complete" | $GREP " "`
35997      if test "x$has_space" != x; then
35998        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36000      fi
36001      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36002    fi
36003  fi
36004
36005  # Now join together the path and the arguments once again
36006  if test "x$arguments" != xEOL; then
36007    new_complete="$new_path ${arguments% *}"
36008  else
36009    new_complete="$new_path"
36010  fi
36011
36012  if test "x$complete" != "x$new_complete"; then
36013    NM="$new_complete"
36014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36015$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36016  fi
36017
36018
36019
36020  # Publish this variable in the help.
36021
36022
36023  if test "x$GNM" = x; then
36024    # The variable is not set by user, try to locate tool using the code snippet
36025    for ac_prog in gnm
36026do
36027  # Extract the first word of "$ac_prog", so it can be a program name with args.
36028set dummy $ac_prog; ac_word=$2
36029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36030$as_echo_n "checking for $ac_word... " >&6; }
36031if ${ac_cv_path_GNM+:} false; then :
36032  $as_echo_n "(cached) " >&6
36033else
36034  case $GNM in
36035  [\\/]* | ?:[\\/]*)
36036  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36037  ;;
36038  *)
36039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36040for as_dir in $PATH
36041do
36042  IFS=$as_save_IFS
36043  test -z "$as_dir" && as_dir=.
36044    for ac_exec_ext in '' $ac_executable_extensions; do
36045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36046    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36048    break 2
36049  fi
36050done
36051  done
36052IFS=$as_save_IFS
36053
36054  ;;
36055esac
36056fi
36057GNM=$ac_cv_path_GNM
36058if test -n "$GNM"; then
36059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36060$as_echo "$GNM" >&6; }
36061else
36062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36063$as_echo "no" >&6; }
36064fi
36065
36066
36067  test -n "$GNM" && break
36068done
36069
36070  else
36071    # The variable is set, but is it from the command line or the environment?
36072
36073    # Try to remove the string !GNM! from our list.
36074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36076      # If it failed, the variable was not from the command line. Ignore it,
36077      # but warn the user (except for BASH, which is always set by the calling BASH).
36078      if test "xGNM" != xBASH; then
36079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36080$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36081      fi
36082      # Try to locate tool using the code snippet
36083      for ac_prog in gnm
36084do
36085  # Extract the first word of "$ac_prog", so it can be a program name with args.
36086set dummy $ac_prog; ac_word=$2
36087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36088$as_echo_n "checking for $ac_word... " >&6; }
36089if ${ac_cv_path_GNM+:} false; then :
36090  $as_echo_n "(cached) " >&6
36091else
36092  case $GNM in
36093  [\\/]* | ?:[\\/]*)
36094  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36095  ;;
36096  *)
36097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36098for as_dir in $PATH
36099do
36100  IFS=$as_save_IFS
36101  test -z "$as_dir" && as_dir=.
36102    for ac_exec_ext in '' $ac_executable_extensions; do
36103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36104    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36106    break 2
36107  fi
36108done
36109  done
36110IFS=$as_save_IFS
36111
36112  ;;
36113esac
36114fi
36115GNM=$ac_cv_path_GNM
36116if test -n "$GNM"; then
36117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36118$as_echo "$GNM" >&6; }
36119else
36120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36121$as_echo "no" >&6; }
36122fi
36123
36124
36125  test -n "$GNM" && break
36126done
36127
36128    else
36129      # If it succeeded, then it was overridden by the user. We will use it
36130      # for the tool.
36131
36132      # First remove it from the list of overridden variables, so we can test
36133      # for unknown variables in the end.
36134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36135
36136      # Check if the provided tool contains a complete path.
36137      tool_specified="$GNM"
36138      tool_basename="${tool_specified##*/}"
36139      if test "x$tool_basename" = "x$tool_specified"; then
36140        # A command without a complete path is provided, search $PATH.
36141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36142$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36143        # Extract the first word of "$tool_basename", so it can be a program name with args.
36144set dummy $tool_basename; ac_word=$2
36145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36146$as_echo_n "checking for $ac_word... " >&6; }
36147if ${ac_cv_path_GNM+:} false; then :
36148  $as_echo_n "(cached) " >&6
36149else
36150  case $GNM in
36151  [\\/]* | ?:[\\/]*)
36152  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36153  ;;
36154  *)
36155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36156for as_dir in $PATH
36157do
36158  IFS=$as_save_IFS
36159  test -z "$as_dir" && as_dir=.
36160    for ac_exec_ext in '' $ac_executable_extensions; do
36161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36162    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36164    break 2
36165  fi
36166done
36167  done
36168IFS=$as_save_IFS
36169
36170  ;;
36171esac
36172fi
36173GNM=$ac_cv_path_GNM
36174if test -n "$GNM"; then
36175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36176$as_echo "$GNM" >&6; }
36177else
36178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36179$as_echo "no" >&6; }
36180fi
36181
36182
36183        if test "x$GNM" = x; then
36184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36185        fi
36186      else
36187        # Otherwise we believe it is a complete path. Use it as it is.
36188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36189$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36191$as_echo_n "checking for GNM... " >&6; }
36192        if test ! -x "$tool_specified"; then
36193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36194$as_echo "not found" >&6; }
36195          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36196        fi
36197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36198$as_echo "$tool_specified" >&6; }
36199      fi
36200    fi
36201  fi
36202
36203
36204
36205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36206
36207  # First separate the path from the arguments. This will split at the first
36208  # space.
36209  complete="$GNM"
36210  path="${complete%% *}"
36211  tmp="$complete EOL"
36212  arguments="${tmp#* }"
36213
36214  # Input might be given as Windows format, start by converting to
36215  # unix format.
36216  new_path=`$CYGPATH -u "$path"`
36217
36218  # Now try to locate executable using which
36219  new_path=`$WHICH "$new_path" 2> /dev/null`
36220  # bat and cmd files are not always considered executable in cygwin causing which
36221  # to not find them
36222  if test "x$new_path" = x \
36223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36225    new_path=`$CYGPATH -u "$path"`
36226  fi
36227  if test "x$new_path" = x; then
36228    # Oops. Which didn't find the executable.
36229    # The splitting of arguments from the executable at a space might have been incorrect,
36230    # since paths with space are more likely in Windows. Give it another try with the whole
36231    # argument.
36232    path="$complete"
36233    arguments="EOL"
36234    new_path=`$CYGPATH -u "$path"`
36235    new_path=`$WHICH "$new_path" 2> /dev/null`
36236    # bat and cmd files are not always considered executable in cygwin causing which
36237    # to not find them
36238    if test "x$new_path" = x \
36239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36241      new_path=`$CYGPATH -u "$path"`
36242    fi
36243    if test "x$new_path" = x; then
36244      # It's still not found. Now this is an unrecoverable error.
36245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36246$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36247      has_space=`$ECHO "$complete" | $GREP " "`
36248      if test "x$has_space" != x; then
36249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36251      fi
36252      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36253    fi
36254  fi
36255
36256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36259  # "foo.exe" is OK but "foo" is an error.
36260  #
36261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36262  # It is also a way to make sure we got the proper file name for the real test later on.
36263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36264  if test "x$test_shortpath" = x; then
36265    # Short path failed, file does not exist as specified.
36266    # Try adding .exe or .cmd
36267    if test -f "${new_path}.exe"; then
36268      input_to_shortpath="${new_path}.exe"
36269    elif test -f "${new_path}.cmd"; then
36270      input_to_shortpath="${new_path}.cmd"
36271    else
36272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36273$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36276      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36277    fi
36278  else
36279    input_to_shortpath="$new_path"
36280  fi
36281
36282  # Call helper function which possibly converts this using DOS-style short mode.
36283  # If so, the updated path is stored in $new_path.
36284  new_path="$input_to_shortpath"
36285
36286  input_path="$input_to_shortpath"
36287  # Check if we need to convert this using DOS-style short mode. If the path
36288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36289  # take no chances and rewrite it.
36290  # Note: m4 eats our [], so we need to use [ and ] instead.
36291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36292  if test "x$has_forbidden_chars" != x; then
36293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36297      # Going to short mode and back again did indeed matter. Since short mode is
36298      # case insensitive, let's make it lowercase to improve readability.
36299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36300      # Now convert it back to Unix-stile (cygpath)
36301      input_path=`$CYGPATH -u "$shortmode_path"`
36302      new_path="$input_path"
36303    fi
36304  fi
36305
36306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36307  if test "x$test_cygdrive_prefix" = x; then
36308    # As a simple fix, exclude /usr/bin since it's not a real path.
36309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36311      # a path prefixed by /cygdrive for fixpath to work.
36312      new_path="$CYGWIN_ROOT_PATH$input_path"
36313    fi
36314  fi
36315
36316  # remove trailing .exe if any
36317  new_path="${new_path/%.exe/}"
36318
36319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36320
36321  # First separate the path from the arguments. This will split at the first
36322  # space.
36323  complete="$GNM"
36324  path="${complete%% *}"
36325  tmp="$complete EOL"
36326  arguments="${tmp#* }"
36327
36328  # Input might be given as Windows format, start by converting to
36329  # unix format.
36330  new_path="$path"
36331
36332  windows_path="$new_path"
36333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36334    unix_path=`$CYGPATH -u "$windows_path"`
36335    new_path="$unix_path"
36336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36338    new_path="$unix_path"
36339  fi
36340
36341
36342  # Now try to locate executable using which
36343  new_path=`$WHICH "$new_path" 2> /dev/null`
36344
36345  if test "x$new_path" = x; then
36346    # Oops. Which didn't find the executable.
36347    # The splitting of arguments from the executable at a space might have been incorrect,
36348    # since paths with space are more likely in Windows. Give it another try with the whole
36349    # argument.
36350    path="$complete"
36351    arguments="EOL"
36352    new_path="$path"
36353
36354  windows_path="$new_path"
36355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36356    unix_path=`$CYGPATH -u "$windows_path"`
36357    new_path="$unix_path"
36358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36360    new_path="$unix_path"
36361  fi
36362
36363
36364    new_path=`$WHICH "$new_path" 2> /dev/null`
36365    # bat and cmd files are not always considered executable in MSYS causing which
36366    # to not find them
36367    if test "x$new_path" = x \
36368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36370      new_path="$path"
36371
36372  windows_path="$new_path"
36373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36374    unix_path=`$CYGPATH -u "$windows_path"`
36375    new_path="$unix_path"
36376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36378    new_path="$unix_path"
36379  fi
36380
36381    fi
36382
36383    if test "x$new_path" = x; then
36384      # It's still not found. Now this is an unrecoverable error.
36385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36386$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36387      has_space=`$ECHO "$complete" | $GREP " "`
36388      if test "x$has_space" != x; then
36389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36391      fi
36392      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36393    fi
36394  fi
36395
36396  # Now new_path has a complete unix path to the binary
36397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36398    # Keep paths in /bin as-is, but remove trailing .exe if any
36399    new_path="${new_path/%.exe/}"
36400    # Do not save /bin paths to all_fixpath_prefixes!
36401  else
36402    # Not in mixed or Windows style, start by that.
36403    new_path=`cmd //c echo $new_path`
36404
36405  input_path="$new_path"
36406  # Check if we need to convert this using DOS-style short mode. If the path
36407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36408  # take no chances and rewrite it.
36409  # Note: m4 eats our [], so we need to use [ and ] instead.
36410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36411  if test "x$has_forbidden_chars" != x; then
36412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36414  fi
36415
36416    # Output is in $new_path
36417
36418  windows_path="$new_path"
36419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36420    unix_path=`$CYGPATH -u "$windows_path"`
36421    new_path="$unix_path"
36422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36424    new_path="$unix_path"
36425  fi
36426
36427    # remove trailing .exe if any
36428    new_path="${new_path/%.exe/}"
36429
36430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36432  fi
36433
36434  else
36435    # We're on a unix platform. Hooray! :)
36436    # First separate the path from the arguments. This will split at the first
36437    # space.
36438    complete="$GNM"
36439    path="${complete%% *}"
36440    tmp="$complete EOL"
36441    arguments="${tmp#* }"
36442
36443    # Cannot rely on the command "which" here since it doesn't always work.
36444    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36445    if test -z "$is_absolute_path"; then
36446      # Path to executable is not absolute. Find it.
36447      IFS_save="$IFS"
36448      IFS=:
36449      for p in $PATH; do
36450        if test -f "$p/$path" && test -x "$p/$path"; then
36451          new_path="$p/$path"
36452          break
36453        fi
36454      done
36455      IFS="$IFS_save"
36456    else
36457      # This is an absolute path, we can use it without further modifications.
36458      new_path="$path"
36459    fi
36460
36461    if test "x$new_path" = x; then
36462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36463$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36464      has_space=`$ECHO "$complete" | $GREP " "`
36465      if test "x$has_space" != x; then
36466        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36468      fi
36469      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36470    fi
36471  fi
36472
36473  # Now join together the path and the arguments once again
36474  if test "x$arguments" != xEOL; then
36475    new_complete="$new_path ${arguments% *}"
36476  else
36477    new_complete="$new_path"
36478  fi
36479
36480  if test "x$complete" != "x$new_complete"; then
36481    GNM="$new_complete"
36482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36483$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36484  fi
36485
36486
36487
36488
36489  # Publish this variable in the help.
36490
36491
36492  if test "x$MCS" = x; then
36493    # The variable is not set by user, try to locate tool using the code snippet
36494    for ac_prog in mcs
36495do
36496  # Extract the first word of "$ac_prog", so it can be a program name with args.
36497set dummy $ac_prog; ac_word=$2
36498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36499$as_echo_n "checking for $ac_word... " >&6; }
36500if ${ac_cv_path_MCS+:} false; then :
36501  $as_echo_n "(cached) " >&6
36502else
36503  case $MCS in
36504  [\\/]* | ?:[\\/]*)
36505  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36506  ;;
36507  *)
36508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36509for as_dir in $PATH
36510do
36511  IFS=$as_save_IFS
36512  test -z "$as_dir" && as_dir=.
36513    for ac_exec_ext in '' $ac_executable_extensions; do
36514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36515    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36517    break 2
36518  fi
36519done
36520  done
36521IFS=$as_save_IFS
36522
36523  ;;
36524esac
36525fi
36526MCS=$ac_cv_path_MCS
36527if test -n "$MCS"; then
36528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36529$as_echo "$MCS" >&6; }
36530else
36531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36532$as_echo "no" >&6; }
36533fi
36534
36535
36536  test -n "$MCS" && break
36537done
36538
36539  else
36540    # The variable is set, but is it from the command line or the environment?
36541
36542    # Try to remove the string !MCS! from our list.
36543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36545      # If it failed, the variable was not from the command line. Ignore it,
36546      # but warn the user (except for BASH, which is always set by the calling BASH).
36547      if test "xMCS" != xBASH; then
36548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36549$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36550      fi
36551      # Try to locate tool using the code snippet
36552      for ac_prog in mcs
36553do
36554  # Extract the first word of "$ac_prog", so it can be a program name with args.
36555set dummy $ac_prog; ac_word=$2
36556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36557$as_echo_n "checking for $ac_word... " >&6; }
36558if ${ac_cv_path_MCS+:} false; then :
36559  $as_echo_n "(cached) " >&6
36560else
36561  case $MCS in
36562  [\\/]* | ?:[\\/]*)
36563  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36564  ;;
36565  *)
36566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36567for as_dir in $PATH
36568do
36569  IFS=$as_save_IFS
36570  test -z "$as_dir" && as_dir=.
36571    for ac_exec_ext in '' $ac_executable_extensions; do
36572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36573    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36575    break 2
36576  fi
36577done
36578  done
36579IFS=$as_save_IFS
36580
36581  ;;
36582esac
36583fi
36584MCS=$ac_cv_path_MCS
36585if test -n "$MCS"; then
36586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36587$as_echo "$MCS" >&6; }
36588else
36589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36590$as_echo "no" >&6; }
36591fi
36592
36593
36594  test -n "$MCS" && break
36595done
36596
36597    else
36598      # If it succeeded, then it was overridden by the user. We will use it
36599      # for the tool.
36600
36601      # First remove it from the list of overridden variables, so we can test
36602      # for unknown variables in the end.
36603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36604
36605      # Check if the provided tool contains a complete path.
36606      tool_specified="$MCS"
36607      tool_basename="${tool_specified##*/}"
36608      if test "x$tool_basename" = "x$tool_specified"; then
36609        # A command without a complete path is provided, search $PATH.
36610        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36611$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36612        # Extract the first word of "$tool_basename", so it can be a program name with args.
36613set dummy $tool_basename; ac_word=$2
36614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36615$as_echo_n "checking for $ac_word... " >&6; }
36616if ${ac_cv_path_MCS+:} false; then :
36617  $as_echo_n "(cached) " >&6
36618else
36619  case $MCS in
36620  [\\/]* | ?:[\\/]*)
36621  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36622  ;;
36623  *)
36624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36625for as_dir in $PATH
36626do
36627  IFS=$as_save_IFS
36628  test -z "$as_dir" && as_dir=.
36629    for ac_exec_ext in '' $ac_executable_extensions; do
36630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36631    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36633    break 2
36634  fi
36635done
36636  done
36637IFS=$as_save_IFS
36638
36639  ;;
36640esac
36641fi
36642MCS=$ac_cv_path_MCS
36643if test -n "$MCS"; then
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36645$as_echo "$MCS" >&6; }
36646else
36647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36648$as_echo "no" >&6; }
36649fi
36650
36651
36652        if test "x$MCS" = x; then
36653          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36654        fi
36655      else
36656        # Otherwise we believe it is a complete path. Use it as it is.
36657        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36658$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36660$as_echo_n "checking for MCS... " >&6; }
36661        if test ! -x "$tool_specified"; then
36662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36663$as_echo "not found" >&6; }
36664          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36665        fi
36666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36667$as_echo "$tool_specified" >&6; }
36668      fi
36669    fi
36670  fi
36671
36672
36673
36674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36675
36676  # First separate the path from the arguments. This will split at the first
36677  # space.
36678  complete="$MCS"
36679  path="${complete%% *}"
36680  tmp="$complete EOL"
36681  arguments="${tmp#* }"
36682
36683  # Input might be given as Windows format, start by converting to
36684  # unix format.
36685  new_path=`$CYGPATH -u "$path"`
36686
36687  # Now try to locate executable using which
36688  new_path=`$WHICH "$new_path" 2> /dev/null`
36689  # bat and cmd files are not always considered executable in cygwin causing which
36690  # to not find them
36691  if test "x$new_path" = x \
36692      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36693      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36694    new_path=`$CYGPATH -u "$path"`
36695  fi
36696  if test "x$new_path" = x; then
36697    # Oops. Which didn't find the executable.
36698    # The splitting of arguments from the executable at a space might have been incorrect,
36699    # since paths with space are more likely in Windows. Give it another try with the whole
36700    # argument.
36701    path="$complete"
36702    arguments="EOL"
36703    new_path=`$CYGPATH -u "$path"`
36704    new_path=`$WHICH "$new_path" 2> /dev/null`
36705    # bat and cmd files are not always considered executable in cygwin causing which
36706    # to not find them
36707    if test "x$new_path" = x \
36708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36710      new_path=`$CYGPATH -u "$path"`
36711    fi
36712    if test "x$new_path" = x; then
36713      # It's still not found. Now this is an unrecoverable error.
36714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36715$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36716      has_space=`$ECHO "$complete" | $GREP " "`
36717      if test "x$has_space" != x; then
36718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36720      fi
36721      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36722    fi
36723  fi
36724
36725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36728  # "foo.exe" is OK but "foo" is an error.
36729  #
36730  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36731  # It is also a way to make sure we got the proper file name for the real test later on.
36732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36733  if test "x$test_shortpath" = x; then
36734    # Short path failed, file does not exist as specified.
36735    # Try adding .exe or .cmd
36736    if test -f "${new_path}.exe"; then
36737      input_to_shortpath="${new_path}.exe"
36738    elif test -f "${new_path}.cmd"; then
36739      input_to_shortpath="${new_path}.cmd"
36740    else
36741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36742$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36745      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36746    fi
36747  else
36748    input_to_shortpath="$new_path"
36749  fi
36750
36751  # Call helper function which possibly converts this using DOS-style short mode.
36752  # If so, the updated path is stored in $new_path.
36753  new_path="$input_to_shortpath"
36754
36755  input_path="$input_to_shortpath"
36756  # Check if we need to convert this using DOS-style short mode. If the path
36757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36758  # take no chances and rewrite it.
36759  # Note: m4 eats our [], so we need to use [ and ] instead.
36760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36761  if test "x$has_forbidden_chars" != x; then
36762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36766      # Going to short mode and back again did indeed matter. Since short mode is
36767      # case insensitive, let's make it lowercase to improve readability.
36768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36769      # Now convert it back to Unix-stile (cygpath)
36770      input_path=`$CYGPATH -u "$shortmode_path"`
36771      new_path="$input_path"
36772    fi
36773  fi
36774
36775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36776  if test "x$test_cygdrive_prefix" = x; then
36777    # As a simple fix, exclude /usr/bin since it's not a real path.
36778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36780      # a path prefixed by /cygdrive for fixpath to work.
36781      new_path="$CYGWIN_ROOT_PATH$input_path"
36782    fi
36783  fi
36784
36785  # remove trailing .exe if any
36786  new_path="${new_path/%.exe/}"
36787
36788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36789
36790  # First separate the path from the arguments. This will split at the first
36791  # space.
36792  complete="$MCS"
36793  path="${complete%% *}"
36794  tmp="$complete EOL"
36795  arguments="${tmp#* }"
36796
36797  # Input might be given as Windows format, start by converting to
36798  # unix format.
36799  new_path="$path"
36800
36801  windows_path="$new_path"
36802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36803    unix_path=`$CYGPATH -u "$windows_path"`
36804    new_path="$unix_path"
36805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36807    new_path="$unix_path"
36808  fi
36809
36810
36811  # Now try to locate executable using which
36812  new_path=`$WHICH "$new_path" 2> /dev/null`
36813
36814  if test "x$new_path" = x; then
36815    # Oops. Which didn't find the executable.
36816    # The splitting of arguments from the executable at a space might have been incorrect,
36817    # since paths with space are more likely in Windows. Give it another try with the whole
36818    # argument.
36819    path="$complete"
36820    arguments="EOL"
36821    new_path="$path"
36822
36823  windows_path="$new_path"
36824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36825    unix_path=`$CYGPATH -u "$windows_path"`
36826    new_path="$unix_path"
36827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36829    new_path="$unix_path"
36830  fi
36831
36832
36833    new_path=`$WHICH "$new_path" 2> /dev/null`
36834    # bat and cmd files are not always considered executable in MSYS causing which
36835    # to not find them
36836    if test "x$new_path" = x \
36837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36839      new_path="$path"
36840
36841  windows_path="$new_path"
36842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36843    unix_path=`$CYGPATH -u "$windows_path"`
36844    new_path="$unix_path"
36845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36847    new_path="$unix_path"
36848  fi
36849
36850    fi
36851
36852    if test "x$new_path" = x; then
36853      # It's still not found. Now this is an unrecoverable error.
36854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36855$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36856      has_space=`$ECHO "$complete" | $GREP " "`
36857      if test "x$has_space" != x; then
36858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36860      fi
36861      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36862    fi
36863  fi
36864
36865  # Now new_path has a complete unix path to the binary
36866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36867    # Keep paths in /bin as-is, but remove trailing .exe if any
36868    new_path="${new_path/%.exe/}"
36869    # Do not save /bin paths to all_fixpath_prefixes!
36870  else
36871    # Not in mixed or Windows style, start by that.
36872    new_path=`cmd //c echo $new_path`
36873
36874  input_path="$new_path"
36875  # Check if we need to convert this using DOS-style short mode. If the path
36876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36877  # take no chances and rewrite it.
36878  # Note: m4 eats our [], so we need to use [ and ] instead.
36879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36880  if test "x$has_forbidden_chars" != x; then
36881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36883  fi
36884
36885    # Output is in $new_path
36886
36887  windows_path="$new_path"
36888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36889    unix_path=`$CYGPATH -u "$windows_path"`
36890    new_path="$unix_path"
36891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36893    new_path="$unix_path"
36894  fi
36895
36896    # remove trailing .exe if any
36897    new_path="${new_path/%.exe/}"
36898
36899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36901  fi
36902
36903  else
36904    # We're on a unix platform. Hooray! :)
36905    # First separate the path from the arguments. This will split at the first
36906    # space.
36907    complete="$MCS"
36908    path="${complete%% *}"
36909    tmp="$complete EOL"
36910    arguments="${tmp#* }"
36911
36912    # Cannot rely on the command "which" here since it doesn't always work.
36913    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36914    if test -z "$is_absolute_path"; then
36915      # Path to executable is not absolute. Find it.
36916      IFS_save="$IFS"
36917      IFS=:
36918      for p in $PATH; do
36919        if test -f "$p/$path" && test -x "$p/$path"; then
36920          new_path="$p/$path"
36921          break
36922        fi
36923      done
36924      IFS="$IFS_save"
36925    else
36926      # This is an absolute path, we can use it without further modifications.
36927      new_path="$path"
36928    fi
36929
36930    if test "x$new_path" = x; then
36931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36932$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36933      has_space=`$ECHO "$complete" | $GREP " "`
36934      if test "x$has_space" != x; then
36935        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36937      fi
36938      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36939    fi
36940  fi
36941
36942  # Now join together the path and the arguments once again
36943  if test "x$arguments" != xEOL; then
36944    new_complete="$new_path ${arguments% *}"
36945  else
36946    new_complete="$new_path"
36947  fi
36948
36949  if test "x$complete" != "x$new_complete"; then
36950    MCS="$new_complete"
36951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36952$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36953  fi
36954
36955  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36956    # FIXME: we should unify this with the solaris case above.
36957
36958
36959  # Publish this variable in the help.
36960
36961
36962  if test "x$STRIP" = x; then
36963    # The variable is not set by user, try to locate tool using the code snippet
36964    if test -n "$ac_tool_prefix"; then
36965  for ac_prog in strip
36966  do
36967    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36968set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36970$as_echo_n "checking for $ac_word... " >&6; }
36971if ${ac_cv_prog_STRIP+:} false; then :
36972  $as_echo_n "(cached) " >&6
36973else
36974  if test -n "$STRIP"; then
36975  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36976else
36977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36978for as_dir in $PATH
36979do
36980  IFS=$as_save_IFS
36981  test -z "$as_dir" && as_dir=.
36982    for ac_exec_ext in '' $ac_executable_extensions; do
36983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36984    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36986    break 2
36987  fi
36988done
36989  done
36990IFS=$as_save_IFS
36991
36992fi
36993fi
36994STRIP=$ac_cv_prog_STRIP
36995if test -n "$STRIP"; then
36996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36997$as_echo "$STRIP" >&6; }
36998else
36999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37000$as_echo "no" >&6; }
37001fi
37002
37003
37004    test -n "$STRIP" && break
37005  done
37006fi
37007if test -z "$STRIP"; then
37008  ac_ct_STRIP=$STRIP
37009  for ac_prog in strip
37010do
37011  # Extract the first word of "$ac_prog", so it can be a program name with args.
37012set dummy $ac_prog; ac_word=$2
37013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37014$as_echo_n "checking for $ac_word... " >&6; }
37015if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37016  $as_echo_n "(cached) " >&6
37017else
37018  if test -n "$ac_ct_STRIP"; then
37019  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37020else
37021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37022for as_dir in $PATH
37023do
37024  IFS=$as_save_IFS
37025  test -z "$as_dir" && as_dir=.
37026    for ac_exec_ext in '' $ac_executable_extensions; do
37027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37028    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37030    break 2
37031  fi
37032done
37033  done
37034IFS=$as_save_IFS
37035
37036fi
37037fi
37038ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37039if test -n "$ac_ct_STRIP"; then
37040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37041$as_echo "$ac_ct_STRIP" >&6; }
37042else
37043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37044$as_echo "no" >&6; }
37045fi
37046
37047
37048  test -n "$ac_ct_STRIP" && break
37049done
37050
37051  if test "x$ac_ct_STRIP" = x; then
37052    STRIP=""
37053  else
37054    case $cross_compiling:$ac_tool_warned in
37055yes:)
37056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37058ac_tool_warned=yes ;;
37059esac
37060    STRIP=$ac_ct_STRIP
37061  fi
37062fi
37063
37064  else
37065    # The variable is set, but is it from the command line or the environment?
37066
37067    # Try to remove the string !STRIP! from our list.
37068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37070      # If it failed, the variable was not from the command line. Ignore it,
37071      # but warn the user (except for BASH, which is always set by the calling BASH).
37072      if test "xSTRIP" != xBASH; then
37073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37074$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37075      fi
37076      # Try to locate tool using the code snippet
37077      if test -n "$ac_tool_prefix"; then
37078  for ac_prog in strip
37079  do
37080    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37083$as_echo_n "checking for $ac_word... " >&6; }
37084if ${ac_cv_prog_STRIP+:} false; then :
37085  $as_echo_n "(cached) " >&6
37086else
37087  if test -n "$STRIP"; then
37088  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37089else
37090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37091for as_dir in $PATH
37092do
37093  IFS=$as_save_IFS
37094  test -z "$as_dir" && as_dir=.
37095    for ac_exec_ext in '' $ac_executable_extensions; do
37096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37097    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37099    break 2
37100  fi
37101done
37102  done
37103IFS=$as_save_IFS
37104
37105fi
37106fi
37107STRIP=$ac_cv_prog_STRIP
37108if test -n "$STRIP"; then
37109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37110$as_echo "$STRIP" >&6; }
37111else
37112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37113$as_echo "no" >&6; }
37114fi
37115
37116
37117    test -n "$STRIP" && break
37118  done
37119fi
37120if test -z "$STRIP"; then
37121  ac_ct_STRIP=$STRIP
37122  for ac_prog in strip
37123do
37124  # Extract the first word of "$ac_prog", so it can be a program name with args.
37125set dummy $ac_prog; ac_word=$2
37126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37127$as_echo_n "checking for $ac_word... " >&6; }
37128if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37129  $as_echo_n "(cached) " >&6
37130else
37131  if test -n "$ac_ct_STRIP"; then
37132  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37133else
37134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37135for as_dir in $PATH
37136do
37137  IFS=$as_save_IFS
37138  test -z "$as_dir" && as_dir=.
37139    for ac_exec_ext in '' $ac_executable_extensions; do
37140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37141    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37143    break 2
37144  fi
37145done
37146  done
37147IFS=$as_save_IFS
37148
37149fi
37150fi
37151ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37152if test -n "$ac_ct_STRIP"; then
37153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37154$as_echo "$ac_ct_STRIP" >&6; }
37155else
37156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37157$as_echo "no" >&6; }
37158fi
37159
37160
37161  test -n "$ac_ct_STRIP" && break
37162done
37163
37164  if test "x$ac_ct_STRIP" = x; then
37165    STRIP=""
37166  else
37167    case $cross_compiling:$ac_tool_warned in
37168yes:)
37169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37171ac_tool_warned=yes ;;
37172esac
37173    STRIP=$ac_ct_STRIP
37174  fi
37175fi
37176
37177    else
37178      # If it succeeded, then it was overridden by the user. We will use it
37179      # for the tool.
37180
37181      # First remove it from the list of overridden variables, so we can test
37182      # for unknown variables in the end.
37183      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37184
37185      # Check if the provided tool contains a complete path.
37186      tool_specified="$STRIP"
37187      tool_basename="${tool_specified##*/}"
37188      if test "x$tool_basename" = "x$tool_specified"; then
37189        # A command without a complete path is provided, search $PATH.
37190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37191$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37192        # Extract the first word of "$tool_basename", so it can be a program name with args.
37193set dummy $tool_basename; ac_word=$2
37194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37195$as_echo_n "checking for $ac_word... " >&6; }
37196if ${ac_cv_path_STRIP+:} false; then :
37197  $as_echo_n "(cached) " >&6
37198else
37199  case $STRIP in
37200  [\\/]* | ?:[\\/]*)
37201  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37202  ;;
37203  *)
37204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37205for as_dir in $PATH
37206do
37207  IFS=$as_save_IFS
37208  test -z "$as_dir" && as_dir=.
37209    for ac_exec_ext in '' $ac_executable_extensions; do
37210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37211    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37213    break 2
37214  fi
37215done
37216  done
37217IFS=$as_save_IFS
37218
37219  ;;
37220esac
37221fi
37222STRIP=$ac_cv_path_STRIP
37223if test -n "$STRIP"; then
37224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37225$as_echo "$STRIP" >&6; }
37226else
37227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37228$as_echo "no" >&6; }
37229fi
37230
37231
37232        if test "x$STRIP" = x; then
37233          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37234        fi
37235      else
37236        # Otherwise we believe it is a complete path. Use it as it is.
37237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37238$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37240$as_echo_n "checking for STRIP... " >&6; }
37241        if test ! -x "$tool_specified"; then
37242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37243$as_echo "not found" >&6; }
37244          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37245        fi
37246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37247$as_echo "$tool_specified" >&6; }
37248      fi
37249    fi
37250  fi
37251
37252
37253
37254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37255
37256  # First separate the path from the arguments. This will split at the first
37257  # space.
37258  complete="$STRIP"
37259  path="${complete%% *}"
37260  tmp="$complete EOL"
37261  arguments="${tmp#* }"
37262
37263  # Input might be given as Windows format, start by converting to
37264  # unix format.
37265  new_path=`$CYGPATH -u "$path"`
37266
37267  # Now try to locate executable using which
37268  new_path=`$WHICH "$new_path" 2> /dev/null`
37269  # bat and cmd files are not always considered executable in cygwin causing which
37270  # to not find them
37271  if test "x$new_path" = x \
37272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37274    new_path=`$CYGPATH -u "$path"`
37275  fi
37276  if test "x$new_path" = x; then
37277    # Oops. Which didn't find the executable.
37278    # The splitting of arguments from the executable at a space might have been incorrect,
37279    # since paths with space are more likely in Windows. Give it another try with the whole
37280    # argument.
37281    path="$complete"
37282    arguments="EOL"
37283    new_path=`$CYGPATH -u "$path"`
37284    new_path=`$WHICH "$new_path" 2> /dev/null`
37285    # bat and cmd files are not always considered executable in cygwin causing which
37286    # to not find them
37287    if test "x$new_path" = x \
37288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37290      new_path=`$CYGPATH -u "$path"`
37291    fi
37292    if test "x$new_path" = x; then
37293      # It's still not found. Now this is an unrecoverable error.
37294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37295$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37296      has_space=`$ECHO "$complete" | $GREP " "`
37297      if test "x$has_space" != x; then
37298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37300      fi
37301      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37302    fi
37303  fi
37304
37305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37308  # "foo.exe" is OK but "foo" is an error.
37309  #
37310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37311  # It is also a way to make sure we got the proper file name for the real test later on.
37312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37313  if test "x$test_shortpath" = x; then
37314    # Short path failed, file does not exist as specified.
37315    # Try adding .exe or .cmd
37316    if test -f "${new_path}.exe"; then
37317      input_to_shortpath="${new_path}.exe"
37318    elif test -f "${new_path}.cmd"; then
37319      input_to_shortpath="${new_path}.cmd"
37320    else
37321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37322$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37325      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37326    fi
37327  else
37328    input_to_shortpath="$new_path"
37329  fi
37330
37331  # Call helper function which possibly converts this using DOS-style short mode.
37332  # If so, the updated path is stored in $new_path.
37333  new_path="$input_to_shortpath"
37334
37335  input_path="$input_to_shortpath"
37336  # Check if we need to convert this using DOS-style short mode. If the path
37337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37338  # take no chances and rewrite it.
37339  # Note: m4 eats our [], so we need to use [ and ] instead.
37340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37341  if test "x$has_forbidden_chars" != x; then
37342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37346      # Going to short mode and back again did indeed matter. Since short mode is
37347      # case insensitive, let's make it lowercase to improve readability.
37348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37349      # Now convert it back to Unix-stile (cygpath)
37350      input_path=`$CYGPATH -u "$shortmode_path"`
37351      new_path="$input_path"
37352    fi
37353  fi
37354
37355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37356  if test "x$test_cygdrive_prefix" = x; then
37357    # As a simple fix, exclude /usr/bin since it's not a real path.
37358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37360      # a path prefixed by /cygdrive for fixpath to work.
37361      new_path="$CYGWIN_ROOT_PATH$input_path"
37362    fi
37363  fi
37364
37365  # remove trailing .exe if any
37366  new_path="${new_path/%.exe/}"
37367
37368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37369
37370  # First separate the path from the arguments. This will split at the first
37371  # space.
37372  complete="$STRIP"
37373  path="${complete%% *}"
37374  tmp="$complete EOL"
37375  arguments="${tmp#* }"
37376
37377  # Input might be given as Windows format, start by converting to
37378  # unix format.
37379  new_path="$path"
37380
37381  windows_path="$new_path"
37382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37383    unix_path=`$CYGPATH -u "$windows_path"`
37384    new_path="$unix_path"
37385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37387    new_path="$unix_path"
37388  fi
37389
37390
37391  # Now try to locate executable using which
37392  new_path=`$WHICH "$new_path" 2> /dev/null`
37393
37394  if test "x$new_path" = x; then
37395    # Oops. Which didn't find the executable.
37396    # The splitting of arguments from the executable at a space might have been incorrect,
37397    # since paths with space are more likely in Windows. Give it another try with the whole
37398    # argument.
37399    path="$complete"
37400    arguments="EOL"
37401    new_path="$path"
37402
37403  windows_path="$new_path"
37404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37405    unix_path=`$CYGPATH -u "$windows_path"`
37406    new_path="$unix_path"
37407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37409    new_path="$unix_path"
37410  fi
37411
37412
37413    new_path=`$WHICH "$new_path" 2> /dev/null`
37414    # bat and cmd files are not always considered executable in MSYS causing which
37415    # to not find them
37416    if test "x$new_path" = x \
37417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37419      new_path="$path"
37420
37421  windows_path="$new_path"
37422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37423    unix_path=`$CYGPATH -u "$windows_path"`
37424    new_path="$unix_path"
37425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37427    new_path="$unix_path"
37428  fi
37429
37430    fi
37431
37432    if test "x$new_path" = x; then
37433      # It's still not found. Now this is an unrecoverable error.
37434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37435$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37436      has_space=`$ECHO "$complete" | $GREP " "`
37437      if test "x$has_space" != x; then
37438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37440      fi
37441      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37442    fi
37443  fi
37444
37445  # Now new_path has a complete unix path to the binary
37446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37447    # Keep paths in /bin as-is, but remove trailing .exe if any
37448    new_path="${new_path/%.exe/}"
37449    # Do not save /bin paths to all_fixpath_prefixes!
37450  else
37451    # Not in mixed or Windows style, start by that.
37452    new_path=`cmd //c echo $new_path`
37453
37454  input_path="$new_path"
37455  # Check if we need to convert this using DOS-style short mode. If the path
37456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37457  # take no chances and rewrite it.
37458  # Note: m4 eats our [], so we need to use [ and ] instead.
37459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37460  if test "x$has_forbidden_chars" != x; then
37461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37463  fi
37464
37465    # Output is in $new_path
37466
37467  windows_path="$new_path"
37468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37469    unix_path=`$CYGPATH -u "$windows_path"`
37470    new_path="$unix_path"
37471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37473    new_path="$unix_path"
37474  fi
37475
37476    # remove trailing .exe if any
37477    new_path="${new_path/%.exe/}"
37478
37479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37481  fi
37482
37483  else
37484    # We're on a unix platform. Hooray! :)
37485    # First separate the path from the arguments. This will split at the first
37486    # space.
37487    complete="$STRIP"
37488    path="${complete%% *}"
37489    tmp="$complete EOL"
37490    arguments="${tmp#* }"
37491
37492    # Cannot rely on the command "which" here since it doesn't always work.
37493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37494    if test -z "$is_absolute_path"; then
37495      # Path to executable is not absolute. Find it.
37496      IFS_save="$IFS"
37497      IFS=:
37498      for p in $PATH; do
37499        if test -f "$p/$path" && test -x "$p/$path"; then
37500          new_path="$p/$path"
37501          break
37502        fi
37503      done
37504      IFS="$IFS_save"
37505    else
37506      # This is an absolute path, we can use it without further modifications.
37507      new_path="$path"
37508    fi
37509
37510    if test "x$new_path" = x; then
37511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37512$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37513      has_space=`$ECHO "$complete" | $GREP " "`
37514      if test "x$has_space" != x; then
37515        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37517      fi
37518      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37519    fi
37520  fi
37521
37522  # Now join together the path and the arguments once again
37523  if test "x$arguments" != xEOL; then
37524    new_complete="$new_path ${arguments% *}"
37525  else
37526    new_complete="$new_path"
37527  fi
37528
37529  if test "x$complete" != "x$new_complete"; then
37530    STRIP="$new_complete"
37531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37532$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37533  fi
37534
37535
37536
37537  # Publish this variable in the help.
37538
37539
37540  if test "x$NM" = x; then
37541    # The variable is not set by user, try to locate tool using the code snippet
37542    if test -n "$ac_tool_prefix"; then
37543  for ac_prog in nm
37544  do
37545    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37546set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37548$as_echo_n "checking for $ac_word... " >&6; }
37549if ${ac_cv_prog_NM+:} false; then :
37550  $as_echo_n "(cached) " >&6
37551else
37552  if test -n "$NM"; then
37553  ac_cv_prog_NM="$NM" # Let the user override the test.
37554else
37555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37556for as_dir in $PATH
37557do
37558  IFS=$as_save_IFS
37559  test -z "$as_dir" && as_dir=.
37560    for ac_exec_ext in '' $ac_executable_extensions; do
37561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37562    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37564    break 2
37565  fi
37566done
37567  done
37568IFS=$as_save_IFS
37569
37570fi
37571fi
37572NM=$ac_cv_prog_NM
37573if test -n "$NM"; then
37574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37575$as_echo "$NM" >&6; }
37576else
37577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37578$as_echo "no" >&6; }
37579fi
37580
37581
37582    test -n "$NM" && break
37583  done
37584fi
37585if test -z "$NM"; then
37586  ac_ct_NM=$NM
37587  for ac_prog in nm
37588do
37589  # Extract the first word of "$ac_prog", so it can be a program name with args.
37590set dummy $ac_prog; ac_word=$2
37591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37592$as_echo_n "checking for $ac_word... " >&6; }
37593if ${ac_cv_prog_ac_ct_NM+:} false; then :
37594  $as_echo_n "(cached) " >&6
37595else
37596  if test -n "$ac_ct_NM"; then
37597  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37598else
37599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37600for as_dir in $PATH
37601do
37602  IFS=$as_save_IFS
37603  test -z "$as_dir" && as_dir=.
37604    for ac_exec_ext in '' $ac_executable_extensions; do
37605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37606    ac_cv_prog_ac_ct_NM="$ac_prog"
37607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37608    break 2
37609  fi
37610done
37611  done
37612IFS=$as_save_IFS
37613
37614fi
37615fi
37616ac_ct_NM=$ac_cv_prog_ac_ct_NM
37617if test -n "$ac_ct_NM"; then
37618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37619$as_echo "$ac_ct_NM" >&6; }
37620else
37621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37622$as_echo "no" >&6; }
37623fi
37624
37625
37626  test -n "$ac_ct_NM" && break
37627done
37628
37629  if test "x$ac_ct_NM" = x; then
37630    NM=""
37631  else
37632    case $cross_compiling:$ac_tool_warned in
37633yes:)
37634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37636ac_tool_warned=yes ;;
37637esac
37638    NM=$ac_ct_NM
37639  fi
37640fi
37641
37642  else
37643    # The variable is set, but is it from the command line or the environment?
37644
37645    # Try to remove the string !NM! from our list.
37646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37648      # If it failed, the variable was not from the command line. Ignore it,
37649      # but warn the user (except for BASH, which is always set by the calling BASH).
37650      if test "xNM" != xBASH; then
37651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37652$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37653      fi
37654      # Try to locate tool using the code snippet
37655      if test -n "$ac_tool_prefix"; then
37656  for ac_prog in nm
37657  do
37658    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37659set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37661$as_echo_n "checking for $ac_word... " >&6; }
37662if ${ac_cv_prog_NM+:} false; then :
37663  $as_echo_n "(cached) " >&6
37664else
37665  if test -n "$NM"; then
37666  ac_cv_prog_NM="$NM" # Let the user override the test.
37667else
37668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37669for as_dir in $PATH
37670do
37671  IFS=$as_save_IFS
37672  test -z "$as_dir" && as_dir=.
37673    for ac_exec_ext in '' $ac_executable_extensions; do
37674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37675    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37677    break 2
37678  fi
37679done
37680  done
37681IFS=$as_save_IFS
37682
37683fi
37684fi
37685NM=$ac_cv_prog_NM
37686if test -n "$NM"; then
37687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37688$as_echo "$NM" >&6; }
37689else
37690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37691$as_echo "no" >&6; }
37692fi
37693
37694
37695    test -n "$NM" && break
37696  done
37697fi
37698if test -z "$NM"; then
37699  ac_ct_NM=$NM
37700  for ac_prog in nm
37701do
37702  # Extract the first word of "$ac_prog", so it can be a program name with args.
37703set dummy $ac_prog; ac_word=$2
37704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37705$as_echo_n "checking for $ac_word... " >&6; }
37706if ${ac_cv_prog_ac_ct_NM+:} false; then :
37707  $as_echo_n "(cached) " >&6
37708else
37709  if test -n "$ac_ct_NM"; then
37710  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37711else
37712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37713for as_dir in $PATH
37714do
37715  IFS=$as_save_IFS
37716  test -z "$as_dir" && as_dir=.
37717    for ac_exec_ext in '' $ac_executable_extensions; do
37718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37719    ac_cv_prog_ac_ct_NM="$ac_prog"
37720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37721    break 2
37722  fi
37723done
37724  done
37725IFS=$as_save_IFS
37726
37727fi
37728fi
37729ac_ct_NM=$ac_cv_prog_ac_ct_NM
37730if test -n "$ac_ct_NM"; then
37731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37732$as_echo "$ac_ct_NM" >&6; }
37733else
37734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37735$as_echo "no" >&6; }
37736fi
37737
37738
37739  test -n "$ac_ct_NM" && break
37740done
37741
37742  if test "x$ac_ct_NM" = x; then
37743    NM=""
37744  else
37745    case $cross_compiling:$ac_tool_warned in
37746yes:)
37747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37749ac_tool_warned=yes ;;
37750esac
37751    NM=$ac_ct_NM
37752  fi
37753fi
37754
37755    else
37756      # If it succeeded, then it was overridden by the user. We will use it
37757      # for the tool.
37758
37759      # First remove it from the list of overridden variables, so we can test
37760      # for unknown variables in the end.
37761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37762
37763      # Check if the provided tool contains a complete path.
37764      tool_specified="$NM"
37765      tool_basename="${tool_specified##*/}"
37766      if test "x$tool_basename" = "x$tool_specified"; then
37767        # A command without a complete path is provided, search $PATH.
37768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37769$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37770        # Extract the first word of "$tool_basename", so it can be a program name with args.
37771set dummy $tool_basename; ac_word=$2
37772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37773$as_echo_n "checking for $ac_word... " >&6; }
37774if ${ac_cv_path_NM+:} false; then :
37775  $as_echo_n "(cached) " >&6
37776else
37777  case $NM in
37778  [\\/]* | ?:[\\/]*)
37779  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37780  ;;
37781  *)
37782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37783for as_dir in $PATH
37784do
37785  IFS=$as_save_IFS
37786  test -z "$as_dir" && as_dir=.
37787    for ac_exec_ext in '' $ac_executable_extensions; do
37788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37789    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37791    break 2
37792  fi
37793done
37794  done
37795IFS=$as_save_IFS
37796
37797  ;;
37798esac
37799fi
37800NM=$ac_cv_path_NM
37801if test -n "$NM"; then
37802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37803$as_echo "$NM" >&6; }
37804else
37805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37806$as_echo "no" >&6; }
37807fi
37808
37809
37810        if test "x$NM" = x; then
37811          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37812        fi
37813      else
37814        # Otherwise we believe it is a complete path. Use it as it is.
37815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37816$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37818$as_echo_n "checking for NM... " >&6; }
37819        if test ! -x "$tool_specified"; then
37820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37821$as_echo "not found" >&6; }
37822          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37823        fi
37824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37825$as_echo "$tool_specified" >&6; }
37826      fi
37827    fi
37828  fi
37829
37830
37831
37832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37833
37834  # First separate the path from the arguments. This will split at the first
37835  # space.
37836  complete="$NM"
37837  path="${complete%% *}"
37838  tmp="$complete EOL"
37839  arguments="${tmp#* }"
37840
37841  # Input might be given as Windows format, start by converting to
37842  # unix format.
37843  new_path=`$CYGPATH -u "$path"`
37844
37845  # Now try to locate executable using which
37846  new_path=`$WHICH "$new_path" 2> /dev/null`
37847  # bat and cmd files are not always considered executable in cygwin causing which
37848  # to not find them
37849  if test "x$new_path" = x \
37850      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37851      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37852    new_path=`$CYGPATH -u "$path"`
37853  fi
37854  if test "x$new_path" = x; then
37855    # Oops. Which didn't find the executable.
37856    # The splitting of arguments from the executable at a space might have been incorrect,
37857    # since paths with space are more likely in Windows. Give it another try with the whole
37858    # argument.
37859    path="$complete"
37860    arguments="EOL"
37861    new_path=`$CYGPATH -u "$path"`
37862    new_path=`$WHICH "$new_path" 2> /dev/null`
37863    # bat and cmd files are not always considered executable in cygwin causing which
37864    # to not find them
37865    if test "x$new_path" = x \
37866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37868      new_path=`$CYGPATH -u "$path"`
37869    fi
37870    if test "x$new_path" = x; then
37871      # It's still not found. Now this is an unrecoverable error.
37872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37873$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37874      has_space=`$ECHO "$complete" | $GREP " "`
37875      if test "x$has_space" != x; then
37876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37878      fi
37879      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37880    fi
37881  fi
37882
37883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37886  # "foo.exe" is OK but "foo" is an error.
37887  #
37888  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37889  # It is also a way to make sure we got the proper file name for the real test later on.
37890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37891  if test "x$test_shortpath" = x; then
37892    # Short path failed, file does not exist as specified.
37893    # Try adding .exe or .cmd
37894    if test -f "${new_path}.exe"; then
37895      input_to_shortpath="${new_path}.exe"
37896    elif test -f "${new_path}.cmd"; then
37897      input_to_shortpath="${new_path}.cmd"
37898    else
37899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37900$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37903      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37904    fi
37905  else
37906    input_to_shortpath="$new_path"
37907  fi
37908
37909  # Call helper function which possibly converts this using DOS-style short mode.
37910  # If so, the updated path is stored in $new_path.
37911  new_path="$input_to_shortpath"
37912
37913  input_path="$input_to_shortpath"
37914  # Check if we need to convert this using DOS-style short mode. If the path
37915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37916  # take no chances and rewrite it.
37917  # Note: m4 eats our [], so we need to use [ and ] instead.
37918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37919  if test "x$has_forbidden_chars" != x; then
37920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37924      # Going to short mode and back again did indeed matter. Since short mode is
37925      # case insensitive, let's make it lowercase to improve readability.
37926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37927      # Now convert it back to Unix-stile (cygpath)
37928      input_path=`$CYGPATH -u "$shortmode_path"`
37929      new_path="$input_path"
37930    fi
37931  fi
37932
37933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37934  if test "x$test_cygdrive_prefix" = x; then
37935    # As a simple fix, exclude /usr/bin since it's not a real path.
37936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37938      # a path prefixed by /cygdrive for fixpath to work.
37939      new_path="$CYGWIN_ROOT_PATH$input_path"
37940    fi
37941  fi
37942
37943  # remove trailing .exe if any
37944  new_path="${new_path/%.exe/}"
37945
37946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37947
37948  # First separate the path from the arguments. This will split at the first
37949  # space.
37950  complete="$NM"
37951  path="${complete%% *}"
37952  tmp="$complete EOL"
37953  arguments="${tmp#* }"
37954
37955  # Input might be given as Windows format, start by converting to
37956  # unix format.
37957  new_path="$path"
37958
37959  windows_path="$new_path"
37960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37961    unix_path=`$CYGPATH -u "$windows_path"`
37962    new_path="$unix_path"
37963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37965    new_path="$unix_path"
37966  fi
37967
37968
37969  # Now try to locate executable using which
37970  new_path=`$WHICH "$new_path" 2> /dev/null`
37971
37972  if test "x$new_path" = x; then
37973    # Oops. Which didn't find the executable.
37974    # The splitting of arguments from the executable at a space might have been incorrect,
37975    # since paths with space are more likely in Windows. Give it another try with the whole
37976    # argument.
37977    path="$complete"
37978    arguments="EOL"
37979    new_path="$path"
37980
37981  windows_path="$new_path"
37982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37983    unix_path=`$CYGPATH -u "$windows_path"`
37984    new_path="$unix_path"
37985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37987    new_path="$unix_path"
37988  fi
37989
37990
37991    new_path=`$WHICH "$new_path" 2> /dev/null`
37992    # bat and cmd files are not always considered executable in MSYS causing which
37993    # to not find them
37994    if test "x$new_path" = x \
37995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37997      new_path="$path"
37998
37999  windows_path="$new_path"
38000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38001    unix_path=`$CYGPATH -u "$windows_path"`
38002    new_path="$unix_path"
38003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38005    new_path="$unix_path"
38006  fi
38007
38008    fi
38009
38010    if test "x$new_path" = x; then
38011      # It's still not found. Now this is an unrecoverable error.
38012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38013$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38014      has_space=`$ECHO "$complete" | $GREP " "`
38015      if test "x$has_space" != x; then
38016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38018      fi
38019      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38020    fi
38021  fi
38022
38023  # Now new_path has a complete unix path to the binary
38024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38025    # Keep paths in /bin as-is, but remove trailing .exe if any
38026    new_path="${new_path/%.exe/}"
38027    # Do not save /bin paths to all_fixpath_prefixes!
38028  else
38029    # Not in mixed or Windows style, start by that.
38030    new_path=`cmd //c echo $new_path`
38031
38032  input_path="$new_path"
38033  # Check if we need to convert this using DOS-style short mode. If the path
38034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38035  # take no chances and rewrite it.
38036  # Note: m4 eats our [], so we need to use [ and ] instead.
38037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38038  if test "x$has_forbidden_chars" != x; then
38039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38041  fi
38042
38043    # Output is in $new_path
38044
38045  windows_path="$new_path"
38046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38047    unix_path=`$CYGPATH -u "$windows_path"`
38048    new_path="$unix_path"
38049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38051    new_path="$unix_path"
38052  fi
38053
38054    # remove trailing .exe if any
38055    new_path="${new_path/%.exe/}"
38056
38057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38059  fi
38060
38061  else
38062    # We're on a unix platform. Hooray! :)
38063    # First separate the path from the arguments. This will split at the first
38064    # space.
38065    complete="$NM"
38066    path="${complete%% *}"
38067    tmp="$complete EOL"
38068    arguments="${tmp#* }"
38069
38070    # Cannot rely on the command "which" here since it doesn't always work.
38071    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38072    if test -z "$is_absolute_path"; then
38073      # Path to executable is not absolute. Find it.
38074      IFS_save="$IFS"
38075      IFS=:
38076      for p in $PATH; do
38077        if test -f "$p/$path" && test -x "$p/$path"; then
38078          new_path="$p/$path"
38079          break
38080        fi
38081      done
38082      IFS="$IFS_save"
38083    else
38084      # This is an absolute path, we can use it without further modifications.
38085      new_path="$path"
38086    fi
38087
38088    if test "x$new_path" = x; then
38089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38090$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38091      has_space=`$ECHO "$complete" | $GREP " "`
38092      if test "x$has_space" != x; then
38093        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38095      fi
38096      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38097    fi
38098  fi
38099
38100  # Now join together the path and the arguments once again
38101  if test "x$arguments" != xEOL; then
38102    new_complete="$new_path ${arguments% *}"
38103  else
38104    new_complete="$new_path"
38105  fi
38106
38107  if test "x$complete" != "x$new_complete"; then
38108    NM="$new_complete"
38109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38110$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38111  fi
38112
38113    GNM="$NM"
38114
38115  fi
38116
38117  # objcopy is used for moving debug symbols to separate files when
38118  # full debug symbols are enabled.
38119  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38120
38121
38122  # Publish this variable in the help.
38123
38124
38125  if test "x$OBJCOPY" = x; then
38126    # The variable is not set by user, try to locate tool using the code snippet
38127    if test -n "$ac_tool_prefix"; then
38128  for ac_prog in gobjcopy objcopy
38129  do
38130    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38131set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38133$as_echo_n "checking for $ac_word... " >&6; }
38134if ${ac_cv_prog_OBJCOPY+:} false; then :
38135  $as_echo_n "(cached) " >&6
38136else
38137  if test -n "$OBJCOPY"; then
38138  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38139else
38140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38141for as_dir in $PATH
38142do
38143  IFS=$as_save_IFS
38144  test -z "$as_dir" && as_dir=.
38145    for ac_exec_ext in '' $ac_executable_extensions; do
38146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38147    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38149    break 2
38150  fi
38151done
38152  done
38153IFS=$as_save_IFS
38154
38155fi
38156fi
38157OBJCOPY=$ac_cv_prog_OBJCOPY
38158if test -n "$OBJCOPY"; then
38159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38160$as_echo "$OBJCOPY" >&6; }
38161else
38162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38163$as_echo "no" >&6; }
38164fi
38165
38166
38167    test -n "$OBJCOPY" && break
38168  done
38169fi
38170if test -z "$OBJCOPY"; then
38171  ac_ct_OBJCOPY=$OBJCOPY
38172  for ac_prog in gobjcopy objcopy
38173do
38174  # Extract the first word of "$ac_prog", so it can be a program name with args.
38175set dummy $ac_prog; ac_word=$2
38176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38177$as_echo_n "checking for $ac_word... " >&6; }
38178if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38179  $as_echo_n "(cached) " >&6
38180else
38181  if test -n "$ac_ct_OBJCOPY"; then
38182  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38183else
38184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38185for as_dir in $PATH
38186do
38187  IFS=$as_save_IFS
38188  test -z "$as_dir" && as_dir=.
38189    for ac_exec_ext in '' $ac_executable_extensions; do
38190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38191    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38193    break 2
38194  fi
38195done
38196  done
38197IFS=$as_save_IFS
38198
38199fi
38200fi
38201ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38202if test -n "$ac_ct_OBJCOPY"; then
38203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38204$as_echo "$ac_ct_OBJCOPY" >&6; }
38205else
38206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38207$as_echo "no" >&6; }
38208fi
38209
38210
38211  test -n "$ac_ct_OBJCOPY" && break
38212done
38213
38214  if test "x$ac_ct_OBJCOPY" = x; then
38215    OBJCOPY=""
38216  else
38217    case $cross_compiling:$ac_tool_warned in
38218yes:)
38219{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38220$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38221ac_tool_warned=yes ;;
38222esac
38223    OBJCOPY=$ac_ct_OBJCOPY
38224  fi
38225fi
38226
38227  else
38228    # The variable is set, but is it from the command line or the environment?
38229
38230    # Try to remove the string !OBJCOPY! from our list.
38231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38233      # If it failed, the variable was not from the command line. Ignore it,
38234      # but warn the user (except for BASH, which is always set by the calling BASH).
38235      if test "xOBJCOPY" != xBASH; then
38236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38237$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38238      fi
38239      # Try to locate tool using the code snippet
38240      if test -n "$ac_tool_prefix"; then
38241  for ac_prog in gobjcopy objcopy
38242  do
38243    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38244set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38246$as_echo_n "checking for $ac_word... " >&6; }
38247if ${ac_cv_prog_OBJCOPY+:} false; then :
38248  $as_echo_n "(cached) " >&6
38249else
38250  if test -n "$OBJCOPY"; then
38251  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38252else
38253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38254for as_dir in $PATH
38255do
38256  IFS=$as_save_IFS
38257  test -z "$as_dir" && as_dir=.
38258    for ac_exec_ext in '' $ac_executable_extensions; do
38259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38260    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38262    break 2
38263  fi
38264done
38265  done
38266IFS=$as_save_IFS
38267
38268fi
38269fi
38270OBJCOPY=$ac_cv_prog_OBJCOPY
38271if test -n "$OBJCOPY"; then
38272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38273$as_echo "$OBJCOPY" >&6; }
38274else
38275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38276$as_echo "no" >&6; }
38277fi
38278
38279
38280    test -n "$OBJCOPY" && break
38281  done
38282fi
38283if test -z "$OBJCOPY"; then
38284  ac_ct_OBJCOPY=$OBJCOPY
38285  for ac_prog in gobjcopy objcopy
38286do
38287  # Extract the first word of "$ac_prog", so it can be a program name with args.
38288set dummy $ac_prog; ac_word=$2
38289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38290$as_echo_n "checking for $ac_word... " >&6; }
38291if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38292  $as_echo_n "(cached) " >&6
38293else
38294  if test -n "$ac_ct_OBJCOPY"; then
38295  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38296else
38297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38298for as_dir in $PATH
38299do
38300  IFS=$as_save_IFS
38301  test -z "$as_dir" && as_dir=.
38302    for ac_exec_ext in '' $ac_executable_extensions; do
38303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38304    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38306    break 2
38307  fi
38308done
38309  done
38310IFS=$as_save_IFS
38311
38312fi
38313fi
38314ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38315if test -n "$ac_ct_OBJCOPY"; then
38316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38317$as_echo "$ac_ct_OBJCOPY" >&6; }
38318else
38319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38320$as_echo "no" >&6; }
38321fi
38322
38323
38324  test -n "$ac_ct_OBJCOPY" && break
38325done
38326
38327  if test "x$ac_ct_OBJCOPY" = x; then
38328    OBJCOPY=""
38329  else
38330    case $cross_compiling:$ac_tool_warned in
38331yes:)
38332{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38333$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38334ac_tool_warned=yes ;;
38335esac
38336    OBJCOPY=$ac_ct_OBJCOPY
38337  fi
38338fi
38339
38340    else
38341      # If it succeeded, then it was overridden by the user. We will use it
38342      # for the tool.
38343
38344      # First remove it from the list of overridden variables, so we can test
38345      # for unknown variables in the end.
38346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38347
38348      # Check if the provided tool contains a complete path.
38349      tool_specified="$OBJCOPY"
38350      tool_basename="${tool_specified##*/}"
38351      if test "x$tool_basename" = "x$tool_specified"; then
38352        # A command without a complete path is provided, search $PATH.
38353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38354$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38355        # Extract the first word of "$tool_basename", so it can be a program name with args.
38356set dummy $tool_basename; ac_word=$2
38357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38358$as_echo_n "checking for $ac_word... " >&6; }
38359if ${ac_cv_path_OBJCOPY+:} false; then :
38360  $as_echo_n "(cached) " >&6
38361else
38362  case $OBJCOPY in
38363  [\\/]* | ?:[\\/]*)
38364  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38365  ;;
38366  *)
38367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38368for as_dir in $PATH
38369do
38370  IFS=$as_save_IFS
38371  test -z "$as_dir" && as_dir=.
38372    for ac_exec_ext in '' $ac_executable_extensions; do
38373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38374    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38376    break 2
38377  fi
38378done
38379  done
38380IFS=$as_save_IFS
38381
38382  ;;
38383esac
38384fi
38385OBJCOPY=$ac_cv_path_OBJCOPY
38386if test -n "$OBJCOPY"; then
38387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38388$as_echo "$OBJCOPY" >&6; }
38389else
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38391$as_echo "no" >&6; }
38392fi
38393
38394
38395        if test "x$OBJCOPY" = x; then
38396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38397        fi
38398      else
38399        # Otherwise we believe it is a complete path. Use it as it is.
38400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38401$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38403$as_echo_n "checking for OBJCOPY... " >&6; }
38404        if test ! -x "$tool_specified"; then
38405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38406$as_echo "not found" >&6; }
38407          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38408        fi
38409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38410$as_echo "$tool_specified" >&6; }
38411      fi
38412    fi
38413  fi
38414
38415
38416    # Only call fixup if objcopy was found.
38417    if test -n "$OBJCOPY"; then
38418
38419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38420
38421  # First separate the path from the arguments. This will split at the first
38422  # space.
38423  complete="$OBJCOPY"
38424  path="${complete%% *}"
38425  tmp="$complete EOL"
38426  arguments="${tmp#* }"
38427
38428  # Input might be given as Windows format, start by converting to
38429  # unix format.
38430  new_path=`$CYGPATH -u "$path"`
38431
38432  # Now try to locate executable using which
38433  new_path=`$WHICH "$new_path" 2> /dev/null`
38434  # bat and cmd files are not always considered executable in cygwin causing which
38435  # to not find them
38436  if test "x$new_path" = x \
38437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38439    new_path=`$CYGPATH -u "$path"`
38440  fi
38441  if test "x$new_path" = x; then
38442    # Oops. Which didn't find the executable.
38443    # The splitting of arguments from the executable at a space might have been incorrect,
38444    # since paths with space are more likely in Windows. Give it another try with the whole
38445    # argument.
38446    path="$complete"
38447    arguments="EOL"
38448    new_path=`$CYGPATH -u "$path"`
38449    new_path=`$WHICH "$new_path" 2> /dev/null`
38450    # bat and cmd files are not always considered executable in cygwin causing which
38451    # to not find them
38452    if test "x$new_path" = x \
38453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38455      new_path=`$CYGPATH -u "$path"`
38456    fi
38457    if test "x$new_path" = x; then
38458      # It's still not found. Now this is an unrecoverable error.
38459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38460$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38461      has_space=`$ECHO "$complete" | $GREP " "`
38462      if test "x$has_space" != x; then
38463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38465      fi
38466      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38467    fi
38468  fi
38469
38470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38473  # "foo.exe" is OK but "foo" is an error.
38474  #
38475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38476  # It is also a way to make sure we got the proper file name for the real test later on.
38477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38478  if test "x$test_shortpath" = x; then
38479    # Short path failed, file does not exist as specified.
38480    # Try adding .exe or .cmd
38481    if test -f "${new_path}.exe"; then
38482      input_to_shortpath="${new_path}.exe"
38483    elif test -f "${new_path}.cmd"; then
38484      input_to_shortpath="${new_path}.cmd"
38485    else
38486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38487$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38490      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38491    fi
38492  else
38493    input_to_shortpath="$new_path"
38494  fi
38495
38496  # Call helper function which possibly converts this using DOS-style short mode.
38497  # If so, the updated path is stored in $new_path.
38498  new_path="$input_to_shortpath"
38499
38500  input_path="$input_to_shortpath"
38501  # Check if we need to convert this using DOS-style short mode. If the path
38502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38503  # take no chances and rewrite it.
38504  # Note: m4 eats our [], so we need to use [ and ] instead.
38505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38506  if test "x$has_forbidden_chars" != x; then
38507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38511      # Going to short mode and back again did indeed matter. Since short mode is
38512      # case insensitive, let's make it lowercase to improve readability.
38513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38514      # Now convert it back to Unix-stile (cygpath)
38515      input_path=`$CYGPATH -u "$shortmode_path"`
38516      new_path="$input_path"
38517    fi
38518  fi
38519
38520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38521  if test "x$test_cygdrive_prefix" = x; then
38522    # As a simple fix, exclude /usr/bin since it's not a real path.
38523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38525      # a path prefixed by /cygdrive for fixpath to work.
38526      new_path="$CYGWIN_ROOT_PATH$input_path"
38527    fi
38528  fi
38529
38530  # remove trailing .exe if any
38531  new_path="${new_path/%.exe/}"
38532
38533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38534
38535  # First separate the path from the arguments. This will split at the first
38536  # space.
38537  complete="$OBJCOPY"
38538  path="${complete%% *}"
38539  tmp="$complete EOL"
38540  arguments="${tmp#* }"
38541
38542  # Input might be given as Windows format, start by converting to
38543  # unix format.
38544  new_path="$path"
38545
38546  windows_path="$new_path"
38547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38548    unix_path=`$CYGPATH -u "$windows_path"`
38549    new_path="$unix_path"
38550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38552    new_path="$unix_path"
38553  fi
38554
38555
38556  # Now try to locate executable using which
38557  new_path=`$WHICH "$new_path" 2> /dev/null`
38558
38559  if test "x$new_path" = x; then
38560    # Oops. Which didn't find the executable.
38561    # The splitting of arguments from the executable at a space might have been incorrect,
38562    # since paths with space are more likely in Windows. Give it another try with the whole
38563    # argument.
38564    path="$complete"
38565    arguments="EOL"
38566    new_path="$path"
38567
38568  windows_path="$new_path"
38569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38570    unix_path=`$CYGPATH -u "$windows_path"`
38571    new_path="$unix_path"
38572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38574    new_path="$unix_path"
38575  fi
38576
38577
38578    new_path=`$WHICH "$new_path" 2> /dev/null`
38579    # bat and cmd files are not always considered executable in MSYS causing which
38580    # to not find them
38581    if test "x$new_path" = x \
38582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38584      new_path="$path"
38585
38586  windows_path="$new_path"
38587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38588    unix_path=`$CYGPATH -u "$windows_path"`
38589    new_path="$unix_path"
38590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38592    new_path="$unix_path"
38593  fi
38594
38595    fi
38596
38597    if test "x$new_path" = x; then
38598      # It's still not found. Now this is an unrecoverable error.
38599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38600$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38601      has_space=`$ECHO "$complete" | $GREP " "`
38602      if test "x$has_space" != x; then
38603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38605      fi
38606      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38607    fi
38608  fi
38609
38610  # Now new_path has a complete unix path to the binary
38611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38612    # Keep paths in /bin as-is, but remove trailing .exe if any
38613    new_path="${new_path/%.exe/}"
38614    # Do not save /bin paths to all_fixpath_prefixes!
38615  else
38616    # Not in mixed or Windows style, start by that.
38617    new_path=`cmd //c echo $new_path`
38618
38619  input_path="$new_path"
38620  # Check if we need to convert this using DOS-style short mode. If the path
38621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38622  # take no chances and rewrite it.
38623  # Note: m4 eats our [], so we need to use [ and ] instead.
38624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38625  if test "x$has_forbidden_chars" != x; then
38626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38628  fi
38629
38630    # Output is in $new_path
38631
38632  windows_path="$new_path"
38633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38634    unix_path=`$CYGPATH -u "$windows_path"`
38635    new_path="$unix_path"
38636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38638    new_path="$unix_path"
38639  fi
38640
38641    # remove trailing .exe if any
38642    new_path="${new_path/%.exe/}"
38643
38644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38646  fi
38647
38648  else
38649    # We're on a unix platform. Hooray! :)
38650    # First separate the path from the arguments. This will split at the first
38651    # space.
38652    complete="$OBJCOPY"
38653    path="${complete%% *}"
38654    tmp="$complete EOL"
38655    arguments="${tmp#* }"
38656
38657    # Cannot rely on the command "which" here since it doesn't always work.
38658    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38659    if test -z "$is_absolute_path"; then
38660      # Path to executable is not absolute. Find it.
38661      IFS_save="$IFS"
38662      IFS=:
38663      for p in $PATH; do
38664        if test -f "$p/$path" && test -x "$p/$path"; then
38665          new_path="$p/$path"
38666          break
38667        fi
38668      done
38669      IFS="$IFS_save"
38670    else
38671      # This is an absolute path, we can use it without further modifications.
38672      new_path="$path"
38673    fi
38674
38675    if test "x$new_path" = x; then
38676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38677$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38678      has_space=`$ECHO "$complete" | $GREP " "`
38679      if test "x$has_space" != x; then
38680        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38682      fi
38683      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38684    fi
38685  fi
38686
38687  # Now join together the path and the arguments once again
38688  if test "x$arguments" != xEOL; then
38689    new_complete="$new_path ${arguments% *}"
38690  else
38691    new_complete="$new_path"
38692  fi
38693
38694  if test "x$complete" != "x$new_complete"; then
38695    OBJCOPY="$new_complete"
38696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38697$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38698  fi
38699
38700    fi
38701  fi
38702
38703
38704
38705  # Publish this variable in the help.
38706
38707
38708  if test "x$OBJDUMP" = x; then
38709    # The variable is not set by user, try to locate tool using the code snippet
38710    if test -n "$ac_tool_prefix"; then
38711  for ac_prog in gobjdump objdump
38712  do
38713    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38714set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38716$as_echo_n "checking for $ac_word... " >&6; }
38717if ${ac_cv_prog_OBJDUMP+:} false; then :
38718  $as_echo_n "(cached) " >&6
38719else
38720  if test -n "$OBJDUMP"; then
38721  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38722else
38723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38724for as_dir in $PATH
38725do
38726  IFS=$as_save_IFS
38727  test -z "$as_dir" && as_dir=.
38728    for ac_exec_ext in '' $ac_executable_extensions; do
38729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38730    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38732    break 2
38733  fi
38734done
38735  done
38736IFS=$as_save_IFS
38737
38738fi
38739fi
38740OBJDUMP=$ac_cv_prog_OBJDUMP
38741if test -n "$OBJDUMP"; then
38742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38743$as_echo "$OBJDUMP" >&6; }
38744else
38745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38746$as_echo "no" >&6; }
38747fi
38748
38749
38750    test -n "$OBJDUMP" && break
38751  done
38752fi
38753if test -z "$OBJDUMP"; then
38754  ac_ct_OBJDUMP=$OBJDUMP
38755  for ac_prog in gobjdump objdump
38756do
38757  # Extract the first word of "$ac_prog", so it can be a program name with args.
38758set dummy $ac_prog; ac_word=$2
38759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38760$as_echo_n "checking for $ac_word... " >&6; }
38761if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38762  $as_echo_n "(cached) " >&6
38763else
38764  if test -n "$ac_ct_OBJDUMP"; then
38765  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38766else
38767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38768for as_dir in $PATH
38769do
38770  IFS=$as_save_IFS
38771  test -z "$as_dir" && as_dir=.
38772    for ac_exec_ext in '' $ac_executable_extensions; do
38773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38774    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38776    break 2
38777  fi
38778done
38779  done
38780IFS=$as_save_IFS
38781
38782fi
38783fi
38784ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38785if test -n "$ac_ct_OBJDUMP"; then
38786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38787$as_echo "$ac_ct_OBJDUMP" >&6; }
38788else
38789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38790$as_echo "no" >&6; }
38791fi
38792
38793
38794  test -n "$ac_ct_OBJDUMP" && break
38795done
38796
38797  if test "x$ac_ct_OBJDUMP" = x; then
38798    OBJDUMP=""
38799  else
38800    case $cross_compiling:$ac_tool_warned in
38801yes:)
38802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38804ac_tool_warned=yes ;;
38805esac
38806    OBJDUMP=$ac_ct_OBJDUMP
38807  fi
38808fi
38809
38810  else
38811    # The variable is set, but is it from the command line or the environment?
38812
38813    # Try to remove the string !OBJDUMP! from our list.
38814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38816      # If it failed, the variable was not from the command line. Ignore it,
38817      # but warn the user (except for BASH, which is always set by the calling BASH).
38818      if test "xOBJDUMP" != xBASH; then
38819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38820$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38821      fi
38822      # Try to locate tool using the code snippet
38823      if test -n "$ac_tool_prefix"; then
38824  for ac_prog in gobjdump objdump
38825  do
38826    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38827set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38829$as_echo_n "checking for $ac_word... " >&6; }
38830if ${ac_cv_prog_OBJDUMP+:} false; then :
38831  $as_echo_n "(cached) " >&6
38832else
38833  if test -n "$OBJDUMP"; then
38834  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38835else
38836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38837for as_dir in $PATH
38838do
38839  IFS=$as_save_IFS
38840  test -z "$as_dir" && as_dir=.
38841    for ac_exec_ext in '' $ac_executable_extensions; do
38842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38843    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38845    break 2
38846  fi
38847done
38848  done
38849IFS=$as_save_IFS
38850
38851fi
38852fi
38853OBJDUMP=$ac_cv_prog_OBJDUMP
38854if test -n "$OBJDUMP"; then
38855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38856$as_echo "$OBJDUMP" >&6; }
38857else
38858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38859$as_echo "no" >&6; }
38860fi
38861
38862
38863    test -n "$OBJDUMP" && break
38864  done
38865fi
38866if test -z "$OBJDUMP"; then
38867  ac_ct_OBJDUMP=$OBJDUMP
38868  for ac_prog in gobjdump objdump
38869do
38870  # Extract the first word of "$ac_prog", so it can be a program name with args.
38871set dummy $ac_prog; ac_word=$2
38872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38873$as_echo_n "checking for $ac_word... " >&6; }
38874if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38875  $as_echo_n "(cached) " >&6
38876else
38877  if test -n "$ac_ct_OBJDUMP"; then
38878  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38879else
38880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38881for as_dir in $PATH
38882do
38883  IFS=$as_save_IFS
38884  test -z "$as_dir" && as_dir=.
38885    for ac_exec_ext in '' $ac_executable_extensions; do
38886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38887    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38889    break 2
38890  fi
38891done
38892  done
38893IFS=$as_save_IFS
38894
38895fi
38896fi
38897ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38898if test -n "$ac_ct_OBJDUMP"; then
38899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38900$as_echo "$ac_ct_OBJDUMP" >&6; }
38901else
38902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38903$as_echo "no" >&6; }
38904fi
38905
38906
38907  test -n "$ac_ct_OBJDUMP" && break
38908done
38909
38910  if test "x$ac_ct_OBJDUMP" = x; then
38911    OBJDUMP=""
38912  else
38913    case $cross_compiling:$ac_tool_warned in
38914yes:)
38915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38917ac_tool_warned=yes ;;
38918esac
38919    OBJDUMP=$ac_ct_OBJDUMP
38920  fi
38921fi
38922
38923    else
38924      # If it succeeded, then it was overridden by the user. We will use it
38925      # for the tool.
38926
38927      # First remove it from the list of overridden variables, so we can test
38928      # for unknown variables in the end.
38929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38930
38931      # Check if the provided tool contains a complete path.
38932      tool_specified="$OBJDUMP"
38933      tool_basename="${tool_specified##*/}"
38934      if test "x$tool_basename" = "x$tool_specified"; then
38935        # A command without a complete path is provided, search $PATH.
38936        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38937$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38938        # Extract the first word of "$tool_basename", so it can be a program name with args.
38939set dummy $tool_basename; ac_word=$2
38940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38941$as_echo_n "checking for $ac_word... " >&6; }
38942if ${ac_cv_path_OBJDUMP+:} false; then :
38943  $as_echo_n "(cached) " >&6
38944else
38945  case $OBJDUMP in
38946  [\\/]* | ?:[\\/]*)
38947  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38948  ;;
38949  *)
38950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38951for as_dir in $PATH
38952do
38953  IFS=$as_save_IFS
38954  test -z "$as_dir" && as_dir=.
38955    for ac_exec_ext in '' $ac_executable_extensions; do
38956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38957    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38959    break 2
38960  fi
38961done
38962  done
38963IFS=$as_save_IFS
38964
38965  ;;
38966esac
38967fi
38968OBJDUMP=$ac_cv_path_OBJDUMP
38969if test -n "$OBJDUMP"; then
38970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38971$as_echo "$OBJDUMP" >&6; }
38972else
38973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38974$as_echo "no" >&6; }
38975fi
38976
38977
38978        if test "x$OBJDUMP" = x; then
38979          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38980        fi
38981      else
38982        # Otherwise we believe it is a complete path. Use it as it is.
38983        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38984$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38986$as_echo_n "checking for OBJDUMP... " >&6; }
38987        if test ! -x "$tool_specified"; then
38988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38989$as_echo "not found" >&6; }
38990          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38991        fi
38992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38993$as_echo "$tool_specified" >&6; }
38994      fi
38995    fi
38996  fi
38997
38998
38999  if test "x$OBJDUMP" != x; then
39000    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39001    # bails if argument is missing.
39002
39003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39004
39005  # First separate the path from the arguments. This will split at the first
39006  # space.
39007  complete="$OBJDUMP"
39008  path="${complete%% *}"
39009  tmp="$complete EOL"
39010  arguments="${tmp#* }"
39011
39012  # Input might be given as Windows format, start by converting to
39013  # unix format.
39014  new_path=`$CYGPATH -u "$path"`
39015
39016  # Now try to locate executable using which
39017  new_path=`$WHICH "$new_path" 2> /dev/null`
39018  # bat and cmd files are not always considered executable in cygwin causing which
39019  # to not find them
39020  if test "x$new_path" = x \
39021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39023    new_path=`$CYGPATH -u "$path"`
39024  fi
39025  if test "x$new_path" = x; then
39026    # Oops. Which didn't find the executable.
39027    # The splitting of arguments from the executable at a space might have been incorrect,
39028    # since paths with space are more likely in Windows. Give it another try with the whole
39029    # argument.
39030    path="$complete"
39031    arguments="EOL"
39032    new_path=`$CYGPATH -u "$path"`
39033    new_path=`$WHICH "$new_path" 2> /dev/null`
39034    # bat and cmd files are not always considered executable in cygwin causing which
39035    # to not find them
39036    if test "x$new_path" = x \
39037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039      new_path=`$CYGPATH -u "$path"`
39040    fi
39041    if test "x$new_path" = x; then
39042      # It's still not found. Now this is an unrecoverable error.
39043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39044$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39045      has_space=`$ECHO "$complete" | $GREP " "`
39046      if test "x$has_space" != x; then
39047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39049      fi
39050      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39051    fi
39052  fi
39053
39054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39057  # "foo.exe" is OK but "foo" is an error.
39058  #
39059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39060  # It is also a way to make sure we got the proper file name for the real test later on.
39061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39062  if test "x$test_shortpath" = x; then
39063    # Short path failed, file does not exist as specified.
39064    # Try adding .exe or .cmd
39065    if test -f "${new_path}.exe"; then
39066      input_to_shortpath="${new_path}.exe"
39067    elif test -f "${new_path}.cmd"; then
39068      input_to_shortpath="${new_path}.cmd"
39069    else
39070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39071$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39074      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39075    fi
39076  else
39077    input_to_shortpath="$new_path"
39078  fi
39079
39080  # Call helper function which possibly converts this using DOS-style short mode.
39081  # If so, the updated path is stored in $new_path.
39082  new_path="$input_to_shortpath"
39083
39084  input_path="$input_to_shortpath"
39085  # Check if we need to convert this using DOS-style short mode. If the path
39086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39087  # take no chances and rewrite it.
39088  # Note: m4 eats our [], so we need to use [ and ] instead.
39089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39090  if test "x$has_forbidden_chars" != x; then
39091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39095      # Going to short mode and back again did indeed matter. Since short mode is
39096      # case insensitive, let's make it lowercase to improve readability.
39097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39098      # Now convert it back to Unix-stile (cygpath)
39099      input_path=`$CYGPATH -u "$shortmode_path"`
39100      new_path="$input_path"
39101    fi
39102  fi
39103
39104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39105  if test "x$test_cygdrive_prefix" = x; then
39106    # As a simple fix, exclude /usr/bin since it's not a real path.
39107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39109      # a path prefixed by /cygdrive for fixpath to work.
39110      new_path="$CYGWIN_ROOT_PATH$input_path"
39111    fi
39112  fi
39113
39114  # remove trailing .exe if any
39115  new_path="${new_path/%.exe/}"
39116
39117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39118
39119  # First separate the path from the arguments. This will split at the first
39120  # space.
39121  complete="$OBJDUMP"
39122  path="${complete%% *}"
39123  tmp="$complete EOL"
39124  arguments="${tmp#* }"
39125
39126  # Input might be given as Windows format, start by converting to
39127  # unix format.
39128  new_path="$path"
39129
39130  windows_path="$new_path"
39131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39132    unix_path=`$CYGPATH -u "$windows_path"`
39133    new_path="$unix_path"
39134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39136    new_path="$unix_path"
39137  fi
39138
39139
39140  # Now try to locate executable using which
39141  new_path=`$WHICH "$new_path" 2> /dev/null`
39142
39143  if test "x$new_path" = x; then
39144    # Oops. Which didn't find the executable.
39145    # The splitting of arguments from the executable at a space might have been incorrect,
39146    # since paths with space are more likely in Windows. Give it another try with the whole
39147    # argument.
39148    path="$complete"
39149    arguments="EOL"
39150    new_path="$path"
39151
39152  windows_path="$new_path"
39153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39154    unix_path=`$CYGPATH -u "$windows_path"`
39155    new_path="$unix_path"
39156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39158    new_path="$unix_path"
39159  fi
39160
39161
39162    new_path=`$WHICH "$new_path" 2> /dev/null`
39163    # bat and cmd files are not always considered executable in MSYS causing which
39164    # to not find them
39165    if test "x$new_path" = x \
39166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39168      new_path="$path"
39169
39170  windows_path="$new_path"
39171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39172    unix_path=`$CYGPATH -u "$windows_path"`
39173    new_path="$unix_path"
39174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39176    new_path="$unix_path"
39177  fi
39178
39179    fi
39180
39181    if test "x$new_path" = x; then
39182      # It's still not found. Now this is an unrecoverable error.
39183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39184$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39185      has_space=`$ECHO "$complete" | $GREP " "`
39186      if test "x$has_space" != x; then
39187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39189      fi
39190      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39191    fi
39192  fi
39193
39194  # Now new_path has a complete unix path to the binary
39195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39196    # Keep paths in /bin as-is, but remove trailing .exe if any
39197    new_path="${new_path/%.exe/}"
39198    # Do not save /bin paths to all_fixpath_prefixes!
39199  else
39200    # Not in mixed or Windows style, start by that.
39201    new_path=`cmd //c echo $new_path`
39202
39203  input_path="$new_path"
39204  # Check if we need to convert this using DOS-style short mode. If the path
39205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39206  # take no chances and rewrite it.
39207  # Note: m4 eats our [], so we need to use [ and ] instead.
39208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39209  if test "x$has_forbidden_chars" != x; then
39210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39212  fi
39213
39214    # Output is in $new_path
39215
39216  windows_path="$new_path"
39217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39218    unix_path=`$CYGPATH -u "$windows_path"`
39219    new_path="$unix_path"
39220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39222    new_path="$unix_path"
39223  fi
39224
39225    # remove trailing .exe if any
39226    new_path="${new_path/%.exe/}"
39227
39228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39230  fi
39231
39232  else
39233    # We're on a unix platform. Hooray! :)
39234    # First separate the path from the arguments. This will split at the first
39235    # space.
39236    complete="$OBJDUMP"
39237    path="${complete%% *}"
39238    tmp="$complete EOL"
39239    arguments="${tmp#* }"
39240
39241    # Cannot rely on the command "which" here since it doesn't always work.
39242    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39243    if test -z "$is_absolute_path"; then
39244      # Path to executable is not absolute. Find it.
39245      IFS_save="$IFS"
39246      IFS=:
39247      for p in $PATH; do
39248        if test -f "$p/$path" && test -x "$p/$path"; then
39249          new_path="$p/$path"
39250          break
39251        fi
39252      done
39253      IFS="$IFS_save"
39254    else
39255      # This is an absolute path, we can use it without further modifications.
39256      new_path="$path"
39257    fi
39258
39259    if test "x$new_path" = x; then
39260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39261$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39262      has_space=`$ECHO "$complete" | $GREP " "`
39263      if test "x$has_space" != x; then
39264        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39266      fi
39267      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39268    fi
39269  fi
39270
39271  # Now join together the path and the arguments once again
39272  if test "x$arguments" != xEOL; then
39273    new_complete="$new_path ${arguments% *}"
39274  else
39275    new_complete="$new_path"
39276  fi
39277
39278  if test "x$complete" != "x$new_complete"; then
39279    OBJDUMP="$new_complete"
39280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39281$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39282  fi
39283
39284  fi
39285
39286
39287  # Restore old path.
39288  PATH="$OLD_PATH"
39289
39290  # Restore the flags to the user specified values.
39291  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39292  CFLAGS="$ORG_CFLAGS"
39293  CXXFLAGS="$ORG_CXXFLAGS"
39294  OBJCFLAGS="$ORG_OBJCFLAGS"
39295
39296
39297# Finally do some processing after the detection phase
39298
39299  if test "x$COMPILE_TYPE" = "xcross"; then
39300    # Now we need to find a C/C++ compiler that can build executables for the
39301    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39302    # used once. Also, we need to do this without adding a tools dir to the
39303    # path, otherwise we might pick up cross-compilers which don't use standard
39304    # naming.
39305
39306    # FIXME: we should list the discovered compilers as an exclude pattern!
39307    # If we do that, we can do this detection before POST_DETECTION, and still
39308    # find the build compilers in the tools dir, if needed.
39309
39310
39311  # Publish this variable in the help.
39312
39313
39314  if test "x$BUILD_CC" = x; then
39315    # The variable is not set by user, try to locate tool using the code snippet
39316    for ac_prog in cl cc gcc
39317do
39318  # Extract the first word of "$ac_prog", so it can be a program name with args.
39319set dummy $ac_prog; ac_word=$2
39320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39321$as_echo_n "checking for $ac_word... " >&6; }
39322if ${ac_cv_path_BUILD_CC+:} false; then :
39323  $as_echo_n "(cached) " >&6
39324else
39325  case $BUILD_CC in
39326  [\\/]* | ?:[\\/]*)
39327  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39328  ;;
39329  *)
39330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39331for as_dir in $PATH
39332do
39333  IFS=$as_save_IFS
39334  test -z "$as_dir" && as_dir=.
39335    for ac_exec_ext in '' $ac_executable_extensions; do
39336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39337    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39339    break 2
39340  fi
39341done
39342  done
39343IFS=$as_save_IFS
39344
39345  ;;
39346esac
39347fi
39348BUILD_CC=$ac_cv_path_BUILD_CC
39349if test -n "$BUILD_CC"; then
39350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39351$as_echo "$BUILD_CC" >&6; }
39352else
39353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39354$as_echo "no" >&6; }
39355fi
39356
39357
39358  test -n "$BUILD_CC" && break
39359done
39360
39361  else
39362    # The variable is set, but is it from the command line or the environment?
39363
39364    # Try to remove the string !BUILD_CC! from our list.
39365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39367      # If it failed, the variable was not from the command line. Ignore it,
39368      # but warn the user (except for BASH, which is always set by the calling BASH).
39369      if test "xBUILD_CC" != xBASH; then
39370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39371$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39372      fi
39373      # Try to locate tool using the code snippet
39374      for ac_prog in cl cc gcc
39375do
39376  # Extract the first word of "$ac_prog", so it can be a program name with args.
39377set dummy $ac_prog; ac_word=$2
39378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39379$as_echo_n "checking for $ac_word... " >&6; }
39380if ${ac_cv_path_BUILD_CC+:} false; then :
39381  $as_echo_n "(cached) " >&6
39382else
39383  case $BUILD_CC in
39384  [\\/]* | ?:[\\/]*)
39385  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39386  ;;
39387  *)
39388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39389for as_dir in $PATH
39390do
39391  IFS=$as_save_IFS
39392  test -z "$as_dir" && as_dir=.
39393    for ac_exec_ext in '' $ac_executable_extensions; do
39394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39395    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39397    break 2
39398  fi
39399done
39400  done
39401IFS=$as_save_IFS
39402
39403  ;;
39404esac
39405fi
39406BUILD_CC=$ac_cv_path_BUILD_CC
39407if test -n "$BUILD_CC"; then
39408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39409$as_echo "$BUILD_CC" >&6; }
39410else
39411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39412$as_echo "no" >&6; }
39413fi
39414
39415
39416  test -n "$BUILD_CC" && break
39417done
39418
39419    else
39420      # If it succeeded, then it was overridden by the user. We will use it
39421      # for the tool.
39422
39423      # First remove it from the list of overridden variables, so we can test
39424      # for unknown variables in the end.
39425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39426
39427      # Check if the provided tool contains a complete path.
39428      tool_specified="$BUILD_CC"
39429      tool_basename="${tool_specified##*/}"
39430      if test "x$tool_basename" = "x$tool_specified"; then
39431        # A command without a complete path is provided, search $PATH.
39432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39433$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39434        # Extract the first word of "$tool_basename", so it can be a program name with args.
39435set dummy $tool_basename; ac_word=$2
39436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39437$as_echo_n "checking for $ac_word... " >&6; }
39438if ${ac_cv_path_BUILD_CC+:} false; then :
39439  $as_echo_n "(cached) " >&6
39440else
39441  case $BUILD_CC in
39442  [\\/]* | ?:[\\/]*)
39443  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39444  ;;
39445  *)
39446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39447for as_dir in $PATH
39448do
39449  IFS=$as_save_IFS
39450  test -z "$as_dir" && as_dir=.
39451    for ac_exec_ext in '' $ac_executable_extensions; do
39452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39453    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39455    break 2
39456  fi
39457done
39458  done
39459IFS=$as_save_IFS
39460
39461  ;;
39462esac
39463fi
39464BUILD_CC=$ac_cv_path_BUILD_CC
39465if test -n "$BUILD_CC"; then
39466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39467$as_echo "$BUILD_CC" >&6; }
39468else
39469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39470$as_echo "no" >&6; }
39471fi
39472
39473
39474        if test "x$BUILD_CC" = x; then
39475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39476        fi
39477      else
39478        # Otherwise we believe it is a complete path. Use it as it is.
39479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39480$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39482$as_echo_n "checking for BUILD_CC... " >&6; }
39483        if test ! -x "$tool_specified"; then
39484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39485$as_echo "not found" >&6; }
39486          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39487        fi
39488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39489$as_echo "$tool_specified" >&6; }
39490      fi
39491    fi
39492  fi
39493
39494
39495
39496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39497
39498  # First separate the path from the arguments. This will split at the first
39499  # space.
39500  complete="$BUILD_CC"
39501  path="${complete%% *}"
39502  tmp="$complete EOL"
39503  arguments="${tmp#* }"
39504
39505  # Input might be given as Windows format, start by converting to
39506  # unix format.
39507  new_path=`$CYGPATH -u "$path"`
39508
39509  # Now try to locate executable using which
39510  new_path=`$WHICH "$new_path" 2> /dev/null`
39511  # bat and cmd files are not always considered executable in cygwin causing which
39512  # to not find them
39513  if test "x$new_path" = x \
39514      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39515      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39516    new_path=`$CYGPATH -u "$path"`
39517  fi
39518  if test "x$new_path" = x; then
39519    # Oops. Which didn't find the executable.
39520    # The splitting of arguments from the executable at a space might have been incorrect,
39521    # since paths with space are more likely in Windows. Give it another try with the whole
39522    # argument.
39523    path="$complete"
39524    arguments="EOL"
39525    new_path=`$CYGPATH -u "$path"`
39526    new_path=`$WHICH "$new_path" 2> /dev/null`
39527    # bat and cmd files are not always considered executable in cygwin causing which
39528    # to not find them
39529    if test "x$new_path" = x \
39530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39532      new_path=`$CYGPATH -u "$path"`
39533    fi
39534    if test "x$new_path" = x; then
39535      # It's still not found. Now this is an unrecoverable error.
39536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39537$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39538      has_space=`$ECHO "$complete" | $GREP " "`
39539      if test "x$has_space" != x; then
39540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39542      fi
39543      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39544    fi
39545  fi
39546
39547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39550  # "foo.exe" is OK but "foo" is an error.
39551  #
39552  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39553  # It is also a way to make sure we got the proper file name for the real test later on.
39554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39555  if test "x$test_shortpath" = x; then
39556    # Short path failed, file does not exist as specified.
39557    # Try adding .exe or .cmd
39558    if test -f "${new_path}.exe"; then
39559      input_to_shortpath="${new_path}.exe"
39560    elif test -f "${new_path}.cmd"; then
39561      input_to_shortpath="${new_path}.cmd"
39562    else
39563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39564$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39565      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39566$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39567      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39568    fi
39569  else
39570    input_to_shortpath="$new_path"
39571  fi
39572
39573  # Call helper function which possibly converts this using DOS-style short mode.
39574  # If so, the updated path is stored in $new_path.
39575  new_path="$input_to_shortpath"
39576
39577  input_path="$input_to_shortpath"
39578  # Check if we need to convert this using DOS-style short mode. If the path
39579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39580  # take no chances and rewrite it.
39581  # Note: m4 eats our [], so we need to use [ and ] instead.
39582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39583  if test "x$has_forbidden_chars" != x; then
39584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39588      # Going to short mode and back again did indeed matter. Since short mode is
39589      # case insensitive, let's make it lowercase to improve readability.
39590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39591      # Now convert it back to Unix-stile (cygpath)
39592      input_path=`$CYGPATH -u "$shortmode_path"`
39593      new_path="$input_path"
39594    fi
39595  fi
39596
39597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39598  if test "x$test_cygdrive_prefix" = x; then
39599    # As a simple fix, exclude /usr/bin since it's not a real path.
39600    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39602      # a path prefixed by /cygdrive for fixpath to work.
39603      new_path="$CYGWIN_ROOT_PATH$input_path"
39604    fi
39605  fi
39606
39607  # remove trailing .exe if any
39608  new_path="${new_path/%.exe/}"
39609
39610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39611
39612  # First separate the path from the arguments. This will split at the first
39613  # space.
39614  complete="$BUILD_CC"
39615  path="${complete%% *}"
39616  tmp="$complete EOL"
39617  arguments="${tmp#* }"
39618
39619  # Input might be given as Windows format, start by converting to
39620  # unix format.
39621  new_path="$path"
39622
39623  windows_path="$new_path"
39624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39625    unix_path=`$CYGPATH -u "$windows_path"`
39626    new_path="$unix_path"
39627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39629    new_path="$unix_path"
39630  fi
39631
39632
39633  # Now try to locate executable using which
39634  new_path=`$WHICH "$new_path" 2> /dev/null`
39635
39636  if test "x$new_path" = x; then
39637    # Oops. Which didn't find the executable.
39638    # The splitting of arguments from the executable at a space might have been incorrect,
39639    # since paths with space are more likely in Windows. Give it another try with the whole
39640    # argument.
39641    path="$complete"
39642    arguments="EOL"
39643    new_path="$path"
39644
39645  windows_path="$new_path"
39646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39647    unix_path=`$CYGPATH -u "$windows_path"`
39648    new_path="$unix_path"
39649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39651    new_path="$unix_path"
39652  fi
39653
39654
39655    new_path=`$WHICH "$new_path" 2> /dev/null`
39656    # bat and cmd files are not always considered executable in MSYS causing which
39657    # to not find them
39658    if test "x$new_path" = x \
39659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39661      new_path="$path"
39662
39663  windows_path="$new_path"
39664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39665    unix_path=`$CYGPATH -u "$windows_path"`
39666    new_path="$unix_path"
39667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39669    new_path="$unix_path"
39670  fi
39671
39672    fi
39673
39674    if test "x$new_path" = x; then
39675      # It's still not found. Now this is an unrecoverable error.
39676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39677$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39678      has_space=`$ECHO "$complete" | $GREP " "`
39679      if test "x$has_space" != x; then
39680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39682      fi
39683      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39684    fi
39685  fi
39686
39687  # Now new_path has a complete unix path to the binary
39688  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39689    # Keep paths in /bin as-is, but remove trailing .exe if any
39690    new_path="${new_path/%.exe/}"
39691    # Do not save /bin paths to all_fixpath_prefixes!
39692  else
39693    # Not in mixed or Windows style, start by that.
39694    new_path=`cmd //c echo $new_path`
39695
39696  input_path="$new_path"
39697  # Check if we need to convert this using DOS-style short mode. If the path
39698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39699  # take no chances and rewrite it.
39700  # Note: m4 eats our [], so we need to use [ and ] instead.
39701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39702  if test "x$has_forbidden_chars" != x; then
39703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39705  fi
39706
39707    # Output is in $new_path
39708
39709  windows_path="$new_path"
39710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39711    unix_path=`$CYGPATH -u "$windows_path"`
39712    new_path="$unix_path"
39713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39715    new_path="$unix_path"
39716  fi
39717
39718    # remove trailing .exe if any
39719    new_path="${new_path/%.exe/}"
39720
39721    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39722    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39723  fi
39724
39725  else
39726    # We're on a unix platform. Hooray! :)
39727    # First separate the path from the arguments. This will split at the first
39728    # space.
39729    complete="$BUILD_CC"
39730    path="${complete%% *}"
39731    tmp="$complete EOL"
39732    arguments="${tmp#* }"
39733
39734    # Cannot rely on the command "which" here since it doesn't always work.
39735    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39736    if test -z "$is_absolute_path"; then
39737      # Path to executable is not absolute. Find it.
39738      IFS_save="$IFS"
39739      IFS=:
39740      for p in $PATH; do
39741        if test -f "$p/$path" && test -x "$p/$path"; then
39742          new_path="$p/$path"
39743          break
39744        fi
39745      done
39746      IFS="$IFS_save"
39747    else
39748      # This is an absolute path, we can use it without further modifications.
39749      new_path="$path"
39750    fi
39751
39752    if test "x$new_path" = x; then
39753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39754$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39755      has_space=`$ECHO "$complete" | $GREP " "`
39756      if test "x$has_space" != x; then
39757        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39758$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39759      fi
39760      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39761    fi
39762  fi
39763
39764  # Now join together the path and the arguments once again
39765  if test "x$arguments" != xEOL; then
39766    new_complete="$new_path ${arguments% *}"
39767  else
39768    new_complete="$new_path"
39769  fi
39770
39771  if test "x$complete" != "x$new_complete"; then
39772    BUILD_CC="$new_complete"
39773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39774$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39775  fi
39776
39777
39778
39779  # Publish this variable in the help.
39780
39781
39782  if test "x$BUILD_CXX" = x; then
39783    # The variable is not set by user, try to locate tool using the code snippet
39784    for ac_prog in cl CC g++
39785do
39786  # Extract the first word of "$ac_prog", so it can be a program name with args.
39787set dummy $ac_prog; ac_word=$2
39788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39789$as_echo_n "checking for $ac_word... " >&6; }
39790if ${ac_cv_path_BUILD_CXX+:} false; then :
39791  $as_echo_n "(cached) " >&6
39792else
39793  case $BUILD_CXX in
39794  [\\/]* | ?:[\\/]*)
39795  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39796  ;;
39797  *)
39798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39799for as_dir in $PATH
39800do
39801  IFS=$as_save_IFS
39802  test -z "$as_dir" && as_dir=.
39803    for ac_exec_ext in '' $ac_executable_extensions; do
39804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39805    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39807    break 2
39808  fi
39809done
39810  done
39811IFS=$as_save_IFS
39812
39813  ;;
39814esac
39815fi
39816BUILD_CXX=$ac_cv_path_BUILD_CXX
39817if test -n "$BUILD_CXX"; then
39818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39819$as_echo "$BUILD_CXX" >&6; }
39820else
39821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39822$as_echo "no" >&6; }
39823fi
39824
39825
39826  test -n "$BUILD_CXX" && break
39827done
39828
39829  else
39830    # The variable is set, but is it from the command line or the environment?
39831
39832    # Try to remove the string !BUILD_CXX! from our list.
39833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39835      # If it failed, the variable was not from the command line. Ignore it,
39836      # but warn the user (except for BASH, which is always set by the calling BASH).
39837      if test "xBUILD_CXX" != xBASH; then
39838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39839$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39840      fi
39841      # Try to locate tool using the code snippet
39842      for ac_prog in cl CC g++
39843do
39844  # Extract the first word of "$ac_prog", so it can be a program name with args.
39845set dummy $ac_prog; ac_word=$2
39846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39847$as_echo_n "checking for $ac_word... " >&6; }
39848if ${ac_cv_path_BUILD_CXX+:} false; then :
39849  $as_echo_n "(cached) " >&6
39850else
39851  case $BUILD_CXX in
39852  [\\/]* | ?:[\\/]*)
39853  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39854  ;;
39855  *)
39856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39857for as_dir in $PATH
39858do
39859  IFS=$as_save_IFS
39860  test -z "$as_dir" && as_dir=.
39861    for ac_exec_ext in '' $ac_executable_extensions; do
39862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39863    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39865    break 2
39866  fi
39867done
39868  done
39869IFS=$as_save_IFS
39870
39871  ;;
39872esac
39873fi
39874BUILD_CXX=$ac_cv_path_BUILD_CXX
39875if test -n "$BUILD_CXX"; then
39876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39877$as_echo "$BUILD_CXX" >&6; }
39878else
39879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39880$as_echo "no" >&6; }
39881fi
39882
39883
39884  test -n "$BUILD_CXX" && break
39885done
39886
39887    else
39888      # If it succeeded, then it was overridden by the user. We will use it
39889      # for the tool.
39890
39891      # First remove it from the list of overridden variables, so we can test
39892      # for unknown variables in the end.
39893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39894
39895      # Check if the provided tool contains a complete path.
39896      tool_specified="$BUILD_CXX"
39897      tool_basename="${tool_specified##*/}"
39898      if test "x$tool_basename" = "x$tool_specified"; then
39899        # A command without a complete path is provided, search $PATH.
39900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39901$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39902        # Extract the first word of "$tool_basename", so it can be a program name with args.
39903set dummy $tool_basename; ac_word=$2
39904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39905$as_echo_n "checking for $ac_word... " >&6; }
39906if ${ac_cv_path_BUILD_CXX+:} false; then :
39907  $as_echo_n "(cached) " >&6
39908else
39909  case $BUILD_CXX in
39910  [\\/]* | ?:[\\/]*)
39911  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39912  ;;
39913  *)
39914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39915for as_dir in $PATH
39916do
39917  IFS=$as_save_IFS
39918  test -z "$as_dir" && as_dir=.
39919    for ac_exec_ext in '' $ac_executable_extensions; do
39920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39921    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39923    break 2
39924  fi
39925done
39926  done
39927IFS=$as_save_IFS
39928
39929  ;;
39930esac
39931fi
39932BUILD_CXX=$ac_cv_path_BUILD_CXX
39933if test -n "$BUILD_CXX"; then
39934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39935$as_echo "$BUILD_CXX" >&6; }
39936else
39937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39938$as_echo "no" >&6; }
39939fi
39940
39941
39942        if test "x$BUILD_CXX" = x; then
39943          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39944        fi
39945      else
39946        # Otherwise we believe it is a complete path. Use it as it is.
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39948$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39950$as_echo_n "checking for BUILD_CXX... " >&6; }
39951        if test ! -x "$tool_specified"; then
39952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39953$as_echo "not found" >&6; }
39954          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39955        fi
39956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39957$as_echo "$tool_specified" >&6; }
39958      fi
39959    fi
39960  fi
39961
39962
39963
39964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39965
39966  # First separate the path from the arguments. This will split at the first
39967  # space.
39968  complete="$BUILD_CXX"
39969  path="${complete%% *}"
39970  tmp="$complete EOL"
39971  arguments="${tmp#* }"
39972
39973  # Input might be given as Windows format, start by converting to
39974  # unix format.
39975  new_path=`$CYGPATH -u "$path"`
39976
39977  # Now try to locate executable using which
39978  new_path=`$WHICH "$new_path" 2> /dev/null`
39979  # bat and cmd files are not always considered executable in cygwin causing which
39980  # to not find them
39981  if test "x$new_path" = x \
39982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39984    new_path=`$CYGPATH -u "$path"`
39985  fi
39986  if test "x$new_path" = x; then
39987    # Oops. Which didn't find the executable.
39988    # The splitting of arguments from the executable at a space might have been incorrect,
39989    # since paths with space are more likely in Windows. Give it another try with the whole
39990    # argument.
39991    path="$complete"
39992    arguments="EOL"
39993    new_path=`$CYGPATH -u "$path"`
39994    new_path=`$WHICH "$new_path" 2> /dev/null`
39995    # bat and cmd files are not always considered executable in cygwin causing which
39996    # to not find them
39997    if test "x$new_path" = x \
39998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40000      new_path=`$CYGPATH -u "$path"`
40001    fi
40002    if test "x$new_path" = x; then
40003      # It's still not found. Now this is an unrecoverable error.
40004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40005$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40006      has_space=`$ECHO "$complete" | $GREP " "`
40007      if test "x$has_space" != x; then
40008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40010      fi
40011      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40012    fi
40013  fi
40014
40015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40018  # "foo.exe" is OK but "foo" is an error.
40019  #
40020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40021  # It is also a way to make sure we got the proper file name for the real test later on.
40022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40023  if test "x$test_shortpath" = x; then
40024    # Short path failed, file does not exist as specified.
40025    # Try adding .exe or .cmd
40026    if test -f "${new_path}.exe"; then
40027      input_to_shortpath="${new_path}.exe"
40028    elif test -f "${new_path}.cmd"; then
40029      input_to_shortpath="${new_path}.cmd"
40030    else
40031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40032$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40035      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40036    fi
40037  else
40038    input_to_shortpath="$new_path"
40039  fi
40040
40041  # Call helper function which possibly converts this using DOS-style short mode.
40042  # If so, the updated path is stored in $new_path.
40043  new_path="$input_to_shortpath"
40044
40045  input_path="$input_to_shortpath"
40046  # Check if we need to convert this using DOS-style short mode. If the path
40047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40048  # take no chances and rewrite it.
40049  # Note: m4 eats our [], so we need to use [ and ] instead.
40050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40051  if test "x$has_forbidden_chars" != x; then
40052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40056      # Going to short mode and back again did indeed matter. Since short mode is
40057      # case insensitive, let's make it lowercase to improve readability.
40058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40059      # Now convert it back to Unix-stile (cygpath)
40060      input_path=`$CYGPATH -u "$shortmode_path"`
40061      new_path="$input_path"
40062    fi
40063  fi
40064
40065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40066  if test "x$test_cygdrive_prefix" = x; then
40067    # As a simple fix, exclude /usr/bin since it's not a real path.
40068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40070      # a path prefixed by /cygdrive for fixpath to work.
40071      new_path="$CYGWIN_ROOT_PATH$input_path"
40072    fi
40073  fi
40074
40075  # remove trailing .exe if any
40076  new_path="${new_path/%.exe/}"
40077
40078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40079
40080  # First separate the path from the arguments. This will split at the first
40081  # space.
40082  complete="$BUILD_CXX"
40083  path="${complete%% *}"
40084  tmp="$complete EOL"
40085  arguments="${tmp#* }"
40086
40087  # Input might be given as Windows format, start by converting to
40088  # unix format.
40089  new_path="$path"
40090
40091  windows_path="$new_path"
40092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40093    unix_path=`$CYGPATH -u "$windows_path"`
40094    new_path="$unix_path"
40095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40097    new_path="$unix_path"
40098  fi
40099
40100
40101  # Now try to locate executable using which
40102  new_path=`$WHICH "$new_path" 2> /dev/null`
40103
40104  if test "x$new_path" = x; then
40105    # Oops. Which didn't find the executable.
40106    # The splitting of arguments from the executable at a space might have been incorrect,
40107    # since paths with space are more likely in Windows. Give it another try with the whole
40108    # argument.
40109    path="$complete"
40110    arguments="EOL"
40111    new_path="$path"
40112
40113  windows_path="$new_path"
40114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40115    unix_path=`$CYGPATH -u "$windows_path"`
40116    new_path="$unix_path"
40117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40119    new_path="$unix_path"
40120  fi
40121
40122
40123    new_path=`$WHICH "$new_path" 2> /dev/null`
40124    # bat and cmd files are not always considered executable in MSYS causing which
40125    # to not find them
40126    if test "x$new_path" = x \
40127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40129      new_path="$path"
40130
40131  windows_path="$new_path"
40132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40133    unix_path=`$CYGPATH -u "$windows_path"`
40134    new_path="$unix_path"
40135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40137    new_path="$unix_path"
40138  fi
40139
40140    fi
40141
40142    if test "x$new_path" = x; then
40143      # It's still not found. Now this is an unrecoverable error.
40144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40145$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40146      has_space=`$ECHO "$complete" | $GREP " "`
40147      if test "x$has_space" != x; then
40148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40150      fi
40151      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40152    fi
40153  fi
40154
40155  # Now new_path has a complete unix path to the binary
40156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40157    # Keep paths in /bin as-is, but remove trailing .exe if any
40158    new_path="${new_path/%.exe/}"
40159    # Do not save /bin paths to all_fixpath_prefixes!
40160  else
40161    # Not in mixed or Windows style, start by that.
40162    new_path=`cmd //c echo $new_path`
40163
40164  input_path="$new_path"
40165  # Check if we need to convert this using DOS-style short mode. If the path
40166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40167  # take no chances and rewrite it.
40168  # Note: m4 eats our [], so we need to use [ and ] instead.
40169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40170  if test "x$has_forbidden_chars" != x; then
40171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40173  fi
40174
40175    # Output is in $new_path
40176
40177  windows_path="$new_path"
40178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40179    unix_path=`$CYGPATH -u "$windows_path"`
40180    new_path="$unix_path"
40181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40183    new_path="$unix_path"
40184  fi
40185
40186    # remove trailing .exe if any
40187    new_path="${new_path/%.exe/}"
40188
40189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40191  fi
40192
40193  else
40194    # We're on a unix platform. Hooray! :)
40195    # First separate the path from the arguments. This will split at the first
40196    # space.
40197    complete="$BUILD_CXX"
40198    path="${complete%% *}"
40199    tmp="$complete EOL"
40200    arguments="${tmp#* }"
40201
40202    # Cannot rely on the command "which" here since it doesn't always work.
40203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40204    if test -z "$is_absolute_path"; then
40205      # Path to executable is not absolute. Find it.
40206      IFS_save="$IFS"
40207      IFS=:
40208      for p in $PATH; do
40209        if test -f "$p/$path" && test -x "$p/$path"; then
40210          new_path="$p/$path"
40211          break
40212        fi
40213      done
40214      IFS="$IFS_save"
40215    else
40216      # This is an absolute path, we can use it without further modifications.
40217      new_path="$path"
40218    fi
40219
40220    if test "x$new_path" = x; then
40221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40222$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40223      has_space=`$ECHO "$complete" | $GREP " "`
40224      if test "x$has_space" != x; then
40225        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40227      fi
40228      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40229    fi
40230  fi
40231
40232  # Now join together the path and the arguments once again
40233  if test "x$arguments" != xEOL; then
40234    new_complete="$new_path ${arguments% *}"
40235  else
40236    new_complete="$new_path"
40237  fi
40238
40239  if test "x$complete" != "x$new_complete"; then
40240    BUILD_CXX="$new_complete"
40241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40242$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40243  fi
40244
40245
40246
40247  # Publish this variable in the help.
40248
40249
40250  if test "x$BUILD_LD" = x; then
40251    # The variable is not set by user, try to locate tool using the code snippet
40252    for ac_prog in ld
40253do
40254  # Extract the first word of "$ac_prog", so it can be a program name with args.
40255set dummy $ac_prog; ac_word=$2
40256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40257$as_echo_n "checking for $ac_word... " >&6; }
40258if ${ac_cv_path_BUILD_LD+:} false; then :
40259  $as_echo_n "(cached) " >&6
40260else
40261  case $BUILD_LD in
40262  [\\/]* | ?:[\\/]*)
40263  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40264  ;;
40265  *)
40266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40267for as_dir in $PATH
40268do
40269  IFS=$as_save_IFS
40270  test -z "$as_dir" && as_dir=.
40271    for ac_exec_ext in '' $ac_executable_extensions; do
40272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40273    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40275    break 2
40276  fi
40277done
40278  done
40279IFS=$as_save_IFS
40280
40281  ;;
40282esac
40283fi
40284BUILD_LD=$ac_cv_path_BUILD_LD
40285if test -n "$BUILD_LD"; then
40286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40287$as_echo "$BUILD_LD" >&6; }
40288else
40289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40290$as_echo "no" >&6; }
40291fi
40292
40293
40294  test -n "$BUILD_LD" && break
40295done
40296
40297  else
40298    # The variable is set, but is it from the command line or the environment?
40299
40300    # Try to remove the string !BUILD_LD! from our list.
40301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40303      # If it failed, the variable was not from the command line. Ignore it,
40304      # but warn the user (except for BASH, which is always set by the calling BASH).
40305      if test "xBUILD_LD" != xBASH; then
40306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40307$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40308      fi
40309      # Try to locate tool using the code snippet
40310      for ac_prog in ld
40311do
40312  # Extract the first word of "$ac_prog", so it can be a program name with args.
40313set dummy $ac_prog; ac_word=$2
40314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40315$as_echo_n "checking for $ac_word... " >&6; }
40316if ${ac_cv_path_BUILD_LD+:} false; then :
40317  $as_echo_n "(cached) " >&6
40318else
40319  case $BUILD_LD in
40320  [\\/]* | ?:[\\/]*)
40321  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40322  ;;
40323  *)
40324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40325for as_dir in $PATH
40326do
40327  IFS=$as_save_IFS
40328  test -z "$as_dir" && as_dir=.
40329    for ac_exec_ext in '' $ac_executable_extensions; do
40330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40331    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40333    break 2
40334  fi
40335done
40336  done
40337IFS=$as_save_IFS
40338
40339  ;;
40340esac
40341fi
40342BUILD_LD=$ac_cv_path_BUILD_LD
40343if test -n "$BUILD_LD"; then
40344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40345$as_echo "$BUILD_LD" >&6; }
40346else
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40348$as_echo "no" >&6; }
40349fi
40350
40351
40352  test -n "$BUILD_LD" && break
40353done
40354
40355    else
40356      # If it succeeded, then it was overridden by the user. We will use it
40357      # for the tool.
40358
40359      # First remove it from the list of overridden variables, so we can test
40360      # for unknown variables in the end.
40361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40362
40363      # Check if the provided tool contains a complete path.
40364      tool_specified="$BUILD_LD"
40365      tool_basename="${tool_specified##*/}"
40366      if test "x$tool_basename" = "x$tool_specified"; then
40367        # A command without a complete path is provided, search $PATH.
40368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40369$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40370        # Extract the first word of "$tool_basename", so it can be a program name with args.
40371set dummy $tool_basename; ac_word=$2
40372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40373$as_echo_n "checking for $ac_word... " >&6; }
40374if ${ac_cv_path_BUILD_LD+:} false; then :
40375  $as_echo_n "(cached) " >&6
40376else
40377  case $BUILD_LD in
40378  [\\/]* | ?:[\\/]*)
40379  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40380  ;;
40381  *)
40382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40383for as_dir in $PATH
40384do
40385  IFS=$as_save_IFS
40386  test -z "$as_dir" && as_dir=.
40387    for ac_exec_ext in '' $ac_executable_extensions; do
40388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40389    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40391    break 2
40392  fi
40393done
40394  done
40395IFS=$as_save_IFS
40396
40397  ;;
40398esac
40399fi
40400BUILD_LD=$ac_cv_path_BUILD_LD
40401if test -n "$BUILD_LD"; then
40402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40403$as_echo "$BUILD_LD" >&6; }
40404else
40405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40406$as_echo "no" >&6; }
40407fi
40408
40409
40410        if test "x$BUILD_LD" = x; then
40411          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40412        fi
40413      else
40414        # Otherwise we believe it is a complete path. Use it as it is.
40415        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40416$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40418$as_echo_n "checking for BUILD_LD... " >&6; }
40419        if test ! -x "$tool_specified"; then
40420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40421$as_echo "not found" >&6; }
40422          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40423        fi
40424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40425$as_echo "$tool_specified" >&6; }
40426      fi
40427    fi
40428  fi
40429
40430
40431
40432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40433
40434  # First separate the path from the arguments. This will split at the first
40435  # space.
40436  complete="$BUILD_LD"
40437  path="${complete%% *}"
40438  tmp="$complete EOL"
40439  arguments="${tmp#* }"
40440
40441  # Input might be given as Windows format, start by converting to
40442  # unix format.
40443  new_path=`$CYGPATH -u "$path"`
40444
40445  # Now try to locate executable using which
40446  new_path=`$WHICH "$new_path" 2> /dev/null`
40447  # bat and cmd files are not always considered executable in cygwin causing which
40448  # to not find them
40449  if test "x$new_path" = x \
40450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40452    new_path=`$CYGPATH -u "$path"`
40453  fi
40454  if test "x$new_path" = x; then
40455    # Oops. Which didn't find the executable.
40456    # The splitting of arguments from the executable at a space might have been incorrect,
40457    # since paths with space are more likely in Windows. Give it another try with the whole
40458    # argument.
40459    path="$complete"
40460    arguments="EOL"
40461    new_path=`$CYGPATH -u "$path"`
40462    new_path=`$WHICH "$new_path" 2> /dev/null`
40463    # bat and cmd files are not always considered executable in cygwin causing which
40464    # to not find them
40465    if test "x$new_path" = x \
40466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40468      new_path=`$CYGPATH -u "$path"`
40469    fi
40470    if test "x$new_path" = x; then
40471      # It's still not found. Now this is an unrecoverable error.
40472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40473$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40474      has_space=`$ECHO "$complete" | $GREP " "`
40475      if test "x$has_space" != x; then
40476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40478      fi
40479      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40480    fi
40481  fi
40482
40483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40486  # "foo.exe" is OK but "foo" is an error.
40487  #
40488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40489  # It is also a way to make sure we got the proper file name for the real test later on.
40490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40491  if test "x$test_shortpath" = x; then
40492    # Short path failed, file does not exist as specified.
40493    # Try adding .exe or .cmd
40494    if test -f "${new_path}.exe"; then
40495      input_to_shortpath="${new_path}.exe"
40496    elif test -f "${new_path}.cmd"; then
40497      input_to_shortpath="${new_path}.cmd"
40498    else
40499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40500$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40503      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40504    fi
40505  else
40506    input_to_shortpath="$new_path"
40507  fi
40508
40509  # Call helper function which possibly converts this using DOS-style short mode.
40510  # If so, the updated path is stored in $new_path.
40511  new_path="$input_to_shortpath"
40512
40513  input_path="$input_to_shortpath"
40514  # Check if we need to convert this using DOS-style short mode. If the path
40515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40516  # take no chances and rewrite it.
40517  # Note: m4 eats our [], so we need to use [ and ] instead.
40518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40519  if test "x$has_forbidden_chars" != x; then
40520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40524      # Going to short mode and back again did indeed matter. Since short mode is
40525      # case insensitive, let's make it lowercase to improve readability.
40526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40527      # Now convert it back to Unix-stile (cygpath)
40528      input_path=`$CYGPATH -u "$shortmode_path"`
40529      new_path="$input_path"
40530    fi
40531  fi
40532
40533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40534  if test "x$test_cygdrive_prefix" = x; then
40535    # As a simple fix, exclude /usr/bin since it's not a real path.
40536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40538      # a path prefixed by /cygdrive for fixpath to work.
40539      new_path="$CYGWIN_ROOT_PATH$input_path"
40540    fi
40541  fi
40542
40543  # remove trailing .exe if any
40544  new_path="${new_path/%.exe/}"
40545
40546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40547
40548  # First separate the path from the arguments. This will split at the first
40549  # space.
40550  complete="$BUILD_LD"
40551  path="${complete%% *}"
40552  tmp="$complete EOL"
40553  arguments="${tmp#* }"
40554
40555  # Input might be given as Windows format, start by converting to
40556  # unix format.
40557  new_path="$path"
40558
40559  windows_path="$new_path"
40560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40561    unix_path=`$CYGPATH -u "$windows_path"`
40562    new_path="$unix_path"
40563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40565    new_path="$unix_path"
40566  fi
40567
40568
40569  # Now try to locate executable using which
40570  new_path=`$WHICH "$new_path" 2> /dev/null`
40571
40572  if test "x$new_path" = x; then
40573    # Oops. Which didn't find the executable.
40574    # The splitting of arguments from the executable at a space might have been incorrect,
40575    # since paths with space are more likely in Windows. Give it another try with the whole
40576    # argument.
40577    path="$complete"
40578    arguments="EOL"
40579    new_path="$path"
40580
40581  windows_path="$new_path"
40582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40583    unix_path=`$CYGPATH -u "$windows_path"`
40584    new_path="$unix_path"
40585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40587    new_path="$unix_path"
40588  fi
40589
40590
40591    new_path=`$WHICH "$new_path" 2> /dev/null`
40592    # bat and cmd files are not always considered executable in MSYS causing which
40593    # to not find them
40594    if test "x$new_path" = x \
40595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40597      new_path="$path"
40598
40599  windows_path="$new_path"
40600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40601    unix_path=`$CYGPATH -u "$windows_path"`
40602    new_path="$unix_path"
40603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40605    new_path="$unix_path"
40606  fi
40607
40608    fi
40609
40610    if test "x$new_path" = x; then
40611      # It's still not found. Now this is an unrecoverable error.
40612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40613$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40614      has_space=`$ECHO "$complete" | $GREP " "`
40615      if test "x$has_space" != x; then
40616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40618      fi
40619      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40620    fi
40621  fi
40622
40623  # Now new_path has a complete unix path to the binary
40624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40625    # Keep paths in /bin as-is, but remove trailing .exe if any
40626    new_path="${new_path/%.exe/}"
40627    # Do not save /bin paths to all_fixpath_prefixes!
40628  else
40629    # Not in mixed or Windows style, start by that.
40630    new_path=`cmd //c echo $new_path`
40631
40632  input_path="$new_path"
40633  # Check if we need to convert this using DOS-style short mode. If the path
40634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40635  # take no chances and rewrite it.
40636  # Note: m4 eats our [], so we need to use [ and ] instead.
40637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40638  if test "x$has_forbidden_chars" != x; then
40639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40641  fi
40642
40643    # Output is in $new_path
40644
40645  windows_path="$new_path"
40646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40647    unix_path=`$CYGPATH -u "$windows_path"`
40648    new_path="$unix_path"
40649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40651    new_path="$unix_path"
40652  fi
40653
40654    # remove trailing .exe if any
40655    new_path="${new_path/%.exe/}"
40656
40657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40659  fi
40660
40661  else
40662    # We're on a unix platform. Hooray! :)
40663    # First separate the path from the arguments. This will split at the first
40664    # space.
40665    complete="$BUILD_LD"
40666    path="${complete%% *}"
40667    tmp="$complete EOL"
40668    arguments="${tmp#* }"
40669
40670    # Cannot rely on the command "which" here since it doesn't always work.
40671    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40672    if test -z "$is_absolute_path"; then
40673      # Path to executable is not absolute. Find it.
40674      IFS_save="$IFS"
40675      IFS=:
40676      for p in $PATH; do
40677        if test -f "$p/$path" && test -x "$p/$path"; then
40678          new_path="$p/$path"
40679          break
40680        fi
40681      done
40682      IFS="$IFS_save"
40683    else
40684      # This is an absolute path, we can use it without further modifications.
40685      new_path="$path"
40686    fi
40687
40688    if test "x$new_path" = x; then
40689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40690$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40691      has_space=`$ECHO "$complete" | $GREP " "`
40692      if test "x$has_space" != x; then
40693        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40695      fi
40696      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40697    fi
40698  fi
40699
40700  # Now join together the path and the arguments once again
40701  if test "x$arguments" != xEOL; then
40702    new_complete="$new_path ${arguments% *}"
40703  else
40704    new_complete="$new_path"
40705  fi
40706
40707  if test "x$complete" != "x$new_complete"; then
40708    BUILD_LD="$new_complete"
40709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40710$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40711  fi
40712
40713  else
40714    # If we are not cross compiling, use the normal target compilers for
40715    # building the build platform executables.
40716    BUILD_CC="$CC"
40717    BUILD_CXX="$CXX"
40718    BUILD_LD="$LD"
40719  fi
40720
40721
40722
40723
40724
40725
40726  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40727    # For hotspot, we need these in Windows mixed path,
40728    # so rewrite them all. Need added .exe suffix.
40729    HOTSPOT_CXX="$CXX.exe"
40730    HOTSPOT_LD="$LD.exe"
40731    HOTSPOT_MT="$MT.exe"
40732    HOTSPOT_RC="$RC.exe"
40733
40734  unix_path="$HOTSPOT_CXX"
40735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40736    windows_path=`$CYGPATH -m "$unix_path"`
40737    HOTSPOT_CXX="$windows_path"
40738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40739    windows_path=`cmd //c echo $unix_path`
40740    HOTSPOT_CXX="$windows_path"
40741  fi
40742
40743
40744  unix_path="$HOTSPOT_LD"
40745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40746    windows_path=`$CYGPATH -m "$unix_path"`
40747    HOTSPOT_LD="$windows_path"
40748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40749    windows_path=`cmd //c echo $unix_path`
40750    HOTSPOT_LD="$windows_path"
40751  fi
40752
40753
40754  unix_path="$HOTSPOT_MT"
40755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40756    windows_path=`$CYGPATH -m "$unix_path"`
40757    HOTSPOT_MT="$windows_path"
40758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40759    windows_path=`cmd //c echo $unix_path`
40760    HOTSPOT_MT="$windows_path"
40761  fi
40762
40763
40764  unix_path="$HOTSPOT_RC"
40765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40766    windows_path=`$CYGPATH -m "$unix_path"`
40767    HOTSPOT_RC="$windows_path"
40768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40769    windows_path=`cmd //c echo $unix_path`
40770    HOTSPOT_RC="$windows_path"
40771  fi
40772
40773
40774
40775  else
40776    HOTSPOT_CXX="$CXX"
40777    HOTSPOT_LD="$LD"
40778  fi
40779
40780
40781
40782  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40783    USE_CLANG=true
40784  fi
40785
40786
40787  # LDEXE is the linker to use, when creating executables. Not really used.
40788  # FIXME: These should just be removed!
40789  LDEXE="$LD"
40790  LDEXECXX="$LDCXX"
40791
40792
40793
40794
40795
40796
40797  # The package path is used only on macosx?
40798  # FIXME: clean this up, and/or move it elsewhere.
40799  PACKAGE_PATH=/opt/local
40800
40801
40802  # Check for extra potential brokenness.
40803  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40804    # On Windows, double-check that we got the right compiler.
40805    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40806    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40807    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40808      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40809        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
40810      fi
40811    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40812      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40813        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40814      fi
40815    fi
40816  fi
40817
40818  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40819    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40820    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40821    # This is later checked when setting flags.
40822
40823    # "-Og" suppported for GCC 4.8 and later
40824    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40825
40826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40827$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40828  supports=yes
40829
40830  saved_cflags="$CFLAGS"
40831  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40832  ac_ext=c
40833ac_cpp='$CPP $CPPFLAGS'
40834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40836ac_compiler_gnu=$ac_cv_c_compiler_gnu
40837
40838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40839/* end confdefs.h.  */
40840int i;
40841_ACEOF
40842if ac_fn_c_try_compile "$LINENO"; then :
40843
40844else
40845  supports=no
40846fi
40847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40848  ac_ext=cpp
40849ac_cpp='$CXXCPP $CPPFLAGS'
40850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40853
40854  CFLAGS="$saved_cflags"
40855
40856  saved_cxxflags="$CXXFLAGS"
40857  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40858  ac_ext=cpp
40859ac_cpp='$CXXCPP $CPPFLAGS'
40860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40863
40864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40865/* end confdefs.h.  */
40866int i;
40867_ACEOF
40868if ac_fn_cxx_try_compile "$LINENO"; then :
40869
40870else
40871  supports=no
40872fi
40873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40874  ac_ext=cpp
40875ac_cpp='$CXXCPP $CPPFLAGS'
40876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40879
40880  CXXFLAGS="$saved_cxxflags"
40881
40882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40883$as_echo "$supports" >&6; }
40884  if test "x$supports" = "xyes" ; then
40885    HAS_CFLAG_OPTIMIZE_DEBUG=true
40886  else
40887    HAS_CFLAG_OPTIMIZE_DEBUG=false
40888  fi
40889
40890
40891    # "-z relro" supported in GNU binutils 2.17 and later
40892    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40893
40894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40895$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40896  supports=yes
40897
40898  saved_ldflags="$LDFLAGS"
40899  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40900  ac_ext=c
40901ac_cpp='$CPP $CPPFLAGS'
40902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40904ac_compiler_gnu=$ac_cv_c_compiler_gnu
40905
40906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40907/* end confdefs.h.  */
40908
40909int
40910main ()
40911{
40912
40913  ;
40914  return 0;
40915}
40916_ACEOF
40917if ac_fn_c_try_link "$LINENO"; then :
40918
40919else
40920  supports=no
40921fi
40922rm -f core conftest.err conftest.$ac_objext \
40923    conftest$ac_exeext conftest.$ac_ext
40924  ac_ext=cpp
40925ac_cpp='$CXXCPP $CPPFLAGS'
40926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40929
40930  LDFLAGS="$saved_ldflags"
40931
40932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40933$as_echo "$supports" >&6; }
40934  if test "x$supports" = "xyes" ; then
40935    HAS_LINKER_RELRO=true
40936  else
40937    HAS_LINKER_RELRO=false
40938  fi
40939
40940
40941    # "-z now" supported in GNU binutils 2.11 and later
40942    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40943
40944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40945$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40946  supports=yes
40947
40948  saved_ldflags="$LDFLAGS"
40949  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40950  ac_ext=c
40951ac_cpp='$CPP $CPPFLAGS'
40952ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40953ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40954ac_compiler_gnu=$ac_cv_c_compiler_gnu
40955
40956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40957/* end confdefs.h.  */
40958
40959int
40960main ()
40961{
40962
40963  ;
40964  return 0;
40965}
40966_ACEOF
40967if ac_fn_c_try_link "$LINENO"; then :
40968
40969else
40970  supports=no
40971fi
40972rm -f core conftest.err conftest.$ac_objext \
40973    conftest$ac_exeext conftest.$ac_ext
40974  ac_ext=cpp
40975ac_cpp='$CXXCPP $CPPFLAGS'
40976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40979
40980  LDFLAGS="$saved_ldflags"
40981
40982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40983$as_echo "$supports" >&6; }
40984  if test "x$supports" = "xyes" ; then
40985    HAS_LINKER_NOW=true
40986  else
40987    HAS_LINKER_NOW=false
40988  fi
40989
40990  fi
40991
40992  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40993  # in executable.'
40994  USING_BROKEN_SUSE_LD=no
40995  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40997$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40998    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40999    $ECHO "int main() { }" > main.c
41000    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41002$as_echo "no" >&6; }
41003      USING_BROKEN_SUSE_LD=no
41004    else
41005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41006$as_echo "yes" >&6; }
41007      USING_BROKEN_SUSE_LD=yes
41008    fi
41009    rm -rf version-script.map main.c a.out
41010  fi
41011
41012
41013
41014# Setup the JTReg Regression Test Harness.
41015
41016
41017# Check whether --with-jtreg was given.
41018if test "${with_jtreg+set}" = set; then :
41019  withval=$with_jtreg;
41020else
41021  with_jtreg=no
41022fi
41023
41024
41025  if test "x$with_jtreg" = xno; then
41026    # jtreg disabled
41027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41028$as_echo_n "checking for jtreg... " >&6; }
41029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41030$as_echo "no" >&6; }
41031  else
41032    if test "x$with_jtreg" != xyes; then
41033      # with path specified.
41034      JT_HOME="$with_jtreg"
41035    fi
41036
41037    if test "x$JT_HOME" != x; then
41038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41039$as_echo_n "checking for jtreg... " >&6; }
41040
41041      # use JT_HOME enviroment var.
41042
41043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41044
41045  # Input might be given as Windows format, start by converting to
41046  # unix format.
41047  path="$JT_HOME"
41048  new_path=`$CYGPATH -u "$path"`
41049
41050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41053  # "foo.exe" is OK but "foo" is an error.
41054  #
41055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41056  # It is also a way to make sure we got the proper file name for the real test later on.
41057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41058  if test "x$test_shortpath" = x; then
41059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41060$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41061    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41062  fi
41063
41064  # Call helper function which possibly converts this using DOS-style short mode.
41065  # If so, the updated path is stored in $new_path.
41066
41067  input_path="$new_path"
41068  # Check if we need to convert this using DOS-style short mode. If the path
41069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41070  # take no chances and rewrite it.
41071  # Note: m4 eats our [], so we need to use [ and ] instead.
41072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41073  if test "x$has_forbidden_chars" != x; then
41074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41078      # Going to short mode and back again did indeed matter. Since short mode is
41079      # case insensitive, let's make it lowercase to improve readability.
41080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41081      # Now convert it back to Unix-stile (cygpath)
41082      input_path=`$CYGPATH -u "$shortmode_path"`
41083      new_path="$input_path"
41084    fi
41085  fi
41086
41087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41088  if test "x$test_cygdrive_prefix" = x; then
41089    # As a simple fix, exclude /usr/bin since it's not a real path.
41090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41092      # a path prefixed by /cygdrive for fixpath to work.
41093      new_path="$CYGWIN_ROOT_PATH$input_path"
41094    fi
41095  fi
41096
41097
41098  if test "x$path" != "x$new_path"; then
41099    JT_HOME="$new_path"
41100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41101$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41102  fi
41103
41104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41105
41106  path="$JT_HOME"
41107  has_colon=`$ECHO $path | $GREP ^.:`
41108  new_path="$path"
41109  if test "x$has_colon" = x; then
41110    # Not in mixed or Windows style, start by that.
41111    new_path=`cmd //c echo $path`
41112  fi
41113
41114
41115  input_path="$new_path"
41116  # Check if we need to convert this using DOS-style short mode. If the path
41117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41118  # take no chances and rewrite it.
41119  # Note: m4 eats our [], so we need to use [ and ] instead.
41120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41121  if test "x$has_forbidden_chars" != x; then
41122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41124  fi
41125
41126
41127  windows_path="$new_path"
41128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41129    unix_path=`$CYGPATH -u "$windows_path"`
41130    new_path="$unix_path"
41131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41133    new_path="$unix_path"
41134  fi
41135
41136  if test "x$path" != "x$new_path"; then
41137    JT_HOME="$new_path"
41138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41139$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41140  fi
41141
41142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41144
41145  else
41146    # We're on a unix platform. Hooray! :)
41147    path="$JT_HOME"
41148    has_space=`$ECHO "$path" | $GREP " "`
41149    if test "x$has_space" != x; then
41150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41151$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41153    fi
41154
41155    # Use eval to expand a potential ~
41156    eval path="$path"
41157    if test ! -f "$path" && test ! -d "$path"; then
41158      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41159    fi
41160
41161    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41162  fi
41163
41164
41165      # jtreg win32 script works for everybody
41166      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41167
41168      if test ! -f "$JTREGEXE"; then
41169        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41170      fi
41171
41172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41173$as_echo "$JTREGEXE" >&6; }
41174    else
41175      # try to find jtreg on path
41176
41177
41178
41179  # Publish this variable in the help.
41180
41181
41182  if test "x$JTREGEXE" = x; then
41183    # The variable is not set by user, try to locate tool using the code snippet
41184    for ac_prog in jtreg
41185do
41186  # Extract the first word of "$ac_prog", so it can be a program name with args.
41187set dummy $ac_prog; ac_word=$2
41188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41189$as_echo_n "checking for $ac_word... " >&6; }
41190if ${ac_cv_path_JTREGEXE+:} false; then :
41191  $as_echo_n "(cached) " >&6
41192else
41193  case $JTREGEXE in
41194  [\\/]* | ?:[\\/]*)
41195  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41196  ;;
41197  *)
41198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41199for as_dir in $PATH
41200do
41201  IFS=$as_save_IFS
41202  test -z "$as_dir" && as_dir=.
41203    for ac_exec_ext in '' $ac_executable_extensions; do
41204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41205    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41207    break 2
41208  fi
41209done
41210  done
41211IFS=$as_save_IFS
41212
41213  ;;
41214esac
41215fi
41216JTREGEXE=$ac_cv_path_JTREGEXE
41217if test -n "$JTREGEXE"; then
41218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41219$as_echo "$JTREGEXE" >&6; }
41220else
41221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41222$as_echo "no" >&6; }
41223fi
41224
41225
41226  test -n "$JTREGEXE" && break
41227done
41228
41229  else
41230    # The variable is set, but is it from the command line or the environment?
41231
41232    # Try to remove the string !JTREGEXE! from our list.
41233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41235      # If it failed, the variable was not from the command line. Ignore it,
41236      # but warn the user (except for BASH, which is always set by the calling BASH).
41237      if test "xJTREGEXE" != xBASH; then
41238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41239$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41240      fi
41241      # Try to locate tool using the code snippet
41242      for ac_prog in jtreg
41243do
41244  # Extract the first word of "$ac_prog", so it can be a program name with args.
41245set dummy $ac_prog; ac_word=$2
41246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41247$as_echo_n "checking for $ac_word... " >&6; }
41248if ${ac_cv_path_JTREGEXE+:} false; then :
41249  $as_echo_n "(cached) " >&6
41250else
41251  case $JTREGEXE in
41252  [\\/]* | ?:[\\/]*)
41253  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41254  ;;
41255  *)
41256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41257for as_dir in $PATH
41258do
41259  IFS=$as_save_IFS
41260  test -z "$as_dir" && as_dir=.
41261    for ac_exec_ext in '' $ac_executable_extensions; do
41262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41263    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41265    break 2
41266  fi
41267done
41268  done
41269IFS=$as_save_IFS
41270
41271  ;;
41272esac
41273fi
41274JTREGEXE=$ac_cv_path_JTREGEXE
41275if test -n "$JTREGEXE"; then
41276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41277$as_echo "$JTREGEXE" >&6; }
41278else
41279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41280$as_echo "no" >&6; }
41281fi
41282
41283
41284  test -n "$JTREGEXE" && break
41285done
41286
41287    else
41288      # If it succeeded, then it was overridden by the user. We will use it
41289      # for the tool.
41290
41291      # First remove it from the list of overridden variables, so we can test
41292      # for unknown variables in the end.
41293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41294
41295      # Check if the provided tool contains a complete path.
41296      tool_specified="$JTREGEXE"
41297      tool_basename="${tool_specified##*/}"
41298      if test "x$tool_basename" = "x$tool_specified"; then
41299        # A command without a complete path is provided, search $PATH.
41300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41301$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41302        # Extract the first word of "$tool_basename", so it can be a program name with args.
41303set dummy $tool_basename; ac_word=$2
41304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41305$as_echo_n "checking for $ac_word... " >&6; }
41306if ${ac_cv_path_JTREGEXE+:} false; then :
41307  $as_echo_n "(cached) " >&6
41308else
41309  case $JTREGEXE in
41310  [\\/]* | ?:[\\/]*)
41311  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41312  ;;
41313  *)
41314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41315for as_dir in $PATH
41316do
41317  IFS=$as_save_IFS
41318  test -z "$as_dir" && as_dir=.
41319    for ac_exec_ext in '' $ac_executable_extensions; do
41320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41321    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41323    break 2
41324  fi
41325done
41326  done
41327IFS=$as_save_IFS
41328
41329  ;;
41330esac
41331fi
41332JTREGEXE=$ac_cv_path_JTREGEXE
41333if test -n "$JTREGEXE"; then
41334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41335$as_echo "$JTREGEXE" >&6; }
41336else
41337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41338$as_echo "no" >&6; }
41339fi
41340
41341
41342        if test "x$JTREGEXE" = x; then
41343          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41344        fi
41345      else
41346        # Otherwise we believe it is a complete path. Use it as it is.
41347        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41348$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41350$as_echo_n "checking for JTREGEXE... " >&6; }
41351        if test ! -x "$tool_specified"; then
41352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41353$as_echo "not found" >&6; }
41354          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41355        fi
41356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41357$as_echo "$tool_specified" >&6; }
41358      fi
41359    fi
41360  fi
41361
41362
41363
41364  if test "x$JTREGEXE" = x; then
41365    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41366  fi
41367
41368
41369      JT_HOME="`$DIRNAME $JTREGEXE`"
41370    fi
41371  fi
41372
41373
41374
41375
41376
41377
41378  # Option used to tell the compiler whether to create 32- or 64-bit executables
41379  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41380    COMPILER_TARGET_BITS_FLAG="-q"
41381  else
41382    COMPILER_TARGET_BITS_FLAG="-m"
41383  fi
41384
41385
41386  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41387  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41388    ARFLAGS="-r"
41389  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41390    ARFLAGS="-X64"
41391  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41392    # lib.exe is used as AR to create static libraries.
41393    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41394  else
41395    ARFLAGS=""
41396  fi
41397
41398
41399  ## Setup strip.
41400  # FIXME: should this really be per platform, or should it be per toolchain type?
41401  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41402  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41403  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41404    STRIPFLAGS="-g"
41405  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41406    STRIPFLAGS="-x"
41407  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41408    STRIPFLAGS="-S"
41409  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41410    STRIPFLAGS="-X32_64"
41411  fi
41412
41413  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41414    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41415  fi
41416
41417
41418  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41419    # FIXME: break out into MCSFLAGS
41420    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41421  fi
41422
41423
41424  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41425    CC_OUT_OPTION=-Fo
41426    EXE_OUT_OPTION=-out:
41427    LD_OUT_OPTION=-out:
41428    AR_OUT_OPTION=-out:
41429  else
41430    # The option used to specify the target .o,.a or .so file.
41431    # When compiling, how to specify the to be created object file.
41432    CC_OUT_OPTION='-o$(SPACE)'
41433    # When linking, how to specify the to be created executable.
41434    EXE_OUT_OPTION='-o$(SPACE)'
41435    # When linking, how to specify the to be created dynamically linkable library.
41436    LD_OUT_OPTION='-o$(SPACE)'
41437    # When archiving, how to specify the to be create static archive for object files.
41438    AR_OUT_OPTION='rcs$(SPACE)'
41439  fi
41440
41441
41442
41443
41444
41445  # On Windows, we need to set RC flags.
41446  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41447    RC_FLAGS="-nologo -l0x409"
41448    if test "x$VARIANT" = xOPT; then
41449      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41450    fi
41451
41452    # The version variables used to create RC_FLAGS may be overridden
41453    # in a custom configure script, or possibly the command line.
41454    # Let those variables be expanded at make time in spec.gmk.
41455    # The \$ are escaped to the shell, and the $(...) variables
41456    # are evaluated by make.
41457    RC_FLAGS="$RC_FLAGS \
41458        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41459        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41460        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41461        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41462        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41463        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41464        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41465  fi
41466
41467
41468  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41469    # silence copyright notice and other headers.
41470    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41471  fi
41472
41473  if test "x$SYSROOT" != "x"; then
41474    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41475      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41476        # Solaris Studio does not have a concept of sysroot. Instead we must
41477        # make sure the default include and lib dirs are appended to each
41478        # compile and link command line.
41479        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41480        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41481            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41482            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41483      fi
41484    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41485      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41486      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41487      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41488    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41489      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41490      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41491    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41492      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41493      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41494    fi
41495    # Propagate the sysroot args to hotspot
41496    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41497    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41498    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41499  fi
41500
41501  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41502  # set this here so it doesn't have to be peppered throughout the forest
41503  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41504    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41505    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41506  fi
41507
41508
41509
41510
41511
41512# FIXME: Currently we must test this after toolchain but before flags. Fix!
41513
41514# Now we can test some aspects on the target using configure macros.
41515
41516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41517$as_echo_n "checking for ANSI C header files... " >&6; }
41518if ${ac_cv_header_stdc+:} false; then :
41519  $as_echo_n "(cached) " >&6
41520else
41521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41522/* end confdefs.h.  */
41523#include <stdlib.h>
41524#include <stdarg.h>
41525#include <string.h>
41526#include <float.h>
41527
41528int
41529main ()
41530{
41531
41532  ;
41533  return 0;
41534}
41535_ACEOF
41536if ac_fn_cxx_try_compile "$LINENO"; then :
41537  ac_cv_header_stdc=yes
41538else
41539  ac_cv_header_stdc=no
41540fi
41541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41542
41543if test $ac_cv_header_stdc = yes; then
41544  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41546/* end confdefs.h.  */
41547#include <string.h>
41548
41549_ACEOF
41550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41551  $EGREP "memchr" >/dev/null 2>&1; then :
41552
41553else
41554  ac_cv_header_stdc=no
41555fi
41556rm -f conftest*
41557
41558fi
41559
41560if test $ac_cv_header_stdc = yes; then
41561  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41563/* end confdefs.h.  */
41564#include <stdlib.h>
41565
41566_ACEOF
41567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41568  $EGREP "free" >/dev/null 2>&1; then :
41569
41570else
41571  ac_cv_header_stdc=no
41572fi
41573rm -f conftest*
41574
41575fi
41576
41577if test $ac_cv_header_stdc = yes; then
41578  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41579  if test "$cross_compiling" = yes; then :
41580  :
41581else
41582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41583/* end confdefs.h.  */
41584#include <ctype.h>
41585#include <stdlib.h>
41586#if ((' ' & 0x0FF) == 0x020)
41587# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41588# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41589#else
41590# define ISLOWER(c) \
41591		   (('a' <= (c) && (c) <= 'i') \
41592		     || ('j' <= (c) && (c) <= 'r') \
41593		     || ('s' <= (c) && (c) <= 'z'))
41594# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41595#endif
41596
41597#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41598int
41599main ()
41600{
41601  int i;
41602  for (i = 0; i < 256; i++)
41603    if (XOR (islower (i), ISLOWER (i))
41604	|| toupper (i) != TOUPPER (i))
41605      return 2;
41606  return 0;
41607}
41608_ACEOF
41609if ac_fn_cxx_try_run "$LINENO"; then :
41610
41611else
41612  ac_cv_header_stdc=no
41613fi
41614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41615  conftest.$ac_objext conftest.beam conftest.$ac_ext
41616fi
41617
41618fi
41619fi
41620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41621$as_echo "$ac_cv_header_stdc" >&6; }
41622if test $ac_cv_header_stdc = yes; then
41623
41624$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41625
41626fi
41627
41628# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41629for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41630		  inttypes.h stdint.h unistd.h
41631do :
41632  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41633ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41634"
41635if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41636  cat >>confdefs.h <<_ACEOF
41637#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41638_ACEOF
41639
41640fi
41641
41642done
41643
41644
41645
41646  ###############################################################################
41647  #
41648  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41649  # (The JVM can use 32 or 64 bit Java pointers but that decision
41650  # is made at runtime.)
41651  #
41652
41653  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41654    # Always specify -m flag on Solaris
41655    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41656
41657  # When we add flags to the "official" CFLAGS etc, we need to
41658  # keep track of these additions in ADDED_CFLAGS etc. These
41659  # will later be checked to make sure only controlled additions
41660  # have been made to CFLAGS etc.
41661  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41662  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41663  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41664
41665  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41666  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41667  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41668
41669  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41670  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41671  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41672
41673  elif test "x$COMPILE_TYPE" = xreduced; then
41674    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41675      # Specify -m if running reduced on unix platforms
41676
41677  # When we add flags to the "official" CFLAGS etc, we need to
41678  # keep track of these additions in ADDED_CFLAGS etc. These
41679  # will later be checked to make sure only controlled additions
41680  # have been made to CFLAGS etc.
41681  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41682  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41683  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41684
41685  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41686  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41687  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41688
41689  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41690  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41691  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41692
41693    fi
41694  fi
41695
41696  # Make compilation sanity check
41697  for ac_header in stdio.h
41698do :
41699  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41700if test "x$ac_cv_header_stdio_h" = xyes; then :
41701  cat >>confdefs.h <<_ACEOF
41702#define HAVE_STDIO_H 1
41703_ACEOF
41704
41705else
41706
41707    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41708$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41709    if test "x$COMPILE_TYPE" = xreduced; then
41710      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41711$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41712    elif test "x$COMPILE_TYPE" = xcross; then
41713      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41714$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41715    fi
41716    as_fn_error $? "Cannot continue." "$LINENO" 5
41717
41718fi
41719
41720done
41721
41722
41723  # The cast to long int works around a bug in the HP C Compiler
41724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41726# This bug is HP SR number 8606223364.
41727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41728$as_echo_n "checking size of int *... " >&6; }
41729if ${ac_cv_sizeof_int_p+:} false; then :
41730  $as_echo_n "(cached) " >&6
41731else
41732  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41733
41734else
41735  if test "$ac_cv_type_int_p" = yes; then
41736     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41738as_fn_error 77 "cannot compute sizeof (int *)
41739See \`config.log' for more details" "$LINENO" 5; }
41740   else
41741     ac_cv_sizeof_int_p=0
41742   fi
41743fi
41744
41745fi
41746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41747$as_echo "$ac_cv_sizeof_int_p" >&6; }
41748
41749
41750
41751cat >>confdefs.h <<_ACEOF
41752#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41753_ACEOF
41754
41755
41756
41757  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41758  if test "x$ac_cv_sizeof_int_p" = x; then
41759    # The test failed, lets stick to the assumed value.
41760    { $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
41761$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41762  else
41763    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41764
41765    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41766      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41767      # Let's try to implicitely set the compilers target architecture and retry the test
41768      { $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
41769$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;}
41770      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41771$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41772
41773  # When we add flags to the "official" CFLAGS etc, we need to
41774  # keep track of these additions in ADDED_CFLAGS etc. These
41775  # will later be checked to make sure only controlled additions
41776  # have been made to CFLAGS etc.
41777  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41778  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41779  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41780
41781  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41782  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41783  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41784
41785  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41786  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41787  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41788
41789
41790      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41791      unset ac_cv_sizeof_int_p
41792      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41793      cat >>confdefs.h <<_ACEOF
41794#undef SIZEOF_INT_P
41795_ACEOF
41796
41797      # The cast to long int works around a bug in the HP C Compiler
41798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41800# This bug is HP SR number 8606223364.
41801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41802$as_echo_n "checking size of int *... " >&6; }
41803if ${ac_cv_sizeof_int_p+:} false; then :
41804  $as_echo_n "(cached) " >&6
41805else
41806  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41807
41808else
41809  if test "$ac_cv_type_int_p" = yes; then
41810     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41812as_fn_error 77 "cannot compute sizeof (int *)
41813See \`config.log' for more details" "$LINENO" 5; }
41814   else
41815     ac_cv_sizeof_int_p=0
41816   fi
41817fi
41818
41819fi
41820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41821$as_echo "$ac_cv_sizeof_int_p" >&6; }
41822
41823
41824
41825cat >>confdefs.h <<_ACEOF
41826#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41827_ACEOF
41828
41829
41830
41831      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41832
41833      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41834        as_fn_error $? "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)" "$LINENO" 5
41835      fi
41836    fi
41837  fi
41838
41839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41840$as_echo_n "checking for target address size... " >&6; }
41841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41842$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41843
41844
41845  ###############################################################################
41846  #
41847  # Is the target little of big endian?
41848  #
41849   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41850$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41851if ${ac_cv_c_bigendian+:} false; then :
41852  $as_echo_n "(cached) " >&6
41853else
41854  ac_cv_c_bigendian=unknown
41855    # See if we're dealing with a universal compiler.
41856    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41857/* end confdefs.h.  */
41858#ifndef __APPLE_CC__
41859	       not a universal capable compiler
41860	     #endif
41861	     typedef int dummy;
41862
41863_ACEOF
41864if ac_fn_cxx_try_compile "$LINENO"; then :
41865
41866	# Check for potential -arch flags.  It is not universal unless
41867	# there are at least two -arch flags with different values.
41868	ac_arch=
41869	ac_prev=
41870	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41871	 if test -n "$ac_prev"; then
41872	   case $ac_word in
41873	     i?86 | x86_64 | ppc | ppc64)
41874	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41875		 ac_arch=$ac_word
41876	       else
41877		 ac_cv_c_bigendian=universal
41878		 break
41879	       fi
41880	       ;;
41881	   esac
41882	   ac_prev=
41883	 elif test "x$ac_word" = "x-arch"; then
41884	   ac_prev=arch
41885	 fi
41886       done
41887fi
41888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41889    if test $ac_cv_c_bigendian = unknown; then
41890      # See if sys/param.h defines the BYTE_ORDER macro.
41891      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41892/* end confdefs.h.  */
41893#include <sys/types.h>
41894	     #include <sys/param.h>
41895
41896int
41897main ()
41898{
41899#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41900		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41901		     && LITTLE_ENDIAN)
41902	      bogus endian macros
41903	     #endif
41904
41905  ;
41906  return 0;
41907}
41908_ACEOF
41909if ac_fn_cxx_try_compile "$LINENO"; then :
41910  # It does; now see whether it defined to BIG_ENDIAN or not.
41911	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41912/* end confdefs.h.  */
41913#include <sys/types.h>
41914		#include <sys/param.h>
41915
41916int
41917main ()
41918{
41919#if BYTE_ORDER != BIG_ENDIAN
41920		 not big endian
41921		#endif
41922
41923  ;
41924  return 0;
41925}
41926_ACEOF
41927if ac_fn_cxx_try_compile "$LINENO"; then :
41928  ac_cv_c_bigendian=yes
41929else
41930  ac_cv_c_bigendian=no
41931fi
41932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41933fi
41934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41935    fi
41936    if test $ac_cv_c_bigendian = unknown; then
41937      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41938      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41939/* end confdefs.h.  */
41940#include <limits.h>
41941
41942int
41943main ()
41944{
41945#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41946	      bogus endian macros
41947	     #endif
41948
41949  ;
41950  return 0;
41951}
41952_ACEOF
41953if ac_fn_cxx_try_compile "$LINENO"; then :
41954  # It does; now see whether it defined to _BIG_ENDIAN or not.
41955	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41956/* end confdefs.h.  */
41957#include <limits.h>
41958
41959int
41960main ()
41961{
41962#ifndef _BIG_ENDIAN
41963		 not big endian
41964		#endif
41965
41966  ;
41967  return 0;
41968}
41969_ACEOF
41970if ac_fn_cxx_try_compile "$LINENO"; then :
41971  ac_cv_c_bigendian=yes
41972else
41973  ac_cv_c_bigendian=no
41974fi
41975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41976fi
41977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41978    fi
41979    if test $ac_cv_c_bigendian = unknown; then
41980      # Compile a test program.
41981      if test "$cross_compiling" = yes; then :
41982  # Try to guess by grepping values from an object file.
41983	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41984/* end confdefs.h.  */
41985short int ascii_mm[] =
41986		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41987		short int ascii_ii[] =
41988		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41989		int use_ascii (int i) {
41990		  return ascii_mm[i] + ascii_ii[i];
41991		}
41992		short int ebcdic_ii[] =
41993		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41994		short int ebcdic_mm[] =
41995		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41996		int use_ebcdic (int i) {
41997		  return ebcdic_mm[i] + ebcdic_ii[i];
41998		}
41999		extern int foo;
42000
42001int
42002main ()
42003{
42004return use_ascii (foo) == use_ebcdic (foo);
42005  ;
42006  return 0;
42007}
42008_ACEOF
42009if ac_fn_cxx_try_compile "$LINENO"; then :
42010  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42011	      ac_cv_c_bigendian=yes
42012	    fi
42013	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42014	      if test "$ac_cv_c_bigendian" = unknown; then
42015		ac_cv_c_bigendian=no
42016	      else
42017		# finding both strings is unlikely to happen, but who knows?
42018		ac_cv_c_bigendian=unknown
42019	      fi
42020	    fi
42021fi
42022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42023else
42024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42025/* end confdefs.h.  */
42026$ac_includes_default
42027int
42028main ()
42029{
42030
42031	     /* Are we little or big endian?  From Harbison&Steele.  */
42032	     union
42033	     {
42034	       long int l;
42035	       char c[sizeof (long int)];
42036	     } u;
42037	     u.l = 1;
42038	     return u.c[sizeof (long int) - 1] == 1;
42039
42040  ;
42041  return 0;
42042}
42043_ACEOF
42044if ac_fn_cxx_try_run "$LINENO"; then :
42045  ac_cv_c_bigendian=no
42046else
42047  ac_cv_c_bigendian=yes
42048fi
42049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42050  conftest.$ac_objext conftest.beam conftest.$ac_ext
42051fi
42052
42053    fi
42054fi
42055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42056$as_echo "$ac_cv_c_bigendian" >&6; }
42057 case $ac_cv_c_bigendian in #(
42058   yes)
42059     ENDIAN="big";; #(
42060   no)
42061     ENDIAN="little" ;; #(
42062   universal)
42063     ENDIAN="universal_endianness"
42064     ;; #(
42065   *)
42066     ENDIAN="unknown" ;;
42067 esac
42068
42069
42070  if test "x$ENDIAN" = xuniversal_endianness; then
42071    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42072  fi
42073  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42074    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
42075  fi
42076
42077
42078# Configure flags for the tools
42079
42080  ###############################################################################
42081  #
42082  # How to compile shared libraries.
42083  #
42084
42085  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42086    PICFLAG="-fPIC"
42087    C_FLAG_REORDER=''
42088    CXX_FLAG_REORDER=''
42089
42090    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42091      # Linking is different on MacOSX
42092      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42093      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42094      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42095      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42096      SET_SHARED_LIBRARY_MAPFILE=''
42097    else
42098      # Default works for linux, might work on other platforms as well.
42099      SHARED_LIBRARY_FLAGS='-shared'
42100      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42101      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42102      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42103      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42104    fi
42105  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42106    PICFLAG=''
42107    C_FLAG_REORDER=''
42108    CXX_FLAG_REORDER=''
42109
42110    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42111      # Linking is different on MacOSX
42112      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42113      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42114      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42115      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42116      SET_SHARED_LIBRARY_MAPFILE=''
42117    else
42118      # Default works for linux, might work on other platforms as well.
42119      SHARED_LIBRARY_FLAGS='-shared'
42120      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42121      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42122      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42123      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42124    fi
42125  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42126    PICFLAG="-KPIC"
42127    C_FLAG_REORDER='-xF'
42128    CXX_FLAG_REORDER='-xF'
42129    SHARED_LIBRARY_FLAGS="-G"
42130    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42131    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42132    SET_SHARED_LIBRARY_NAME=''
42133    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42134  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42135    PICFLAG="-qpic=large"
42136    C_FLAG_REORDER=''
42137    CXX_FLAG_REORDER=''
42138    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42139    SET_EXECUTABLE_ORIGIN=""
42140    SET_SHARED_LIBRARY_ORIGIN=''
42141    SET_SHARED_LIBRARY_NAME=''
42142    SET_SHARED_LIBRARY_MAPFILE=''
42143  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42144    PICFLAG=""
42145    C_FLAG_REORDER=''
42146    CXX_FLAG_REORDER=''
42147    SHARED_LIBRARY_FLAGS="-LD"
42148    SET_EXECUTABLE_ORIGIN=''
42149    SET_SHARED_LIBRARY_ORIGIN=''
42150    SET_SHARED_LIBRARY_NAME=''
42151    SET_SHARED_LIBRARY_MAPFILE=''
42152  fi
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42163    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42164    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42165    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42166  fi
42167  # The (cross) compiler is now configured, we can now test capabilities
42168  # of the target platform.
42169
42170
42171
42172  ###############################################################################
42173  #
42174  # Setup the opt flags for different compilers
42175  # and different operating systems.
42176  #
42177
42178  # FIXME: this was indirectly the old default, but just inherited.
42179  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42180  #   C_FLAG_DEPS="-MMD -MF"
42181  # fi
42182
42183  # Generate make dependency files
42184  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42185    C_FLAG_DEPS="-MMD -MF"
42186  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42187    C_FLAG_DEPS="-MMD -MF"
42188  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42189    C_FLAG_DEPS="-xMMD -xMF"
42190  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42191    C_FLAG_DEPS="-qmakedep=gcc -MF"
42192  fi
42193  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42194
42195
42196
42197  # Debug symbols
42198  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42199    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42200      # reduce from default "-g2" option to save space
42201      CFLAGS_DEBUG_SYMBOLS="-g1"
42202      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42203    else
42204      CFLAGS_DEBUG_SYMBOLS="-g"
42205      CXXFLAGS_DEBUG_SYMBOLS="-g"
42206    fi
42207  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42208    CFLAGS_DEBUG_SYMBOLS="-g"
42209    CXXFLAGS_DEBUG_SYMBOLS="-g"
42210  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42211    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42212    # FIXME: likely a bug, this disables debug symbols rather than enables them
42213    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42214  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42215    CFLAGS_DEBUG_SYMBOLS="-g"
42216    CXXFLAGS_DEBUG_SYMBOLS="-g"
42217  fi
42218
42219
42220
42221  # bounds, memory and behavior checking options
42222  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42223    case $DEBUG_LEVEL in
42224    release )
42225      # no adjustment
42226      ;;
42227    fastdebug )
42228      # no adjustment
42229      ;;
42230    slowdebug )
42231      # Add runtime stack smashing and undefined behavior checks
42232      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42233      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42234      ;;
42235    esac
42236  fi
42237
42238
42239
42240  # Optimization levels
42241  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42242    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42243
42244    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42245      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42246      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42247      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42248      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42249      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42250      C_O_FLAG_NONE="-xregs=no%frameptr"
42251      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42252      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42253      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42254      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42255      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42256      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42257        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42258        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42259      fi
42260    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42261      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42262      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42263      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42264      C_O_FLAG_DEBUG=""
42265      C_O_FLAG_NONE=""
42266      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42267      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42268      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42269      C_O_FLAG_DEBUG=""
42270      CXX_O_FLAG_NONE=""
42271    fi
42272  else
42273    # The remaining toolchains share opt flags between CC and CXX;
42274    # setup for C and duplicate afterwards.
42275    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42276      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42277        # On MacOSX we optimize for size, something
42278        # we should do for all platforms?
42279        C_O_FLAG_HIGHEST="-Os"
42280        C_O_FLAG_HI="-Os"
42281        C_O_FLAG_NORM="-Os"
42282      else
42283        C_O_FLAG_HIGHEST="-O3"
42284        C_O_FLAG_HI="-O3"
42285        C_O_FLAG_NORM="-O2"
42286      fi
42287      C_O_FLAG_DEBUG="-O0"
42288      C_O_FLAG_NONE="-O0"
42289    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42290      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42291        # On MacOSX we optimize for size, something
42292        # we should do for all platforms?
42293        C_O_FLAG_HIGHEST="-Os"
42294        C_O_FLAG_HI="-Os"
42295        C_O_FLAG_NORM="-Os"
42296      else
42297        C_O_FLAG_HIGHEST="-O3"
42298        C_O_FLAG_HI="-O3"
42299        C_O_FLAG_NORM="-O2"
42300      fi
42301      C_O_FLAG_DEBUG="-O0"
42302      C_O_FLAG_NONE="-O0"
42303    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42304      C_O_FLAG_HIGHEST="-O3"
42305      C_O_FLAG_HI="-O3 -qstrict"
42306      C_O_FLAG_NORM="-O2"
42307      C_O_FLAG_DEBUG="-qnoopt"
42308      C_O_FLAG_NONE="-qnoop"
42309    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42310      C_O_FLAG_HIGHEST="-O2"
42311      C_O_FLAG_HI="-O1"
42312      C_O_FLAG_NORM="-O1"
42313      C_O_FLAG_DEBUG="-Od"
42314      C_O_FLAG_NONE="-Od"
42315    fi
42316    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42317    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42318    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42319    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42320    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42321  fi
42322
42323  # Adjust optimization flags according to debug level.
42324  case $DEBUG_LEVEL in
42325    release )
42326      # no adjustment
42327      ;;
42328    fastdebug )
42329      # Not quite so much optimization
42330      C_O_FLAG_HI="$C_O_FLAG_NORM"
42331      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42332      ;;
42333    slowdebug )
42334      # Disable optimization
42335      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42336      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42337      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42338      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42339      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42340      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42341      ;;
42342  esac
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356  # Special extras...
42357  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42358    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42359      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42360      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42361    fi
42362  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42363    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42364    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42365    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42366  fi
42367
42368  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42369    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42370$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42371  fi
42372
42373  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42374    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42375$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42376  fi
42377
42378  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42379    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42380$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42381  fi
42382
42383
42384# Check whether --with-extra-cflags was given.
42385if test "${with_extra_cflags+set}" = set; then :
42386  withval=$with_extra_cflags;
42387fi
42388
42389
42390
42391# Check whether --with-extra-cxxflags was given.
42392if test "${with_extra_cxxflags+set}" = set; then :
42393  withval=$with_extra_cxxflags;
42394fi
42395
42396
42397
42398# Check whether --with-extra-ldflags was given.
42399if test "${with_extra_ldflags+set}" = set; then :
42400  withval=$with_extra_ldflags;
42401fi
42402
42403
42404  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42405  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42406  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42407
42408  # Hotspot needs these set in their legacy form
42409  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42410  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42411  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42412
42413
42414
42415
42416
42417  ###############################################################################
42418  #
42419  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42420  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42421  #
42422
42423  # Setup compiler/platform specific flags into
42424  #    CFLAGS_JDK    - C Compiler flags
42425  #    CXXFLAGS_JDK  - C++ Compiler flags
42426  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42427  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42428    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42429        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42430    case $OPENJDK_TARGET_CPU_ARCH in
42431      arm )
42432        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42433        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42434        ;;
42435      ppc )
42436        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42437        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42438        ;;
42439      * )
42440        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42441        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42442        ;;
42443    esac
42444  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42445    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42446    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42447      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42448      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42449    fi
42450
42451    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42452    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42453  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42454    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42455    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42456  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42457    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42458        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42459        -DWIN32_LEAN_AND_MEAN \
42460        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42461        -DWIN32 -DIAL"
42462    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42463      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42464    else
42465      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42466    fi
42467    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42468    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42469    # studio.
42470    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42471      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42472          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42473    fi
42474  fi
42475
42476  ###############################################################################
42477
42478  # Adjust flags according to debug level.
42479  case $DEBUG_LEVEL in
42480    fastdebug | slowdebug )
42481      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42482      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42483      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42484      ;;
42485    release )
42486      ;;
42487    * )
42488      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42489      ;;
42490  esac
42491
42492  # Setup LP64
42493  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42494
42495  # Set some common defines. These works for all compilers, but assume
42496  # -D is universally accepted.
42497
42498  # Setup endianness
42499  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42500    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42501    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42502    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42503    #   Note: -Dmacro         is the same as    #define macro 1
42504    #         -Dmacro=        is the same as    #define macro
42505    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42506      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42507    else
42508      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42509    fi
42510  else
42511    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42512    # are defined in the system?
42513    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42514      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42515    else
42516      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42517    fi
42518  fi
42519
42520  # Setup target OS define. Use OS target name but in upper case.
42521  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42522  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42523
42524  # Setup target CPU
42525  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42526
42527  # Setup debug/release defines
42528  if test "x$DEBUG_LEVEL" = xrelease; then
42529    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42530    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42531      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42532    fi
42533  else
42534    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42535  fi
42536
42537  # Setup release name
42538  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42539
42540
42541  # Set some additional per-OS defines.
42542  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42543    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42544  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42545    # FIXME: PPC64 should not be here.
42546    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42547  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42548    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42549  fi
42550
42551  # Additional macosx handling
42552  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42553    # Setting these parameters makes it an error to link to macosx APIs that are
42554    # newer than the given OS version and makes the linked binaries compatible
42555    # even if built on a newer version of the OS.
42556    # The expected format is X.Y.Z
42557    MACOSX_VERSION_MIN=10.7.0
42558
42559
42560    # The macro takes the version with no dots, ex: 1070
42561    # Let the flags variables get resolved in make for easier override on make
42562    # command line.
42563    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42564    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42565  fi
42566
42567  # Setup some hard coded includes
42568  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42569      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42570      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42571      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42572
42573  # The shared libraries are compiled using the picflag.
42574  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42575  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42576
42577  # Executable flags
42578  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42579  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42580
42581
42582
42583
42584
42585
42586  # Setup LDFLAGS et al.
42587  #
42588
42589  # Now this is odd. The JDK native libraries have to link against libjvm.so
42590  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42591  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42592  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42593  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42594  # libraries will link to whatever is in memory. Yuck.
42595  #
42596  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42597  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42598    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42599    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42600      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42601    fi
42602    # TODO: make -debug optional "--disable-full-debug-symbols"
42603    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42604  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42605    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42606    # We have previously set HAS_GNU_HASH if this is the case
42607    if test -n "$HAS_GNU_HASH"; then
42608      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42609    fi
42610    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42611      # And since we now know that the linker is gnu, then add -z defs, to forbid
42612      # undefined symbols in object files.
42613      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42614      case $DEBUG_LEVEL in
42615        release )
42616          # tell linker to optimize libraries.
42617          # Should this be supplied to the OSS linker as well?
42618          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42619          ;;
42620        slowdebug )
42621          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42622            # do relocations at load
42623            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42624            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42625          fi
42626          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42627            # mark relocations read only
42628            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42629            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42630          fi
42631          ;;
42632        fastdebug )
42633          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42634            # mark relocations read only
42635            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42636            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42637          fi
42638          ;;
42639        * )
42640          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42641          ;;
42642        esac
42643    fi
42644  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42645    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42646    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42647  fi
42648
42649  # Customize LDFLAGS for executables
42650
42651  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42652
42653  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42654    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42655      LDFLAGS_STACK_SIZE=1048576
42656    else
42657      LDFLAGS_STACK_SIZE=327680
42658    fi
42659    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42660  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42661    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42662  fi
42663
42664  # Customize LDFLAGS for libs
42665  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42666
42667  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42668    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42669    LDFLAGS_JDKLIB_SUFFIX=""
42670  else
42671    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42672        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42673
42674    # On some platforms (mac) the linker warns about non existing -L dirs.
42675    # Add server first if available. Linking aginst client does not always produce the same results.
42676    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42677    # Default to server for other variants.
42678    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42679      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42680    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42681      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42682    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42683      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42684    else
42685      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42686    fi
42687
42688    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42689    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42690      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42691    fi
42692  fi
42693
42694
42695
42696
42697
42698
42699
42700
42701  # Some Zero and Shark settings.
42702  # ZERO_ARCHFLAG tells the compiler which mode to build for
42703  case "${OPENJDK_TARGET_CPU}" in
42704    s390)
42705      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42706      ;;
42707    *)
42708      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42709  esac
42710
42711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42712$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42713  supports=yes
42714
42715  saved_cflags="$CFLAGS"
42716  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42717  ac_ext=c
42718ac_cpp='$CPP $CPPFLAGS'
42719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42721ac_compiler_gnu=$ac_cv_c_compiler_gnu
42722
42723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42724/* end confdefs.h.  */
42725int i;
42726_ACEOF
42727if ac_fn_c_try_compile "$LINENO"; then :
42728
42729else
42730  supports=no
42731fi
42732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42733  ac_ext=cpp
42734ac_cpp='$CXXCPP $CPPFLAGS'
42735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42738
42739  CFLAGS="$saved_cflags"
42740
42741  saved_cxxflags="$CXXFLAGS"
42742  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42743  ac_ext=cpp
42744ac_cpp='$CXXCPP $CPPFLAGS'
42745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42748
42749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42750/* end confdefs.h.  */
42751int i;
42752_ACEOF
42753if ac_fn_cxx_try_compile "$LINENO"; then :
42754
42755else
42756  supports=no
42757fi
42758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42759  ac_ext=cpp
42760ac_cpp='$CXXCPP $CPPFLAGS'
42761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42764
42765  CXXFLAGS="$saved_cxxflags"
42766
42767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42768$as_echo "$supports" >&6; }
42769  if test "x$supports" = "xyes" ; then
42770    :
42771  else
42772    ZERO_ARCHFLAG=""
42773  fi
42774
42775
42776
42777  # Check that the compiler supports -mX (or -qX on AIX) flags
42778  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42779
42780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42781$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42782  supports=yes
42783
42784  saved_cflags="$CFLAGS"
42785  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42786  ac_ext=c
42787ac_cpp='$CPP $CPPFLAGS'
42788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42790ac_compiler_gnu=$ac_cv_c_compiler_gnu
42791
42792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42793/* end confdefs.h.  */
42794int i;
42795_ACEOF
42796if ac_fn_c_try_compile "$LINENO"; then :
42797
42798else
42799  supports=no
42800fi
42801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42802  ac_ext=cpp
42803ac_cpp='$CXXCPP $CPPFLAGS'
42804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42807
42808  CFLAGS="$saved_cflags"
42809
42810  saved_cxxflags="$CXXFLAGS"
42811  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42812  ac_ext=cpp
42813ac_cpp='$CXXCPP $CPPFLAGS'
42814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42817
42818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42819/* end confdefs.h.  */
42820int i;
42821_ACEOF
42822if ac_fn_cxx_try_compile "$LINENO"; then :
42823
42824else
42825  supports=no
42826fi
42827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42828  ac_ext=cpp
42829ac_cpp='$CXXCPP $CPPFLAGS'
42830ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42831ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42832ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42833
42834  CXXFLAGS="$saved_cxxflags"
42835
42836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42837$as_echo "$supports" >&6; }
42838  if test "x$supports" = "xyes" ; then
42839    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42840  else
42841    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42842  fi
42843
42844
42845
42846  case "${TOOLCHAIN_TYPE}" in
42847    microsoft)
42848      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42849      ;;
42850    solstudio)
42851      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42852      ;;
42853    gcc)
42854      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42855      ;;
42856    clang)
42857      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42858      ;;
42859  esac
42860
42861
42862
42863# Setup debug symbols (need objcopy from the toolchain for that)
42864
42865  #
42866  # ENABLE_DEBUG_SYMBOLS
42867  # This must be done after the toolchain is setup, since we're looking at objcopy.
42868  #
42869  # Check whether --enable-debug-symbols was given.
42870if test "${enable_debug_symbols+set}" = set; then :
42871  enableval=$enable_debug_symbols;
42872fi
42873
42874
42875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42876$as_echo_n "checking if we should generate debug symbols... " >&6; }
42877
42878  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42879    # explicit enabling of enable-debug-symbols and can't find objcopy
42880    #   this is an error
42881    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42882  fi
42883
42884  if test "x$enable_debug_symbols" = "xyes"; then
42885    ENABLE_DEBUG_SYMBOLS=true
42886  elif test "x$enable_debug_symbols" = "xno"; then
42887    ENABLE_DEBUG_SYMBOLS=false
42888  else
42889    # Default is on if objcopy is found
42890    if test "x$OBJCOPY" != x; then
42891      ENABLE_DEBUG_SYMBOLS=true
42892    # MacOS X and Windows don't use objcopy but default is on for those OSes
42893    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42894      ENABLE_DEBUG_SYMBOLS=true
42895    else
42896      ENABLE_DEBUG_SYMBOLS=false
42897    fi
42898  fi
42899
42900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42901$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42902
42903  #
42904  # ZIP_DEBUGINFO_FILES
42905  #
42906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42907$as_echo_n "checking if we should zip debug-info files... " >&6; }
42908  # Check whether --enable-zip-debug-info was given.
42909if test "${enable_zip_debug_info+set}" = set; then :
42910  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42911else
42912  enable_zip_debug_info="yes"
42913fi
42914
42915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42916$as_echo "${enable_zip_debug_info}" >&6; }
42917
42918  if test "x${enable_zip_debug_info}" = "xno"; then
42919    ZIP_DEBUGINFO_FILES=false
42920  else
42921    ZIP_DEBUGINFO_FILES=true
42922  fi
42923
42924
42925
42926
42927
42928###############################################################################
42929#
42930# Check dependencies for external and internal libraries.
42931#
42932###############################################################################
42933
42934# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42935
42936  # When using cygwin or msys, we need a wrapper binary that renames
42937  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42938  # @files and rewrites these too! This wrapper binary is
42939  # called fixpath.
42940  FIXPATH=
42941  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42943$as_echo_n "checking if fixpath can be created... " >&6; }
42944    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42945    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42946    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42947      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42948      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42949      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42950      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42951    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42952      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42953      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42954
42955      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42956      # @ was chosen as separator to minimize risk of other tools messing around with it
42957      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42958      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42959
42960      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42961    fi
42962    rm -f $OUTPUT_ROOT/fixpath*
42963    cd $OUTPUT_ROOT
42964    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42965    cd $CURDIR
42966
42967    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42969$as_echo "no" >&6; }
42970      cat $OUTPUT_ROOT/fixpath1.log
42971      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42972    fi
42973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42974$as_echo "yes" >&6; }
42975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42976$as_echo_n "checking if fixpath.exe works... " >&6; }
42977    cd $OUTPUT_ROOT
42978    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42979    cd $CURDIR
42980    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42982$as_echo "no" >&6; }
42983      cat $OUTPUT_ROOT/fixpath2.log
42984      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42985    fi
42986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42987$as_echo "yes" >&6; }
42988    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42989  fi
42990
42991
42992
42993
42994
42995
42996  ###############################################################################
42997  #
42998  # OS specific settings that we never will need to probe.
42999  #
43000  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43002$as_echo_n "checking what is not needed on Linux?... " >&6; }
43003    PULSE_NOT_NEEDED=yes
43004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43005$as_echo "pulse" >&6; }
43006  fi
43007
43008  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43010$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43011    ALSA_NOT_NEEDED=yes
43012    PULSE_NOT_NEEDED=yes
43013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43014$as_echo "alsa pulse" >&6; }
43015  fi
43016
43017  if test "x$OPENJDK_TARGET_OS" = xaix; then
43018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43019$as_echo_n "checking what is not needed on AIX?... " >&6; }
43020    ALSA_NOT_NEEDED=yes
43021    PULSE_NOT_NEEDED=yes
43022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43023$as_echo "alsa pulse" >&6; }
43024  fi
43025
43026
43027  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43029$as_echo_n "checking what is not needed on Windows?... " >&6; }
43030    CUPS_NOT_NEEDED=yes
43031    ALSA_NOT_NEEDED=yes
43032    PULSE_NOT_NEEDED=yes
43033    X11_NOT_NEEDED=yes
43034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43035$as_echo "alsa cups pulse x11" >&6; }
43036  fi
43037
43038  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43040$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43041    ALSA_NOT_NEEDED=yes
43042    PULSE_NOT_NEEDED=yes
43043    X11_NOT_NEEDED=yes
43044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43045$as_echo "alsa pulse x11" >&6; }
43046  fi
43047
43048  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43050$as_echo_n "checking what is not needed on bsd?... " >&6; }
43051    ALSA_NOT_NEEDED=yes
43052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43053$as_echo "alsa" >&6; }
43054  fi
43055
43056  if test "x$OPENJDK" = "xfalse"; then
43057    FREETYPE_NOT_NEEDED=yes
43058  fi
43059
43060  if test "x$SUPPORT_HEADFUL" = xno; then
43061    X11_NOT_NEEDED=yes
43062  fi
43063
43064
43065
43066  ###############################################################################
43067  #
43068  # Check for X Windows
43069  #
43070
43071  if test "x$X11_NOT_NEEDED" = xyes; then
43072    if test "x${with_x}" != x; then
43073      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43074$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43075    fi
43076    X_CFLAGS=
43077    X_LIBS=
43078  else
43079    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43080    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43081    # --x-libraries for the sysroot, if that seems to be correct.
43082    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43083      if test "x$SYSROOT" != "x"; then
43084        if test "x$x_includes" = xNONE; then
43085          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43086            x_includes="$SYSROOT/usr/X11R6/include"
43087          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43088            x_includes="$SYSROOT/usr/include"
43089          fi
43090        fi
43091        if test "x$x_libraries" = xNONE; then
43092          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43093            x_libraries="$SYSROOT/usr/X11R6/lib"
43094          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43095            x_libraries="$SYSROOT/usr/lib64"
43096          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43097            x_libraries="$SYSROOT/usr/lib"
43098          fi
43099        fi
43100      fi
43101    fi
43102
43103    # Now let autoconf do it's magic
43104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43105$as_echo_n "checking for X... " >&6; }
43106
43107
43108# Check whether --with-x was given.
43109if test "${with_x+set}" = set; then :
43110  withval=$with_x;
43111fi
43112
43113# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43114if test "x$with_x" = xno; then
43115  # The user explicitly disabled X.
43116  have_x=disabled
43117else
43118  case $x_includes,$x_libraries in #(
43119    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43120    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43121  $as_echo_n "(cached) " >&6
43122else
43123  # One or both of the vars are not set, and there is no cached value.
43124ac_x_includes=no ac_x_libraries=no
43125rm -f -r conftest.dir
43126if mkdir conftest.dir; then
43127  cd conftest.dir
43128  cat >Imakefile <<'_ACEOF'
43129incroot:
43130	@echo incroot='${INCROOT}'
43131usrlibdir:
43132	@echo usrlibdir='${USRLIBDIR}'
43133libdir:
43134	@echo libdir='${LIBDIR}'
43135_ACEOF
43136  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43137    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43138    for ac_var in incroot usrlibdir libdir; do
43139      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43140    done
43141    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43142    for ac_extension in a so sl dylib la dll; do
43143      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43144	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43145	ac_im_usrlibdir=$ac_im_libdir; break
43146      fi
43147    done
43148    # Screen out bogus values from the imake configuration.  They are
43149    # bogus both because they are the default anyway, and because
43150    # using them would break gcc on systems where it needs fixed includes.
43151    case $ac_im_incroot in
43152	/usr/include) ac_x_includes= ;;
43153	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43154    esac
43155    case $ac_im_usrlibdir in
43156	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43157	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43158    esac
43159  fi
43160  cd ..
43161  rm -f -r conftest.dir
43162fi
43163
43164# Standard set of common directories for X headers.
43165# Check X11 before X11Rn because it is often a symlink to the current release.
43166ac_x_header_dirs='
43167/usr/X11/include
43168/usr/X11R7/include
43169/usr/X11R6/include
43170/usr/X11R5/include
43171/usr/X11R4/include
43172
43173/usr/include/X11
43174/usr/include/X11R7
43175/usr/include/X11R6
43176/usr/include/X11R5
43177/usr/include/X11R4
43178
43179/usr/local/X11/include
43180/usr/local/X11R7/include
43181/usr/local/X11R6/include
43182/usr/local/X11R5/include
43183/usr/local/X11R4/include
43184
43185/usr/local/include/X11
43186/usr/local/include/X11R7
43187/usr/local/include/X11R6
43188/usr/local/include/X11R5
43189/usr/local/include/X11R4
43190
43191/usr/X386/include
43192/usr/x386/include
43193/usr/XFree86/include/X11
43194
43195/usr/include
43196/usr/local/include
43197/usr/unsupported/include
43198/usr/athena/include
43199/usr/local/x11r5/include
43200/usr/lpp/Xamples/include
43201
43202/usr/openwin/include
43203/usr/openwin/share/include'
43204
43205if test "$ac_x_includes" = no; then
43206  # Guess where to find include files, by looking for Xlib.h.
43207  # First, try using that file with no special directory specified.
43208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43209/* end confdefs.h.  */
43210#include <X11/Xlib.h>
43211_ACEOF
43212if ac_fn_cxx_try_cpp "$LINENO"; then :
43213  # We can compile using X headers with no special include directory.
43214ac_x_includes=
43215else
43216  for ac_dir in $ac_x_header_dirs; do
43217  if test -r "$ac_dir/X11/Xlib.h"; then
43218    ac_x_includes=$ac_dir
43219    break
43220  fi
43221done
43222fi
43223rm -f conftest.err conftest.i conftest.$ac_ext
43224fi # $ac_x_includes = no
43225
43226if test "$ac_x_libraries" = no; then
43227  # Check for the libraries.
43228  # See if we find them without any special options.
43229  # Don't add to $LIBS permanently.
43230  ac_save_LIBS=$LIBS
43231  LIBS="-lX11 $LIBS"
43232  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43233/* end confdefs.h.  */
43234#include <X11/Xlib.h>
43235int
43236main ()
43237{
43238XrmInitialize ()
43239  ;
43240  return 0;
43241}
43242_ACEOF
43243if ac_fn_cxx_try_link "$LINENO"; then :
43244  LIBS=$ac_save_LIBS
43245# We can link X programs with no special library path.
43246ac_x_libraries=
43247else
43248  LIBS=$ac_save_LIBS
43249for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43250do
43251  # Don't even attempt the hair of trying to link an X program!
43252  for ac_extension in a so sl dylib la dll; do
43253    if test -r "$ac_dir/libX11.$ac_extension"; then
43254      ac_x_libraries=$ac_dir
43255      break 2
43256    fi
43257  done
43258done
43259fi
43260rm -f core conftest.err conftest.$ac_objext \
43261    conftest$ac_exeext conftest.$ac_ext
43262fi # $ac_x_libraries = no
43263
43264case $ac_x_includes,$ac_x_libraries in #(
43265  no,* | *,no | *\'*)
43266    # Didn't find X, or a directory has "'" in its name.
43267    ac_cv_have_x="have_x=no";; #(
43268  *)
43269    # Record where we found X for the cache.
43270    ac_cv_have_x="have_x=yes\
43271	ac_x_includes='$ac_x_includes'\
43272	ac_x_libraries='$ac_x_libraries'"
43273esac
43274fi
43275;; #(
43276    *) have_x=yes;;
43277  esac
43278  eval "$ac_cv_have_x"
43279fi # $with_x != no
43280
43281if test "$have_x" != yes; then
43282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43283$as_echo "$have_x" >&6; }
43284  no_x=yes
43285else
43286  # If each of the values was on the command line, it overrides each guess.
43287  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43288  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43289  # Update the cache value to reflect the command line values.
43290  ac_cv_have_x="have_x=yes\
43291	ac_x_includes='$x_includes'\
43292	ac_x_libraries='$x_libraries'"
43293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43294$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43295fi
43296
43297    if test "$no_x" = yes; then
43298  # Not all programs may use this symbol, but it does not hurt to define it.
43299
43300$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43301
43302  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43303else
43304  if test -n "$x_includes"; then
43305    X_CFLAGS="$X_CFLAGS -I$x_includes"
43306  fi
43307
43308  # It would also be nice to do this for all -L options, not just this one.
43309  if test -n "$x_libraries"; then
43310    X_LIBS="$X_LIBS -L$x_libraries"
43311    # For Solaris; some versions of Sun CC require a space after -R and
43312    # others require no space.  Words are not sufficient . . . .
43313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43314$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43315    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43316    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43317    ac_cxx_werror_flag=yes
43318    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43319/* end confdefs.h.  */
43320
43321int
43322main ()
43323{
43324
43325  ;
43326  return 0;
43327}
43328_ACEOF
43329if ac_fn_cxx_try_link "$LINENO"; then :
43330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43331$as_echo "no" >&6; }
43332       X_LIBS="$X_LIBS -R$x_libraries"
43333else
43334  LIBS="$ac_xsave_LIBS -R $x_libraries"
43335       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43336/* end confdefs.h.  */
43337
43338int
43339main ()
43340{
43341
43342  ;
43343  return 0;
43344}
43345_ACEOF
43346if ac_fn_cxx_try_link "$LINENO"; then :
43347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43348$as_echo "yes" >&6; }
43349	  X_LIBS="$X_LIBS -R $x_libraries"
43350else
43351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43352$as_echo "neither works" >&6; }
43353fi
43354rm -f core conftest.err conftest.$ac_objext \
43355    conftest$ac_exeext conftest.$ac_ext
43356fi
43357rm -f core conftest.err conftest.$ac_objext \
43358    conftest$ac_exeext conftest.$ac_ext
43359    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43360    LIBS=$ac_xsave_LIBS
43361  fi
43362
43363  # Check for system-dependent libraries X programs must link with.
43364  # Do this before checking for the system-independent R6 libraries
43365  # (-lICE), since we may need -lsocket or whatever for X linking.
43366
43367  if test "$ISC" = yes; then
43368    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43369  else
43370    # Martyn Johnson says this is needed for Ultrix, if the X
43371    # libraries were built with DECnet support.  And Karl Berry says
43372    # the Alpha needs dnet_stub (dnet does not exist).
43373    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43374    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43375/* end confdefs.h.  */
43376
43377/* Override any GCC internal prototype to avoid an error.
43378   Use char because int might match the return type of a GCC
43379   builtin and then its argument prototype would still apply.  */
43380#ifdef __cplusplus
43381extern "C"
43382#endif
43383char XOpenDisplay ();
43384int
43385main ()
43386{
43387return XOpenDisplay ();
43388  ;
43389  return 0;
43390}
43391_ACEOF
43392if ac_fn_cxx_try_link "$LINENO"; then :
43393
43394else
43395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43396$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43397if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43398  $as_echo_n "(cached) " >&6
43399else
43400  ac_check_lib_save_LIBS=$LIBS
43401LIBS="-ldnet  $LIBS"
43402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43403/* end confdefs.h.  */
43404
43405/* Override any GCC internal prototype to avoid an error.
43406   Use char because int might match the return type of a GCC
43407   builtin and then its argument prototype would still apply.  */
43408#ifdef __cplusplus
43409extern "C"
43410#endif
43411char dnet_ntoa ();
43412int
43413main ()
43414{
43415return dnet_ntoa ();
43416  ;
43417  return 0;
43418}
43419_ACEOF
43420if ac_fn_cxx_try_link "$LINENO"; then :
43421  ac_cv_lib_dnet_dnet_ntoa=yes
43422else
43423  ac_cv_lib_dnet_dnet_ntoa=no
43424fi
43425rm -f core conftest.err conftest.$ac_objext \
43426    conftest$ac_exeext conftest.$ac_ext
43427LIBS=$ac_check_lib_save_LIBS
43428fi
43429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43430$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43431if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43432  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43433fi
43434
43435    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43437$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43438if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43439  $as_echo_n "(cached) " >&6
43440else
43441  ac_check_lib_save_LIBS=$LIBS
43442LIBS="-ldnet_stub  $LIBS"
43443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43444/* end confdefs.h.  */
43445
43446/* Override any GCC internal prototype to avoid an error.
43447   Use char because int might match the return type of a GCC
43448   builtin and then its argument prototype would still apply.  */
43449#ifdef __cplusplus
43450extern "C"
43451#endif
43452char dnet_ntoa ();
43453int
43454main ()
43455{
43456return dnet_ntoa ();
43457  ;
43458  return 0;
43459}
43460_ACEOF
43461if ac_fn_cxx_try_link "$LINENO"; then :
43462  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43463else
43464  ac_cv_lib_dnet_stub_dnet_ntoa=no
43465fi
43466rm -f core conftest.err conftest.$ac_objext \
43467    conftest$ac_exeext conftest.$ac_ext
43468LIBS=$ac_check_lib_save_LIBS
43469fi
43470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43471$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43472if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43473  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43474fi
43475
43476    fi
43477fi
43478rm -f core conftest.err conftest.$ac_objext \
43479    conftest$ac_exeext conftest.$ac_ext
43480    LIBS="$ac_xsave_LIBS"
43481
43482    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43483    # to get the SysV transport functions.
43484    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43485    # needs -lnsl.
43486    # The nsl library prevents programs from opening the X display
43487    # on Irix 5.2, according to T.E. Dickey.
43488    # The functions gethostbyname, getservbyname, and inet_addr are
43489    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43490    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43491if test "x$ac_cv_func_gethostbyname" = xyes; then :
43492
43493fi
43494
43495    if test $ac_cv_func_gethostbyname = no; then
43496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43497$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43498if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43499  $as_echo_n "(cached) " >&6
43500else
43501  ac_check_lib_save_LIBS=$LIBS
43502LIBS="-lnsl  $LIBS"
43503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43504/* end confdefs.h.  */
43505
43506/* Override any GCC internal prototype to avoid an error.
43507   Use char because int might match the return type of a GCC
43508   builtin and then its argument prototype would still apply.  */
43509#ifdef __cplusplus
43510extern "C"
43511#endif
43512char gethostbyname ();
43513int
43514main ()
43515{
43516return gethostbyname ();
43517  ;
43518  return 0;
43519}
43520_ACEOF
43521if ac_fn_cxx_try_link "$LINENO"; then :
43522  ac_cv_lib_nsl_gethostbyname=yes
43523else
43524  ac_cv_lib_nsl_gethostbyname=no
43525fi
43526rm -f core conftest.err conftest.$ac_objext \
43527    conftest$ac_exeext conftest.$ac_ext
43528LIBS=$ac_check_lib_save_LIBS
43529fi
43530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43531$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43532if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43533  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43534fi
43535
43536      if test $ac_cv_lib_nsl_gethostbyname = no; then
43537	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43538$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43539if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43540  $as_echo_n "(cached) " >&6
43541else
43542  ac_check_lib_save_LIBS=$LIBS
43543LIBS="-lbsd  $LIBS"
43544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43545/* end confdefs.h.  */
43546
43547/* Override any GCC internal prototype to avoid an error.
43548   Use char because int might match the return type of a GCC
43549   builtin and then its argument prototype would still apply.  */
43550#ifdef __cplusplus
43551extern "C"
43552#endif
43553char gethostbyname ();
43554int
43555main ()
43556{
43557return gethostbyname ();
43558  ;
43559  return 0;
43560}
43561_ACEOF
43562if ac_fn_cxx_try_link "$LINENO"; then :
43563  ac_cv_lib_bsd_gethostbyname=yes
43564else
43565  ac_cv_lib_bsd_gethostbyname=no
43566fi
43567rm -f core conftest.err conftest.$ac_objext \
43568    conftest$ac_exeext conftest.$ac_ext
43569LIBS=$ac_check_lib_save_LIBS
43570fi
43571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43572$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43573if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43574  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43575fi
43576
43577      fi
43578    fi
43579
43580    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43581    # socket/setsockopt and other routines are undefined under SCO ODT
43582    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43583    # on later versions), says Simon Leinen: it contains gethostby*
43584    # variants that don't use the name server (or something).  -lsocket
43585    # must be given before -lnsl if both are needed.  We assume that
43586    # if connect needs -lnsl, so does gethostbyname.
43587    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43588if test "x$ac_cv_func_connect" = xyes; then :
43589
43590fi
43591
43592    if test $ac_cv_func_connect = no; then
43593      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43594$as_echo_n "checking for connect in -lsocket... " >&6; }
43595if ${ac_cv_lib_socket_connect+:} false; then :
43596  $as_echo_n "(cached) " >&6
43597else
43598  ac_check_lib_save_LIBS=$LIBS
43599LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43601/* end confdefs.h.  */
43602
43603/* Override any GCC internal prototype to avoid an error.
43604   Use char because int might match the return type of a GCC
43605   builtin and then its argument prototype would still apply.  */
43606#ifdef __cplusplus
43607extern "C"
43608#endif
43609char connect ();
43610int
43611main ()
43612{
43613return connect ();
43614  ;
43615  return 0;
43616}
43617_ACEOF
43618if ac_fn_cxx_try_link "$LINENO"; then :
43619  ac_cv_lib_socket_connect=yes
43620else
43621  ac_cv_lib_socket_connect=no
43622fi
43623rm -f core conftest.err conftest.$ac_objext \
43624    conftest$ac_exeext conftest.$ac_ext
43625LIBS=$ac_check_lib_save_LIBS
43626fi
43627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43628$as_echo "$ac_cv_lib_socket_connect" >&6; }
43629if test "x$ac_cv_lib_socket_connect" = xyes; then :
43630  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43631fi
43632
43633    fi
43634
43635    # Guillermo Gomez says -lposix is necessary on A/UX.
43636    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43637if test "x$ac_cv_func_remove" = xyes; then :
43638
43639fi
43640
43641    if test $ac_cv_func_remove = no; then
43642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43643$as_echo_n "checking for remove in -lposix... " >&6; }
43644if ${ac_cv_lib_posix_remove+:} false; then :
43645  $as_echo_n "(cached) " >&6
43646else
43647  ac_check_lib_save_LIBS=$LIBS
43648LIBS="-lposix  $LIBS"
43649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43650/* end confdefs.h.  */
43651
43652/* Override any GCC internal prototype to avoid an error.
43653   Use char because int might match the return type of a GCC
43654   builtin and then its argument prototype would still apply.  */
43655#ifdef __cplusplus
43656extern "C"
43657#endif
43658char remove ();
43659int
43660main ()
43661{
43662return remove ();
43663  ;
43664  return 0;
43665}
43666_ACEOF
43667if ac_fn_cxx_try_link "$LINENO"; then :
43668  ac_cv_lib_posix_remove=yes
43669else
43670  ac_cv_lib_posix_remove=no
43671fi
43672rm -f core conftest.err conftest.$ac_objext \
43673    conftest$ac_exeext conftest.$ac_ext
43674LIBS=$ac_check_lib_save_LIBS
43675fi
43676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43677$as_echo "$ac_cv_lib_posix_remove" >&6; }
43678if test "x$ac_cv_lib_posix_remove" = xyes; then :
43679  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43680fi
43681
43682    fi
43683
43684    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43685    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43686if test "x$ac_cv_func_shmat" = xyes; then :
43687
43688fi
43689
43690    if test $ac_cv_func_shmat = no; then
43691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43692$as_echo_n "checking for shmat in -lipc... " >&6; }
43693if ${ac_cv_lib_ipc_shmat+:} false; then :
43694  $as_echo_n "(cached) " >&6
43695else
43696  ac_check_lib_save_LIBS=$LIBS
43697LIBS="-lipc  $LIBS"
43698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43699/* end confdefs.h.  */
43700
43701/* Override any GCC internal prototype to avoid an error.
43702   Use char because int might match the return type of a GCC
43703   builtin and then its argument prototype would still apply.  */
43704#ifdef __cplusplus
43705extern "C"
43706#endif
43707char shmat ();
43708int
43709main ()
43710{
43711return shmat ();
43712  ;
43713  return 0;
43714}
43715_ACEOF
43716if ac_fn_cxx_try_link "$LINENO"; then :
43717  ac_cv_lib_ipc_shmat=yes
43718else
43719  ac_cv_lib_ipc_shmat=no
43720fi
43721rm -f core conftest.err conftest.$ac_objext \
43722    conftest$ac_exeext conftest.$ac_ext
43723LIBS=$ac_check_lib_save_LIBS
43724fi
43725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43726$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43727if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43728  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43729fi
43730
43731    fi
43732  fi
43733
43734  # Check for libraries that X11R6 Xt/Xaw programs need.
43735  ac_save_LDFLAGS=$LDFLAGS
43736  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43737  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43738  # check for ICE first), but we must link in the order -lSM -lICE or
43739  # we get undefined symbols.  So assume we have SM if we have ICE.
43740  # These have to be linked with before -lX11, unlike the other
43741  # libraries we check for below, so use a different variable.
43742  # John Interrante, Karl Berry
43743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43744$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43745if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43746  $as_echo_n "(cached) " >&6
43747else
43748  ac_check_lib_save_LIBS=$LIBS
43749LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43751/* end confdefs.h.  */
43752
43753/* Override any GCC internal prototype to avoid an error.
43754   Use char because int might match the return type of a GCC
43755   builtin and then its argument prototype would still apply.  */
43756#ifdef __cplusplus
43757extern "C"
43758#endif
43759char IceConnectionNumber ();
43760int
43761main ()
43762{
43763return IceConnectionNumber ();
43764  ;
43765  return 0;
43766}
43767_ACEOF
43768if ac_fn_cxx_try_link "$LINENO"; then :
43769  ac_cv_lib_ICE_IceConnectionNumber=yes
43770else
43771  ac_cv_lib_ICE_IceConnectionNumber=no
43772fi
43773rm -f core conftest.err conftest.$ac_objext \
43774    conftest$ac_exeext conftest.$ac_ext
43775LIBS=$ac_check_lib_save_LIBS
43776fi
43777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43778$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43779if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43780  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43781fi
43782
43783  LDFLAGS=$ac_save_LDFLAGS
43784
43785fi
43786
43787
43788    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43789    # this doesn't make sense so we remove it.
43790    if test "x$COMPILE_TYPE" = xcross; then
43791      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43792    fi
43793
43794    if test "x$no_x" = xyes; then
43795
43796  # Print a helpful message on how to acquire the necessary build dependency.
43797  # x11 is the help tag: freetype, cups, pulse, alsa etc
43798  MISSING_DEPENDENCY=x11
43799
43800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43801    cygwin_help $MISSING_DEPENDENCY
43802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43803    msys_help $MISSING_DEPENDENCY
43804  else
43805    PKGHANDLER_COMMAND=
43806
43807    case $PKGHANDLER in
43808      apt-get)
43809        apt_help     $MISSING_DEPENDENCY ;;
43810      yum)
43811        yum_help     $MISSING_DEPENDENCY ;;
43812      port)
43813        port_help    $MISSING_DEPENDENCY ;;
43814      pkgutil)
43815        pkgutil_help $MISSING_DEPENDENCY ;;
43816      pkgadd)
43817        pkgadd_help  $MISSING_DEPENDENCY ;;
43818    esac
43819
43820    if test "x$PKGHANDLER_COMMAND" != x; then
43821      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43822    fi
43823  fi
43824
43825      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43826    fi
43827
43828    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43829      OPENWIN_HOME="/usr/openwin"
43830      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43831      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43832          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43833          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43834          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43835    fi
43836
43837    ac_ext=c
43838ac_cpp='$CPP $CPPFLAGS'
43839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43841ac_compiler_gnu=$ac_cv_c_compiler_gnu
43842
43843    OLD_CFLAGS="$CFLAGS"
43844    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43845
43846    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43847    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43848do :
43849  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43850ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43851          # include <X11/Xlib.h>
43852          # include <X11/Xutil.h>
43853
43854
43855"
43856if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43857  cat >>confdefs.h <<_ACEOF
43858#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43859_ACEOF
43860 X11_HEADERS_OK=yes
43861else
43862  X11_HEADERS_OK=no; break
43863fi
43864
43865done
43866
43867
43868    if test "x$X11_HEADERS_OK" = xno; then
43869
43870  # Print a helpful message on how to acquire the necessary build dependency.
43871  # x11 is the help tag: freetype, cups, pulse, alsa etc
43872  MISSING_DEPENDENCY=x11
43873
43874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43875    cygwin_help $MISSING_DEPENDENCY
43876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43877    msys_help $MISSING_DEPENDENCY
43878  else
43879    PKGHANDLER_COMMAND=
43880
43881    case $PKGHANDLER in
43882      apt-get)
43883        apt_help     $MISSING_DEPENDENCY ;;
43884      yum)
43885        yum_help     $MISSING_DEPENDENCY ;;
43886      port)
43887        port_help    $MISSING_DEPENDENCY ;;
43888      pkgutil)
43889        pkgutil_help $MISSING_DEPENDENCY ;;
43890      pkgadd)
43891        pkgadd_help  $MISSING_DEPENDENCY ;;
43892    esac
43893
43894    if test "x$PKGHANDLER_COMMAND" != x; then
43895      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43896    fi
43897  fi
43898
43899      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43900    fi
43901
43902    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43903    # defined in libawt_xawt.
43904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43905$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43906    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43907/* end confdefs.h.  */
43908#include <X11/extensions/Xrender.h>
43909int
43910main ()
43911{
43912XLinearGradient x;
43913  ;
43914  return 0;
43915}
43916_ACEOF
43917if ac_fn_c_try_compile "$LINENO"; then :
43918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43919$as_echo "yes" >&6; }
43920else
43921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43922$as_echo "no" >&6; }
43923         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43924fi
43925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43926
43927    CFLAGS="$OLD_CFLAGS"
43928    ac_ext=cpp
43929ac_cpp='$CXXCPP $CPPFLAGS'
43930ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43931ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43932ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43933
43934  fi # X11_NOT_NEEDED
43935
43936
43937
43938
43939
43940
43941  ###############################################################################
43942  #
43943  # The common unix printing system cups is used to print from java.
43944  #
43945
43946# Check whether --with-cups was given.
43947if test "${with_cups+set}" = set; then :
43948  withval=$with_cups;
43949fi
43950
43951
43952# Check whether --with-cups-include was given.
43953if test "${with_cups_include+set}" = set; then :
43954  withval=$with_cups_include;
43955fi
43956
43957
43958  if test "x$CUPS_NOT_NEEDED" = xyes; then
43959    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43960      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43961$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43962    fi
43963    CUPS_CFLAGS=
43964  else
43965    CUPS_FOUND=no
43966
43967    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43968      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43969    fi
43970
43971    if test "x${with_cups}" != x; then
43972      CUPS_CFLAGS="-I${with_cups}/include"
43973      CUPS_FOUND=yes
43974    fi
43975    if test "x${with_cups_include}" != x; then
43976      CUPS_CFLAGS="-I${with_cups_include}"
43977      CUPS_FOUND=yes
43978    fi
43979    if test "x$CUPS_FOUND" = xno; then
43980
43981
43982  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43983    # Source the builddeps file again, to make sure it uses the latest variables!
43984    . $builddepsfile
43985    # Look for a target and build machine specific resource!
43986    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43987    if test "x$resource" = x; then
43988      # Ok, lets instead look for a target specific resource
43989      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43990    fi
43991    if test "x$resource" = x; then
43992      # Ok, lets instead look for a build specific resource
43993      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43994    fi
43995    if test "x$resource" = x; then
43996      # Ok, lets instead look for a generic resource
43997      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43998      resource=${builddep_cups}
43999    fi
44000    if test "x$resource" != x; then
44001      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44002$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44003      # If the resource in the builddeps.conf file is an existing directory,
44004      # for example /java/linux/cups
44005      if test -d ${resource}; then
44006        depdir=${resource}
44007      else
44008
44009  # cups is for example mymodule
44010  # $resource is for example libs/general/libmymod_1_2_3.zip
44011  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44012  # $with_builddeps_dir is for example /localhome/builddeps
44013  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44014  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44015  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44016  filename=`basename $resource`
44017  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44018  filebase=${filename%%.*}
44019  extension=${filename#*.}
44020  installdir=$with_builddeps_dir/$filebase
44021  if test ! -f $installdir/$filename.unpacked; then
44022    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44023$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44024    if test ! -d $installdir; then
44025      mkdir -p $installdir
44026    fi
44027    if test ! -d $installdir; then
44028      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44029    fi
44030    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44031    touch $tmpfile
44032    if test ! -f $tmpfile; then
44033      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44034    fi
44035
44036  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44037  # $tmpfile is the local file name for the downloaded file.
44038  VALID_TOOL=no
44039  if test "x$BDEPS_FTP" = xwget; then
44040    VALID_TOOL=yes
44041    wget -O $tmpfile $with_builddeps_server/$resource
44042  fi
44043  if test "x$BDEPS_FTP" = xlftp; then
44044    VALID_TOOL=yes
44045    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44046  fi
44047  if test "x$BDEPS_FTP" = xftp; then
44048    VALID_TOOL=yes
44049    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44050    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44051    FTPUSERPWD=${FTPSERVER%%@*}
44052    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44053      FTPUSER=${userpwd%%:*}
44054      FTPPWD=${userpwd#*@}
44055      FTPSERVER=${FTPSERVER#*@}
44056    else
44057      FTPUSER=ftp
44058      FTPPWD=ftp
44059    fi
44060    # the "pass" command does not work on some
44061    # ftp clients (read ftp.exe) but if it works,
44062    # passive mode is better!
44063    ( \
44064        echo "user $FTPUSER $FTPPWD"        ; \
44065        echo "pass"                         ; \
44066        echo "bin"                          ; \
44067        echo "get $FTPPATH $tmpfile"              ; \
44068    ) | ftp -in $FTPSERVER
44069  fi
44070  if test "x$VALID_TOOL" != xyes; then
44071    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44072  fi
44073
44074    mv $tmpfile $installdir/$filename
44075    if test ! -s $installdir/$filename; then
44076      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44077    fi
44078    case "$extension" in
44079      zip)  echo "Unzipping $installdir/$filename..."
44080        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44081        ;;
44082      tar.gz) echo "Untaring $installdir/$filename..."
44083        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44084        ;;
44085      tgz) echo "Untaring $installdir/$filename..."
44086        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44087        ;;
44088      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44089        ;;
44090    esac
44091  fi
44092  if test -f $installdir/$filename.unpacked; then
44093    depdir=$installdir
44094  fi
44095
44096      fi
44097      # Source the builddeps file again, because in the previous command, the depdir
44098      # was updated to point at the current build dependency install directory.
44099      . $builddepsfile
44100      # Now extract variables from the builddeps.conf files.
44101      theroot=${builddep_cups_ROOT}
44102      thecflags=${builddep_cups_CFLAGS}
44103      thelibs=${builddep_cups_LIBS}
44104      if test "x$depdir" = x; then
44105        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44106      fi
44107      CUPS=$depdir
44108      if test "x$theroot" != x; then
44109        CUPS="$theroot"
44110      fi
44111      if test "x$thecflags" != x; then
44112        CUPS_CFLAGS="$thecflags"
44113      fi
44114      if test "x$thelibs" != x; then
44115        CUPS_LIBS="$thelibs"
44116      fi
44117      CUPS_FOUND=yes
44118
44119    fi
44120
44121  fi
44122
44123    fi
44124    if test "x$CUPS_FOUND" = xno; then
44125      # Are the cups headers installed in the default /usr/include location?
44126      for ac_header in cups/cups.h cups/ppd.h
44127do :
44128  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44129ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44130if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44131  cat >>confdefs.h <<_ACEOF
44132#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44133_ACEOF
44134
44135            CUPS_FOUND=yes
44136            CUPS_CFLAGS=
44137            DEFAULT_CUPS=yes
44138
44139
44140fi
44141
44142done
44143
44144    fi
44145    if test "x$CUPS_FOUND" = xno; then
44146      # Getting nervous now? Lets poke around for standard Solaris third-party
44147      # package installation locations.
44148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44149$as_echo_n "checking for cups headers... " >&6; }
44150      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44151        # An SFW package seems to be installed!
44152        CUPS_FOUND=yes
44153        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44154      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44155        # A CSW package seems to be installed!
44156        CUPS_FOUND=yes
44157        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44158      fi
44159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44160$as_echo "$CUPS_FOUND" >&6; }
44161    fi
44162    if test "x$CUPS_FOUND" = xno; then
44163
44164  # Print a helpful message on how to acquire the necessary build dependency.
44165  # cups is the help tag: freetype, cups, pulse, alsa etc
44166  MISSING_DEPENDENCY=cups
44167
44168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44169    cygwin_help $MISSING_DEPENDENCY
44170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44171    msys_help $MISSING_DEPENDENCY
44172  else
44173    PKGHANDLER_COMMAND=
44174
44175    case $PKGHANDLER in
44176      apt-get)
44177        apt_help     $MISSING_DEPENDENCY ;;
44178      yum)
44179        yum_help     $MISSING_DEPENDENCY ;;
44180      port)
44181        port_help    $MISSING_DEPENDENCY ;;
44182      pkgutil)
44183        pkgutil_help $MISSING_DEPENDENCY ;;
44184      pkgadd)
44185        pkgadd_help  $MISSING_DEPENDENCY ;;
44186    esac
44187
44188    if test "x$PKGHANDLER_COMMAND" != x; then
44189      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44190    fi
44191  fi
44192
44193      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44194    fi
44195  fi
44196
44197
44198
44199
44200
44201
44202  ###############################################################################
44203  #
44204  # The ubiquitous freetype library is used to render fonts.
44205  #
44206
44207# Check whether --with-freetype was given.
44208if test "${with_freetype+set}" = set; then :
44209  withval=$with_freetype;
44210fi
44211
44212
44213# Check whether --with-freetype-include was given.
44214if test "${with_freetype_include+set}" = set; then :
44215  withval=$with_freetype_include;
44216fi
44217
44218
44219# Check whether --with-freetype-lib was given.
44220if test "${with_freetype_lib+set}" = set; then :
44221  withval=$with_freetype_lib;
44222fi
44223
44224
44225# Check whether --with-freetype-src was given.
44226if test "${with_freetype_src+set}" = set; then :
44227  withval=$with_freetype_src;
44228fi
44229
44230  # Check whether --enable-freetype-bundling was given.
44231if test "${enable_freetype_bundling+set}" = set; then :
44232  enableval=$enable_freetype_bundling;
44233fi
44234
44235
44236  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44237  FREETYPE_BASE_NAME=freetype
44238  FREETYPE_CFLAGS=
44239  FREETYPE_LIBS=
44240  FREETYPE_BUNDLE_LIB_PATH=
44241
44242  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44243    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44244      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44245$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44246    fi
44247    if test "x$enable_freetype_bundling" != x; then
44248      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44249$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44250    fi
44251  else
44252    # freetype is needed to build; go get it!
44253
44254    BUNDLE_FREETYPE="$enable_freetype_bundling"
44255
44256    if  test "x$with_freetype_src" != x; then
44257      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44258        # Try to build freetype if --with-freetype-src was given on Windows
44259
44260  FREETYPE_SRC_PATH="$with_freetype_src"
44261  BUILD_FREETYPE=yes
44262
44263  # Check if the freetype sources are acessible..
44264  if ! test -d $FREETYPE_SRC_PATH; then
44265    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44266$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44267    BUILD_FREETYPE=no
44268  fi
44269  # ..and contain a vc2010 project file
44270  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44271  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44272    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44273$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44274    BUILD_FREETYPE=no
44275  fi
44276  # Now check if configure found a version of 'msbuild.exe'
44277  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44278    { $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
44279$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;}
44280    BUILD_FREETYPE=no
44281  fi
44282
44283  # Ready to go..
44284  if test "x$BUILD_FREETYPE" = xyes; then
44285
44286    # msbuild requires trailing slashes for output directories
44287    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44288    freetype_lib_path_unix="$freetype_lib_path"
44289    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44290
44291  unix_path="$vcxproj_path"
44292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44293    windows_path=`$CYGPATH -m "$unix_path"`
44294    vcxproj_path="$windows_path"
44295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44296    windows_path=`cmd //c echo $unix_path`
44297    vcxproj_path="$windows_path"
44298  fi
44299
44300
44301  unix_path="$freetype_lib_path"
44302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44303    windows_path=`$CYGPATH -m "$unix_path"`
44304    freetype_lib_path="$windows_path"
44305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44306    windows_path=`cmd //c echo $unix_path`
44307    freetype_lib_path="$windows_path"
44308  fi
44309
44310
44311  unix_path="$freetype_obj_path"
44312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44313    windows_path=`$CYGPATH -m "$unix_path"`
44314    freetype_obj_path="$windows_path"
44315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44316    windows_path=`cmd //c echo $unix_path`
44317    freetype_obj_path="$windows_path"
44318  fi
44319
44320    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44321      freetype_platform=x64
44322    else
44323      freetype_platform=win32
44324    fi
44325
44326    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44327    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44328    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44329    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44330    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44331$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44332
44333    # First we try to build the freetype.dll
44334    $ECHO -e "@echo off\n"\
44335	     "$MSBUILD $vcxproj_path "\
44336		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44337		       "/p:Configuration=\"Release Multithreaded\" "\
44338		       "/p:Platform=$freetype_platform "\
44339		       "/p:ConfigurationType=DynamicLibrary "\
44340		       "/p:TargetName=freetype "\
44341		       "/p:OutDir=\"$freetype_lib_path\" "\
44342		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44343    cmd /c freetype.bat
44344
44345    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44346      # If that succeeds we also build freetype.lib
44347      $ECHO -e "@echo off\n"\
44348	       "$MSBUILD $vcxproj_path "\
44349			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44350			 "/p:Configuration=\"Release Multithreaded\" "\
44351			 "/p:Platform=$freetype_platform "\
44352			 "/p:ConfigurationType=StaticLibrary "\
44353			 "/p:TargetName=freetype "\
44354			 "/p:OutDir=\"$freetype_lib_path\" "\
44355			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44356      cmd /c freetype.bat
44357
44358      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44359	# Once we build both, lib and dll, set freetype lib and include path appropriately
44360	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44361	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44362	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44363$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44364      else
44365	BUILD_FREETYPE=no
44366      fi
44367    else
44368      BUILD_FREETYPE=no
44369    fi
44370  fi
44371
44372        if test "x$BUILD_FREETYPE" = xyes; then
44373          # Okay, we built it. Check that it works.
44374
44375  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44376  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44377  METHOD="--with-freetype-src"
44378
44379  # Let's start with an optimistic view of the world :-)
44380  FOUND_FREETYPE=yes
44381
44382  # First look for the canonical freetype main include file ft2build.h.
44383  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44384    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44385    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44386    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44387      # Fail.
44388      FOUND_FREETYPE=no
44389    fi
44390  fi
44391
44392  if test "x$FOUND_FREETYPE" = xyes; then
44393    # Include file found, let's continue the sanity check.
44394    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44395$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44396
44397    # Reset to default value
44398    FREETYPE_BASE_NAME=freetype
44399    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44400    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44401      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44402          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44403        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44404        # for the .6 version explicitly.
44405        FREETYPE_BASE_NAME=freetype.6
44406        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44407        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44408$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44409      else
44410        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44411$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44412        FOUND_FREETYPE=no
44413      fi
44414    else
44415      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44416        # On Windows, we will need both .lib and .dll file.
44417        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44418          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44419$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44420          FOUND_FREETYPE=no
44421        fi
44422      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44423          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44424        # Found lib in isa dir, use that instead.
44425        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44426        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44427$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44428      fi
44429    fi
44430  fi
44431
44432  if test "x$FOUND_FREETYPE" = xyes; then
44433
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435
44436  # Input might be given as Windows format, start by converting to
44437  # unix format.
44438  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44439  new_path=`$CYGPATH -u "$path"`
44440
44441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44444  # "foo.exe" is OK but "foo" is an error.
44445  #
44446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44447  # It is also a way to make sure we got the proper file name for the real test later on.
44448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44449  if test "x$test_shortpath" = x; then
44450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44453  fi
44454
44455  # Call helper function which possibly converts this using DOS-style short mode.
44456  # If so, the updated path is stored in $new_path.
44457
44458  input_path="$new_path"
44459  # Check if we need to convert this using DOS-style short mode. If the path
44460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44461  # take no chances and rewrite it.
44462  # Note: m4 eats our [], so we need to use [ and ] instead.
44463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44464  if test "x$has_forbidden_chars" != x; then
44465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44469      # Going to short mode and back again did indeed matter. Since short mode is
44470      # case insensitive, let's make it lowercase to improve readability.
44471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44472      # Now convert it back to Unix-stile (cygpath)
44473      input_path=`$CYGPATH -u "$shortmode_path"`
44474      new_path="$input_path"
44475    fi
44476  fi
44477
44478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44479  if test "x$test_cygdrive_prefix" = x; then
44480    # As a simple fix, exclude /usr/bin since it's not a real path.
44481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44483      # a path prefixed by /cygdrive for fixpath to work.
44484      new_path="$CYGWIN_ROOT_PATH$input_path"
44485    fi
44486  fi
44487
44488
44489  if test "x$path" != "x$new_path"; then
44490    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44493  fi
44494
44495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44496
44497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44498  has_colon=`$ECHO $path | $GREP ^.:`
44499  new_path="$path"
44500  if test "x$has_colon" = x; then
44501    # Not in mixed or Windows style, start by that.
44502    new_path=`cmd //c echo $path`
44503  fi
44504
44505
44506  input_path="$new_path"
44507  # Check if we need to convert this using DOS-style short mode. If the path
44508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44509  # take no chances and rewrite it.
44510  # Note: m4 eats our [], so we need to use [ and ] instead.
44511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44512  if test "x$has_forbidden_chars" != x; then
44513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44515  fi
44516
44517
44518  windows_path="$new_path"
44519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44520    unix_path=`$CYGPATH -u "$windows_path"`
44521    new_path="$unix_path"
44522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44524    new_path="$unix_path"
44525  fi
44526
44527  if test "x$path" != "x$new_path"; then
44528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44531  fi
44532
44533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44535
44536  else
44537    # We're on a unix platform. Hooray! :)
44538    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44539    has_space=`$ECHO "$path" | $GREP " "`
44540    if test "x$has_space" != x; then
44541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44544    fi
44545
44546    # Use eval to expand a potential ~
44547    eval path="$path"
44548    if test ! -f "$path" && test ! -d "$path"; then
44549      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44550    fi
44551
44552    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44553  fi
44554
44555
44556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44557
44558  # Input might be given as Windows format, start by converting to
44559  # unix format.
44560  path="$POTENTIAL_FREETYPE_LIB_PATH"
44561  new_path=`$CYGPATH -u "$path"`
44562
44563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44566  # "foo.exe" is OK but "foo" is an error.
44567  #
44568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44569  # It is also a way to make sure we got the proper file name for the real test later on.
44570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44571  if test "x$test_shortpath" = x; then
44572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44573$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44574    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44575  fi
44576
44577  # Call helper function which possibly converts this using DOS-style short mode.
44578  # If so, the updated path is stored in $new_path.
44579
44580  input_path="$new_path"
44581  # Check if we need to convert this using DOS-style short mode. If the path
44582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44583  # take no chances and rewrite it.
44584  # Note: m4 eats our [], so we need to use [ and ] instead.
44585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44586  if test "x$has_forbidden_chars" != x; then
44587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44591      # Going to short mode and back again did indeed matter. Since short mode is
44592      # case insensitive, let's make it lowercase to improve readability.
44593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44594      # Now convert it back to Unix-stile (cygpath)
44595      input_path=`$CYGPATH -u "$shortmode_path"`
44596      new_path="$input_path"
44597    fi
44598  fi
44599
44600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44601  if test "x$test_cygdrive_prefix" = x; then
44602    # As a simple fix, exclude /usr/bin since it's not a real path.
44603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44605      # a path prefixed by /cygdrive for fixpath to work.
44606      new_path="$CYGWIN_ROOT_PATH$input_path"
44607    fi
44608  fi
44609
44610
44611  if test "x$path" != "x$new_path"; then
44612    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44615  fi
44616
44617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44618
44619  path="$POTENTIAL_FREETYPE_LIB_PATH"
44620  has_colon=`$ECHO $path | $GREP ^.:`
44621  new_path="$path"
44622  if test "x$has_colon" = x; then
44623    # Not in mixed or Windows style, start by that.
44624    new_path=`cmd //c echo $path`
44625  fi
44626
44627
44628  input_path="$new_path"
44629  # Check if we need to convert this using DOS-style short mode. If the path
44630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44631  # take no chances and rewrite it.
44632  # Note: m4 eats our [], so we need to use [ and ] instead.
44633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44634  if test "x$has_forbidden_chars" != x; then
44635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44637  fi
44638
44639
44640  windows_path="$new_path"
44641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44642    unix_path=`$CYGPATH -u "$windows_path"`
44643    new_path="$unix_path"
44644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44646    new_path="$unix_path"
44647  fi
44648
44649  if test "x$path" != "x$new_path"; then
44650    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44653  fi
44654
44655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44657
44658  else
44659    # We're on a unix platform. Hooray! :)
44660    path="$POTENTIAL_FREETYPE_LIB_PATH"
44661    has_space=`$ECHO "$path" | $GREP " "`
44662    if test "x$has_space" != x; then
44663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44664$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44665      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44666    fi
44667
44668    # Use eval to expand a potential ~
44669    eval path="$path"
44670    if test ! -f "$path" && test ! -d "$path"; then
44671      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44672    fi
44673
44674    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44675  fi
44676
44677
44678    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44680$as_echo_n "checking for freetype includes... " >&6; }
44681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44682$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44683    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44685$as_echo_n "checking for freetype libraries... " >&6; }
44686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44687$as_echo "$FREETYPE_LIB_PATH" >&6; }
44688  fi
44689
44690          if test "x$FOUND_FREETYPE" != xyes; then
44691            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44692          fi
44693        else
44694          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44695$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44696          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44697        fi
44698      else
44699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44700$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44701      fi
44702    fi
44703
44704    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44705      # User has specified settings
44706
44707      if test "x$BUNDLE_FREETYPE" = x; then
44708        # If not specified, default is to bundle freetype
44709        BUNDLE_FREETYPE=yes
44710      fi
44711
44712      if test "x$with_freetype" != x; then
44713        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44714        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44715      fi
44716
44717      # Allow --with-freetype-lib and --with-freetype-include to override
44718      if test "x$with_freetype_include" != x; then
44719        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44720      fi
44721      if test "x$with_freetype_lib" != x; then
44722        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44723      fi
44724
44725      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44726        # Okay, we got it. Check that it works.
44727
44728  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44729  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44730  METHOD="--with-freetype"
44731
44732  # Let's start with an optimistic view of the world :-)
44733  FOUND_FREETYPE=yes
44734
44735  # First look for the canonical freetype main include file ft2build.h.
44736  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44737    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44738    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44739    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44740      # Fail.
44741      FOUND_FREETYPE=no
44742    fi
44743  fi
44744
44745  if test "x$FOUND_FREETYPE" = xyes; then
44746    # Include file found, let's continue the sanity check.
44747    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44748$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44749
44750    # Reset to default value
44751    FREETYPE_BASE_NAME=freetype
44752    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44753    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44754      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44755          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44756        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44757        # for the .6 version explicitly.
44758        FREETYPE_BASE_NAME=freetype.6
44759        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44760        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44761$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44762      else
44763        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44764$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44765        FOUND_FREETYPE=no
44766      fi
44767    else
44768      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44769        # On Windows, we will need both .lib and .dll file.
44770        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44771          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44772$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44773          FOUND_FREETYPE=no
44774        fi
44775      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44776          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44777        # Found lib in isa dir, use that instead.
44778        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44779        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44780$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44781      fi
44782    fi
44783  fi
44784
44785  if test "x$FOUND_FREETYPE" = xyes; then
44786
44787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44788
44789  # Input might be given as Windows format, start by converting to
44790  # unix format.
44791  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44792  new_path=`$CYGPATH -u "$path"`
44793
44794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44797  # "foo.exe" is OK but "foo" is an error.
44798  #
44799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44800  # It is also a way to make sure we got the proper file name for the real test later on.
44801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44802  if test "x$test_shortpath" = x; then
44803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44804$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44805    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44806  fi
44807
44808  # Call helper function which possibly converts this using DOS-style short mode.
44809  # If so, the updated path is stored in $new_path.
44810
44811  input_path="$new_path"
44812  # Check if we need to convert this using DOS-style short mode. If the path
44813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44814  # take no chances and rewrite it.
44815  # Note: m4 eats our [], so we need to use [ and ] instead.
44816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44817  if test "x$has_forbidden_chars" != x; then
44818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44822      # Going to short mode and back again did indeed matter. Since short mode is
44823      # case insensitive, let's make it lowercase to improve readability.
44824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44825      # Now convert it back to Unix-stile (cygpath)
44826      input_path=`$CYGPATH -u "$shortmode_path"`
44827      new_path="$input_path"
44828    fi
44829  fi
44830
44831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44832  if test "x$test_cygdrive_prefix" = x; then
44833    # As a simple fix, exclude /usr/bin since it's not a real path.
44834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44836      # a path prefixed by /cygdrive for fixpath to work.
44837      new_path="$CYGWIN_ROOT_PATH$input_path"
44838    fi
44839  fi
44840
44841
44842  if test "x$path" != "x$new_path"; then
44843    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44845$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44846  fi
44847
44848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44849
44850  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44851  has_colon=`$ECHO $path | $GREP ^.:`
44852  new_path="$path"
44853  if test "x$has_colon" = x; then
44854    # Not in mixed or Windows style, start by that.
44855    new_path=`cmd //c echo $path`
44856  fi
44857
44858
44859  input_path="$new_path"
44860  # Check if we need to convert this using DOS-style short mode. If the path
44861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44862  # take no chances and rewrite it.
44863  # Note: m4 eats our [], so we need to use [ and ] instead.
44864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44865  if test "x$has_forbidden_chars" != x; then
44866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44868  fi
44869
44870
44871  windows_path="$new_path"
44872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44873    unix_path=`$CYGPATH -u "$windows_path"`
44874    new_path="$unix_path"
44875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44877    new_path="$unix_path"
44878  fi
44879
44880  if test "x$path" != "x$new_path"; then
44881    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44883$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44884  fi
44885
44886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44888
44889  else
44890    # We're on a unix platform. Hooray! :)
44891    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44892    has_space=`$ECHO "$path" | $GREP " "`
44893    if test "x$has_space" != x; then
44894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44895$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44896      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44897    fi
44898
44899    # Use eval to expand a potential ~
44900    eval path="$path"
44901    if test ! -f "$path" && test ! -d "$path"; then
44902      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44903    fi
44904
44905    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44906  fi
44907
44908
44909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44910
44911  # Input might be given as Windows format, start by converting to
44912  # unix format.
44913  path="$POTENTIAL_FREETYPE_LIB_PATH"
44914  new_path=`$CYGPATH -u "$path"`
44915
44916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44919  # "foo.exe" is OK but "foo" is an error.
44920  #
44921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44922  # It is also a way to make sure we got the proper file name for the real test later on.
44923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44924  if test "x$test_shortpath" = x; then
44925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44927    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44928  fi
44929
44930  # Call helper function which possibly converts this using DOS-style short mode.
44931  # If so, the updated path is stored in $new_path.
44932
44933  input_path="$new_path"
44934  # Check if we need to convert this using DOS-style short mode. If the path
44935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44936  # take no chances and rewrite it.
44937  # Note: m4 eats our [], so we need to use [ and ] instead.
44938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44939  if test "x$has_forbidden_chars" != x; then
44940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44944      # Going to short mode and back again did indeed matter. Since short mode is
44945      # case insensitive, let's make it lowercase to improve readability.
44946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44947      # Now convert it back to Unix-stile (cygpath)
44948      input_path=`$CYGPATH -u "$shortmode_path"`
44949      new_path="$input_path"
44950    fi
44951  fi
44952
44953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44954  if test "x$test_cygdrive_prefix" = x; then
44955    # As a simple fix, exclude /usr/bin since it's not a real path.
44956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44958      # a path prefixed by /cygdrive for fixpath to work.
44959      new_path="$CYGWIN_ROOT_PATH$input_path"
44960    fi
44961  fi
44962
44963
44964  if test "x$path" != "x$new_path"; then
44965    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44968  fi
44969
44970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44971
44972  path="$POTENTIAL_FREETYPE_LIB_PATH"
44973  has_colon=`$ECHO $path | $GREP ^.:`
44974  new_path="$path"
44975  if test "x$has_colon" = x; then
44976    # Not in mixed or Windows style, start by that.
44977    new_path=`cmd //c echo $path`
44978  fi
44979
44980
44981  input_path="$new_path"
44982  # Check if we need to convert this using DOS-style short mode. If the path
44983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44984  # take no chances and rewrite it.
44985  # Note: m4 eats our [], so we need to use [ and ] instead.
44986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44987  if test "x$has_forbidden_chars" != x; then
44988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44990  fi
44991
44992
44993  windows_path="$new_path"
44994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44995    unix_path=`$CYGPATH -u "$windows_path"`
44996    new_path="$unix_path"
44997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44999    new_path="$unix_path"
45000  fi
45001
45002  if test "x$path" != "x$new_path"; then
45003    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45006  fi
45007
45008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45010
45011  else
45012    # We're on a unix platform. Hooray! :)
45013    path="$POTENTIAL_FREETYPE_LIB_PATH"
45014    has_space=`$ECHO "$path" | $GREP " "`
45015    if test "x$has_space" != x; then
45016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45019    fi
45020
45021    # Use eval to expand a potential ~
45022    eval path="$path"
45023    if test ! -f "$path" && test ! -d "$path"; then
45024      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45025    fi
45026
45027    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45028  fi
45029
45030
45031    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45033$as_echo_n "checking for freetype includes... " >&6; }
45034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45035$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45036    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45038$as_echo_n "checking for freetype libraries... " >&6; }
45039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45040$as_echo "$FREETYPE_LIB_PATH" >&6; }
45041  fi
45042
45043        if test "x$FOUND_FREETYPE" != xyes; then
45044          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45045        fi
45046      else
45047        # User specified only one of lib or include. This is an error.
45048        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45049          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45050$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45051          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45052        else
45053          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45054$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45055          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45056        fi
45057      fi
45058    else
45059      # User did not specify settings, but we need freetype. Try to locate it.
45060
45061      if test "x$BUNDLE_FREETYPE" = x; then
45062        # If not specified, default is to bundle freetype only on windows
45063        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45064          BUNDLE_FREETYPE=yes
45065        else
45066          BUNDLE_FREETYPE=no
45067        fi
45068      fi
45069
45070      if test "x$FOUND_FREETYPE" != xyes; then
45071        # Check builddeps
45072
45073
45074  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45075    # Source the builddeps file again, to make sure it uses the latest variables!
45076    . $builddepsfile
45077    # Look for a target and build machine specific resource!
45078    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45079    if test "x$resource" = x; then
45080      # Ok, lets instead look for a target specific resource
45081      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45082    fi
45083    if test "x$resource" = x; then
45084      # Ok, lets instead look for a build specific resource
45085      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45086    fi
45087    if test "x$resource" = x; then
45088      # Ok, lets instead look for a generic resource
45089      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45090      resource=${builddep_freetype2}
45091    fi
45092    if test "x$resource" != x; then
45093      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45094$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45095      # If the resource in the builddeps.conf file is an existing directory,
45096      # for example /java/linux/cups
45097      if test -d ${resource}; then
45098        depdir=${resource}
45099      else
45100
45101  # freetype2 is for example mymodule
45102  # $resource is for example libs/general/libmymod_1_2_3.zip
45103  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45104  # $with_builddeps_dir is for example /localhome/builddeps
45105  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45106  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45107  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45108  filename=`basename $resource`
45109  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45110  filebase=${filename%%.*}
45111  extension=${filename#*.}
45112  installdir=$with_builddeps_dir/$filebase
45113  if test ! -f $installdir/$filename.unpacked; then
45114    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45115$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45116    if test ! -d $installdir; then
45117      mkdir -p $installdir
45118    fi
45119    if test ! -d $installdir; then
45120      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45121    fi
45122    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45123    touch $tmpfile
45124    if test ! -f $tmpfile; then
45125      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45126    fi
45127
45128  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45129  # $tmpfile is the local file name for the downloaded file.
45130  VALID_TOOL=no
45131  if test "x$BDEPS_FTP" = xwget; then
45132    VALID_TOOL=yes
45133    wget -O $tmpfile $with_builddeps_server/$resource
45134  fi
45135  if test "x$BDEPS_FTP" = xlftp; then
45136    VALID_TOOL=yes
45137    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45138  fi
45139  if test "x$BDEPS_FTP" = xftp; then
45140    VALID_TOOL=yes
45141    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45142    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45143    FTPUSERPWD=${FTPSERVER%%@*}
45144    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45145      FTPUSER=${userpwd%%:*}
45146      FTPPWD=${userpwd#*@}
45147      FTPSERVER=${FTPSERVER#*@}
45148    else
45149      FTPUSER=ftp
45150      FTPPWD=ftp
45151    fi
45152    # the "pass" command does not work on some
45153    # ftp clients (read ftp.exe) but if it works,
45154    # passive mode is better!
45155    ( \
45156        echo "user $FTPUSER $FTPPWD"        ; \
45157        echo "pass"                         ; \
45158        echo "bin"                          ; \
45159        echo "get $FTPPATH $tmpfile"              ; \
45160    ) | ftp -in $FTPSERVER
45161  fi
45162  if test "x$VALID_TOOL" != xyes; then
45163    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45164  fi
45165
45166    mv $tmpfile $installdir/$filename
45167    if test ! -s $installdir/$filename; then
45168      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45169    fi
45170    case "$extension" in
45171      zip)  echo "Unzipping $installdir/$filename..."
45172        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45173        ;;
45174      tar.gz) echo "Untaring $installdir/$filename..."
45175        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45176        ;;
45177      tgz) echo "Untaring $installdir/$filename..."
45178        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45179        ;;
45180      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45181        ;;
45182    esac
45183  fi
45184  if test -f $installdir/$filename.unpacked; then
45185    depdir=$installdir
45186  fi
45187
45188      fi
45189      # Source the builddeps file again, because in the previous command, the depdir
45190      # was updated to point at the current build dependency install directory.
45191      . $builddepsfile
45192      # Now extract variables from the builddeps.conf files.
45193      theroot=${builddep_freetype2_ROOT}
45194      thecflags=${builddep_freetype2_CFLAGS}
45195      thelibs=${builddep_freetype2_LIBS}
45196      if test "x$depdir" = x; then
45197        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45198      fi
45199      FREETYPE=$depdir
45200      if test "x$theroot" != x; then
45201        FREETYPE="$theroot"
45202      fi
45203      if test "x$thecflags" != x; then
45204        FREETYPE_CFLAGS="$thecflags"
45205      fi
45206      if test "x$thelibs" != x; then
45207        FREETYPE_LIBS="$thelibs"
45208      fi
45209      FOUND_FREETYPE=yes
45210      else FOUND_FREETYPE=no
45211
45212    fi
45213    else FOUND_FREETYPE=no
45214
45215  fi
45216
45217        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45218        if test "x$FOUND_FREETYPE" = xyes; then
45219          if test "x$BUNDLE_FREETYPE" = xyes; then
45220            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45221$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45222            FOUND_FREETYPE=no
45223          else
45224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45225$as_echo_n "checking for freetype... " >&6; }
45226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45227$as_echo "yes (using builddeps)" >&6; }
45228          fi
45229        fi
45230      fi
45231
45232      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45233      if test "x$SYSROOT" = x; then
45234        if test "x$FOUND_FREETYPE" != xyes; then
45235          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45236          if test "x$PKG_CONFIG" != x; then
45237
45238pkg_failed=no
45239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45240$as_echo_n "checking for FREETYPE... " >&6; }
45241
45242if test -n "$FREETYPE_CFLAGS"; then
45243    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45244 elif test -n "$PKG_CONFIG"; then
45245    if test -n "$PKG_CONFIG" && \
45246    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45247  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45248  ac_status=$?
45249  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45250  test $ac_status = 0; }; then
45251  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45252else
45253  pkg_failed=yes
45254fi
45255 else
45256    pkg_failed=untried
45257fi
45258if test -n "$FREETYPE_LIBS"; then
45259    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45260 elif test -n "$PKG_CONFIG"; then
45261    if test -n "$PKG_CONFIG" && \
45262    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45263  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45264  ac_status=$?
45265  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45266  test $ac_status = 0; }; then
45267  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45268else
45269  pkg_failed=yes
45270fi
45271 else
45272    pkg_failed=untried
45273fi
45274
45275
45276
45277if test $pkg_failed = yes; then
45278
45279if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45280        _pkg_short_errors_supported=yes
45281else
45282        _pkg_short_errors_supported=no
45283fi
45284        if test $_pkg_short_errors_supported = yes; then
45285	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45286        else
45287	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45288        fi
45289	# Put the nasty error message in config.log where it belongs
45290	echo "$FREETYPE_PKG_ERRORS" >&5
45291
45292	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45293$as_echo "no" >&6; }
45294                FOUND_FREETYPE=no
45295elif test $pkg_failed = untried; then
45296	FOUND_FREETYPE=no
45297else
45298	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45299	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45301$as_echo "yes" >&6; }
45302	FOUND_FREETYPE=yes
45303fi
45304            if test "x$FOUND_FREETYPE" = xyes; then
45305              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45306              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45307              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45308              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45309                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45310              fi
45311              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45312              if test "x$BUNDLE_FREETYPE" = xyes; then
45313                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45314$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45315                FOUND_FREETYPE=no
45316              else
45317                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45318$as_echo_n "checking for freetype... " >&6; }
45319                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45320$as_echo "yes (using pkg-config)" >&6; }
45321              fi
45322            fi
45323          fi
45324        fi
45325      fi
45326
45327      if test "x$FOUND_FREETYPE" != xyes; then
45328        # Check in well-known locations
45329        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45330          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45331
45332  windows_path="$FREETYPE_BASE_DIR"
45333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45334    unix_path=`$CYGPATH -u "$windows_path"`
45335    FREETYPE_BASE_DIR="$unix_path"
45336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45338    FREETYPE_BASE_DIR="$unix_path"
45339  fi
45340
45341
45342  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45343  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45344  METHOD="well-known location"
45345
45346  # Let's start with an optimistic view of the world :-)
45347  FOUND_FREETYPE=yes
45348
45349  # First look for the canonical freetype main include file ft2build.h.
45350  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45351    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45352    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45353    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45354      # Fail.
45355      FOUND_FREETYPE=no
45356    fi
45357  fi
45358
45359  if test "x$FOUND_FREETYPE" = xyes; then
45360    # Include file found, let's continue the sanity check.
45361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45362$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45363
45364    # Reset to default value
45365    FREETYPE_BASE_NAME=freetype
45366    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45367    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45368      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45369          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45370        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45371        # for the .6 version explicitly.
45372        FREETYPE_BASE_NAME=freetype.6
45373        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45374        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45375$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45376      else
45377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45378$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45379        FOUND_FREETYPE=no
45380      fi
45381    else
45382      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45383        # On Windows, we will need both .lib and .dll file.
45384        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45385          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45386$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45387          FOUND_FREETYPE=no
45388        fi
45389      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45390          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45391        # Found lib in isa dir, use that instead.
45392        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45393        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45394$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45395      fi
45396    fi
45397  fi
45398
45399  if test "x$FOUND_FREETYPE" = xyes; then
45400
45401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45402
45403  # Input might be given as Windows format, start by converting to
45404  # unix format.
45405  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45406  new_path=`$CYGPATH -u "$path"`
45407
45408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45411  # "foo.exe" is OK but "foo" is an error.
45412  #
45413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45414  # It is also a way to make sure we got the proper file name for the real test later on.
45415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45416  if test "x$test_shortpath" = x; then
45417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45419    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45420  fi
45421
45422  # Call helper function which possibly converts this using DOS-style short mode.
45423  # If so, the updated path is stored in $new_path.
45424
45425  input_path="$new_path"
45426  # Check if we need to convert this using DOS-style short mode. If the path
45427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45428  # take no chances and rewrite it.
45429  # Note: m4 eats our [], so we need to use [ and ] instead.
45430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45431  if test "x$has_forbidden_chars" != x; then
45432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45436      # Going to short mode and back again did indeed matter. Since short mode is
45437      # case insensitive, let's make it lowercase to improve readability.
45438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45439      # Now convert it back to Unix-stile (cygpath)
45440      input_path=`$CYGPATH -u "$shortmode_path"`
45441      new_path="$input_path"
45442    fi
45443  fi
45444
45445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45446  if test "x$test_cygdrive_prefix" = x; then
45447    # As a simple fix, exclude /usr/bin since it's not a real path.
45448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45450      # a path prefixed by /cygdrive for fixpath to work.
45451      new_path="$CYGWIN_ROOT_PATH$input_path"
45452    fi
45453  fi
45454
45455
45456  if test "x$path" != "x$new_path"; then
45457    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45460  fi
45461
45462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45463
45464  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45465  has_colon=`$ECHO $path | $GREP ^.:`
45466  new_path="$path"
45467  if test "x$has_colon" = x; then
45468    # Not in mixed or Windows style, start by that.
45469    new_path=`cmd //c echo $path`
45470  fi
45471
45472
45473  input_path="$new_path"
45474  # Check if we need to convert this using DOS-style short mode. If the path
45475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45476  # take no chances and rewrite it.
45477  # Note: m4 eats our [], so we need to use [ and ] instead.
45478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45479  if test "x$has_forbidden_chars" != x; then
45480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45482  fi
45483
45484
45485  windows_path="$new_path"
45486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45487    unix_path=`$CYGPATH -u "$windows_path"`
45488    new_path="$unix_path"
45489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45491    new_path="$unix_path"
45492  fi
45493
45494  if test "x$path" != "x$new_path"; then
45495    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45498  fi
45499
45500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45502
45503  else
45504    # We're on a unix platform. Hooray! :)
45505    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45506    has_space=`$ECHO "$path" | $GREP " "`
45507    if test "x$has_space" != x; then
45508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45510      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45511    fi
45512
45513    # Use eval to expand a potential ~
45514    eval path="$path"
45515    if test ! -f "$path" && test ! -d "$path"; then
45516      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45517    fi
45518
45519    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45520  fi
45521
45522
45523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45524
45525  # Input might be given as Windows format, start by converting to
45526  # unix format.
45527  path="$POTENTIAL_FREETYPE_LIB_PATH"
45528  new_path=`$CYGPATH -u "$path"`
45529
45530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45533  # "foo.exe" is OK but "foo" is an error.
45534  #
45535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45536  # It is also a way to make sure we got the proper file name for the real test later on.
45537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45538  if test "x$test_shortpath" = x; then
45539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45540$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45541    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45542  fi
45543
45544  # Call helper function which possibly converts this using DOS-style short mode.
45545  # If so, the updated path is stored in $new_path.
45546
45547  input_path="$new_path"
45548  # Check if we need to convert this using DOS-style short mode. If the path
45549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45550  # take no chances and rewrite it.
45551  # Note: m4 eats our [], so we need to use [ and ] instead.
45552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45553  if test "x$has_forbidden_chars" != x; then
45554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45558      # Going to short mode and back again did indeed matter. Since short mode is
45559      # case insensitive, let's make it lowercase to improve readability.
45560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45561      # Now convert it back to Unix-stile (cygpath)
45562      input_path=`$CYGPATH -u "$shortmode_path"`
45563      new_path="$input_path"
45564    fi
45565  fi
45566
45567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45568  if test "x$test_cygdrive_prefix" = x; then
45569    # As a simple fix, exclude /usr/bin since it's not a real path.
45570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45572      # a path prefixed by /cygdrive for fixpath to work.
45573      new_path="$CYGWIN_ROOT_PATH$input_path"
45574    fi
45575  fi
45576
45577
45578  if test "x$path" != "x$new_path"; then
45579    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45582  fi
45583
45584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45585
45586  path="$POTENTIAL_FREETYPE_LIB_PATH"
45587  has_colon=`$ECHO $path | $GREP ^.:`
45588  new_path="$path"
45589  if test "x$has_colon" = x; then
45590    # Not in mixed or Windows style, start by that.
45591    new_path=`cmd //c echo $path`
45592  fi
45593
45594
45595  input_path="$new_path"
45596  # Check if we need to convert this using DOS-style short mode. If the path
45597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45598  # take no chances and rewrite it.
45599  # Note: m4 eats our [], so we need to use [ and ] instead.
45600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45601  if test "x$has_forbidden_chars" != x; then
45602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45604  fi
45605
45606
45607  windows_path="$new_path"
45608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45609    unix_path=`$CYGPATH -u "$windows_path"`
45610    new_path="$unix_path"
45611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45613    new_path="$unix_path"
45614  fi
45615
45616  if test "x$path" != "x$new_path"; then
45617    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45619$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45620  fi
45621
45622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45624
45625  else
45626    # We're on a unix platform. Hooray! :)
45627    path="$POTENTIAL_FREETYPE_LIB_PATH"
45628    has_space=`$ECHO "$path" | $GREP " "`
45629    if test "x$has_space" != x; then
45630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45631$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45632      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45633    fi
45634
45635    # Use eval to expand a potential ~
45636    eval path="$path"
45637    if test ! -f "$path" && test ! -d "$path"; then
45638      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45639    fi
45640
45641    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45642  fi
45643
45644
45645    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45647$as_echo_n "checking for freetype includes... " >&6; }
45648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45649$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45650    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45652$as_echo_n "checking for freetype libraries... " >&6; }
45653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45654$as_echo "$FREETYPE_LIB_PATH" >&6; }
45655  fi
45656
45657          if test "x$FOUND_FREETYPE" != xyes; then
45658            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45659
45660  windows_path="$FREETYPE_BASE_DIR"
45661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45662    unix_path=`$CYGPATH -u "$windows_path"`
45663    FREETYPE_BASE_DIR="$unix_path"
45664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45666    FREETYPE_BASE_DIR="$unix_path"
45667  fi
45668
45669
45670  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45671  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45672  METHOD="well-known location"
45673
45674  # Let's start with an optimistic view of the world :-)
45675  FOUND_FREETYPE=yes
45676
45677  # First look for the canonical freetype main include file ft2build.h.
45678  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45679    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45680    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45681    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45682      # Fail.
45683      FOUND_FREETYPE=no
45684    fi
45685  fi
45686
45687  if test "x$FOUND_FREETYPE" = xyes; then
45688    # Include file found, let's continue the sanity check.
45689    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45690$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45691
45692    # Reset to default value
45693    FREETYPE_BASE_NAME=freetype
45694    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45695    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45696      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45697          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45698        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45699        # for the .6 version explicitly.
45700        FREETYPE_BASE_NAME=freetype.6
45701        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45702        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45703$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45704      else
45705        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45706$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45707        FOUND_FREETYPE=no
45708      fi
45709    else
45710      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45711        # On Windows, we will need both .lib and .dll file.
45712        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45713          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45715          FOUND_FREETYPE=no
45716        fi
45717      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45718          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45719        # Found lib in isa dir, use that instead.
45720        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45721        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45722$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45723      fi
45724    fi
45725  fi
45726
45727  if test "x$FOUND_FREETYPE" = xyes; then
45728
45729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45730
45731  # Input might be given as Windows format, start by converting to
45732  # unix format.
45733  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45734  new_path=`$CYGPATH -u "$path"`
45735
45736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45739  # "foo.exe" is OK but "foo" is an error.
45740  #
45741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45742  # It is also a way to make sure we got the proper file name for the real test later on.
45743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45744  if test "x$test_shortpath" = x; then
45745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45747    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45748  fi
45749
45750  # Call helper function which possibly converts this using DOS-style short mode.
45751  # If so, the updated path is stored in $new_path.
45752
45753  input_path="$new_path"
45754  # Check if we need to convert this using DOS-style short mode. If the path
45755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45756  # take no chances and rewrite it.
45757  # Note: m4 eats our [], so we need to use [ and ] instead.
45758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45759  if test "x$has_forbidden_chars" != x; then
45760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45764      # Going to short mode and back again did indeed matter. Since short mode is
45765      # case insensitive, let's make it lowercase to improve readability.
45766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45767      # Now convert it back to Unix-stile (cygpath)
45768      input_path=`$CYGPATH -u "$shortmode_path"`
45769      new_path="$input_path"
45770    fi
45771  fi
45772
45773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45774  if test "x$test_cygdrive_prefix" = x; then
45775    # As a simple fix, exclude /usr/bin since it's not a real path.
45776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45778      # a path prefixed by /cygdrive for fixpath to work.
45779      new_path="$CYGWIN_ROOT_PATH$input_path"
45780    fi
45781  fi
45782
45783
45784  if test "x$path" != "x$new_path"; then
45785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45788  fi
45789
45790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45791
45792  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45793  has_colon=`$ECHO $path | $GREP ^.:`
45794  new_path="$path"
45795  if test "x$has_colon" = x; then
45796    # Not in mixed or Windows style, start by that.
45797    new_path=`cmd //c echo $path`
45798  fi
45799
45800
45801  input_path="$new_path"
45802  # Check if we need to convert this using DOS-style short mode. If the path
45803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45804  # take no chances and rewrite it.
45805  # Note: m4 eats our [], so we need to use [ and ] instead.
45806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45807  if test "x$has_forbidden_chars" != x; then
45808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45810  fi
45811
45812
45813  windows_path="$new_path"
45814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45815    unix_path=`$CYGPATH -u "$windows_path"`
45816    new_path="$unix_path"
45817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45819    new_path="$unix_path"
45820  fi
45821
45822  if test "x$path" != "x$new_path"; then
45823    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45826  fi
45827
45828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45830
45831  else
45832    # We're on a unix platform. Hooray! :)
45833    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45834    has_space=`$ECHO "$path" | $GREP " "`
45835    if test "x$has_space" != x; then
45836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45838      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45839    fi
45840
45841    # Use eval to expand a potential ~
45842    eval path="$path"
45843    if test ! -f "$path" && test ! -d "$path"; then
45844      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45845    fi
45846
45847    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45848  fi
45849
45850
45851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45852
45853  # Input might be given as Windows format, start by converting to
45854  # unix format.
45855  path="$POTENTIAL_FREETYPE_LIB_PATH"
45856  new_path=`$CYGPATH -u "$path"`
45857
45858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45861  # "foo.exe" is OK but "foo" is an error.
45862  #
45863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45864  # It is also a way to make sure we got the proper file name for the real test later on.
45865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45866  if test "x$test_shortpath" = x; then
45867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45870  fi
45871
45872  # Call helper function which possibly converts this using DOS-style short mode.
45873  # If so, the updated path is stored in $new_path.
45874
45875  input_path="$new_path"
45876  # Check if we need to convert this using DOS-style short mode. If the path
45877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45878  # take no chances and rewrite it.
45879  # Note: m4 eats our [], so we need to use [ and ] instead.
45880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45881  if test "x$has_forbidden_chars" != x; then
45882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45886      # Going to short mode and back again did indeed matter. Since short mode is
45887      # case insensitive, let's make it lowercase to improve readability.
45888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45889      # Now convert it back to Unix-stile (cygpath)
45890      input_path=`$CYGPATH -u "$shortmode_path"`
45891      new_path="$input_path"
45892    fi
45893  fi
45894
45895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45896  if test "x$test_cygdrive_prefix" = x; then
45897    # As a simple fix, exclude /usr/bin since it's not a real path.
45898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45900      # a path prefixed by /cygdrive for fixpath to work.
45901      new_path="$CYGWIN_ROOT_PATH$input_path"
45902    fi
45903  fi
45904
45905
45906  if test "x$path" != "x$new_path"; then
45907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45910  fi
45911
45912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913
45914  path="$POTENTIAL_FREETYPE_LIB_PATH"
45915  has_colon=`$ECHO $path | $GREP ^.:`
45916  new_path="$path"
45917  if test "x$has_colon" = x; then
45918    # Not in mixed or Windows style, start by that.
45919    new_path=`cmd //c echo $path`
45920  fi
45921
45922
45923  input_path="$new_path"
45924  # Check if we need to convert this using DOS-style short mode. If the path
45925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45926  # take no chances and rewrite it.
45927  # Note: m4 eats our [], so we need to use [ and ] instead.
45928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45929  if test "x$has_forbidden_chars" != x; then
45930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45932  fi
45933
45934
45935  windows_path="$new_path"
45936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45937    unix_path=`$CYGPATH -u "$windows_path"`
45938    new_path="$unix_path"
45939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45941    new_path="$unix_path"
45942  fi
45943
45944  if test "x$path" != "x$new_path"; then
45945    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45948  fi
45949
45950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45952
45953  else
45954    # We're on a unix platform. Hooray! :)
45955    path="$POTENTIAL_FREETYPE_LIB_PATH"
45956    has_space=`$ECHO "$path" | $GREP " "`
45957    if test "x$has_space" != x; then
45958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45961    fi
45962
45963    # Use eval to expand a potential ~
45964    eval path="$path"
45965    if test ! -f "$path" && test ! -d "$path"; then
45966      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45967    fi
45968
45969    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45970  fi
45971
45972
45973    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45975$as_echo_n "checking for freetype includes... " >&6; }
45976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45977$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45978    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45980$as_echo_n "checking for freetype libraries... " >&6; }
45981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45982$as_echo "$FREETYPE_LIB_PATH" >&6; }
45983  fi
45984
45985          fi
45986        else
45987          FREETYPE_BASE_DIR="$SYSROOT/usr"
45988
45989  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45990  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45991  METHOD="well-known location"
45992
45993  # Let's start with an optimistic view of the world :-)
45994  FOUND_FREETYPE=yes
45995
45996  # First look for the canonical freetype main include file ft2build.h.
45997  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45998    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45999    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46000    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46001      # Fail.
46002      FOUND_FREETYPE=no
46003    fi
46004  fi
46005
46006  if test "x$FOUND_FREETYPE" = xyes; then
46007    # Include file found, let's continue the sanity check.
46008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46009$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46010
46011    # Reset to default value
46012    FREETYPE_BASE_NAME=freetype
46013    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46014    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46015      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46017        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46018        # for the .6 version explicitly.
46019        FREETYPE_BASE_NAME=freetype.6
46020        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46021        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46022$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46023      else
46024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46026        FOUND_FREETYPE=no
46027      fi
46028    else
46029      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46030        # On Windows, we will need both .lib and .dll file.
46031        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46032          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46033$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46034          FOUND_FREETYPE=no
46035        fi
46036      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46037          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46038        # Found lib in isa dir, use that instead.
46039        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46040        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46041$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46042      fi
46043    fi
46044  fi
46045
46046  if test "x$FOUND_FREETYPE" = xyes; then
46047
46048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46049
46050  # Input might be given as Windows format, start by converting to
46051  # unix format.
46052  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46053  new_path=`$CYGPATH -u "$path"`
46054
46055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46058  # "foo.exe" is OK but "foo" is an error.
46059  #
46060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46061  # It is also a way to make sure we got the proper file name for the real test later on.
46062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46063  if test "x$test_shortpath" = x; then
46064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46065$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46066    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46067  fi
46068
46069  # Call helper function which possibly converts this using DOS-style short mode.
46070  # If so, the updated path is stored in $new_path.
46071
46072  input_path="$new_path"
46073  # Check if we need to convert this using DOS-style short mode. If the path
46074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46075  # take no chances and rewrite it.
46076  # Note: m4 eats our [], so we need to use [ and ] instead.
46077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46078  if test "x$has_forbidden_chars" != x; then
46079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46083      # Going to short mode and back again did indeed matter. Since short mode is
46084      # case insensitive, let's make it lowercase to improve readability.
46085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46086      # Now convert it back to Unix-stile (cygpath)
46087      input_path=`$CYGPATH -u "$shortmode_path"`
46088      new_path="$input_path"
46089    fi
46090  fi
46091
46092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46093  if test "x$test_cygdrive_prefix" = x; then
46094    # As a simple fix, exclude /usr/bin since it's not a real path.
46095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46097      # a path prefixed by /cygdrive for fixpath to work.
46098      new_path="$CYGWIN_ROOT_PATH$input_path"
46099    fi
46100  fi
46101
46102
46103  if test "x$path" != "x$new_path"; then
46104    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46107  fi
46108
46109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46110
46111  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46112  has_colon=`$ECHO $path | $GREP ^.:`
46113  new_path="$path"
46114  if test "x$has_colon" = x; then
46115    # Not in mixed or Windows style, start by that.
46116    new_path=`cmd //c echo $path`
46117  fi
46118
46119
46120  input_path="$new_path"
46121  # Check if we need to convert this using DOS-style short mode. If the path
46122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46123  # take no chances and rewrite it.
46124  # Note: m4 eats our [], so we need to use [ and ] instead.
46125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46126  if test "x$has_forbidden_chars" != x; then
46127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46129  fi
46130
46131
46132  windows_path="$new_path"
46133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46134    unix_path=`$CYGPATH -u "$windows_path"`
46135    new_path="$unix_path"
46136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46138    new_path="$unix_path"
46139  fi
46140
46141  if test "x$path" != "x$new_path"; then
46142    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46144$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46145  fi
46146
46147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46149
46150  else
46151    # We're on a unix platform. Hooray! :)
46152    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46153    has_space=`$ECHO "$path" | $GREP " "`
46154    if test "x$has_space" != x; then
46155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46156$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46157      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46158    fi
46159
46160    # Use eval to expand a potential ~
46161    eval path="$path"
46162    if test ! -f "$path" && test ! -d "$path"; then
46163      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46164    fi
46165
46166    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46167  fi
46168
46169
46170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46171
46172  # Input might be given as Windows format, start by converting to
46173  # unix format.
46174  path="$POTENTIAL_FREETYPE_LIB_PATH"
46175  new_path=`$CYGPATH -u "$path"`
46176
46177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46180  # "foo.exe" is OK but "foo" is an error.
46181  #
46182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46183  # It is also a way to make sure we got the proper file name for the real test later on.
46184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46185  if test "x$test_shortpath" = x; then
46186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46188    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46189  fi
46190
46191  # Call helper function which possibly converts this using DOS-style short mode.
46192  # If so, the updated path is stored in $new_path.
46193
46194  input_path="$new_path"
46195  # Check if we need to convert this using DOS-style short mode. If the path
46196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46197  # take no chances and rewrite it.
46198  # Note: m4 eats our [], so we need to use [ and ] instead.
46199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46200  if test "x$has_forbidden_chars" != x; then
46201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46205      # Going to short mode and back again did indeed matter. Since short mode is
46206      # case insensitive, let's make it lowercase to improve readability.
46207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46208      # Now convert it back to Unix-stile (cygpath)
46209      input_path=`$CYGPATH -u "$shortmode_path"`
46210      new_path="$input_path"
46211    fi
46212  fi
46213
46214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46215  if test "x$test_cygdrive_prefix" = x; then
46216    # As a simple fix, exclude /usr/bin since it's not a real path.
46217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46219      # a path prefixed by /cygdrive for fixpath to work.
46220      new_path="$CYGWIN_ROOT_PATH$input_path"
46221    fi
46222  fi
46223
46224
46225  if test "x$path" != "x$new_path"; then
46226    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46229  fi
46230
46231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46232
46233  path="$POTENTIAL_FREETYPE_LIB_PATH"
46234  has_colon=`$ECHO $path | $GREP ^.:`
46235  new_path="$path"
46236  if test "x$has_colon" = x; then
46237    # Not in mixed or Windows style, start by that.
46238    new_path=`cmd //c echo $path`
46239  fi
46240
46241
46242  input_path="$new_path"
46243  # Check if we need to convert this using DOS-style short mode. If the path
46244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46245  # take no chances and rewrite it.
46246  # Note: m4 eats our [], so we need to use [ and ] instead.
46247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46248  if test "x$has_forbidden_chars" != x; then
46249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46251  fi
46252
46253
46254  windows_path="$new_path"
46255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46256    unix_path=`$CYGPATH -u "$windows_path"`
46257    new_path="$unix_path"
46258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46260    new_path="$unix_path"
46261  fi
46262
46263  if test "x$path" != "x$new_path"; then
46264    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46266$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46267  fi
46268
46269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46271
46272  else
46273    # We're on a unix platform. Hooray! :)
46274    path="$POTENTIAL_FREETYPE_LIB_PATH"
46275    has_space=`$ECHO "$path" | $GREP " "`
46276    if test "x$has_space" != x; then
46277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46278$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46280    fi
46281
46282    # Use eval to expand a potential ~
46283    eval path="$path"
46284    if test ! -f "$path" && test ! -d "$path"; then
46285      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46286    fi
46287
46288    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46289  fi
46290
46291
46292    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46294$as_echo_n "checking for freetype includes... " >&6; }
46295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46296$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46297    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46299$as_echo_n "checking for freetype libraries... " >&6; }
46300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46301$as_echo "$FREETYPE_LIB_PATH" >&6; }
46302  fi
46303
46304
46305          if test "x$FOUND_FREETYPE" != xyes; then
46306            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46307
46308  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46309  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46310  METHOD="well-known location"
46311
46312  # Let's start with an optimistic view of the world :-)
46313  FOUND_FREETYPE=yes
46314
46315  # First look for the canonical freetype main include file ft2build.h.
46316  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46317    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46318    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46319    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46320      # Fail.
46321      FOUND_FREETYPE=no
46322    fi
46323  fi
46324
46325  if test "x$FOUND_FREETYPE" = xyes; then
46326    # Include file found, let's continue the sanity check.
46327    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46328$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46329
46330    # Reset to default value
46331    FREETYPE_BASE_NAME=freetype
46332    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46333    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46334      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46335          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46336        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46337        # for the .6 version explicitly.
46338        FREETYPE_BASE_NAME=freetype.6
46339        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46340        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46341$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46342      else
46343        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46344$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46345        FOUND_FREETYPE=no
46346      fi
46347    else
46348      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46349        # On Windows, we will need both .lib and .dll file.
46350        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46351          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46352$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46353          FOUND_FREETYPE=no
46354        fi
46355      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46356          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46357        # Found lib in isa dir, use that instead.
46358        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46359        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46360$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46361      fi
46362    fi
46363  fi
46364
46365  if test "x$FOUND_FREETYPE" = xyes; then
46366
46367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46368
46369  # Input might be given as Windows format, start by converting to
46370  # unix format.
46371  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46372  new_path=`$CYGPATH -u "$path"`
46373
46374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46377  # "foo.exe" is OK but "foo" is an error.
46378  #
46379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46380  # It is also a way to make sure we got the proper file name for the real test later on.
46381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46382  if test "x$test_shortpath" = x; then
46383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46386  fi
46387
46388  # Call helper function which possibly converts this using DOS-style short mode.
46389  # If so, the updated path is stored in $new_path.
46390
46391  input_path="$new_path"
46392  # Check if we need to convert this using DOS-style short mode. If the path
46393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46394  # take no chances and rewrite it.
46395  # Note: m4 eats our [], so we need to use [ and ] instead.
46396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46397  if test "x$has_forbidden_chars" != x; then
46398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46402      # Going to short mode and back again did indeed matter. Since short mode is
46403      # case insensitive, let's make it lowercase to improve readability.
46404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46405      # Now convert it back to Unix-stile (cygpath)
46406      input_path=`$CYGPATH -u "$shortmode_path"`
46407      new_path="$input_path"
46408    fi
46409  fi
46410
46411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46412  if test "x$test_cygdrive_prefix" = x; then
46413    # As a simple fix, exclude /usr/bin since it's not a real path.
46414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46416      # a path prefixed by /cygdrive for fixpath to work.
46417      new_path="$CYGWIN_ROOT_PATH$input_path"
46418    fi
46419  fi
46420
46421
46422  if test "x$path" != "x$new_path"; then
46423    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46426  fi
46427
46428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46429
46430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46431  has_colon=`$ECHO $path | $GREP ^.:`
46432  new_path="$path"
46433  if test "x$has_colon" = x; then
46434    # Not in mixed or Windows style, start by that.
46435    new_path=`cmd //c echo $path`
46436  fi
46437
46438
46439  input_path="$new_path"
46440  # Check if we need to convert this using DOS-style short mode. If the path
46441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46442  # take no chances and rewrite it.
46443  # Note: m4 eats our [], so we need to use [ and ] instead.
46444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46445  if test "x$has_forbidden_chars" != x; then
46446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46448  fi
46449
46450
46451  windows_path="$new_path"
46452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46453    unix_path=`$CYGPATH -u "$windows_path"`
46454    new_path="$unix_path"
46455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46457    new_path="$unix_path"
46458  fi
46459
46460  if test "x$path" != "x$new_path"; then
46461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46464  fi
46465
46466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46468
46469  else
46470    # We're on a unix platform. Hooray! :)
46471    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46472    has_space=`$ECHO "$path" | $GREP " "`
46473    if test "x$has_space" != x; then
46474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46477    fi
46478
46479    # Use eval to expand a potential ~
46480    eval path="$path"
46481    if test ! -f "$path" && test ! -d "$path"; then
46482      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46483    fi
46484
46485    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46486  fi
46487
46488
46489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46490
46491  # Input might be given as Windows format, start by converting to
46492  # unix format.
46493  path="$POTENTIAL_FREETYPE_LIB_PATH"
46494  new_path=`$CYGPATH -u "$path"`
46495
46496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46499  # "foo.exe" is OK but "foo" is an error.
46500  #
46501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46502  # It is also a way to make sure we got the proper file name for the real test later on.
46503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46504  if test "x$test_shortpath" = x; then
46505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46508  fi
46509
46510  # Call helper function which possibly converts this using DOS-style short mode.
46511  # If so, the updated path is stored in $new_path.
46512
46513  input_path="$new_path"
46514  # Check if we need to convert this using DOS-style short mode. If the path
46515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46516  # take no chances and rewrite it.
46517  # Note: m4 eats our [], so we need to use [ and ] instead.
46518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46519  if test "x$has_forbidden_chars" != x; then
46520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46524      # Going to short mode and back again did indeed matter. Since short mode is
46525      # case insensitive, let's make it lowercase to improve readability.
46526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46527      # Now convert it back to Unix-stile (cygpath)
46528      input_path=`$CYGPATH -u "$shortmode_path"`
46529      new_path="$input_path"
46530    fi
46531  fi
46532
46533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46534  if test "x$test_cygdrive_prefix" = x; then
46535    # As a simple fix, exclude /usr/bin since it's not a real path.
46536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46538      # a path prefixed by /cygdrive for fixpath to work.
46539      new_path="$CYGWIN_ROOT_PATH$input_path"
46540    fi
46541  fi
46542
46543
46544  if test "x$path" != "x$new_path"; then
46545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46548  fi
46549
46550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46551
46552  path="$POTENTIAL_FREETYPE_LIB_PATH"
46553  has_colon=`$ECHO $path | $GREP ^.:`
46554  new_path="$path"
46555  if test "x$has_colon" = x; then
46556    # Not in mixed or Windows style, start by that.
46557    new_path=`cmd //c echo $path`
46558  fi
46559
46560
46561  input_path="$new_path"
46562  # Check if we need to convert this using DOS-style short mode. If the path
46563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46564  # take no chances and rewrite it.
46565  # Note: m4 eats our [], so we need to use [ and ] instead.
46566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46567  if test "x$has_forbidden_chars" != x; then
46568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46570  fi
46571
46572
46573  windows_path="$new_path"
46574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46575    unix_path=`$CYGPATH -u "$windows_path"`
46576    new_path="$unix_path"
46577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46579    new_path="$unix_path"
46580  fi
46581
46582  if test "x$path" != "x$new_path"; then
46583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46586  fi
46587
46588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46590
46591  else
46592    # We're on a unix platform. Hooray! :)
46593    path="$POTENTIAL_FREETYPE_LIB_PATH"
46594    has_space=`$ECHO "$path" | $GREP " "`
46595    if test "x$has_space" != x; then
46596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46599    fi
46600
46601    # Use eval to expand a potential ~
46602    eval path="$path"
46603    if test ! -f "$path" && test ! -d "$path"; then
46604      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46605    fi
46606
46607    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46608  fi
46609
46610
46611    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46613$as_echo_n "checking for freetype includes... " >&6; }
46614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46615$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46616    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46618$as_echo_n "checking for freetype libraries... " >&6; }
46619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46620$as_echo "$FREETYPE_LIB_PATH" >&6; }
46621  fi
46622
46623          fi
46624
46625          if test "x$FOUND_FREETYPE" != xyes; then
46626            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46627
46628  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46629  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46630  METHOD="well-known location"
46631
46632  # Let's start with an optimistic view of the world :-)
46633  FOUND_FREETYPE=yes
46634
46635  # First look for the canonical freetype main include file ft2build.h.
46636  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46637    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46638    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46639    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46640      # Fail.
46641      FOUND_FREETYPE=no
46642    fi
46643  fi
46644
46645  if test "x$FOUND_FREETYPE" = xyes; then
46646    # Include file found, let's continue the sanity check.
46647    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46648$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46649
46650    # Reset to default value
46651    FREETYPE_BASE_NAME=freetype
46652    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46653    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46654      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46655          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46656        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46657        # for the .6 version explicitly.
46658        FREETYPE_BASE_NAME=freetype.6
46659        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46660        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46661$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46662      else
46663        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46664$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46665        FOUND_FREETYPE=no
46666      fi
46667    else
46668      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46669        # On Windows, we will need both .lib and .dll file.
46670        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46671          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46672$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46673          FOUND_FREETYPE=no
46674        fi
46675      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46676          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46677        # Found lib in isa dir, use that instead.
46678        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46679        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46680$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46681      fi
46682    fi
46683  fi
46684
46685  if test "x$FOUND_FREETYPE" = xyes; then
46686
46687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46688
46689  # Input might be given as Windows format, start by converting to
46690  # unix format.
46691  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46692  new_path=`$CYGPATH -u "$path"`
46693
46694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46697  # "foo.exe" is OK but "foo" is an error.
46698  #
46699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46700  # It is also a way to make sure we got the proper file name for the real test later on.
46701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46702  if test "x$test_shortpath" = x; then
46703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46705    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46706  fi
46707
46708  # Call helper function which possibly converts this using DOS-style short mode.
46709  # If so, the updated path is stored in $new_path.
46710
46711  input_path="$new_path"
46712  # Check if we need to convert this using DOS-style short mode. If the path
46713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46714  # take no chances and rewrite it.
46715  # Note: m4 eats our [], so we need to use [ and ] instead.
46716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46717  if test "x$has_forbidden_chars" != x; then
46718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46722      # Going to short mode and back again did indeed matter. Since short mode is
46723      # case insensitive, let's make it lowercase to improve readability.
46724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46725      # Now convert it back to Unix-stile (cygpath)
46726      input_path=`$CYGPATH -u "$shortmode_path"`
46727      new_path="$input_path"
46728    fi
46729  fi
46730
46731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46732  if test "x$test_cygdrive_prefix" = x; then
46733    # As a simple fix, exclude /usr/bin since it's not a real path.
46734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46736      # a path prefixed by /cygdrive for fixpath to work.
46737      new_path="$CYGWIN_ROOT_PATH$input_path"
46738    fi
46739  fi
46740
46741
46742  if test "x$path" != "x$new_path"; then
46743    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46746  fi
46747
46748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46749
46750  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46751  has_colon=`$ECHO $path | $GREP ^.:`
46752  new_path="$path"
46753  if test "x$has_colon" = x; then
46754    # Not in mixed or Windows style, start by that.
46755    new_path=`cmd //c echo $path`
46756  fi
46757
46758
46759  input_path="$new_path"
46760  # Check if we need to convert this using DOS-style short mode. If the path
46761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46762  # take no chances and rewrite it.
46763  # Note: m4 eats our [], so we need to use [ and ] instead.
46764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46765  if test "x$has_forbidden_chars" != x; then
46766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46768  fi
46769
46770
46771  windows_path="$new_path"
46772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46773    unix_path=`$CYGPATH -u "$windows_path"`
46774    new_path="$unix_path"
46775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46777    new_path="$unix_path"
46778  fi
46779
46780  if test "x$path" != "x$new_path"; then
46781    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46784  fi
46785
46786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46788
46789  else
46790    # We're on a unix platform. Hooray! :)
46791    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46792    has_space=`$ECHO "$path" | $GREP " "`
46793    if test "x$has_space" != x; then
46794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46796      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46797    fi
46798
46799    # Use eval to expand a potential ~
46800    eval path="$path"
46801    if test ! -f "$path" && test ! -d "$path"; then
46802      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46803    fi
46804
46805    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46806  fi
46807
46808
46809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46810
46811  # Input might be given as Windows format, start by converting to
46812  # unix format.
46813  path="$POTENTIAL_FREETYPE_LIB_PATH"
46814  new_path=`$CYGPATH -u "$path"`
46815
46816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46819  # "foo.exe" is OK but "foo" is an error.
46820  #
46821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46822  # It is also a way to make sure we got the proper file name for the real test later on.
46823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46824  if test "x$test_shortpath" = x; then
46825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46827    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46828  fi
46829
46830  # Call helper function which possibly converts this using DOS-style short mode.
46831  # If so, the updated path is stored in $new_path.
46832
46833  input_path="$new_path"
46834  # Check if we need to convert this using DOS-style short mode. If the path
46835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46836  # take no chances and rewrite it.
46837  # Note: m4 eats our [], so we need to use [ and ] instead.
46838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46839  if test "x$has_forbidden_chars" != x; then
46840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46844      # Going to short mode and back again did indeed matter. Since short mode is
46845      # case insensitive, let's make it lowercase to improve readability.
46846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46847      # Now convert it back to Unix-stile (cygpath)
46848      input_path=`$CYGPATH -u "$shortmode_path"`
46849      new_path="$input_path"
46850    fi
46851  fi
46852
46853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46854  if test "x$test_cygdrive_prefix" = x; then
46855    # As a simple fix, exclude /usr/bin since it's not a real path.
46856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46858      # a path prefixed by /cygdrive for fixpath to work.
46859      new_path="$CYGWIN_ROOT_PATH$input_path"
46860    fi
46861  fi
46862
46863
46864  if test "x$path" != "x$new_path"; then
46865    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46868  fi
46869
46870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46871
46872  path="$POTENTIAL_FREETYPE_LIB_PATH"
46873  has_colon=`$ECHO $path | $GREP ^.:`
46874  new_path="$path"
46875  if test "x$has_colon" = x; then
46876    # Not in mixed or Windows style, start by that.
46877    new_path=`cmd //c echo $path`
46878  fi
46879
46880
46881  input_path="$new_path"
46882  # Check if we need to convert this using DOS-style short mode. If the path
46883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46884  # take no chances and rewrite it.
46885  # Note: m4 eats our [], so we need to use [ and ] instead.
46886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46887  if test "x$has_forbidden_chars" != x; then
46888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46890  fi
46891
46892
46893  windows_path="$new_path"
46894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46895    unix_path=`$CYGPATH -u "$windows_path"`
46896    new_path="$unix_path"
46897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46899    new_path="$unix_path"
46900  fi
46901
46902  if test "x$path" != "x$new_path"; then
46903    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46906  fi
46907
46908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46910
46911  else
46912    # We're on a unix platform. Hooray! :)
46913    path="$POTENTIAL_FREETYPE_LIB_PATH"
46914    has_space=`$ECHO "$path" | $GREP " "`
46915    if test "x$has_space" != x; then
46916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46917$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46918      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46919    fi
46920
46921    # Use eval to expand a potential ~
46922    eval path="$path"
46923    if test ! -f "$path" && test ! -d "$path"; then
46924      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46925    fi
46926
46927    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46928  fi
46929
46930
46931    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46933$as_echo_n "checking for freetype includes... " >&6; }
46934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46935$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46936    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46938$as_echo_n "checking for freetype libraries... " >&6; }
46939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46940$as_echo "$FREETYPE_LIB_PATH" >&6; }
46941  fi
46942
46943          fi
46944
46945          if test "x$FOUND_FREETYPE" != xyes; then
46946            FREETYPE_BASE_DIR="$SYSROOT/usr"
46947            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46948
46949  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46950  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46951  METHOD="well-known location"
46952
46953  # Let's start with an optimistic view of the world :-)
46954  FOUND_FREETYPE=yes
46955
46956  # First look for the canonical freetype main include file ft2build.h.
46957  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46958    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46959    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46960    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46961      # Fail.
46962      FOUND_FREETYPE=no
46963    fi
46964  fi
46965
46966  if test "x$FOUND_FREETYPE" = xyes; then
46967    # Include file found, let's continue the sanity check.
46968    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46969$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46970
46971    # Reset to default value
46972    FREETYPE_BASE_NAME=freetype
46973    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46974    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46975      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46977        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46978        # for the .6 version explicitly.
46979        FREETYPE_BASE_NAME=freetype.6
46980        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46981        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46982$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46983      else
46984        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46986        FOUND_FREETYPE=no
46987      fi
46988    else
46989      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46990        # On Windows, we will need both .lib and .dll file.
46991        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46992          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46993$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46994          FOUND_FREETYPE=no
46995        fi
46996      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46997          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46998        # Found lib in isa dir, use that instead.
46999        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47000        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47001$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47002      fi
47003    fi
47004  fi
47005
47006  if test "x$FOUND_FREETYPE" = xyes; then
47007
47008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47009
47010  # Input might be given as Windows format, start by converting to
47011  # unix format.
47012  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47013  new_path=`$CYGPATH -u "$path"`
47014
47015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47018  # "foo.exe" is OK but "foo" is an error.
47019  #
47020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47021  # It is also a way to make sure we got the proper file name for the real test later on.
47022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47023  if test "x$test_shortpath" = x; then
47024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47026    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47027  fi
47028
47029  # Call helper function which possibly converts this using DOS-style short mode.
47030  # If so, the updated path is stored in $new_path.
47031
47032  input_path="$new_path"
47033  # Check if we need to convert this using DOS-style short mode. If the path
47034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47035  # take no chances and rewrite it.
47036  # Note: m4 eats our [], so we need to use [ and ] instead.
47037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47038  if test "x$has_forbidden_chars" != x; then
47039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47043      # Going to short mode and back again did indeed matter. Since short mode is
47044      # case insensitive, let's make it lowercase to improve readability.
47045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47046      # Now convert it back to Unix-stile (cygpath)
47047      input_path=`$CYGPATH -u "$shortmode_path"`
47048      new_path="$input_path"
47049    fi
47050  fi
47051
47052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47053  if test "x$test_cygdrive_prefix" = x; then
47054    # As a simple fix, exclude /usr/bin since it's not a real path.
47055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47057      # a path prefixed by /cygdrive for fixpath to work.
47058      new_path="$CYGWIN_ROOT_PATH$input_path"
47059    fi
47060  fi
47061
47062
47063  if test "x$path" != "x$new_path"; then
47064    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47067  fi
47068
47069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47070
47071  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47072  has_colon=`$ECHO $path | $GREP ^.:`
47073  new_path="$path"
47074  if test "x$has_colon" = x; then
47075    # Not in mixed or Windows style, start by that.
47076    new_path=`cmd //c echo $path`
47077  fi
47078
47079
47080  input_path="$new_path"
47081  # Check if we need to convert this using DOS-style short mode. If the path
47082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47083  # take no chances and rewrite it.
47084  # Note: m4 eats our [], so we need to use [ and ] instead.
47085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47086  if test "x$has_forbidden_chars" != x; then
47087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47089  fi
47090
47091
47092  windows_path="$new_path"
47093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47094    unix_path=`$CYGPATH -u "$windows_path"`
47095    new_path="$unix_path"
47096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47098    new_path="$unix_path"
47099  fi
47100
47101  if test "x$path" != "x$new_path"; then
47102    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47105  fi
47106
47107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47109
47110  else
47111    # We're on a unix platform. Hooray! :)
47112    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47113    has_space=`$ECHO "$path" | $GREP " "`
47114    if test "x$has_space" != x; then
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47117      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47118    fi
47119
47120    # Use eval to expand a potential ~
47121    eval path="$path"
47122    if test ! -f "$path" && test ! -d "$path"; then
47123      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47124    fi
47125
47126    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47127  fi
47128
47129
47130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47131
47132  # Input might be given as Windows format, start by converting to
47133  # unix format.
47134  path="$POTENTIAL_FREETYPE_LIB_PATH"
47135  new_path=`$CYGPATH -u "$path"`
47136
47137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47140  # "foo.exe" is OK but "foo" is an error.
47141  #
47142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47143  # It is also a way to make sure we got the proper file name for the real test later on.
47144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47145  if test "x$test_shortpath" = x; then
47146    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47147$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47148    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47149  fi
47150
47151  # Call helper function which possibly converts this using DOS-style short mode.
47152  # If so, the updated path is stored in $new_path.
47153
47154  input_path="$new_path"
47155  # Check if we need to convert this using DOS-style short mode. If the path
47156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47157  # take no chances and rewrite it.
47158  # Note: m4 eats our [], so we need to use [ and ] instead.
47159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47160  if test "x$has_forbidden_chars" != x; then
47161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47165      # Going to short mode and back again did indeed matter. Since short mode is
47166      # case insensitive, let's make it lowercase to improve readability.
47167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47168      # Now convert it back to Unix-stile (cygpath)
47169      input_path=`$CYGPATH -u "$shortmode_path"`
47170      new_path="$input_path"
47171    fi
47172  fi
47173
47174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47175  if test "x$test_cygdrive_prefix" = x; then
47176    # As a simple fix, exclude /usr/bin since it's not a real path.
47177    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47179      # a path prefixed by /cygdrive for fixpath to work.
47180      new_path="$CYGWIN_ROOT_PATH$input_path"
47181    fi
47182  fi
47183
47184
47185  if test "x$path" != "x$new_path"; then
47186    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47188$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47189  fi
47190
47191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47192
47193  path="$POTENTIAL_FREETYPE_LIB_PATH"
47194  has_colon=`$ECHO $path | $GREP ^.:`
47195  new_path="$path"
47196  if test "x$has_colon" = x; then
47197    # Not in mixed or Windows style, start by that.
47198    new_path=`cmd //c echo $path`
47199  fi
47200
47201
47202  input_path="$new_path"
47203  # Check if we need to convert this using DOS-style short mode. If the path
47204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47205  # take no chances and rewrite it.
47206  # Note: m4 eats our [], so we need to use [ and ] instead.
47207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47208  if test "x$has_forbidden_chars" != x; then
47209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47211  fi
47212
47213
47214  windows_path="$new_path"
47215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47216    unix_path=`$CYGPATH -u "$windows_path"`
47217    new_path="$unix_path"
47218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47220    new_path="$unix_path"
47221  fi
47222
47223  if test "x$path" != "x$new_path"; then
47224    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47226$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47227  fi
47228
47229  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47230  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47231
47232  else
47233    # We're on a unix platform. Hooray! :)
47234    path="$POTENTIAL_FREETYPE_LIB_PATH"
47235    has_space=`$ECHO "$path" | $GREP " "`
47236    if test "x$has_space" != x; then
47237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47238$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47239      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47240    fi
47241
47242    # Use eval to expand a potential ~
47243    eval path="$path"
47244    if test ! -f "$path" && test ! -d "$path"; then
47245      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47246    fi
47247
47248    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47249  fi
47250
47251
47252    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47254$as_echo_n "checking for freetype includes... " >&6; }
47255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47256$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47257    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47259$as_echo_n "checking for freetype libraries... " >&6; }
47260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47261$as_echo "$FREETYPE_LIB_PATH" >&6; }
47262  fi
47263
47264            else
47265
47266  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47267  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47268  METHOD="well-known location"
47269
47270  # Let's start with an optimistic view of the world :-)
47271  FOUND_FREETYPE=yes
47272
47273  # First look for the canonical freetype main include file ft2build.h.
47274  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47275    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47276    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47277    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47278      # Fail.
47279      FOUND_FREETYPE=no
47280    fi
47281  fi
47282
47283  if test "x$FOUND_FREETYPE" = xyes; then
47284    # Include file found, let's continue the sanity check.
47285    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47286$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47287
47288    # Reset to default value
47289    FREETYPE_BASE_NAME=freetype
47290    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47291    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47292      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47293          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47294        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47295        # for the .6 version explicitly.
47296        FREETYPE_BASE_NAME=freetype.6
47297        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47298        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47299$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47300      else
47301        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47303        FOUND_FREETYPE=no
47304      fi
47305    else
47306      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47307        # On Windows, we will need both .lib and .dll file.
47308        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47309          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47310$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47311          FOUND_FREETYPE=no
47312        fi
47313      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47315        # Found lib in isa dir, use that instead.
47316        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47317        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47318$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47319      fi
47320    fi
47321  fi
47322
47323  if test "x$FOUND_FREETYPE" = xyes; then
47324
47325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47326
47327  # Input might be given as Windows format, start by converting to
47328  # unix format.
47329  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47330  new_path=`$CYGPATH -u "$path"`
47331
47332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47335  # "foo.exe" is OK but "foo" is an error.
47336  #
47337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47338  # It is also a way to make sure we got the proper file name for the real test later on.
47339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47340  if test "x$test_shortpath" = x; then
47341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47343    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47344  fi
47345
47346  # Call helper function which possibly converts this using DOS-style short mode.
47347  # If so, the updated path is stored in $new_path.
47348
47349  input_path="$new_path"
47350  # Check if we need to convert this using DOS-style short mode. If the path
47351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47352  # take no chances and rewrite it.
47353  # Note: m4 eats our [], so we need to use [ and ] instead.
47354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47355  if test "x$has_forbidden_chars" != x; then
47356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47360      # Going to short mode and back again did indeed matter. Since short mode is
47361      # case insensitive, let's make it lowercase to improve readability.
47362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47363      # Now convert it back to Unix-stile (cygpath)
47364      input_path=`$CYGPATH -u "$shortmode_path"`
47365      new_path="$input_path"
47366    fi
47367  fi
47368
47369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47370  if test "x$test_cygdrive_prefix" = x; then
47371    # As a simple fix, exclude /usr/bin since it's not a real path.
47372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47374      # a path prefixed by /cygdrive for fixpath to work.
47375      new_path="$CYGWIN_ROOT_PATH$input_path"
47376    fi
47377  fi
47378
47379
47380  if test "x$path" != "x$new_path"; then
47381    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47383$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47384  fi
47385
47386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47387
47388  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47389  has_colon=`$ECHO $path | $GREP ^.:`
47390  new_path="$path"
47391  if test "x$has_colon" = x; then
47392    # Not in mixed or Windows style, start by that.
47393    new_path=`cmd //c echo $path`
47394  fi
47395
47396
47397  input_path="$new_path"
47398  # Check if we need to convert this using DOS-style short mode. If the path
47399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47400  # take no chances and rewrite it.
47401  # Note: m4 eats our [], so we need to use [ and ] instead.
47402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47403  if test "x$has_forbidden_chars" != x; then
47404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47406  fi
47407
47408
47409  windows_path="$new_path"
47410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47411    unix_path=`$CYGPATH -u "$windows_path"`
47412    new_path="$unix_path"
47413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47415    new_path="$unix_path"
47416  fi
47417
47418  if test "x$path" != "x$new_path"; then
47419    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47421$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47422  fi
47423
47424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47426
47427  else
47428    # We're on a unix platform. Hooray! :)
47429    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47430    has_space=`$ECHO "$path" | $GREP " "`
47431    if test "x$has_space" != x; then
47432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47434      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47435    fi
47436
47437    # Use eval to expand a potential ~
47438    eval path="$path"
47439    if test ! -f "$path" && test ! -d "$path"; then
47440      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47441    fi
47442
47443    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47444  fi
47445
47446
47447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47448
47449  # Input might be given as Windows format, start by converting to
47450  # unix format.
47451  path="$POTENTIAL_FREETYPE_LIB_PATH"
47452  new_path=`$CYGPATH -u "$path"`
47453
47454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47457  # "foo.exe" is OK but "foo" is an error.
47458  #
47459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47460  # It is also a way to make sure we got the proper file name for the real test later on.
47461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47462  if test "x$test_shortpath" = x; then
47463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47465    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47466  fi
47467
47468  # Call helper function which possibly converts this using DOS-style short mode.
47469  # If so, the updated path is stored in $new_path.
47470
47471  input_path="$new_path"
47472  # Check if we need to convert this using DOS-style short mode. If the path
47473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47474  # take no chances and rewrite it.
47475  # Note: m4 eats our [], so we need to use [ and ] instead.
47476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47477  if test "x$has_forbidden_chars" != x; then
47478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47482      # Going to short mode and back again did indeed matter. Since short mode is
47483      # case insensitive, let's make it lowercase to improve readability.
47484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47485      # Now convert it back to Unix-stile (cygpath)
47486      input_path=`$CYGPATH -u "$shortmode_path"`
47487      new_path="$input_path"
47488    fi
47489  fi
47490
47491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47492  if test "x$test_cygdrive_prefix" = x; then
47493    # As a simple fix, exclude /usr/bin since it's not a real path.
47494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47496      # a path prefixed by /cygdrive for fixpath to work.
47497      new_path="$CYGWIN_ROOT_PATH$input_path"
47498    fi
47499  fi
47500
47501
47502  if test "x$path" != "x$new_path"; then
47503    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47506  fi
47507
47508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47509
47510  path="$POTENTIAL_FREETYPE_LIB_PATH"
47511  has_colon=`$ECHO $path | $GREP ^.:`
47512  new_path="$path"
47513  if test "x$has_colon" = x; then
47514    # Not in mixed or Windows style, start by that.
47515    new_path=`cmd //c echo $path`
47516  fi
47517
47518
47519  input_path="$new_path"
47520  # Check if we need to convert this using DOS-style short mode. If the path
47521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47522  # take no chances and rewrite it.
47523  # Note: m4 eats our [], so we need to use [ and ] instead.
47524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47525  if test "x$has_forbidden_chars" != x; then
47526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47528  fi
47529
47530
47531  windows_path="$new_path"
47532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47533    unix_path=`$CYGPATH -u "$windows_path"`
47534    new_path="$unix_path"
47535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47537    new_path="$unix_path"
47538  fi
47539
47540  if test "x$path" != "x$new_path"; then
47541    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47544  fi
47545
47546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47548
47549  else
47550    # We're on a unix platform. Hooray! :)
47551    path="$POTENTIAL_FREETYPE_LIB_PATH"
47552    has_space=`$ECHO "$path" | $GREP " "`
47553    if test "x$has_space" != x; then
47554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47556      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47557    fi
47558
47559    # Use eval to expand a potential ~
47560    eval path="$path"
47561    if test ! -f "$path" && test ! -d "$path"; then
47562      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47563    fi
47564
47565    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47566  fi
47567
47568
47569    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47571$as_echo_n "checking for freetype includes... " >&6; }
47572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47573$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47574    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47576$as_echo_n "checking for freetype libraries... " >&6; }
47577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47578$as_echo "$FREETYPE_LIB_PATH" >&6; }
47579  fi
47580
47581              if test "x$FOUND_FREETYPE" != xyes; then
47582
47583  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47584  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47585  METHOD="well-known location"
47586
47587  # Let's start with an optimistic view of the world :-)
47588  FOUND_FREETYPE=yes
47589
47590  # First look for the canonical freetype main include file ft2build.h.
47591  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47592    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47593    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47594    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47595      # Fail.
47596      FOUND_FREETYPE=no
47597    fi
47598  fi
47599
47600  if test "x$FOUND_FREETYPE" = xyes; then
47601    # Include file found, let's continue the sanity check.
47602    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47603$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47604
47605    # Reset to default value
47606    FREETYPE_BASE_NAME=freetype
47607    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47608    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47609      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47610          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47611        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47612        # for the .6 version explicitly.
47613        FREETYPE_BASE_NAME=freetype.6
47614        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47615        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47616$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47617      else
47618        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47619$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47620        FOUND_FREETYPE=no
47621      fi
47622    else
47623      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47624        # On Windows, we will need both .lib and .dll file.
47625        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47626          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47627$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47628          FOUND_FREETYPE=no
47629        fi
47630      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47631          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47632        # Found lib in isa dir, use that instead.
47633        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47634        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47635$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47636      fi
47637    fi
47638  fi
47639
47640  if test "x$FOUND_FREETYPE" = xyes; then
47641
47642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47643
47644  # Input might be given as Windows format, start by converting to
47645  # unix format.
47646  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47647  new_path=`$CYGPATH -u "$path"`
47648
47649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47652  # "foo.exe" is OK but "foo" is an error.
47653  #
47654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47655  # It is also a way to make sure we got the proper file name for the real test later on.
47656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47657  if test "x$test_shortpath" = x; then
47658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47660    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47661  fi
47662
47663  # Call helper function which possibly converts this using DOS-style short mode.
47664  # If so, the updated path is stored in $new_path.
47665
47666  input_path="$new_path"
47667  # Check if we need to convert this using DOS-style short mode. If the path
47668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47669  # take no chances and rewrite it.
47670  # Note: m4 eats our [], so we need to use [ and ] instead.
47671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47672  if test "x$has_forbidden_chars" != x; then
47673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47677      # Going to short mode and back again did indeed matter. Since short mode is
47678      # case insensitive, let's make it lowercase to improve readability.
47679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47680      # Now convert it back to Unix-stile (cygpath)
47681      input_path=`$CYGPATH -u "$shortmode_path"`
47682      new_path="$input_path"
47683    fi
47684  fi
47685
47686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47687  if test "x$test_cygdrive_prefix" = x; then
47688    # As a simple fix, exclude /usr/bin since it's not a real path.
47689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47691      # a path prefixed by /cygdrive for fixpath to work.
47692      new_path="$CYGWIN_ROOT_PATH$input_path"
47693    fi
47694  fi
47695
47696
47697  if test "x$path" != "x$new_path"; then
47698    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47701  fi
47702
47703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47704
47705  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47706  has_colon=`$ECHO $path | $GREP ^.:`
47707  new_path="$path"
47708  if test "x$has_colon" = x; then
47709    # Not in mixed or Windows style, start by that.
47710    new_path=`cmd //c echo $path`
47711  fi
47712
47713
47714  input_path="$new_path"
47715  # Check if we need to convert this using DOS-style short mode. If the path
47716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47717  # take no chances and rewrite it.
47718  # Note: m4 eats our [], so we need to use [ and ] instead.
47719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47720  if test "x$has_forbidden_chars" != x; then
47721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47723  fi
47724
47725
47726  windows_path="$new_path"
47727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47728    unix_path=`$CYGPATH -u "$windows_path"`
47729    new_path="$unix_path"
47730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47732    new_path="$unix_path"
47733  fi
47734
47735  if test "x$path" != "x$new_path"; then
47736    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47738$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47739  fi
47740
47741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47743
47744  else
47745    # We're on a unix platform. Hooray! :)
47746    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47747    has_space=`$ECHO "$path" | $GREP " "`
47748    if test "x$has_space" != x; then
47749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47751      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47752    fi
47753
47754    # Use eval to expand a potential ~
47755    eval path="$path"
47756    if test ! -f "$path" && test ! -d "$path"; then
47757      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47758    fi
47759
47760    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47761  fi
47762
47763
47764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47765
47766  # Input might be given as Windows format, start by converting to
47767  # unix format.
47768  path="$POTENTIAL_FREETYPE_LIB_PATH"
47769  new_path=`$CYGPATH -u "$path"`
47770
47771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47774  # "foo.exe" is OK but "foo" is an error.
47775  #
47776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47777  # It is also a way to make sure we got the proper file name for the real test later on.
47778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47779  if test "x$test_shortpath" = x; then
47780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47782    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47783  fi
47784
47785  # Call helper function which possibly converts this using DOS-style short mode.
47786  # If so, the updated path is stored in $new_path.
47787
47788  input_path="$new_path"
47789  # Check if we need to convert this using DOS-style short mode. If the path
47790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47791  # take no chances and rewrite it.
47792  # Note: m4 eats our [], so we need to use [ and ] instead.
47793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47794  if test "x$has_forbidden_chars" != x; then
47795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47799      # Going to short mode and back again did indeed matter. Since short mode is
47800      # case insensitive, let's make it lowercase to improve readability.
47801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47802      # Now convert it back to Unix-stile (cygpath)
47803      input_path=`$CYGPATH -u "$shortmode_path"`
47804      new_path="$input_path"
47805    fi
47806  fi
47807
47808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47809  if test "x$test_cygdrive_prefix" = x; then
47810    # As a simple fix, exclude /usr/bin since it's not a real path.
47811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47813      # a path prefixed by /cygdrive for fixpath to work.
47814      new_path="$CYGWIN_ROOT_PATH$input_path"
47815    fi
47816  fi
47817
47818
47819  if test "x$path" != "x$new_path"; then
47820    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47823  fi
47824
47825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47826
47827  path="$POTENTIAL_FREETYPE_LIB_PATH"
47828  has_colon=`$ECHO $path | $GREP ^.:`
47829  new_path="$path"
47830  if test "x$has_colon" = x; then
47831    # Not in mixed or Windows style, start by that.
47832    new_path=`cmd //c echo $path`
47833  fi
47834
47835
47836  input_path="$new_path"
47837  # Check if we need to convert this using DOS-style short mode. If the path
47838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47839  # take no chances and rewrite it.
47840  # Note: m4 eats our [], so we need to use [ and ] instead.
47841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47842  if test "x$has_forbidden_chars" != x; then
47843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47845  fi
47846
47847
47848  windows_path="$new_path"
47849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47850    unix_path=`$CYGPATH -u "$windows_path"`
47851    new_path="$unix_path"
47852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47854    new_path="$unix_path"
47855  fi
47856
47857  if test "x$path" != "x$new_path"; then
47858    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47860$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47861  fi
47862
47863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47865
47866  else
47867    # We're on a unix platform. Hooray! :)
47868    path="$POTENTIAL_FREETYPE_LIB_PATH"
47869    has_space=`$ECHO "$path" | $GREP " "`
47870    if test "x$has_space" != x; then
47871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47873      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47874    fi
47875
47876    # Use eval to expand a potential ~
47877    eval path="$path"
47878    if test ! -f "$path" && test ! -d "$path"; then
47879      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47880    fi
47881
47882    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47883  fi
47884
47885
47886    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47888$as_echo_n "checking for freetype includes... " >&6; }
47889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47890$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47891    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47893$as_echo_n "checking for freetype libraries... " >&6; }
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47895$as_echo "$FREETYPE_LIB_PATH" >&6; }
47896  fi
47897
47898              fi
47899            fi
47900          fi
47901        fi
47902      fi # end check in well-known locations
47903
47904      if test "x$FOUND_FREETYPE" != xyes; then
47905
47906  # Print a helpful message on how to acquire the necessary build dependency.
47907  # freetype is the help tag: freetype, cups, pulse, alsa etc
47908  MISSING_DEPENDENCY=freetype
47909
47910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47911    cygwin_help $MISSING_DEPENDENCY
47912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47913    msys_help $MISSING_DEPENDENCY
47914  else
47915    PKGHANDLER_COMMAND=
47916
47917    case $PKGHANDLER in
47918      apt-get)
47919        apt_help     $MISSING_DEPENDENCY ;;
47920      yum)
47921        yum_help     $MISSING_DEPENDENCY ;;
47922      port)
47923        port_help    $MISSING_DEPENDENCY ;;
47924      pkgutil)
47925        pkgutil_help $MISSING_DEPENDENCY ;;
47926      pkgadd)
47927        pkgadd_help  $MISSING_DEPENDENCY ;;
47928    esac
47929
47930    if test "x$PKGHANDLER_COMMAND" != x; then
47931      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47932    fi
47933  fi
47934
47935        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47936      fi
47937    fi # end user specified settings
47938
47939    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47940    if test "x$FREETYPE_CFLAGS" = x; then
47941
47942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47943
47944  # Input might be given as Windows format, start by converting to
47945  # unix format.
47946  path="$FREETYPE_INCLUDE_PATH"
47947  new_path=`$CYGPATH -u "$path"`
47948
47949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47952  # "foo.exe" is OK but "foo" is an error.
47953  #
47954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47955  # It is also a way to make sure we got the proper file name for the real test later on.
47956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47957  if test "x$test_shortpath" = x; then
47958    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47959$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47960    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47961  fi
47962
47963  # Call helper function which possibly converts this using DOS-style short mode.
47964  # If so, the updated path is stored in $new_path.
47965
47966  input_path="$new_path"
47967  # Check if we need to convert this using DOS-style short mode. If the path
47968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47969  # take no chances and rewrite it.
47970  # Note: m4 eats our [], so we need to use [ and ] instead.
47971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47972  if test "x$has_forbidden_chars" != x; then
47973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47977      # Going to short mode and back again did indeed matter. Since short mode is
47978      # case insensitive, let's make it lowercase to improve readability.
47979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47980      # Now convert it back to Unix-stile (cygpath)
47981      input_path=`$CYGPATH -u "$shortmode_path"`
47982      new_path="$input_path"
47983    fi
47984  fi
47985
47986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47987  if test "x$test_cygdrive_prefix" = x; then
47988    # As a simple fix, exclude /usr/bin since it's not a real path.
47989    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47991      # a path prefixed by /cygdrive for fixpath to work.
47992      new_path="$CYGWIN_ROOT_PATH$input_path"
47993    fi
47994  fi
47995
47996
47997  if test "x$path" != "x$new_path"; then
47998    FREETYPE_INCLUDE_PATH="$new_path"
47999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48000$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48001  fi
48002
48003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48004
48005  path="$FREETYPE_INCLUDE_PATH"
48006  has_colon=`$ECHO $path | $GREP ^.:`
48007  new_path="$path"
48008  if test "x$has_colon" = x; then
48009    # Not in mixed or Windows style, start by that.
48010    new_path=`cmd //c echo $path`
48011  fi
48012
48013
48014  input_path="$new_path"
48015  # Check if we need to convert this using DOS-style short mode. If the path
48016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48017  # take no chances and rewrite it.
48018  # Note: m4 eats our [], so we need to use [ and ] instead.
48019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48020  if test "x$has_forbidden_chars" != x; then
48021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48023  fi
48024
48025
48026  windows_path="$new_path"
48027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48028    unix_path=`$CYGPATH -u "$windows_path"`
48029    new_path="$unix_path"
48030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48032    new_path="$unix_path"
48033  fi
48034
48035  if test "x$path" != "x$new_path"; then
48036    FREETYPE_INCLUDE_PATH="$new_path"
48037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48038$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48039  fi
48040
48041  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48042  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48043
48044  else
48045    # We're on a unix platform. Hooray! :)
48046    path="$FREETYPE_INCLUDE_PATH"
48047    has_space=`$ECHO "$path" | $GREP " "`
48048    if test "x$has_space" != x; then
48049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48050$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48051      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48052    fi
48053
48054    # Use eval to expand a potential ~
48055    eval path="$path"
48056    if test ! -f "$path" && test ! -d "$path"; then
48057      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48058    fi
48059
48060    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48061  fi
48062
48063      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48064        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48065      else
48066        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48067      fi
48068    fi
48069
48070    if test "x$FREETYPE_LIBS" = x; then
48071
48072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48073
48074  # Input might be given as Windows format, start by converting to
48075  # unix format.
48076  path="$FREETYPE_LIB_PATH"
48077  new_path=`$CYGPATH -u "$path"`
48078
48079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48082  # "foo.exe" is OK but "foo" is an error.
48083  #
48084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48085  # It is also a way to make sure we got the proper file name for the real test later on.
48086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48087  if test "x$test_shortpath" = x; then
48088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48089$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48090    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48091  fi
48092
48093  # Call helper function which possibly converts this using DOS-style short mode.
48094  # If so, the updated path is stored in $new_path.
48095
48096  input_path="$new_path"
48097  # Check if we need to convert this using DOS-style short mode. If the path
48098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48099  # take no chances and rewrite it.
48100  # Note: m4 eats our [], so we need to use [ and ] instead.
48101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48102  if test "x$has_forbidden_chars" != x; then
48103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48107      # Going to short mode and back again did indeed matter. Since short mode is
48108      # case insensitive, let's make it lowercase to improve readability.
48109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48110      # Now convert it back to Unix-stile (cygpath)
48111      input_path=`$CYGPATH -u "$shortmode_path"`
48112      new_path="$input_path"
48113    fi
48114  fi
48115
48116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48117  if test "x$test_cygdrive_prefix" = x; then
48118    # As a simple fix, exclude /usr/bin since it's not a real path.
48119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48121      # a path prefixed by /cygdrive for fixpath to work.
48122      new_path="$CYGWIN_ROOT_PATH$input_path"
48123    fi
48124  fi
48125
48126
48127  if test "x$path" != "x$new_path"; then
48128    FREETYPE_LIB_PATH="$new_path"
48129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48130$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48131  fi
48132
48133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48134
48135  path="$FREETYPE_LIB_PATH"
48136  has_colon=`$ECHO $path | $GREP ^.:`
48137  new_path="$path"
48138  if test "x$has_colon" = x; then
48139    # Not in mixed or Windows style, start by that.
48140    new_path=`cmd //c echo $path`
48141  fi
48142
48143
48144  input_path="$new_path"
48145  # Check if we need to convert this using DOS-style short mode. If the path
48146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48147  # take no chances and rewrite it.
48148  # Note: m4 eats our [], so we need to use [ and ] instead.
48149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48150  if test "x$has_forbidden_chars" != x; then
48151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48153  fi
48154
48155
48156  windows_path="$new_path"
48157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48158    unix_path=`$CYGPATH -u "$windows_path"`
48159    new_path="$unix_path"
48160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48162    new_path="$unix_path"
48163  fi
48164
48165  if test "x$path" != "x$new_path"; then
48166    FREETYPE_LIB_PATH="$new_path"
48167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48168$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48169  fi
48170
48171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48173
48174  else
48175    # We're on a unix platform. Hooray! :)
48176    path="$FREETYPE_LIB_PATH"
48177    has_space=`$ECHO "$path" | $GREP " "`
48178    if test "x$has_space" != x; then
48179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48180$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48181      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48182    fi
48183
48184    # Use eval to expand a potential ~
48185    eval path="$path"
48186    if test ! -f "$path" && test ! -d "$path"; then
48187      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48188    fi
48189
48190    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48191  fi
48192
48193      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48194        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48195      else
48196        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48197      fi
48198    fi
48199
48200    # Try to compile it
48201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48202$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48203    ac_ext=cpp
48204ac_cpp='$CXXCPP $CPPFLAGS'
48205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48208
48209    PREV_CXXCFLAGS="$CXXFLAGS"
48210    PREV_LIBS="$LIBS"
48211    PREV_CXX="$CXX"
48212    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48213    LIBS="$LIBS $FREETYPE_LIBS"
48214    CXX="$FIXPATH $CXX"
48215    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48216/* end confdefs.h.  */
48217
48218          #include<ft2build.h>
48219          #include FT_FREETYPE_H
48220          int main () {
48221            FT_Init_FreeType(NULL);
48222            return 0;
48223          }
48224
48225_ACEOF
48226if ac_fn_cxx_try_link "$LINENO"; then :
48227
48228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48229$as_echo "yes" >&6; }
48230
48231else
48232
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48234$as_echo "no" >&6; }
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48236$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48237          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48238$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48239
48240
48241  # Print a helpful message on how to acquire the necessary build dependency.
48242  # freetype is the help tag: freetype, cups, pulse, alsa etc
48243  MISSING_DEPENDENCY=freetype
48244
48245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48246    cygwin_help $MISSING_DEPENDENCY
48247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48248    msys_help $MISSING_DEPENDENCY
48249  else
48250    PKGHANDLER_COMMAND=
48251
48252    case $PKGHANDLER in
48253      apt-get)
48254        apt_help     $MISSING_DEPENDENCY ;;
48255      yum)
48256        yum_help     $MISSING_DEPENDENCY ;;
48257      port)
48258        port_help    $MISSING_DEPENDENCY ;;
48259      pkgutil)
48260        pkgutil_help $MISSING_DEPENDENCY ;;
48261      pkgadd)
48262        pkgadd_help  $MISSING_DEPENDENCY ;;
48263    esac
48264
48265    if test "x$PKGHANDLER_COMMAND" != x; then
48266      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48267    fi
48268  fi
48269
48270
48271          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48272
48273
48274fi
48275rm -f core conftest.err conftest.$ac_objext \
48276    conftest$ac_exeext conftest.$ac_ext
48277    CXXCFLAGS="$PREV_CXXFLAGS"
48278    LIBS="$PREV_LIBS"
48279    CXX="$PREV_CXX"
48280    ac_ext=cpp
48281ac_cpp='$CXXCPP $CPPFLAGS'
48282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48285
48286
48287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48288$as_echo_n "checking if we should bundle freetype... " >&6; }
48289    if test "x$BUNDLE_FREETYPE" = xyes; then
48290      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48291    fi
48292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48293$as_echo "$BUNDLE_FREETYPE" >&6; }
48294
48295  fi # end freetype needed
48296
48297
48298
48299
48300
48301
48302
48303  ###############################################################################
48304  #
48305  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48306  #
48307
48308# Check whether --with-alsa was given.
48309if test "${with_alsa+set}" = set; then :
48310  withval=$with_alsa;
48311fi
48312
48313
48314# Check whether --with-alsa-include was given.
48315if test "${with_alsa_include+set}" = set; then :
48316  withval=$with_alsa_include;
48317fi
48318
48319
48320# Check whether --with-alsa-lib was given.
48321if test "${with_alsa_lib+set}" = set; then :
48322  withval=$with_alsa_lib;
48323fi
48324
48325
48326  if test "x$ALSA_NOT_NEEDED" = xyes; then
48327    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48328      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48329$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48330    fi
48331    ALSA_CFLAGS=
48332    ALSA_LIBS=
48333  else
48334    ALSA_FOUND=no
48335
48336    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48337      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48338    fi
48339
48340    if test "x${with_alsa}" != x; then
48341      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48342      ALSA_CFLAGS="-I${with_alsa}/include"
48343      ALSA_FOUND=yes
48344    fi
48345    if test "x${with_alsa_include}" != x; then
48346      ALSA_CFLAGS="-I${with_alsa_include}"
48347      ALSA_FOUND=yes
48348    fi
48349    if test "x${with_alsa_lib}" != x; then
48350      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48351      ALSA_FOUND=yes
48352    fi
48353    if test "x$ALSA_FOUND" = xno; then
48354
48355
48356  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48357    # Source the builddeps file again, to make sure it uses the latest variables!
48358    . $builddepsfile
48359    # Look for a target and build machine specific resource!
48360    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48361    if test "x$resource" = x; then
48362      # Ok, lets instead look for a target specific resource
48363      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48364    fi
48365    if test "x$resource" = x; then
48366      # Ok, lets instead look for a build specific resource
48367      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48368    fi
48369    if test "x$resource" = x; then
48370      # Ok, lets instead look for a generic resource
48371      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48372      resource=${builddep_alsa}
48373    fi
48374    if test "x$resource" != x; then
48375      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48376$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48377      # If the resource in the builddeps.conf file is an existing directory,
48378      # for example /java/linux/cups
48379      if test -d ${resource}; then
48380        depdir=${resource}
48381      else
48382
48383  # alsa is for example mymodule
48384  # $resource is for example libs/general/libmymod_1_2_3.zip
48385  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48386  # $with_builddeps_dir is for example /localhome/builddeps
48387  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48388  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48389  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48390  filename=`basename $resource`
48391  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48392  filebase=${filename%%.*}
48393  extension=${filename#*.}
48394  installdir=$with_builddeps_dir/$filebase
48395  if test ! -f $installdir/$filename.unpacked; then
48396    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48397$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48398    if test ! -d $installdir; then
48399      mkdir -p $installdir
48400    fi
48401    if test ! -d $installdir; then
48402      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48403    fi
48404    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48405    touch $tmpfile
48406    if test ! -f $tmpfile; then
48407      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48408    fi
48409
48410  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48411  # $tmpfile is the local file name for the downloaded file.
48412  VALID_TOOL=no
48413  if test "x$BDEPS_FTP" = xwget; then
48414    VALID_TOOL=yes
48415    wget -O $tmpfile $with_builddeps_server/$resource
48416  fi
48417  if test "x$BDEPS_FTP" = xlftp; then
48418    VALID_TOOL=yes
48419    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48420  fi
48421  if test "x$BDEPS_FTP" = xftp; then
48422    VALID_TOOL=yes
48423    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48424    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48425    FTPUSERPWD=${FTPSERVER%%@*}
48426    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48427      FTPUSER=${userpwd%%:*}
48428      FTPPWD=${userpwd#*@}
48429      FTPSERVER=${FTPSERVER#*@}
48430    else
48431      FTPUSER=ftp
48432      FTPPWD=ftp
48433    fi
48434    # the "pass" command does not work on some
48435    # ftp clients (read ftp.exe) but if it works,
48436    # passive mode is better!
48437    ( \
48438        echo "user $FTPUSER $FTPPWD"        ; \
48439        echo "pass"                         ; \
48440        echo "bin"                          ; \
48441        echo "get $FTPPATH $tmpfile"              ; \
48442    ) | ftp -in $FTPSERVER
48443  fi
48444  if test "x$VALID_TOOL" != xyes; then
48445    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48446  fi
48447
48448    mv $tmpfile $installdir/$filename
48449    if test ! -s $installdir/$filename; then
48450      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48451    fi
48452    case "$extension" in
48453      zip)  echo "Unzipping $installdir/$filename..."
48454        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48455        ;;
48456      tar.gz) echo "Untaring $installdir/$filename..."
48457        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48458        ;;
48459      tgz) echo "Untaring $installdir/$filename..."
48460        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48461        ;;
48462      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48463        ;;
48464    esac
48465  fi
48466  if test -f $installdir/$filename.unpacked; then
48467    depdir=$installdir
48468  fi
48469
48470      fi
48471      # Source the builddeps file again, because in the previous command, the depdir
48472      # was updated to point at the current build dependency install directory.
48473      . $builddepsfile
48474      # Now extract variables from the builddeps.conf files.
48475      theroot=${builddep_alsa_ROOT}
48476      thecflags=${builddep_alsa_CFLAGS}
48477      thelibs=${builddep_alsa_LIBS}
48478      if test "x$depdir" = x; then
48479        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48480      fi
48481      ALSA=$depdir
48482      if test "x$theroot" != x; then
48483        ALSA="$theroot"
48484      fi
48485      if test "x$thecflags" != x; then
48486        ALSA_CFLAGS="$thecflags"
48487      fi
48488      if test "x$thelibs" != x; then
48489        ALSA_LIBS="$thelibs"
48490      fi
48491      ALSA_FOUND=yes
48492      else ALSA_FOUND=no
48493
48494    fi
48495    else ALSA_FOUND=no
48496
48497  fi
48498
48499    fi
48500    # Do not try pkg-config if we have a sysroot set.
48501    if test "x$SYSROOT" = x; then
48502      if test "x$ALSA_FOUND" = xno; then
48503
48504pkg_failed=no
48505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48506$as_echo_n "checking for ALSA... " >&6; }
48507
48508if test -n "$ALSA_CFLAGS"; then
48509    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48510 elif test -n "$PKG_CONFIG"; then
48511    if test -n "$PKG_CONFIG" && \
48512    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48513  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48514  ac_status=$?
48515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48516  test $ac_status = 0; }; then
48517  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48518else
48519  pkg_failed=yes
48520fi
48521 else
48522    pkg_failed=untried
48523fi
48524if test -n "$ALSA_LIBS"; then
48525    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48526 elif test -n "$PKG_CONFIG"; then
48527    if test -n "$PKG_CONFIG" && \
48528    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48529  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48530  ac_status=$?
48531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48532  test $ac_status = 0; }; then
48533  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48534else
48535  pkg_failed=yes
48536fi
48537 else
48538    pkg_failed=untried
48539fi
48540
48541
48542
48543if test $pkg_failed = yes; then
48544
48545if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48546        _pkg_short_errors_supported=yes
48547else
48548        _pkg_short_errors_supported=no
48549fi
48550        if test $_pkg_short_errors_supported = yes; then
48551	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48552        else
48553	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48554        fi
48555	# Put the nasty error message in config.log where it belongs
48556	echo "$ALSA_PKG_ERRORS" >&5
48557
48558	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48559$as_echo "no" >&6; }
48560                ALSA_FOUND=no
48561elif test $pkg_failed = untried; then
48562	ALSA_FOUND=no
48563else
48564	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48565	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48567$as_echo "yes" >&6; }
48568	ALSA_FOUND=yes
48569fi
48570      fi
48571    fi
48572    if test "x$ALSA_FOUND" = xno; then
48573      for ac_header in alsa/asoundlib.h
48574do :
48575  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48576if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48577  cat >>confdefs.h <<_ACEOF
48578#define HAVE_ALSA_ASOUNDLIB_H 1
48579_ACEOF
48580
48581            ALSA_FOUND=yes
48582            ALSA_CFLAGS=-Iignoreme
48583            ALSA_LIBS=-lasound
48584            DEFAULT_ALSA=yes
48585
48586else
48587  ALSA_FOUND=no
48588fi
48589
48590done
48591
48592    fi
48593    if test "x$ALSA_FOUND" = xno; then
48594
48595  # Print a helpful message on how to acquire the necessary build dependency.
48596  # alsa is the help tag: freetype, cups, pulse, alsa etc
48597  MISSING_DEPENDENCY=alsa
48598
48599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48600    cygwin_help $MISSING_DEPENDENCY
48601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48602    msys_help $MISSING_DEPENDENCY
48603  else
48604    PKGHANDLER_COMMAND=
48605
48606    case $PKGHANDLER in
48607      apt-get)
48608        apt_help     $MISSING_DEPENDENCY ;;
48609      yum)
48610        yum_help     $MISSING_DEPENDENCY ;;
48611      port)
48612        port_help    $MISSING_DEPENDENCY ;;
48613      pkgutil)
48614        pkgutil_help $MISSING_DEPENDENCY ;;
48615      pkgadd)
48616        pkgadd_help  $MISSING_DEPENDENCY ;;
48617    esac
48618
48619    if test "x$PKGHANDLER_COMMAND" != x; then
48620      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48621    fi
48622  fi
48623
48624      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48625    fi
48626  fi
48627
48628
48629
48630
48631
48632
48633  ###############################################################################
48634  #
48635  # Check for the jpeg library
48636  #
48637
48638
48639# Check whether --with-libjpeg was given.
48640if test "${with_libjpeg+set}" = set; then :
48641  withval=$with_libjpeg;
48642fi
48643
48644
48645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48646$as_echo_n "checking for which libjpeg to use... " >&6; }
48647
48648  # default is bundled
48649  DEFAULT_LIBJPEG=bundled
48650
48651  #
48652  # if user didn't specify, use DEFAULT_LIBJPEG
48653  #
48654  if test "x${with_libjpeg}" = "x"; then
48655    with_libjpeg=${DEFAULT_LIBJPEG}
48656  fi
48657
48658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48659$as_echo "${with_libjpeg}" >&6; }
48660
48661  if test "x${with_libjpeg}" = "xbundled"; then
48662    USE_EXTERNAL_LIBJPEG=false
48663  elif test "x${with_libjpeg}" = "xsystem"; then
48664    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48665if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48666
48667else
48668   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48669fi
48670
48671
48672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48673$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48674if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48675  $as_echo_n "(cached) " >&6
48676else
48677  ac_check_lib_save_LIBS=$LIBS
48678LIBS="-ljpeg  $LIBS"
48679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48680/* end confdefs.h.  */
48681
48682/* Override any GCC internal prototype to avoid an error.
48683   Use char because int might match the return type of a GCC
48684   builtin and then its argument prototype would still apply.  */
48685#ifdef __cplusplus
48686extern "C"
48687#endif
48688char jpeg_CreateDecompress ();
48689int
48690main ()
48691{
48692return jpeg_CreateDecompress ();
48693  ;
48694  return 0;
48695}
48696_ACEOF
48697if ac_fn_cxx_try_link "$LINENO"; then :
48698  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48699else
48700  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48701fi
48702rm -f core conftest.err conftest.$ac_objext \
48703    conftest$ac_exeext conftest.$ac_ext
48704LIBS=$ac_check_lib_save_LIBS
48705fi
48706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48707$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48708if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48709  cat >>confdefs.h <<_ACEOF
48710#define HAVE_LIBJPEG 1
48711_ACEOF
48712
48713  LIBS="-ljpeg $LIBS"
48714
48715else
48716   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48717fi
48718
48719
48720    USE_EXTERNAL_LIBJPEG=true
48721  else
48722    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48723  fi
48724
48725
48726
48727  ###############################################################################
48728  #
48729  # Check for the gif library
48730  #
48731
48732
48733# Check whether --with-giflib was given.
48734if test "${with_giflib+set}" = set; then :
48735  withval=$with_giflib;
48736fi
48737
48738
48739
48740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48741$as_echo_n "checking for which giflib to use... " >&6; }
48742
48743  # default is bundled
48744  DEFAULT_GIFLIB=bundled
48745
48746  #
48747  # if user didn't specify, use DEFAULT_GIFLIB
48748  #
48749  if test "x${with_giflib}" = "x"; then
48750    with_giflib=${DEFAULT_GIFLIB}
48751  fi
48752
48753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48754$as_echo "${with_giflib}" >&6; }
48755
48756  if test "x${with_giflib}" = "xbundled"; then
48757    USE_EXTERNAL_LIBGIF=false
48758  elif test "x${with_giflib}" = "xsystem"; then
48759    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48760if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48761
48762else
48763   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48764fi
48765
48766
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48768$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48769if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48770  $as_echo_n "(cached) " >&6
48771else
48772  ac_check_lib_save_LIBS=$LIBS
48773LIBS="-lgif  $LIBS"
48774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48775/* end confdefs.h.  */
48776
48777/* Override any GCC internal prototype to avoid an error.
48778   Use char because int might match the return type of a GCC
48779   builtin and then its argument prototype would still apply.  */
48780#ifdef __cplusplus
48781extern "C"
48782#endif
48783char DGifGetCode ();
48784int
48785main ()
48786{
48787return DGifGetCode ();
48788  ;
48789  return 0;
48790}
48791_ACEOF
48792if ac_fn_cxx_try_link "$LINENO"; then :
48793  ac_cv_lib_gif_DGifGetCode=yes
48794else
48795  ac_cv_lib_gif_DGifGetCode=no
48796fi
48797rm -f core conftest.err conftest.$ac_objext \
48798    conftest$ac_exeext conftest.$ac_ext
48799LIBS=$ac_check_lib_save_LIBS
48800fi
48801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48802$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48803if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48804  cat >>confdefs.h <<_ACEOF
48805#define HAVE_LIBGIF 1
48806_ACEOF
48807
48808  LIBS="-lgif $LIBS"
48809
48810else
48811   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48812fi
48813
48814
48815    USE_EXTERNAL_LIBGIF=true
48816  else
48817    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48818  fi
48819
48820
48821  ###############################################################################
48822  #
48823  # Check for the lcms2 library
48824  #
48825
48826
48827# Check whether --with-lcms was given.
48828if test "${with_lcms+set}" = set; then :
48829  withval=$with_lcms;
48830fi
48831
48832
48833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48834$as_echo_n "checking for which lcms to use... " >&6; }
48835
48836  DEFAULT_LCMS=bundled
48837
48838  #
48839  # If user didn't specify, use DEFAULT_LCMS
48840  #
48841  if test "x${with_lcms}" = "x"; then
48842      with_lcms=${DEFAULT_LCMS}
48843  fi
48844
48845  if test "x${with_lcms}" = "xbundled"; then
48846    USE_EXTERNAL_LCMS=false
48847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48848$as_echo "bundled" >&6; }
48849  elif test "x${with_lcms}" = "xsystem"; then
48850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48851$as_echo "system" >&6; }
48852
48853pkg_failed=no
48854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48855$as_echo_n "checking for LCMS... " >&6; }
48856
48857if test -n "$LCMS_CFLAGS"; then
48858    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48859 elif test -n "$PKG_CONFIG"; then
48860    if test -n "$PKG_CONFIG" && \
48861    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48862  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48863  ac_status=$?
48864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48865  test $ac_status = 0; }; then
48866  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48867else
48868  pkg_failed=yes
48869fi
48870 else
48871    pkg_failed=untried
48872fi
48873if test -n "$LCMS_LIBS"; then
48874    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48875 elif test -n "$PKG_CONFIG"; then
48876    if test -n "$PKG_CONFIG" && \
48877    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48878  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48879  ac_status=$?
48880  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48881  test $ac_status = 0; }; then
48882  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48883else
48884  pkg_failed=yes
48885fi
48886 else
48887    pkg_failed=untried
48888fi
48889
48890
48891
48892if test $pkg_failed = yes; then
48893
48894if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48895        _pkg_short_errors_supported=yes
48896else
48897        _pkg_short_errors_supported=no
48898fi
48899        if test $_pkg_short_errors_supported = yes; then
48900	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48901        else
48902	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48903        fi
48904	# Put the nasty error message in config.log where it belongs
48905	echo "$LCMS_PKG_ERRORS" >&5
48906
48907	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48908$as_echo "no" >&6; }
48909                LCMS_FOUND=no
48910elif test $pkg_failed = untried; then
48911	LCMS_FOUND=no
48912else
48913	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48914	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48916$as_echo "yes" >&6; }
48917	LCMS_FOUND=yes
48918fi
48919    if test "x${LCMS_FOUND}" = "xyes"; then
48920      USE_EXTERNAL_LCMS=true
48921    else
48922      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48923    fi
48924  else
48925    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48926  fi
48927
48928
48929
48930  ###############################################################################
48931  #
48932  # Check for the png library
48933  #
48934
48935
48936# Check whether --with-libpng was given.
48937if test "${with_libpng+set}" = set; then :
48938  withval=$with_libpng;
48939fi
48940
48941
48942
48943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48944$as_echo_n "checking for which libpng to use... " >&6; }
48945
48946  # default is bundled
48947  DEFAULT_LIBPNG=bundled
48948
48949  #
48950  # if user didn't specify, use DEFAULT_LIBPNG
48951  #
48952  if test "x${with_libpng}" = "x"; then
48953      with_libpng=${DEFAULT_LIBPNG}
48954  fi
48955
48956  if test "x${with_libpng}" = "xbundled"; then
48957      USE_EXTERNAL_LIBPNG=false
48958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48959$as_echo "bundled" >&6; }
48960  elif test "x${with_libpng}" = "xsystem"; then
48961
48962pkg_failed=no
48963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48964$as_echo_n "checking for PNG... " >&6; }
48965
48966if test -n "$PNG_CFLAGS"; then
48967    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48968 elif test -n "$PKG_CONFIG"; then
48969    if test -n "$PKG_CONFIG" && \
48970    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48971  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48972  ac_status=$?
48973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48974  test $ac_status = 0; }; then
48975  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48976else
48977  pkg_failed=yes
48978fi
48979 else
48980    pkg_failed=untried
48981fi
48982if test -n "$PNG_LIBS"; then
48983    pkg_cv_PNG_LIBS="$PNG_LIBS"
48984 elif test -n "$PKG_CONFIG"; then
48985    if test -n "$PKG_CONFIG" && \
48986    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48987  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48988  ac_status=$?
48989  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48990  test $ac_status = 0; }; then
48991  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48992else
48993  pkg_failed=yes
48994fi
48995 else
48996    pkg_failed=untried
48997fi
48998
48999
49000
49001if test $pkg_failed = yes; then
49002
49003if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49004        _pkg_short_errors_supported=yes
49005else
49006        _pkg_short_errors_supported=no
49007fi
49008        if test $_pkg_short_errors_supported = yes; then
49009	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49010        else
49011	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49012        fi
49013	# Put the nasty error message in config.log where it belongs
49014	echo "$PNG_PKG_ERRORS" >&5
49015
49016	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49017$as_echo "no" >&6; }
49018                 LIBPNG_FOUND=no
49019elif test $pkg_failed = untried; then
49020	 LIBPNG_FOUND=no
49021else
49022	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49023	PNG_LIBS=$pkg_cv_PNG_LIBS
49024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49025$as_echo "yes" >&6; }
49026	 LIBPNG_FOUND=yes
49027fi
49028      if test "x${LIBPNG_FOUND}" = "xyes"; then
49029          USE_EXTERNAL_LIBPNG=true
49030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49031$as_echo "system" >&6; }
49032      else
49033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49034$as_echo "system not found" >&6; }
49035          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49036      fi
49037  else
49038      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49039  fi
49040
49041
49042  ###############################################################################
49043  #
49044  # Check for the zlib library
49045  #
49046
49047
49048# Check whether --with-zlib was given.
49049if test "${with_zlib+set}" = set; then :
49050  withval=$with_zlib;
49051fi
49052
49053
49054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49055$as_echo_n "checking for compress in -lz... " >&6; }
49056if ${ac_cv_lib_z_compress+:} false; then :
49057  $as_echo_n "(cached) " >&6
49058else
49059  ac_check_lib_save_LIBS=$LIBS
49060LIBS="-lz  $LIBS"
49061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49062/* end confdefs.h.  */
49063
49064/* Override any GCC internal prototype to avoid an error.
49065   Use char because int might match the return type of a GCC
49066   builtin and then its argument prototype would still apply.  */
49067#ifdef __cplusplus
49068extern "C"
49069#endif
49070char compress ();
49071int
49072main ()
49073{
49074return compress ();
49075  ;
49076  return 0;
49077}
49078_ACEOF
49079if ac_fn_cxx_try_link "$LINENO"; then :
49080  ac_cv_lib_z_compress=yes
49081else
49082  ac_cv_lib_z_compress=no
49083fi
49084rm -f core conftest.err conftest.$ac_objext \
49085    conftest$ac_exeext conftest.$ac_ext
49086LIBS=$ac_check_lib_save_LIBS
49087fi
49088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49089$as_echo "$ac_cv_lib_z_compress" >&6; }
49090if test "x$ac_cv_lib_z_compress" = xyes; then :
49091   ZLIB_FOUND=yes
49092else
49093   ZLIB_FOUND=no
49094fi
49095
49096
49097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49098$as_echo_n "checking for which zlib to use... " >&6; }
49099
49100  DEFAULT_ZLIB=bundled
49101  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49102    #
49103    # On macosx default is system...on others default is
49104    #
49105    DEFAULT_ZLIB=system
49106  fi
49107
49108  if test "x${ZLIB_FOUND}" != "xyes"; then
49109    #
49110    # If we don't find any system...set default to bundled
49111    #
49112    DEFAULT_ZLIB=bundled
49113  fi
49114
49115  #
49116  # If user didn't specify, use DEFAULT_ZLIB
49117  #
49118  if test "x${with_zlib}" = "x"; then
49119    with_zlib=${DEFAULT_ZLIB}
49120  fi
49121
49122  if test "x${with_zlib}" = "xbundled"; then
49123    USE_EXTERNAL_LIBZ=false
49124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49125$as_echo "bundled" >&6; }
49126  elif test "x${with_zlib}" = "xsystem"; then
49127    if test "x${ZLIB_FOUND}" = "xyes"; then
49128      USE_EXTERNAL_LIBZ=true
49129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49130$as_echo "system" >&6; }
49131    else
49132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49133$as_echo "system not found" >&6; }
49134      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49135    fi
49136  else
49137    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49138  fi
49139
49140
49141
49142  ###############################################################################
49143  LIBZIP_CAN_USE_MMAP=true
49144
49145
49146
49147  ###############################################################################
49148  #
49149  # Check if altzone exists in time.h
49150  #
49151
49152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49153/* end confdefs.h.  */
49154#include <time.h>
49155int
49156main ()
49157{
49158return (int)altzone;
49159  ;
49160  return 0;
49161}
49162_ACEOF
49163if ac_fn_cxx_try_link "$LINENO"; then :
49164  has_altzone=yes
49165else
49166  has_altzone=no
49167fi
49168rm -f core conftest.err conftest.$ac_objext \
49169    conftest$ac_exeext conftest.$ac_ext
49170  if test "x$has_altzone" = xyes; then
49171
49172$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49173
49174  fi
49175
49176  ###############################################################################
49177  #
49178  # Check the maths library
49179  #
49180
49181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49182$as_echo_n "checking for cos in -lm... " >&6; }
49183if ${ac_cv_lib_m_cos+:} false; then :
49184  $as_echo_n "(cached) " >&6
49185else
49186  ac_check_lib_save_LIBS=$LIBS
49187LIBS="-lm  $LIBS"
49188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49189/* end confdefs.h.  */
49190
49191/* Override any GCC internal prototype to avoid an error.
49192   Use char because int might match the return type of a GCC
49193   builtin and then its argument prototype would still apply.  */
49194#ifdef __cplusplus
49195extern "C"
49196#endif
49197char cos ();
49198int
49199main ()
49200{
49201return cos ();
49202  ;
49203  return 0;
49204}
49205_ACEOF
49206if ac_fn_cxx_try_link "$LINENO"; then :
49207  ac_cv_lib_m_cos=yes
49208else
49209  ac_cv_lib_m_cos=no
49210fi
49211rm -f core conftest.err conftest.$ac_objext \
49212    conftest$ac_exeext conftest.$ac_ext
49213LIBS=$ac_check_lib_save_LIBS
49214fi
49215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49216$as_echo "$ac_cv_lib_m_cos" >&6; }
49217if test "x$ac_cv_lib_m_cos" = xyes; then :
49218  cat >>confdefs.h <<_ACEOF
49219#define HAVE_LIBM 1
49220_ACEOF
49221
49222  LIBS="-lm $LIBS"
49223
49224else
49225
49226        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49227$as_echo "$as_me: Maths library was not found" >&6;}
49228
49229
49230fi
49231
49232
49233
49234  ###############################################################################
49235  #
49236  # Check for libdl.so
49237
49238  save_LIBS="$LIBS"
49239  LIBS=""
49240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49241$as_echo_n "checking for dlopen in -ldl... " >&6; }
49242if ${ac_cv_lib_dl_dlopen+:} false; then :
49243  $as_echo_n "(cached) " >&6
49244else
49245  ac_check_lib_save_LIBS=$LIBS
49246LIBS="-ldl  $LIBS"
49247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49248/* end confdefs.h.  */
49249
49250/* Override any GCC internal prototype to avoid an error.
49251   Use char because int might match the return type of a GCC
49252   builtin and then its argument prototype would still apply.  */
49253#ifdef __cplusplus
49254extern "C"
49255#endif
49256char dlopen ();
49257int
49258main ()
49259{
49260return dlopen ();
49261  ;
49262  return 0;
49263}
49264_ACEOF
49265if ac_fn_cxx_try_link "$LINENO"; then :
49266  ac_cv_lib_dl_dlopen=yes
49267else
49268  ac_cv_lib_dl_dlopen=no
49269fi
49270rm -f core conftest.err conftest.$ac_objext \
49271    conftest$ac_exeext conftest.$ac_ext
49272LIBS=$ac_check_lib_save_LIBS
49273fi
49274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49275$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49276if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49277  cat >>confdefs.h <<_ACEOF
49278#define HAVE_LIBDL 1
49279_ACEOF
49280
49281  LIBS="-ldl $LIBS"
49282
49283fi
49284
49285  LIBDL="$LIBS"
49286
49287  LIBS="$save_LIBS"
49288
49289
49290  ###############################################################################
49291  #
49292  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49293  # dynamic build is configured on command line.
49294  #
49295
49296# Check whether --with-stdc++lib was given.
49297if test "${with_stdc__lib+set}" = set; then :
49298  withval=$with_stdc__lib;
49299        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49300                && test "x$with_stdc__lib" != xdefault; then
49301          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49302        fi
49303
49304else
49305  with_stdc__lib=default
49306
49307fi
49308
49309
49310  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49311    # Test if -lstdc++ works.
49312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49313$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49314    ac_ext=cpp
49315ac_cpp='$CXXCPP $CPPFLAGS'
49316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49319
49320    OLD_CXXFLAGS="$CXXFLAGS"
49321    CXXFLAGS="$CXXFLAGS -lstdc++"
49322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49323/* end confdefs.h.  */
49324
49325int
49326main ()
49327{
49328return 0;
49329  ;
49330  return 0;
49331}
49332_ACEOF
49333if ac_fn_cxx_try_link "$LINENO"; then :
49334  has_dynamic_libstdcxx=yes
49335else
49336  has_dynamic_libstdcxx=no
49337fi
49338rm -f core conftest.err conftest.$ac_objext \
49339    conftest$ac_exeext conftest.$ac_ext
49340    CXXFLAGS="$OLD_CXXFLAGS"
49341    ac_ext=cpp
49342ac_cpp='$CXXCPP $CPPFLAGS'
49343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49346
49347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49348$as_echo "$has_dynamic_libstdcxx" >&6; }
49349
49350    # Test if stdc++ can be linked statically.
49351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49352$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49353    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49354    ac_ext=cpp
49355ac_cpp='$CXXCPP $CPPFLAGS'
49356ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49357ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49358ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49359
49360    OLD_LIBS="$LIBS"
49361    OLD_CXX="$CXX"
49362    LIBS="$STATIC_STDCXX_FLAGS"
49363    CXX="$CC"
49364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49365/* end confdefs.h.  */
49366
49367int
49368main ()
49369{
49370return 0;
49371  ;
49372  return 0;
49373}
49374_ACEOF
49375if ac_fn_cxx_try_link "$LINENO"; then :
49376  has_static_libstdcxx=yes
49377else
49378  has_static_libstdcxx=no
49379fi
49380rm -f core conftest.err conftest.$ac_objext \
49381    conftest$ac_exeext conftest.$ac_ext
49382    LIBS="$OLD_LIBS"
49383    CXX="$OLD_CXX"
49384    ac_ext=cpp
49385ac_cpp='$CXXCPP $CPPFLAGS'
49386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49389
49390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49391$as_echo "$has_static_libstdcxx" >&6; }
49392
49393    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49394      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49395    fi
49396
49397    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49398      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49399    fi
49400
49401    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49402      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49403    fi
49404
49405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49406$as_echo_n "checking how to link with libstdc++... " >&6; }
49407    # If dynamic was requested, it's available since it would fail above otherwise.
49408    # If dynamic wasn't requested, go with static unless it isn't available.
49409    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49410      LIBCXX="$LIBCXX -lstdc++"
49411      LDCXX="$CXX"
49412      STATIC_CXX_SETTING="STATIC_CXX=false"
49413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49414$as_echo "dynamic" >&6; }
49415    else
49416      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49417      LDCXX="$CC"
49418      STATIC_CXX_SETTING="STATIC_CXX=true"
49419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49420$as_echo "static" >&6; }
49421    fi
49422  fi
49423
49424
49425  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49426    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49427
49428pkg_failed=no
49429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49430$as_echo_n "checking for LIBFFI... " >&6; }
49431
49432if test -n "$LIBFFI_CFLAGS"; then
49433    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49434 elif test -n "$PKG_CONFIG"; then
49435    if test -n "$PKG_CONFIG" && \
49436    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49437  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49438  ac_status=$?
49439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49440  test $ac_status = 0; }; then
49441  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49442else
49443  pkg_failed=yes
49444fi
49445 else
49446    pkg_failed=untried
49447fi
49448if test -n "$LIBFFI_LIBS"; then
49449    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49450 elif test -n "$PKG_CONFIG"; then
49451    if test -n "$PKG_CONFIG" && \
49452    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49453  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49454  ac_status=$?
49455  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49456  test $ac_status = 0; }; then
49457  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49458else
49459  pkg_failed=yes
49460fi
49461 else
49462    pkg_failed=untried
49463fi
49464
49465
49466
49467if test $pkg_failed = yes; then
49468
49469if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49470        _pkg_short_errors_supported=yes
49471else
49472        _pkg_short_errors_supported=no
49473fi
49474        if test $_pkg_short_errors_supported = yes; then
49475	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49476        else
49477	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49478        fi
49479	# Put the nasty error message in config.log where it belongs
49480	echo "$LIBFFI_PKG_ERRORS" >&5
49481
49482	as_fn_error $? "Package requirements (libffi) were not met:
49483
49484$LIBFFI_PKG_ERRORS
49485
49486Consider adjusting the PKG_CONFIG_PATH environment variable if you
49487installed software in a non-standard prefix.
49488
49489Alternatively, you may set the environment variables LIBFFI_CFLAGS
49490and LIBFFI_LIBS to avoid the need to call pkg-config.
49491See the pkg-config man page for more details.
49492" "$LINENO" 5
49493elif test $pkg_failed = untried; then
49494	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49496as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49497is in your PATH or set the PKG_CONFIG environment variable to the full
49498path to pkg-config.
49499
49500Alternatively, you may set the environment variables LIBFFI_CFLAGS
49501and LIBFFI_LIBS to avoid the need to call pkg-config.
49502See the pkg-config man page for more details.
49503
49504To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49505See \`config.log' for more details" "$LINENO" 5; }
49506else
49507	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49508	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49510$as_echo "yes" >&6; }
49511	:
49512fi
49513
49514  fi
49515
49516  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49517    # Extract the first word of "llvm-config", so it can be a program name with args.
49518set dummy llvm-config; ac_word=$2
49519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49520$as_echo_n "checking for $ac_word... " >&6; }
49521if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49522  $as_echo_n "(cached) " >&6
49523else
49524  if test -n "$LLVM_CONFIG"; then
49525  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49526else
49527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49528for as_dir in $PATH
49529do
49530  IFS=$as_save_IFS
49531  test -z "$as_dir" && as_dir=.
49532    for ac_exec_ext in '' $ac_executable_extensions; do
49533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49534    ac_cv_prog_LLVM_CONFIG="llvm-config"
49535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49536    break 2
49537  fi
49538done
49539  done
49540IFS=$as_save_IFS
49541
49542fi
49543fi
49544LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49545if test -n "$LLVM_CONFIG"; then
49546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49547$as_echo "$LLVM_CONFIG" >&6; }
49548else
49549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49550$as_echo "no" >&6; }
49551fi
49552
49553
49554
49555    if test "x$LLVM_CONFIG" != xllvm-config; then
49556      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49557    fi
49558
49559    llvm_components="jit mcjit engine nativecodegen native"
49560    unset LLVM_CFLAGS
49561    for flag in $("$LLVM_CONFIG" --cxxflags); do
49562      if echo "${flag}" | grep -q '^-[ID]'; then
49563        if test "${flag}" != "-D_DEBUG" ; then
49564          if test "${LLVM_CFLAGS}" != "" ; then
49565            LLVM_CFLAGS="${LLVM_CFLAGS} "
49566          fi
49567          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49568        fi
49569      fi
49570    done
49571    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49572    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49573
49574    unset LLVM_LDFLAGS
49575    for flag in $("${LLVM_CONFIG}" --ldflags); do
49576      if echo "${flag}" | grep -q '^-L'; then
49577        if test "${LLVM_LDFLAGS}" != ""; then
49578          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49579        fi
49580        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49581      fi
49582    done
49583
49584    unset LLVM_LIBS
49585    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49586      if echo "${flag}" | grep -q '^-l'; then
49587        if test "${LLVM_LIBS}" != ""; then
49588          LLVM_LIBS="${LLVM_LIBS} "
49589        fi
49590        LLVM_LIBS="${LLVM_LIBS}${flag}"
49591      fi
49592    done
49593
49594
49595
49596
49597  fi
49598
49599  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49600  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49601    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49602  fi
49603
49604  # TODO better (platform agnostic) test
49605  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49606    LIBCXX="-lstdc++"
49607  fi
49608
49609
49610
49611
49612  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49613
49614
49615# Check whether --with-msvcr-dll was given.
49616if test "${with_msvcr_dll+set}" = set; then :
49617  withval=$with_msvcr_dll;
49618fi
49619
49620
49621  if test "x$with_msvcr_dll" != x; then
49622    # If given explicitely by user, do not probe. If not present, fail directly.
49623
49624  DLL_NAME="$DLL_NAME"
49625  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49626  METHOD="--with-msvcr-dll"
49627  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49629$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49630
49631    # Need to check if the found msvcr is correct architecture
49632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49633$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49634    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49636      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49637      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49638      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49639        CORRECT_MSVCR_ARCH="PE32 executable"
49640      else
49641        CORRECT_MSVCR_ARCH="PE32+ executable"
49642      fi
49643    else
49644      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49645        CORRECT_MSVCR_ARCH=386
49646      else
49647        CORRECT_MSVCR_ARCH=x86-64
49648      fi
49649    fi
49650    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49652$as_echo "ok" >&6; }
49653      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49655$as_echo_n "checking for $DLL_NAME... " >&6; }
49656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49657$as_echo "$MSVC_DLL" >&6; }
49658    else
49659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49660$as_echo "incorrect, ignoring" >&6; }
49661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49662$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49663    fi
49664  fi
49665
49666    if test "x$MSVC_DLL" = x; then
49667      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49668    fi
49669  else
49670
49671  VAR_NAME="MSVCR_DLL"
49672  DLL_NAME="${MSVCR_NAME}"
49673  MSVC_DLL=
49674
49675  if test "x$MSVC_DLL" = x; then
49676    # Probe: Using well-known location from Visual Studio 10.0
49677    if test "x$VCINSTALLDIR" != x; then
49678      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49679
49680  windows_path="$CYGWIN_VC_INSTALL_DIR"
49681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49682    unix_path=`$CYGPATH -u "$windows_path"`
49683    CYGWIN_VC_INSTALL_DIR="$unix_path"
49684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49686    CYGWIN_VC_INSTALL_DIR="$unix_path"
49687  fi
49688
49689      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49690        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49691      else
49692        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49693      fi
49694      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49695
49696  DLL_NAME="$DLL_NAME"
49697  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49698  METHOD="well-known location in VCINSTALLDIR"
49699  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49700    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49701$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49702
49703    # Need to check if the found msvcr is correct architecture
49704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49705$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49706    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49708      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49709      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49710      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49711        CORRECT_MSVCR_ARCH="PE32 executable"
49712      else
49713        CORRECT_MSVCR_ARCH="PE32+ executable"
49714      fi
49715    else
49716      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49717        CORRECT_MSVCR_ARCH=386
49718      else
49719        CORRECT_MSVCR_ARCH=x86-64
49720      fi
49721    fi
49722    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49724$as_echo "ok" >&6; }
49725      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49727$as_echo_n "checking for $DLL_NAME... " >&6; }
49728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49729$as_echo "$MSVC_DLL" >&6; }
49730    else
49731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49732$as_echo "incorrect, ignoring" >&6; }
49733      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49734$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49735    fi
49736  fi
49737
49738    fi
49739  fi
49740
49741  if test "x$MSVC_DLL" = x; then
49742    # Probe: Check in the Boot JDK directory.
49743    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49744
49745  DLL_NAME="$DLL_NAME"
49746  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49747  METHOD="well-known location in Boot JDK"
49748  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49750$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49751
49752    # Need to check if the found msvcr is correct architecture
49753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49754$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49755    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49757      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49758      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49759      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49760        CORRECT_MSVCR_ARCH="PE32 executable"
49761      else
49762        CORRECT_MSVCR_ARCH="PE32+ executable"
49763      fi
49764    else
49765      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49766        CORRECT_MSVCR_ARCH=386
49767      else
49768        CORRECT_MSVCR_ARCH=x86-64
49769      fi
49770    fi
49771    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49773$as_echo "ok" >&6; }
49774      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49775      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49776$as_echo_n "checking for $DLL_NAME... " >&6; }
49777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49778$as_echo "$MSVC_DLL" >&6; }
49779    else
49780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49781$as_echo "incorrect, ignoring" >&6; }
49782      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49783$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49784    fi
49785  fi
49786
49787  fi
49788
49789  if test "x$MSVC_DLL" = x; then
49790    # Probe: Look in the Windows system32 directory
49791    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49792
49793  windows_path="$CYGWIN_SYSTEMROOT"
49794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49795    unix_path=`$CYGPATH -u "$windows_path"`
49796    CYGWIN_SYSTEMROOT="$unix_path"
49797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49799    CYGWIN_SYSTEMROOT="$unix_path"
49800  fi
49801
49802    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49803
49804  DLL_NAME="$DLL_NAME"
49805  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49806  METHOD="well-known location in SYSTEMROOT"
49807  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49808    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49809$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49810
49811    # Need to check if the found msvcr is correct architecture
49812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49813$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49814    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49816      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49817      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49818      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49819        CORRECT_MSVCR_ARCH="PE32 executable"
49820      else
49821        CORRECT_MSVCR_ARCH="PE32+ executable"
49822      fi
49823    else
49824      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49825        CORRECT_MSVCR_ARCH=386
49826      else
49827        CORRECT_MSVCR_ARCH=x86-64
49828      fi
49829    fi
49830    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49832$as_echo "ok" >&6; }
49833      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49834      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49835$as_echo_n "checking for $DLL_NAME... " >&6; }
49836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49837$as_echo "$MSVC_DLL" >&6; }
49838    else
49839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49840$as_echo "incorrect, ignoring" >&6; }
49841      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49842$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49843    fi
49844  fi
49845
49846  fi
49847
49848  if test "x$MSVC_DLL" = x; then
49849    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49850    if test "x$VS100COMNTOOLS" != x; then
49851      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49852
49853  windows_path="$CYGWIN_VS_TOOLS_DIR"
49854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49855    unix_path=`$CYGPATH -u "$windows_path"`
49856    CYGWIN_VS_TOOLS_DIR="$unix_path"
49857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49859    CYGWIN_VS_TOOLS_DIR="$unix_path"
49860  fi
49861
49862      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49863        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49864	    | $GREP -i /x64/ | $HEAD --lines 1`
49865      else
49866        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49867	    | $GREP -i /x86/ | $HEAD --lines 1`
49868      fi
49869
49870  DLL_NAME="$DLL_NAME"
49871  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49872  METHOD="search of VS100COMNTOOLS"
49873  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49874    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49875$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49876
49877    # Need to check if the found msvcr is correct architecture
49878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49879$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49880    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49882      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49883      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49884      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49885        CORRECT_MSVCR_ARCH="PE32 executable"
49886      else
49887        CORRECT_MSVCR_ARCH="PE32+ executable"
49888      fi
49889    else
49890      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49891        CORRECT_MSVCR_ARCH=386
49892      else
49893        CORRECT_MSVCR_ARCH=x86-64
49894      fi
49895    fi
49896    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49898$as_echo "ok" >&6; }
49899      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49901$as_echo_n "checking for $DLL_NAME... " >&6; }
49902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49903$as_echo "$MSVC_DLL" >&6; }
49904    else
49905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49906$as_echo "incorrect, ignoring" >&6; }
49907      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49908$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49909    fi
49910  fi
49911
49912    fi
49913  fi
49914
49915  if test "x$MSVC_DLL" = x; then
49916    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49917    # (This was the original behaviour; kept since it might turn something up)
49918    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49919      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49920        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49921	    | $GREP x64 | $HEAD --lines 1`
49922      else
49923        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49924	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49925        if test "x$POSSIBLE_MSVC_DLL" = x; then
49926          # We're grasping at straws now...
49927          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49928	      | $HEAD --lines 1`
49929        fi
49930      fi
49931
49932
49933  DLL_NAME="$DLL_NAME"
49934  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49935  METHOD="search of VCINSTALLDIR"
49936  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49938$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49939
49940    # Need to check if the found msvcr is correct architecture
49941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49942$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49943    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49945      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49946      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49947      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49948        CORRECT_MSVCR_ARCH="PE32 executable"
49949      else
49950        CORRECT_MSVCR_ARCH="PE32+ executable"
49951      fi
49952    else
49953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49954        CORRECT_MSVCR_ARCH=386
49955      else
49956        CORRECT_MSVCR_ARCH=x86-64
49957      fi
49958    fi
49959    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49961$as_echo "ok" >&6; }
49962      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49964$as_echo_n "checking for $DLL_NAME... " >&6; }
49965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49966$as_echo "$MSVC_DLL" >&6; }
49967    else
49968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49969$as_echo "incorrect, ignoring" >&6; }
49970      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49971$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49972    fi
49973  fi
49974
49975    fi
49976  fi
49977
49978  if test "x$MSVC_DLL" = x; then
49979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49980$as_echo_n "checking for $DLL_NAME... " >&6; }
49981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49982$as_echo "no" >&6; }
49983    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49984  fi
49985
49986  MSVCR_DLL=$MSVC_DLL
49987
49988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49989
49990  # Input might be given as Windows format, start by converting to
49991  # unix format.
49992  path="$MSVCR_DLL"
49993  new_path=`$CYGPATH -u "$path"`
49994
49995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49998  # "foo.exe" is OK but "foo" is an error.
49999  #
50000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50001  # It is also a way to make sure we got the proper file name for the real test later on.
50002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50003  if test "x$test_shortpath" = x; then
50004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50005$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50006    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50007  fi
50008
50009  # Call helper function which possibly converts this using DOS-style short mode.
50010  # If so, the updated path is stored in $new_path.
50011
50012  input_path="$new_path"
50013  # Check if we need to convert this using DOS-style short mode. If the path
50014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50015  # take no chances and rewrite it.
50016  # Note: m4 eats our [], so we need to use [ and ] instead.
50017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50018  if test "x$has_forbidden_chars" != x; then
50019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50023      # Going to short mode and back again did indeed matter. Since short mode is
50024      # case insensitive, let's make it lowercase to improve readability.
50025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50026      # Now convert it back to Unix-stile (cygpath)
50027      input_path=`$CYGPATH -u "$shortmode_path"`
50028      new_path="$input_path"
50029    fi
50030  fi
50031
50032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50033  if test "x$test_cygdrive_prefix" = x; then
50034    # As a simple fix, exclude /usr/bin since it's not a real path.
50035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50037      # a path prefixed by /cygdrive for fixpath to work.
50038      new_path="$CYGWIN_ROOT_PATH$input_path"
50039    fi
50040  fi
50041
50042
50043  if test "x$path" != "x$new_path"; then
50044    MSVCR_DLL="$new_path"
50045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50046$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50047  fi
50048
50049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50050
50051  path="$MSVCR_DLL"
50052  has_colon=`$ECHO $path | $GREP ^.:`
50053  new_path="$path"
50054  if test "x$has_colon" = x; then
50055    # Not in mixed or Windows style, start by that.
50056    new_path=`cmd //c echo $path`
50057  fi
50058
50059
50060  input_path="$new_path"
50061  # Check if we need to convert this using DOS-style short mode. If the path
50062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50063  # take no chances and rewrite it.
50064  # Note: m4 eats our [], so we need to use [ and ] instead.
50065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50066  if test "x$has_forbidden_chars" != x; then
50067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50069  fi
50070
50071
50072  windows_path="$new_path"
50073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50074    unix_path=`$CYGPATH -u "$windows_path"`
50075    new_path="$unix_path"
50076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50078    new_path="$unix_path"
50079  fi
50080
50081  if test "x$path" != "x$new_path"; then
50082    MSVCR_DLL="$new_path"
50083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50084$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50085  fi
50086
50087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50089
50090  else
50091    # We're on a unix platform. Hooray! :)
50092    path="$MSVCR_DLL"
50093    has_space=`$ECHO "$path" | $GREP " "`
50094    if test "x$has_space" != x; then
50095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50096$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50097      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50098    fi
50099
50100    # Use eval to expand a potential ~
50101    eval path="$path"
50102    if test ! -f "$path" && test ! -d "$path"; then
50103      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50104    fi
50105
50106    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50107  fi
50108
50109  MSVCR_DLL=$MSVCR_DLL
50110
50111
50112  fi
50113
50114
50115# Check whether --with-msvcp-dll was given.
50116if test "${with_msvcp_dll+set}" = set; then :
50117  withval=$with_msvcp_dll;
50118fi
50119
50120
50121  if test "x$MSVCP_NAME" != "x"; then
50122    if test "x$with_msvcp_dll" != x; then
50123      # If given explicitely by user, do not probe. If not present, fail directly.
50124
50125  DLL_NAME="$DLL_NAME"
50126  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50127  METHOD="--with-msvcp-dll"
50128  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50130$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50131
50132    # Need to check if the found msvcr is correct architecture
50133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50134$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50135    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50137      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50138      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50140        CORRECT_MSVCR_ARCH="PE32 executable"
50141      else
50142        CORRECT_MSVCR_ARCH="PE32+ executable"
50143      fi
50144    else
50145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50146        CORRECT_MSVCR_ARCH=386
50147      else
50148        CORRECT_MSVCR_ARCH=x86-64
50149      fi
50150    fi
50151    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50153$as_echo "ok" >&6; }
50154      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50156$as_echo_n "checking for $DLL_NAME... " >&6; }
50157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50158$as_echo "$MSVC_DLL" >&6; }
50159    else
50160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50161$as_echo "incorrect, ignoring" >&6; }
50162      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50163$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50164    fi
50165  fi
50166
50167      if test "x$MSVC_DLL" = x; then
50168        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50169      fi
50170    else
50171
50172  VAR_NAME="MSVCP_DLL"
50173  DLL_NAME="${MSVCP_NAME}"
50174  MSVC_DLL=
50175
50176  if test "x$MSVC_DLL" = x; then
50177    # Probe: Using well-known location from Visual Studio 10.0
50178    if test "x$VCINSTALLDIR" != x; then
50179      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50180
50181  windows_path="$CYGWIN_VC_INSTALL_DIR"
50182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50183    unix_path=`$CYGPATH -u "$windows_path"`
50184    CYGWIN_VC_INSTALL_DIR="$unix_path"
50185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50187    CYGWIN_VC_INSTALL_DIR="$unix_path"
50188  fi
50189
50190      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50191        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50192      else
50193        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50194      fi
50195      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50196
50197  DLL_NAME="$DLL_NAME"
50198  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50199  METHOD="well-known location in VCINSTALLDIR"
50200  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50201    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50202$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50203
50204    # Need to check if the found msvcr is correct architecture
50205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50206$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50207    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50209      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50210      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50211      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50212        CORRECT_MSVCR_ARCH="PE32 executable"
50213      else
50214        CORRECT_MSVCR_ARCH="PE32+ executable"
50215      fi
50216    else
50217      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50218        CORRECT_MSVCR_ARCH=386
50219      else
50220        CORRECT_MSVCR_ARCH=x86-64
50221      fi
50222    fi
50223    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50225$as_echo "ok" >&6; }
50226      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50228$as_echo_n "checking for $DLL_NAME... " >&6; }
50229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50230$as_echo "$MSVC_DLL" >&6; }
50231    else
50232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50233$as_echo "incorrect, ignoring" >&6; }
50234      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50235$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50236    fi
50237  fi
50238
50239    fi
50240  fi
50241
50242  if test "x$MSVC_DLL" = x; then
50243    # Probe: Check in the Boot JDK directory.
50244    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50245
50246  DLL_NAME="$DLL_NAME"
50247  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50248  METHOD="well-known location in Boot JDK"
50249  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50250    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50251$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50252
50253    # Need to check if the found msvcr is correct architecture
50254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50255$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50256    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50258      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50259      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50260      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50261        CORRECT_MSVCR_ARCH="PE32 executable"
50262      else
50263        CORRECT_MSVCR_ARCH="PE32+ executable"
50264      fi
50265    else
50266      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50267        CORRECT_MSVCR_ARCH=386
50268      else
50269        CORRECT_MSVCR_ARCH=x86-64
50270      fi
50271    fi
50272    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50274$as_echo "ok" >&6; }
50275      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50277$as_echo_n "checking for $DLL_NAME... " >&6; }
50278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50279$as_echo "$MSVC_DLL" >&6; }
50280    else
50281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50282$as_echo "incorrect, ignoring" >&6; }
50283      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50284$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50285    fi
50286  fi
50287
50288  fi
50289
50290  if test "x$MSVC_DLL" = x; then
50291    # Probe: Look in the Windows system32 directory
50292    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50293
50294  windows_path="$CYGWIN_SYSTEMROOT"
50295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50296    unix_path=`$CYGPATH -u "$windows_path"`
50297    CYGWIN_SYSTEMROOT="$unix_path"
50298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50300    CYGWIN_SYSTEMROOT="$unix_path"
50301  fi
50302
50303    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50304
50305  DLL_NAME="$DLL_NAME"
50306  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50307  METHOD="well-known location in SYSTEMROOT"
50308  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50310$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50311
50312    # Need to check if the found msvcr is correct architecture
50313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50314$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50315    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50317      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50318      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50320        CORRECT_MSVCR_ARCH="PE32 executable"
50321      else
50322        CORRECT_MSVCR_ARCH="PE32+ executable"
50323      fi
50324    else
50325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50326        CORRECT_MSVCR_ARCH=386
50327      else
50328        CORRECT_MSVCR_ARCH=x86-64
50329      fi
50330    fi
50331    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50333$as_echo "ok" >&6; }
50334      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50336$as_echo_n "checking for $DLL_NAME... " >&6; }
50337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50338$as_echo "$MSVC_DLL" >&6; }
50339    else
50340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50341$as_echo "incorrect, ignoring" >&6; }
50342      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50343$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50344    fi
50345  fi
50346
50347  fi
50348
50349  if test "x$MSVC_DLL" = x; then
50350    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50351    if test "x$VS100COMNTOOLS" != x; then
50352      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50353
50354  windows_path="$CYGWIN_VS_TOOLS_DIR"
50355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50356    unix_path=`$CYGPATH -u "$windows_path"`
50357    CYGWIN_VS_TOOLS_DIR="$unix_path"
50358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50360    CYGWIN_VS_TOOLS_DIR="$unix_path"
50361  fi
50362
50363      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50364        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50365	    | $GREP -i /x64/ | $HEAD --lines 1`
50366      else
50367        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50368	    | $GREP -i /x86/ | $HEAD --lines 1`
50369      fi
50370
50371  DLL_NAME="$DLL_NAME"
50372  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50373  METHOD="search of VS100COMNTOOLS"
50374  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50375    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50376$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50377
50378    # Need to check if the found msvcr is correct architecture
50379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50380$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50381    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50383      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50384      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50385      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50386        CORRECT_MSVCR_ARCH="PE32 executable"
50387      else
50388        CORRECT_MSVCR_ARCH="PE32+ executable"
50389      fi
50390    else
50391      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50392        CORRECT_MSVCR_ARCH=386
50393      else
50394        CORRECT_MSVCR_ARCH=x86-64
50395      fi
50396    fi
50397    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50399$as_echo "ok" >&6; }
50400      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50402$as_echo_n "checking for $DLL_NAME... " >&6; }
50403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50404$as_echo "$MSVC_DLL" >&6; }
50405    else
50406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50407$as_echo "incorrect, ignoring" >&6; }
50408      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50409$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50410    fi
50411  fi
50412
50413    fi
50414  fi
50415
50416  if test "x$MSVC_DLL" = x; then
50417    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50418    # (This was the original behaviour; kept since it might turn something up)
50419    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50420      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50421        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50422	    | $GREP x64 | $HEAD --lines 1`
50423      else
50424        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50425	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50426        if test "x$POSSIBLE_MSVC_DLL" = x; then
50427          # We're grasping at straws now...
50428          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50429	      | $HEAD --lines 1`
50430        fi
50431      fi
50432
50433
50434  DLL_NAME="$DLL_NAME"
50435  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50436  METHOD="search of VCINSTALLDIR"
50437  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50438    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50439$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50440
50441    # Need to check if the found msvcr is correct architecture
50442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50443$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50444    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50446      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50447      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50449        CORRECT_MSVCR_ARCH="PE32 executable"
50450      else
50451        CORRECT_MSVCR_ARCH="PE32+ executable"
50452      fi
50453    else
50454      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50455        CORRECT_MSVCR_ARCH=386
50456      else
50457        CORRECT_MSVCR_ARCH=x86-64
50458      fi
50459    fi
50460    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50462$as_echo "ok" >&6; }
50463      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50464      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50465$as_echo_n "checking for $DLL_NAME... " >&6; }
50466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50467$as_echo "$MSVC_DLL" >&6; }
50468    else
50469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50470$as_echo "incorrect, ignoring" >&6; }
50471      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50472$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50473    fi
50474  fi
50475
50476    fi
50477  fi
50478
50479  if test "x$MSVC_DLL" = x; then
50480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50481$as_echo_n "checking for $DLL_NAME... " >&6; }
50482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50483$as_echo "no" >&6; }
50484    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50485  fi
50486
50487  MSVCP_DLL=$MSVC_DLL
50488
50489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50490
50491  # Input might be given as Windows format, start by converting to
50492  # unix format.
50493  path="$MSVCP_DLL"
50494  new_path=`$CYGPATH -u "$path"`
50495
50496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50499  # "foo.exe" is OK but "foo" is an error.
50500  #
50501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50502  # It is also a way to make sure we got the proper file name for the real test later on.
50503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50504  if test "x$test_shortpath" = x; then
50505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50506$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50507    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50508  fi
50509
50510  # Call helper function which possibly converts this using DOS-style short mode.
50511  # If so, the updated path is stored in $new_path.
50512
50513  input_path="$new_path"
50514  # Check if we need to convert this using DOS-style short mode. If the path
50515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50516  # take no chances and rewrite it.
50517  # Note: m4 eats our [], so we need to use [ and ] instead.
50518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50519  if test "x$has_forbidden_chars" != x; then
50520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50524      # Going to short mode and back again did indeed matter. Since short mode is
50525      # case insensitive, let's make it lowercase to improve readability.
50526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50527      # Now convert it back to Unix-stile (cygpath)
50528      input_path=`$CYGPATH -u "$shortmode_path"`
50529      new_path="$input_path"
50530    fi
50531  fi
50532
50533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50534  if test "x$test_cygdrive_prefix" = x; then
50535    # As a simple fix, exclude /usr/bin since it's not a real path.
50536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50538      # a path prefixed by /cygdrive for fixpath to work.
50539      new_path="$CYGWIN_ROOT_PATH$input_path"
50540    fi
50541  fi
50542
50543
50544  if test "x$path" != "x$new_path"; then
50545    MSVCP_DLL="$new_path"
50546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50547$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50548  fi
50549
50550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50551
50552  path="$MSVCP_DLL"
50553  has_colon=`$ECHO $path | $GREP ^.:`
50554  new_path="$path"
50555  if test "x$has_colon" = x; then
50556    # Not in mixed or Windows style, start by that.
50557    new_path=`cmd //c echo $path`
50558  fi
50559
50560
50561  input_path="$new_path"
50562  # Check if we need to convert this using DOS-style short mode. If the path
50563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50564  # take no chances and rewrite it.
50565  # Note: m4 eats our [], so we need to use [ and ] instead.
50566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50567  if test "x$has_forbidden_chars" != x; then
50568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50570  fi
50571
50572
50573  windows_path="$new_path"
50574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50575    unix_path=`$CYGPATH -u "$windows_path"`
50576    new_path="$unix_path"
50577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50579    new_path="$unix_path"
50580  fi
50581
50582  if test "x$path" != "x$new_path"; then
50583    MSVCP_DLL="$new_path"
50584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50585$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50586  fi
50587
50588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50590
50591  else
50592    # We're on a unix platform. Hooray! :)
50593    path="$MSVCP_DLL"
50594    has_space=`$ECHO "$path" | $GREP " "`
50595    if test "x$has_space" != x; then
50596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50597$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50599    fi
50600
50601    # Use eval to expand a potential ~
50602    eval path="$path"
50603    if test ! -f "$path" && test ! -d "$path"; then
50604      as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50605    fi
50606
50607    MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50608  fi
50609
50610  MSVCP_DLL=$MSVCP_DLL
50611
50612
50613    fi
50614  fi
50615
50616
50617
50618# Check whether --with-dxsdk was given.
50619if test "${with_dxsdk+set}" = set; then :
50620  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50621$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50622fi
50623
50624
50625
50626
50627# Check whether --with-dxsdk-lib was given.
50628if test "${with_dxsdk_lib+set}" = set; then :
50629  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50630$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50631fi
50632
50633
50634
50635
50636# Check whether --with-dxsdk-include was given.
50637if test "${with_dxsdk_include+set}" = set; then :
50638  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50639$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50640fi
50641
50642
50643  fi
50644
50645
50646###############################################################################
50647#
50648# We need to do some final tweaking, when everything else is done.
50649#
50650###############################################################################
50651
50652
50653  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50654
50655
50656  # The name of the Service Agent jar.
50657  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50658  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50659    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50660  fi
50661
50662
50663
50664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50665$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50666
50667    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50668      ENABLE_INTREE_EC=yes
50669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50670$as_echo "yes" >&6; }
50671    else
50672      ENABLE_INTREE_EC=no
50673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50674$as_echo "no" >&6; }
50675    fi
50676
50677
50678
50679
50680###############################################################################
50681#
50682# Configure parts of the build that only affect the build performance,
50683# not the result.
50684#
50685###############################################################################
50686
50687
50688  # How many cores do we have on this build system?
50689
50690# Check whether --with-num-cores was given.
50691if test "${with_num_cores+set}" = set; then :
50692  withval=$with_num_cores;
50693fi
50694
50695  if test "x$with_num_cores" = x; then
50696    # The number of cores were not specified, try to probe them.
50697
50698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50699$as_echo_n "checking for number of cores... " >&6; }
50700  NUM_CORES=1
50701  FOUND_CORES=no
50702
50703  if test -f /proc/cpuinfo; then
50704    # Looks like a Linux (or cygwin) system
50705    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50706    FOUND_CORES=yes
50707  elif test -x /usr/sbin/psrinfo; then
50708    # Looks like a Solaris system
50709    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50710    FOUND_CORES=yes
50711  elif test -x /usr/sbin/system_profiler; then
50712    # Looks like a MacOSX system
50713    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50714    FOUND_CORES=yes
50715  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50716    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50717    FOUND_CORES=yes
50718  elif test -n "$NUMBER_OF_PROCESSORS"; then
50719    # On windows, look in the env
50720    NUM_CORES=$NUMBER_OF_PROCESSORS
50721    FOUND_CORES=yes
50722  fi
50723
50724  if test "x$FOUND_CORES" = xyes; then
50725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50726$as_echo "$NUM_CORES" >&6; }
50727  else
50728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50729$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50730    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50731$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50732  fi
50733
50734  else
50735    NUM_CORES=$with_num_cores
50736  fi
50737
50738
50739
50740  # How much memory do we have on this build system?
50741
50742# Check whether --with-memory-size was given.
50743if test "${with_memory_size+set}" = set; then :
50744  withval=$with_memory_size;
50745fi
50746
50747  if test "x$with_memory_size" = x; then
50748    # The memory size was not specified, try to probe it.
50749
50750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50751$as_echo_n "checking for memory size... " >&6; }
50752  # Default to 1024 MB
50753  MEMORY_SIZE=1024
50754  FOUND_MEM=no
50755
50756  if test -f /proc/meminfo; then
50757    # Looks like a Linux (or cygwin) system
50758    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50759    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50760    FOUND_MEM=yes
50761  elif test -x /usr/sbin/prtconf; then
50762    # Looks like a Solaris or AIX system
50763    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50764    FOUND_MEM=yes
50765  elif test -x /usr/sbin/system_profiler; then
50766    # Looks like a MacOSX system
50767    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50768    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50769    FOUND_MEM=yes
50770  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50771    # Windows, but without cygwin
50772    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50773    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50774    FOUND_MEM=yes
50775  fi
50776
50777  if test "x$FOUND_MEM" = xyes; then
50778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50779$as_echo "$MEMORY_SIZE MB" >&6; }
50780  else
50781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50782$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50783    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50784$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50785  fi
50786
50787  else
50788    MEMORY_SIZE=$with_memory_size
50789  fi
50790
50791
50792
50793  # Provide a decent default number of parallel jobs for make depending on
50794  # number of cores, amount of memory and machine architecture.
50795
50796# Check whether --with-jobs was given.
50797if test "${with_jobs+set}" = set; then :
50798  withval=$with_jobs;
50799fi
50800
50801  if test "x$with_jobs" = x; then
50802    # Number of jobs was not specified, calculate.
50803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50804$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50805    # Approximate memory in GB.
50806    memory_gb=`expr $MEMORY_SIZE / 1024`
50807    # Pick the lowest of memory in gb and number of cores.
50808    if test "$memory_gb" -lt "$NUM_CORES"; then
50809      JOBS="$memory_gb"
50810    else
50811      JOBS="$NUM_CORES"
50812      # On bigger machines, leave some room for other processes to run
50813      if test "$JOBS" -gt "4"; then
50814        JOBS=`expr $JOBS '*' 90 / 100`
50815      fi
50816    fi
50817    # Cap number of jobs to 16
50818    if test "$JOBS" -gt "16"; then
50819      JOBS=16
50820    fi
50821    if test "$JOBS" -eq "0"; then
50822      JOBS=1
50823    fi
50824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50825$as_echo "$JOBS" >&6; }
50826  else
50827    JOBS=$with_jobs
50828  fi
50829
50830
50831
50832# Setup arguments for the boot jdk (after cores and memory have been setup)
50833
50834  ##############################################################################
50835  #
50836  # Specify jvm options for anything that is run with the Boot JDK.
50837  # Not all JVM:s accept the same arguments on the command line.
50838  #
50839
50840# Check whether --with-boot-jdk-jvmargs was given.
50841if test "${with_boot_jdk_jvmargs+set}" = set; then :
50842  withval=$with_boot_jdk_jvmargs;
50843fi
50844
50845
50846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50847$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50848
50849  # Disable special log output when a debug build is used as Boot JDK...
50850
50851  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50852  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50853  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50854  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50855  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50856  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50857    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50858    JVM_ARG_OK=true
50859  else
50860    $ECHO "Arg failed:" >&5
50861    $ECHO "$OUTPUT" >&5
50862    JVM_ARG_OK=false
50863  fi
50864
50865
50866  # Apply user provided options.
50867
50868  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50869  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50870  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50871  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50872  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50873  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50874    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50875    JVM_ARG_OK=true
50876  else
50877    $ECHO "Arg failed:" >&5
50878    $ECHO "$OUTPUT" >&5
50879    JVM_ARG_OK=false
50880  fi
50881
50882
50883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50884$as_echo "$boot_jdk_jvmargs" >&6; }
50885
50886  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50887  JAVA_FLAGS=$boot_jdk_jvmargs
50888
50889
50890
50891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50892$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50893
50894  # Starting amount of heap memory.
50895
50896  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50897  $ECHO "Command: $JAVA -Xms64M -version" >&5
50898  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50899  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50900  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50901  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50902    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50903    JVM_ARG_OK=true
50904  else
50905    $ECHO "Arg failed:" >&5
50906    $ECHO "$OUTPUT" >&5
50907    JVM_ARG_OK=false
50908  fi
50909
50910
50911  # Maximum amount of heap memory.
50912  # Maximum stack size.
50913  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50914  if test "x$BUILD_NUM_BITS" = x32; then
50915    if test "$JVM_MAX_HEAP" -gt "1100"; then
50916      JVM_MAX_HEAP=1100
50917    elif test "$JVM_MAX_HEAP" -lt "512"; then
50918      JVM_MAX_HEAP=512
50919    fi
50920    STACK_SIZE=768
50921  else
50922    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50923    # pointers are used. Apparently, we need to increase the heap and stack
50924    # space for the jvm. More specifically, when running javac to build huge
50925    # jdk batch
50926    if test "$JVM_MAX_HEAP" -gt "1600"; then
50927      JVM_MAX_HEAP=1600
50928    elif test "$JVM_MAX_HEAP" -lt "512"; then
50929      JVM_MAX_HEAP=512
50930    fi
50931    STACK_SIZE=1536
50932  fi
50933
50934  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50935  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50936  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50937  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50938  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50939  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50940    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50941    JVM_ARG_OK=true
50942  else
50943    $ECHO "Arg failed:" >&5
50944    $ECHO "$OUTPUT" >&5
50945    JVM_ARG_OK=false
50946  fi
50947
50948
50949  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50950  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50951  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50952  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50953  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50954  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50955    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50956    JVM_ARG_OK=true
50957  else
50958    $ECHO "Arg failed:" >&5
50959    $ECHO "$OUTPUT" >&5
50960    JVM_ARG_OK=false
50961  fi
50962
50963
50964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50965$as_echo "$boot_jdk_jvmargs_big" >&6; }
50966
50967  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50968
50969
50970
50971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50972$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50973
50974  # Use serial gc for small short lived tools if possible
50975
50976  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50977  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50978  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50979  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50980  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50981  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50982    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50983    JVM_ARG_OK=true
50984  else
50985    $ECHO "Arg failed:" >&5
50986    $ECHO "$OUTPUT" >&5
50987    JVM_ARG_OK=false
50988  fi
50989
50990
50991  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50992  $ECHO "Command: $JAVA -Xms32M -version" >&5
50993  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50994  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50995  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50996  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50997    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50998    JVM_ARG_OK=true
50999  else
51000    $ECHO "Arg failed:" >&5
51001    $ECHO "$OUTPUT" >&5
51002    JVM_ARG_OK=false
51003  fi
51004
51005
51006  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51007  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51008  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51009  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51010  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51011  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51012    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51013    JVM_ARG_OK=true
51014  else
51015    $ECHO "Arg failed:" >&5
51016    $ECHO "$OUTPUT" >&5
51017    JVM_ARG_OK=false
51018  fi
51019
51020
51021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51022$as_echo "$boot_jdk_jvmargs_small" >&6; }
51023
51024  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51025
51026
51027  JAVA_TOOL_FLAGS_SMALL=""
51028  for f in $JAVA_FLAGS_SMALL; do
51029    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51030  done
51031
51032
51033
51034# Setup smart javac (after cores and memory have been setup)
51035
51036
51037# Check whether --with-sjavac-server-java was given.
51038if test "${with_sjavac_server_java+set}" = set; then :
51039  withval=$with_sjavac_server_java;
51040fi
51041
51042
51043  if test "x$with_sjavac_server_java" != x; then
51044    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51045    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51046    if test "x$FOUND_VERSION" = x; then
51047      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51048    fi
51049  else
51050    SJAVAC_SERVER_JAVA="$JAVA"
51051  fi
51052
51053
51054  if test "$MEMORY_SIZE" -gt "3000"; then
51055
51056  $ECHO "Check if jvm arg is ok: -d64" >&5
51057  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51058  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51059  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51060  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51061  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51062    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51063    JVM_ARG_OK=true
51064  else
51065    $ECHO "Arg failed:" >&5
51066    $ECHO "$OUTPUT" >&5
51067    JVM_ARG_OK=false
51068  fi
51069
51070    if test "$JVM_ARG_OK" = true; then
51071      JVM_64BIT=true
51072      JVM_ARG_OK=false
51073    fi
51074  fi
51075
51076  MX_VALUE=`expr $MEMORY_SIZE / 2`
51077  if test "$JVM_64BIT" = true; then
51078    # Set ms lower than mx since more than one instance of the server might
51079    # get launched at the same time before they figure out which instance won.
51080    MS_VALUE=512
51081    if test "$MX_VALUE" -gt "2048"; then
51082      MX_VALUE=2048
51083    fi
51084  else
51085    MS_VALUE=256
51086    if test "$MX_VALUE" -gt "1500"; then
51087      MX_VALUE=1500
51088    fi
51089  fi
51090  if test "$MX_VALUE" -lt "512"; then
51091    MX_VALUE=512
51092  fi
51093
51094  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51095  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51096  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51097  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51098  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51099  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51100    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51101    JVM_ARG_OK=true
51102  else
51103    $ECHO "Arg failed:" >&5
51104    $ECHO "$OUTPUT" >&5
51105    JVM_ARG_OK=false
51106  fi
51107
51108
51109
51110  # Check whether --enable-sjavac was given.
51111if test "${enable_sjavac+set}" = set; then :
51112  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51113else
51114  ENABLE_SJAVAC='no'
51115fi
51116
51117  if test "x$JVM_ARG_OK" = "xfalse"; then
51118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51119$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51120    ENABLE_SJAVAC=no;
51121  fi
51122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51123$as_echo_n "checking whether to use sjavac... " >&6; }
51124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51125$as_echo "$ENABLE_SJAVAC" >&6; }
51126
51127
51128  if test "x$ENABLE_SJAVAC" = xyes; then
51129    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51130  else
51131    SJAVAC_SERVER_DIR=
51132  fi
51133
51134
51135
51136# Can the C/C++ compiler use precompiled headers?
51137
51138
51139  ###############################################################################
51140  #
51141  # Can the C/C++ compiler use precompiled headers?
51142  #
51143  # Check whether --enable-precompiled-headers was given.
51144if test "${enable_precompiled_headers+set}" = set; then :
51145  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51146else
51147  ENABLE_PRECOMPH=yes
51148fi
51149
51150
51151  USE_PRECOMPILED_HEADER=1
51152  if test "x$ENABLE_PRECOMPH" = xno; then
51153    USE_PRECOMPILED_HEADER=0
51154  fi
51155
51156  if test "x$ENABLE_PRECOMPH" = xyes; then
51157    # Check that the compiler actually supports precomp headers.
51158    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51160$as_echo_n "checking that precompiled headers work... " >&6; }
51161      echo "int alfa();" > conftest.h
51162      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51163      if test ! -f conftest.hpp.gch; then
51164        USE_PRECOMPILED_HEADER=0
51165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51166$as_echo "no" >&6; }
51167      else
51168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51169$as_echo "yes" >&6; }
51170      fi
51171      rm -f conftest.h conftest.hpp.gch
51172    fi
51173  fi
51174
51175
51176
51177
51178# Setup use of ccache, if available
51179
51180  # Check whether --enable-ccache was given.
51181if test "${enable_ccache+set}" = set; then :
51182  enableval=$enable_ccache;
51183fi
51184
51185
51186  CCACHE=
51187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51188$as_echo_n "checking is ccache enabled... " >&6; }
51189  ENABLE_CCACHE=$enable_ccache
51190  if test "x$enable_ccache" = xyes; then
51191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51192$as_echo "yes" >&6; }
51193    OLD_PATH="$PATH"
51194    if test "x$TOOLCHAIN_PATH" != x; then
51195      PATH=$TOOLCHAIN_PATH:$PATH
51196    fi
51197
51198
51199
51200  # Publish this variable in the help.
51201
51202
51203  if test "x$CCACHE" = x; then
51204    # The variable is not set by user, try to locate tool using the code snippet
51205    for ac_prog in ccache
51206do
51207  # Extract the first word of "$ac_prog", so it can be a program name with args.
51208set dummy $ac_prog; ac_word=$2
51209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51210$as_echo_n "checking for $ac_word... " >&6; }
51211if ${ac_cv_path_CCACHE+:} false; then :
51212  $as_echo_n "(cached) " >&6
51213else
51214  case $CCACHE in
51215  [\\/]* | ?:[\\/]*)
51216  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51217  ;;
51218  *)
51219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51220for as_dir in $PATH
51221do
51222  IFS=$as_save_IFS
51223  test -z "$as_dir" && as_dir=.
51224    for ac_exec_ext in '' $ac_executable_extensions; do
51225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51226    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51228    break 2
51229  fi
51230done
51231  done
51232IFS=$as_save_IFS
51233
51234  ;;
51235esac
51236fi
51237CCACHE=$ac_cv_path_CCACHE
51238if test -n "$CCACHE"; then
51239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51240$as_echo "$CCACHE" >&6; }
51241else
51242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51243$as_echo "no" >&6; }
51244fi
51245
51246
51247  test -n "$CCACHE" && break
51248done
51249
51250  else
51251    # The variable is set, but is it from the command line or the environment?
51252
51253    # Try to remove the string !CCACHE! from our list.
51254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51256      # If it failed, the variable was not from the command line. Ignore it,
51257      # but warn the user (except for BASH, which is always set by the calling BASH).
51258      if test "xCCACHE" != xBASH; then
51259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51260$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51261      fi
51262      # Try to locate tool using the code snippet
51263      for ac_prog in ccache
51264do
51265  # Extract the first word of "$ac_prog", so it can be a program name with args.
51266set dummy $ac_prog; ac_word=$2
51267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51268$as_echo_n "checking for $ac_word... " >&6; }
51269if ${ac_cv_path_CCACHE+:} false; then :
51270  $as_echo_n "(cached) " >&6
51271else
51272  case $CCACHE in
51273  [\\/]* | ?:[\\/]*)
51274  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51275  ;;
51276  *)
51277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51278for as_dir in $PATH
51279do
51280  IFS=$as_save_IFS
51281  test -z "$as_dir" && as_dir=.
51282    for ac_exec_ext in '' $ac_executable_extensions; do
51283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51284    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51286    break 2
51287  fi
51288done
51289  done
51290IFS=$as_save_IFS
51291
51292  ;;
51293esac
51294fi
51295CCACHE=$ac_cv_path_CCACHE
51296if test -n "$CCACHE"; then
51297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51298$as_echo "$CCACHE" >&6; }
51299else
51300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51301$as_echo "no" >&6; }
51302fi
51303
51304
51305  test -n "$CCACHE" && break
51306done
51307
51308    else
51309      # If it succeeded, then it was overridden by the user. We will use it
51310      # for the tool.
51311
51312      # First remove it from the list of overridden variables, so we can test
51313      # for unknown variables in the end.
51314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51315
51316      # Check if the provided tool contains a complete path.
51317      tool_specified="$CCACHE"
51318      tool_basename="${tool_specified##*/}"
51319      if test "x$tool_basename" = "x$tool_specified"; then
51320        # A command without a complete path is provided, search $PATH.
51321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51322$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51323        # Extract the first word of "$tool_basename", so it can be a program name with args.
51324set dummy $tool_basename; ac_word=$2
51325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51326$as_echo_n "checking for $ac_word... " >&6; }
51327if ${ac_cv_path_CCACHE+:} false; then :
51328  $as_echo_n "(cached) " >&6
51329else
51330  case $CCACHE in
51331  [\\/]* | ?:[\\/]*)
51332  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51333  ;;
51334  *)
51335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51336for as_dir in $PATH
51337do
51338  IFS=$as_save_IFS
51339  test -z "$as_dir" && as_dir=.
51340    for ac_exec_ext in '' $ac_executable_extensions; do
51341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51342    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51344    break 2
51345  fi
51346done
51347  done
51348IFS=$as_save_IFS
51349
51350  ;;
51351esac
51352fi
51353CCACHE=$ac_cv_path_CCACHE
51354if test -n "$CCACHE"; then
51355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51356$as_echo "$CCACHE" >&6; }
51357else
51358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51359$as_echo "no" >&6; }
51360fi
51361
51362
51363        if test "x$CCACHE" = x; then
51364          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51365        fi
51366      else
51367        # Otherwise we believe it is a complete path. Use it as it is.
51368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51369$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51371$as_echo_n "checking for CCACHE... " >&6; }
51372        if test ! -x "$tool_specified"; then
51373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51374$as_echo "not found" >&6; }
51375          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51376        fi
51377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51378$as_echo "$tool_specified" >&6; }
51379      fi
51380    fi
51381  fi
51382
51383
51384
51385  if test "x$CCACHE" = x; then
51386    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51387  fi
51388
51389
51390    CCACHE_STATUS="enabled"
51391    PATH="$OLD_PATH"
51392  elif test "x$enable_ccache" = xno; then
51393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51394$as_echo "no, explicitly disabled" >&6; }
51395  elif test "x$enable_ccache" = x; then
51396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51397$as_echo "no" >&6; }
51398  else
51399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51400$as_echo "unknown" >&6; }
51401    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51402  fi
51403
51404
51405
51406# Check whether --with-ccache-dir was given.
51407if test "${with_ccache_dir+set}" = set; then :
51408  withval=$with_ccache_dir;
51409fi
51410
51411
51412  if test "x$with_ccache_dir" != x; then
51413    # When using a non home ccache directory, assume the use is to share ccache files
51414    # with other users. Thus change the umask.
51415    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51416    if test "x$CCACHE" = x; then
51417      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51418$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51419    fi
51420  fi
51421
51422  if test "x$CCACHE" != x; then
51423
51424  if test "x$CCACHE" != x; then
51425    # Only use ccache if it is 3.1.4 or later, which supports
51426    # precompiled headers.
51427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51428$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51429    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51430    if test "x$HAS_GOOD_CCACHE" = x; then
51431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51432$as_echo "no, disabling ccache" >&6; }
51433      CCACHE=
51434      CCACHE_STATUS="disabled"
51435    else
51436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51437$as_echo "yes" >&6; }
51438      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51439$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51440      PUSHED_FLAGS="$CXXFLAGS"
51441      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51442      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51443/* end confdefs.h.  */
51444
51445int
51446main ()
51447{
51448
51449  ;
51450  return 0;
51451}
51452_ACEOF
51453if ac_fn_cxx_try_compile "$LINENO"; then :
51454  CC_KNOWS_CCACHE_TRICK=yes
51455else
51456  CC_KNOWS_CCACHE_TRICK=no
51457fi
51458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51459      CXXFLAGS="$PUSHED_FLAGS"
51460      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51462$as_echo "yes" >&6; }
51463      else
51464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51465$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51466        CCACHE=
51467        CCACHE_STATUS="disabled"
51468      fi
51469    fi
51470  fi
51471
51472  if test "x$CCACHE" != x; then
51473    CCACHE_SLOPPINESS=time_macros
51474    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51475    CCACHE_FLAGS=-fpch-preprocess
51476
51477    if test "x$SET_CCACHE_DIR" != x; then
51478      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51479      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51480    fi
51481  fi
51482
51483  fi
51484
51485
51486###############################################################################
51487#
51488# And now the finish...
51489#
51490###############################################################################
51491
51492# Check for some common pitfalls
51493
51494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51495    file_to_test="$SRC_ROOT/LICENSE"
51496    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51497      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
51498    fi
51499  fi
51500
51501
51502  # Did user specify any unknown variables?
51503
51504  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51505    # Replace the separating ! with spaces before presenting for end user.
51506    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51507    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51508$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51509  fi
51510
51511
51512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51513$as_echo_n "checking if build directory is on local disk... " >&6; }
51514
51515  # df -l lists only local disks; if the given directory is not found then
51516  # a non-zero exit code is given
51517  if test "x$DF" = x; then
51518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51519      # msys does not have df; use Windows "net use" instead.
51520      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51521      if test "x$IS_NETWORK_DISK" = x; then
51522        OUTPUT_DIR_IS_LOCAL="yes"
51523      else
51524        OUTPUT_DIR_IS_LOCAL="no"
51525      fi
51526    else
51527      # No df here, say it's local
51528      OUTPUT_DIR_IS_LOCAL="yes"
51529    fi
51530  else
51531    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51532      OUTPUT_DIR_IS_LOCAL="yes"
51533    else
51534      OUTPUT_DIR_IS_LOCAL="no"
51535    fi
51536  fi
51537
51538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51539$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51540
51541
51542
51543  # Check if the user has any old-style ALT_ variables set.
51544  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51545
51546  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51547  # Since we can't properly handle the dependencies for this, warn the user about the situation
51548  if test -e $OUTPUT_ROOT/spec.gmk; then
51549    IS_RECONFIGURE=yes
51550  else
51551    IS_RECONFIGURE=no
51552  fi
51553
51554
51555# At the end, call the custom hook. (Dummy macro if no custom sources available)
51556
51557
51558# We're messing a bit with internal autoconf variables to put the config.status
51559# in the output directory instead of the current directory.
51560CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51561
51562# Create the actual output files. Now the main work of configure is done.
51563cat >confcache <<\_ACEOF
51564# This file is a shell script that caches the results of configure
51565# tests run on this system so they can be shared between configure
51566# scripts and configure runs, see configure's option --config-cache.
51567# It is not useful on other systems.  If it contains results you don't
51568# want to keep, you may remove or edit it.
51569#
51570# config.status only pays attention to the cache file if you give it
51571# the --recheck option to rerun configure.
51572#
51573# `ac_cv_env_foo' variables (set or unset) will be overridden when
51574# loading this file, other *unset* `ac_cv_foo' will be assigned the
51575# following values.
51576
51577_ACEOF
51578
51579# The following way of writing the cache mishandles newlines in values,
51580# but we know of no workaround that is simple, portable, and efficient.
51581# So, we kill variables containing newlines.
51582# Ultrix sh set writes to stderr and can't be redirected directly,
51583# and sets the high bit in the cache file unless we assign to the vars.
51584(
51585  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51586    eval ac_val=\$$ac_var
51587    case $ac_val in #(
51588    *${as_nl}*)
51589      case $ac_var in #(
51590      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51591$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51592      esac
51593      case $ac_var in #(
51594      _ | IFS | as_nl) ;; #(
51595      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51596      *) { eval $ac_var=; unset $ac_var;} ;;
51597      esac ;;
51598    esac
51599  done
51600
51601  (set) 2>&1 |
51602    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51603    *${as_nl}ac_space=\ *)
51604      # `set' does not quote correctly, so add quotes: double-quote
51605      # substitution turns \\\\ into \\, and sed turns \\ into \.
51606      sed -n \
51607	"s/'/'\\\\''/g;
51608	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51609      ;; #(
51610    *)
51611      # `set' quotes correctly as required by POSIX, so do not add quotes.
51612      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51613      ;;
51614    esac |
51615    sort
51616) |
51617  sed '
51618     /^ac_cv_env_/b end
51619     t clear
51620     :clear
51621     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51622     t end
51623     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51624     :end' >>confcache
51625if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51626  if test -w "$cache_file"; then
51627    if test "x$cache_file" != "x/dev/null"; then
51628      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51629$as_echo "$as_me: updating cache $cache_file" >&6;}
51630      if test ! -f "$cache_file" || test -h "$cache_file"; then
51631	cat confcache >"$cache_file"
51632      else
51633        case $cache_file in #(
51634        */* | ?:*)
51635	  mv -f confcache "$cache_file"$$ &&
51636	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51637        *)
51638	  mv -f confcache "$cache_file" ;;
51639	esac
51640      fi
51641    fi
51642  else
51643    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51644$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51645  fi
51646fi
51647rm -f confcache
51648
51649test "x$prefix" = xNONE && prefix=$ac_default_prefix
51650# Let make expand exec_prefix.
51651test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51652
51653# Transform confdefs.h into DEFS.
51654# Protect against shell expansion while executing Makefile rules.
51655# Protect against Makefile macro expansion.
51656#
51657# If the first sed substitution is executed (which looks for macros that
51658# take arguments), then branch to the quote section.  Otherwise,
51659# look for a macro that doesn't take arguments.
51660ac_script='
51661:mline
51662/\\$/{
51663 N
51664 s,\\\n,,
51665 b mline
51666}
51667t clear
51668:clear
51669s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51670t quote
51671s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51672t quote
51673b any
51674:quote
51675s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51676s/\[/\\&/g
51677s/\]/\\&/g
51678s/\$/$$/g
51679H
51680:any
51681${
51682	g
51683	s/^\n//
51684	s/\n/ /g
51685	p
51686}
51687'
51688DEFS=`sed -n "$ac_script" confdefs.h`
51689
51690
51691ac_libobjs=
51692ac_ltlibobjs=
51693U=
51694for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51695  # 1. Remove the extension, and $U if already installed.
51696  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51697  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51698  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51699  #    will be set to the directory where LIBOBJS objects are built.
51700  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51701  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51702done
51703LIBOBJS=$ac_libobjs
51704
51705LTLIBOBJS=$ac_ltlibobjs
51706
51707
51708
51709: "${CONFIG_STATUS=./config.status}"
51710ac_write_fail=0
51711ac_clean_files_save=$ac_clean_files
51712ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51713{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51714$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51715as_write_fail=0
51716cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51717#! $SHELL
51718# Generated by $as_me.
51719# Run this file to recreate the current configuration.
51720# Compiler output produced by configure, useful for debugging
51721# configure, is in config.log if it exists.
51722
51723debug=false
51724ac_cs_recheck=false
51725ac_cs_silent=false
51726
51727SHELL=\${CONFIG_SHELL-$SHELL}
51728export SHELL
51729_ASEOF
51730cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51731## -------------------- ##
51732## M4sh Initialization. ##
51733## -------------------- ##
51734
51735# Be more Bourne compatible
51736DUALCASE=1; export DUALCASE # for MKS sh
51737if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51738  emulate sh
51739  NULLCMD=:
51740  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51741  # is contrary to our usage.  Disable this feature.
51742  alias -g '${1+"$@"}'='"$@"'
51743  setopt NO_GLOB_SUBST
51744else
51745  case `(set -o) 2>/dev/null` in #(
51746  *posix*) :
51747    set -o posix ;; #(
51748  *) :
51749     ;;
51750esac
51751fi
51752
51753
51754as_nl='
51755'
51756export as_nl
51757# Printing a long string crashes Solaris 7 /usr/bin/printf.
51758as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51759as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51760as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51761# Prefer a ksh shell builtin over an external printf program on Solaris,
51762# but without wasting forks for bash or zsh.
51763if test -z "$BASH_VERSION$ZSH_VERSION" \
51764    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51765  as_echo='print -r --'
51766  as_echo_n='print -rn --'
51767elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51768  as_echo='printf %s\n'
51769  as_echo_n='printf %s'
51770else
51771  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51772    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51773    as_echo_n='/usr/ucb/echo -n'
51774  else
51775    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51776    as_echo_n_body='eval
51777      arg=$1;
51778      case $arg in #(
51779      *"$as_nl"*)
51780	expr "X$arg" : "X\\(.*\\)$as_nl";
51781	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51782      esac;
51783      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51784    '
51785    export as_echo_n_body
51786    as_echo_n='sh -c $as_echo_n_body as_echo'
51787  fi
51788  export as_echo_body
51789  as_echo='sh -c $as_echo_body as_echo'
51790fi
51791
51792# The user is always right.
51793if test "${PATH_SEPARATOR+set}" != set; then
51794  PATH_SEPARATOR=:
51795  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51796    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51797      PATH_SEPARATOR=';'
51798  }
51799fi
51800
51801
51802# IFS
51803# We need space, tab and new line, in precisely that order.  Quoting is
51804# there to prevent editors from complaining about space-tab.
51805# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51806# splitting by setting IFS to empty value.)
51807IFS=" ""	$as_nl"
51808
51809# Find who we are.  Look in the path if we contain no directory separator.
51810as_myself=
51811case $0 in #((
51812  *[\\/]* ) as_myself=$0 ;;
51813  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51814for as_dir in $PATH
51815do
51816  IFS=$as_save_IFS
51817  test -z "$as_dir" && as_dir=.
51818    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51819  done
51820IFS=$as_save_IFS
51821
51822     ;;
51823esac
51824# We did not find ourselves, most probably we were run as `sh COMMAND'
51825# in which case we are not to be found in the path.
51826if test "x$as_myself" = x; then
51827  as_myself=$0
51828fi
51829if test ! -f "$as_myself"; then
51830  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51831  exit 1
51832fi
51833
51834# Unset variables that we do not need and which cause bugs (e.g. in
51835# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51836# suppresses any "Segmentation fault" message there.  '((' could
51837# trigger a bug in pdksh 5.2.14.
51838for as_var in BASH_ENV ENV MAIL MAILPATH
51839do eval test x\${$as_var+set} = xset \
51840  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51841done
51842PS1='$ '
51843PS2='> '
51844PS4='+ '
51845
51846# NLS nuisances.
51847LC_ALL=C
51848export LC_ALL
51849LANGUAGE=C
51850export LANGUAGE
51851
51852# CDPATH.
51853(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51854
51855
51856# as_fn_error STATUS ERROR [LINENO LOG_FD]
51857# ----------------------------------------
51858# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51859# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51860# script with STATUS, using 1 if that was 0.
51861as_fn_error ()
51862{
51863  as_status=$1; test $as_status -eq 0 && as_status=1
51864  if test "$4"; then
51865    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51866    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51867  fi
51868  $as_echo "$as_me: error: $2" >&2
51869  as_fn_exit $as_status
51870} # as_fn_error
51871
51872
51873# as_fn_set_status STATUS
51874# -----------------------
51875# Set $? to STATUS, without forking.
51876as_fn_set_status ()
51877{
51878  return $1
51879} # as_fn_set_status
51880
51881# as_fn_exit STATUS
51882# -----------------
51883# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51884as_fn_exit ()
51885{
51886  set +e
51887  as_fn_set_status $1
51888  exit $1
51889} # as_fn_exit
51890
51891# as_fn_unset VAR
51892# ---------------
51893# Portably unset VAR.
51894as_fn_unset ()
51895{
51896  { eval $1=; unset $1;}
51897}
51898as_unset=as_fn_unset
51899# as_fn_append VAR VALUE
51900# ----------------------
51901# Append the text in VALUE to the end of the definition contained in VAR. Take
51902# advantage of any shell optimizations that allow amortized linear growth over
51903# repeated appends, instead of the typical quadratic growth present in naive
51904# implementations.
51905if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51906  eval 'as_fn_append ()
51907  {
51908    eval $1+=\$2
51909  }'
51910else
51911  as_fn_append ()
51912  {
51913    eval $1=\$$1\$2
51914  }
51915fi # as_fn_append
51916
51917# as_fn_arith ARG...
51918# ------------------
51919# Perform arithmetic evaluation on the ARGs, and store the result in the
51920# global $as_val. Take advantage of shells that can avoid forks. The arguments
51921# must be portable across $(()) and expr.
51922if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51923  eval 'as_fn_arith ()
51924  {
51925    as_val=$(( $* ))
51926  }'
51927else
51928  as_fn_arith ()
51929  {
51930    as_val=`expr "$@" || test $? -eq 1`
51931  }
51932fi # as_fn_arith
51933
51934
51935if expr a : '\(a\)' >/dev/null 2>&1 &&
51936   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51937  as_expr=expr
51938else
51939  as_expr=false
51940fi
51941
51942if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51943  as_basename=basename
51944else
51945  as_basename=false
51946fi
51947
51948if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51949  as_dirname=dirname
51950else
51951  as_dirname=false
51952fi
51953
51954as_me=`$as_basename -- "$0" ||
51955$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51956	 X"$0" : 'X\(//\)$' \| \
51957	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51958$as_echo X/"$0" |
51959    sed '/^.*\/\([^/][^/]*\)\/*$/{
51960	    s//\1/
51961	    q
51962	  }
51963	  /^X\/\(\/\/\)$/{
51964	    s//\1/
51965	    q
51966	  }
51967	  /^X\/\(\/\).*/{
51968	    s//\1/
51969	    q
51970	  }
51971	  s/.*/./; q'`
51972
51973# Avoid depending upon Character Ranges.
51974as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51975as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51976as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51977as_cr_digits='0123456789'
51978as_cr_alnum=$as_cr_Letters$as_cr_digits
51979
51980ECHO_C= ECHO_N= ECHO_T=
51981case `echo -n x` in #(((((
51982-n*)
51983  case `echo 'xy\c'` in
51984  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51985  xy)  ECHO_C='\c';;
51986  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51987       ECHO_T='	';;
51988  esac;;
51989*)
51990  ECHO_N='-n';;
51991esac
51992
51993rm -f conf$$ conf$$.exe conf$$.file
51994if test -d conf$$.dir; then
51995  rm -f conf$$.dir/conf$$.file
51996else
51997  rm -f conf$$.dir
51998  mkdir conf$$.dir 2>/dev/null
51999fi
52000if (echo >conf$$.file) 2>/dev/null; then
52001  if ln -s conf$$.file conf$$ 2>/dev/null; then
52002    as_ln_s='ln -s'
52003    # ... but there are two gotchas:
52004    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52005    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52006    # In both cases, we have to default to `cp -pR'.
52007    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52008      as_ln_s='cp -pR'
52009  elif ln conf$$.file conf$$ 2>/dev/null; then
52010    as_ln_s=ln
52011  else
52012    as_ln_s='cp -pR'
52013  fi
52014else
52015  as_ln_s='cp -pR'
52016fi
52017rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52018rmdir conf$$.dir 2>/dev/null
52019
52020
52021# as_fn_mkdir_p
52022# -------------
52023# Create "$as_dir" as a directory, including parents if necessary.
52024as_fn_mkdir_p ()
52025{
52026
52027  case $as_dir in #(
52028  -*) as_dir=./$as_dir;;
52029  esac
52030  test -d "$as_dir" || eval $as_mkdir_p || {
52031    as_dirs=
52032    while :; do
52033      case $as_dir in #(
52034      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52035      *) as_qdir=$as_dir;;
52036      esac
52037      as_dirs="'$as_qdir' $as_dirs"
52038      as_dir=`$as_dirname -- "$as_dir" ||
52039$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52040	 X"$as_dir" : 'X\(//\)[^/]' \| \
52041	 X"$as_dir" : 'X\(//\)$' \| \
52042	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52043$as_echo X"$as_dir" |
52044    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52045	    s//\1/
52046	    q
52047	  }
52048	  /^X\(\/\/\)[^/].*/{
52049	    s//\1/
52050	    q
52051	  }
52052	  /^X\(\/\/\)$/{
52053	    s//\1/
52054	    q
52055	  }
52056	  /^X\(\/\).*/{
52057	    s//\1/
52058	    q
52059	  }
52060	  s/.*/./; q'`
52061      test -d "$as_dir" && break
52062    done
52063    test -z "$as_dirs" || eval "mkdir $as_dirs"
52064  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52065
52066
52067} # as_fn_mkdir_p
52068if mkdir -p . 2>/dev/null; then
52069  as_mkdir_p='mkdir -p "$as_dir"'
52070else
52071  test -d ./-p && rmdir ./-p
52072  as_mkdir_p=false
52073fi
52074
52075
52076# as_fn_executable_p FILE
52077# -----------------------
52078# Test if FILE is an executable regular file.
52079as_fn_executable_p ()
52080{
52081  test -f "$1" && test -x "$1"
52082} # as_fn_executable_p
52083as_test_x='test -x'
52084as_executable_p=as_fn_executable_p
52085
52086# Sed expression to map a string onto a valid CPP name.
52087as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52088
52089# Sed expression to map a string onto a valid variable name.
52090as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52091
52092
52093exec 6>&1
52094## ----------------------------------- ##
52095## Main body of $CONFIG_STATUS script. ##
52096## ----------------------------------- ##
52097_ASEOF
52098test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52099
52100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52101# Save the log message, to keep $0 and so on meaningful, and to
52102# report actual input values of CONFIG_FILES etc. instead of their
52103# values after options handling.
52104ac_log="
52105This file was extended by OpenJDK $as_me jdk9, which was
52106generated by GNU Autoconf 2.69.  Invocation command line was
52107
52108  CONFIG_FILES    = $CONFIG_FILES
52109  CONFIG_HEADERS  = $CONFIG_HEADERS
52110  CONFIG_LINKS    = $CONFIG_LINKS
52111  CONFIG_COMMANDS = $CONFIG_COMMANDS
52112  $ $0 $@
52113
52114on `(hostname || uname -n) 2>/dev/null | sed 1q`
52115"
52116
52117_ACEOF
52118
52119case $ac_config_files in *"
52120"*) set x $ac_config_files; shift; ac_config_files=$*;;
52121esac
52122
52123
52124
52125cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52126# Files that config.status was made for.
52127config_files="$ac_config_files"
52128
52129_ACEOF
52130
52131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52132ac_cs_usage="\
52133\`$as_me' instantiates files and other configuration actions
52134from templates according to the current configuration.  Unless the files
52135and actions are specified as TAGs, all are instantiated by default.
52136
52137Usage: $0 [OPTION]... [TAG]...
52138
52139  -h, --help       print this help, then exit
52140  -V, --version    print version number and configuration settings, then exit
52141      --config     print configuration, then exit
52142  -q, --quiet, --silent
52143                   do not print progress messages
52144  -d, --debug      don't remove temporary files
52145      --recheck    update $as_me by reconfiguring in the same conditions
52146      --file=FILE[:TEMPLATE]
52147                   instantiate the configuration file FILE
52148
52149Configuration files:
52150$config_files
52151
52152Report bugs to <build-dev@openjdk.java.net>.
52153OpenJDK home page: <http://openjdk.java.net>."
52154
52155_ACEOF
52156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52157ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52158ac_cs_version="\\
52159OpenJDK config.status jdk9
52160configured by $0, generated by GNU Autoconf 2.69,
52161  with options \\"\$ac_cs_config\\"
52162
52163Copyright (C) 2012 Free Software Foundation, Inc.
52164This config.status script is free software; the Free Software Foundation
52165gives unlimited permission to copy, distribute and modify it."
52166
52167ac_pwd='$ac_pwd'
52168srcdir='$srcdir'
52169AWK='$AWK'
52170test -n "\$AWK" || AWK=awk
52171_ACEOF
52172
52173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52174# The default lists apply if the user does not specify any file.
52175ac_need_defaults=:
52176while test $# != 0
52177do
52178  case $1 in
52179  --*=?*)
52180    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52181    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52182    ac_shift=:
52183    ;;
52184  --*=)
52185    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52186    ac_optarg=
52187    ac_shift=:
52188    ;;
52189  *)
52190    ac_option=$1
52191    ac_optarg=$2
52192    ac_shift=shift
52193    ;;
52194  esac
52195
52196  case $ac_option in
52197  # Handling of the options.
52198  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52199    ac_cs_recheck=: ;;
52200  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52201    $as_echo "$ac_cs_version"; exit ;;
52202  --config | --confi | --conf | --con | --co | --c )
52203    $as_echo "$ac_cs_config"; exit ;;
52204  --debug | --debu | --deb | --de | --d | -d )
52205    debug=: ;;
52206  --file | --fil | --fi | --f )
52207    $ac_shift
52208    case $ac_optarg in
52209    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52210    '') as_fn_error $? "missing file argument" ;;
52211    esac
52212    as_fn_append CONFIG_FILES " '$ac_optarg'"
52213    ac_need_defaults=false;;
52214  --he | --h |  --help | --hel | -h )
52215    $as_echo "$ac_cs_usage"; exit ;;
52216  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52217  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52218    ac_cs_silent=: ;;
52219
52220  # This is an error.
52221  -*) as_fn_error $? "unrecognized option: \`$1'
52222Try \`$0 --help' for more information." ;;
52223
52224  *) as_fn_append ac_config_targets " $1"
52225     ac_need_defaults=false ;;
52226
52227  esac
52228  shift
52229done
52230
52231ac_configure_extra_args=
52232
52233if $ac_cs_silent; then
52234  exec 6>/dev/null
52235  ac_configure_extra_args="$ac_configure_extra_args --silent"
52236fi
52237
52238_ACEOF
52239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52240if \$ac_cs_recheck; then
52241  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52242  shift
52243  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52244  CONFIG_SHELL='$SHELL'
52245  export CONFIG_SHELL
52246  exec "\$@"
52247fi
52248
52249_ACEOF
52250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52251exec 5>>config.log
52252{
52253  echo
52254  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52255## Running $as_me. ##
52256_ASBOX
52257  $as_echo "$ac_log"
52258} >&5
52259
52260_ACEOF
52261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52262_ACEOF
52263
52264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52265
52266# Handling of arguments.
52267for ac_config_target in $ac_config_targets
52268do
52269  case $ac_config_target in
52270    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52271    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52272    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52273    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52274    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52275
52276  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52277  esac
52278done
52279
52280
52281# If the user did not use the arguments to specify the items to instantiate,
52282# then the envvar interface is used.  Set only those that are not.
52283# We use the long form for the default assignment because of an extremely
52284# bizarre bug on SunOS 4.1.3.
52285if $ac_need_defaults; then
52286  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52287fi
52288
52289# Have a temporary directory for convenience.  Make it in the build tree
52290# simply because there is no reason against having it here, and in addition,
52291# creating and moving files from /tmp can sometimes cause problems.
52292# Hook for its removal unless debugging.
52293# Note that there is a small window in which the directory will not be cleaned:
52294# after its creation but before its name has been assigned to `$tmp'.
52295$debug ||
52296{
52297  tmp= ac_tmp=
52298  trap 'exit_status=$?
52299  : "${ac_tmp:=$tmp}"
52300  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52301' 0
52302  trap 'as_fn_exit 1' 1 2 13 15
52303}
52304# Create a (secure) tmp directory for tmp files.
52305
52306{
52307  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52308  test -d "$tmp"
52309}  ||
52310{
52311  tmp=./conf$$-$RANDOM
52312  (umask 077 && mkdir "$tmp")
52313} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52314ac_tmp=$tmp
52315
52316# Set up the scripts for CONFIG_FILES section.
52317# No need to generate them if there are no CONFIG_FILES.
52318# This happens for instance with `./config.status config.h'.
52319if test -n "$CONFIG_FILES"; then
52320
52321
52322ac_cr=`echo X | tr X '\015'`
52323# On cygwin, bash can eat \r inside `` if the user requested igncr.
52324# But we know of no other shell where ac_cr would be empty at this
52325# point, so we can use a bashism as a fallback.
52326if test "x$ac_cr" = x; then
52327  eval ac_cr=\$\'\\r\'
52328fi
52329ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52330if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52331  ac_cs_awk_cr='\\r'
52332else
52333  ac_cs_awk_cr=$ac_cr
52334fi
52335
52336echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52337_ACEOF
52338
52339
52340{
52341  echo "cat >conf$$subs.awk <<_ACEOF" &&
52342  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52343  echo "_ACEOF"
52344} >conf$$subs.sh ||
52345  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52346ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52347ac_delim='%!_!# '
52348for ac_last_try in false false false false false :; do
52349  . ./conf$$subs.sh ||
52350    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52351
52352  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52353  if test $ac_delim_n = $ac_delim_num; then
52354    break
52355  elif $ac_last_try; then
52356    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52357  else
52358    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52359  fi
52360done
52361rm -f conf$$subs.sh
52362
52363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52364cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52365_ACEOF
52366sed -n '
52367h
52368s/^/S["/; s/!.*/"]=/
52369p
52370g
52371s/^[^!]*!//
52372:repl
52373t repl
52374s/'"$ac_delim"'$//
52375t delim
52376:nl
52377h
52378s/\(.\{148\}\)..*/\1/
52379t more1
52380s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52381p
52382n
52383b repl
52384:more1
52385s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52386p
52387g
52388s/.\{148\}//
52389t nl
52390:delim
52391h
52392s/\(.\{148\}\)..*/\1/
52393t more2
52394s/["\\]/\\&/g; s/^/"/; s/$/"/
52395p
52396b
52397:more2
52398s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52399p
52400g
52401s/.\{148\}//
52402t delim
52403' <conf$$subs.awk | sed '
52404/^[^""]/{
52405  N
52406  s/\n//
52407}
52408' >>$CONFIG_STATUS || ac_write_fail=1
52409rm -f conf$$subs.awk
52410cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52411_ACAWK
52412cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52413  for (key in S) S_is_set[key] = 1
52414  FS = ""
52415
52416}
52417{
52418  line = $ 0
52419  nfields = split(line, field, "@")
52420  substed = 0
52421  len = length(field[1])
52422  for (i = 2; i < nfields; i++) {
52423    key = field[i]
52424    keylen = length(key)
52425    if (S_is_set[key]) {
52426      value = S[key]
52427      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52428      len += length(value) + length(field[++i])
52429      substed = 1
52430    } else
52431      len += 1 + keylen
52432  }
52433
52434  print line
52435}
52436
52437_ACAWK
52438_ACEOF
52439cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52440if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52441  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52442else
52443  cat
52444fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52445  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52446_ACEOF
52447
52448# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52449# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52450# trailing colons and then remove the whole line if VPATH becomes empty
52451# (actually we leave an empty line to preserve line numbers).
52452if test "x$srcdir" = x.; then
52453  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52454h
52455s///
52456s/^/:/
52457s/[	 ]*$/:/
52458s/:\$(srcdir):/:/g
52459s/:\${srcdir}:/:/g
52460s/:@srcdir@:/:/g
52461s/^:*//
52462s/:*$//
52463x
52464s/\(=[	 ]*\).*/\1/
52465G
52466s/\n//
52467s/^[^=]*=[	 ]*$//
52468}'
52469fi
52470
52471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52472fi # test -n "$CONFIG_FILES"
52473
52474
52475eval set X "  :F $CONFIG_FILES      "
52476shift
52477for ac_tag
52478do
52479  case $ac_tag in
52480  :[FHLC]) ac_mode=$ac_tag; continue;;
52481  esac
52482  case $ac_mode$ac_tag in
52483  :[FHL]*:*);;
52484  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52485  :[FH]-) ac_tag=-:-;;
52486  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52487  esac
52488  ac_save_IFS=$IFS
52489  IFS=:
52490  set x $ac_tag
52491  IFS=$ac_save_IFS
52492  shift
52493  ac_file=$1
52494  shift
52495
52496  case $ac_mode in
52497  :L) ac_source=$1;;
52498  :[FH])
52499    ac_file_inputs=
52500    for ac_f
52501    do
52502      case $ac_f in
52503      -) ac_f="$ac_tmp/stdin";;
52504      *) # Look for the file first in the build tree, then in the source tree
52505	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52506	 # because $ac_f cannot contain `:'.
52507	 test -f "$ac_f" ||
52508	   case $ac_f in
52509	   [\\/$]*) false;;
52510	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52511	   esac ||
52512	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52513      esac
52514      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52515      as_fn_append ac_file_inputs " '$ac_f'"
52516    done
52517
52518    # Let's still pretend it is `configure' which instantiates (i.e., don't
52519    # use $as_me), people would be surprised to read:
52520    #    /* config.h.  Generated by config.status.  */
52521    configure_input='Generated from '`
52522	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52523	`' by configure.'
52524    if test x"$ac_file" != x-; then
52525      configure_input="$ac_file.  $configure_input"
52526      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52527$as_echo "$as_me: creating $ac_file" >&6;}
52528    fi
52529    # Neutralize special characters interpreted by sed in replacement strings.
52530    case $configure_input in #(
52531    *\&* | *\|* | *\\* )
52532       ac_sed_conf_input=`$as_echo "$configure_input" |
52533       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52534    *) ac_sed_conf_input=$configure_input;;
52535    esac
52536
52537    case $ac_tag in
52538    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52539      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52540    esac
52541    ;;
52542  esac
52543
52544  ac_dir=`$as_dirname -- "$ac_file" ||
52545$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52546	 X"$ac_file" : 'X\(//\)[^/]' \| \
52547	 X"$ac_file" : 'X\(//\)$' \| \
52548	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52549$as_echo X"$ac_file" |
52550    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52551	    s//\1/
52552	    q
52553	  }
52554	  /^X\(\/\/\)[^/].*/{
52555	    s//\1/
52556	    q
52557	  }
52558	  /^X\(\/\/\)$/{
52559	    s//\1/
52560	    q
52561	  }
52562	  /^X\(\/\).*/{
52563	    s//\1/
52564	    q
52565	  }
52566	  s/.*/./; q'`
52567  as_dir="$ac_dir"; as_fn_mkdir_p
52568  ac_builddir=.
52569
52570case "$ac_dir" in
52571.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52572*)
52573  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52574  # A ".." for each directory in $ac_dir_suffix.
52575  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52576  case $ac_top_builddir_sub in
52577  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52578  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52579  esac ;;
52580esac
52581ac_abs_top_builddir=$ac_pwd
52582ac_abs_builddir=$ac_pwd$ac_dir_suffix
52583# for backward compatibility:
52584ac_top_builddir=$ac_top_build_prefix
52585
52586case $srcdir in
52587  .)  # We are building in place.
52588    ac_srcdir=.
52589    ac_top_srcdir=$ac_top_builddir_sub
52590    ac_abs_top_srcdir=$ac_pwd ;;
52591  [\\/]* | ?:[\\/]* )  # Absolute name.
52592    ac_srcdir=$srcdir$ac_dir_suffix;
52593    ac_top_srcdir=$srcdir
52594    ac_abs_top_srcdir=$srcdir ;;
52595  *) # Relative name.
52596    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52597    ac_top_srcdir=$ac_top_build_prefix$srcdir
52598    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52599esac
52600ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52601
52602
52603  case $ac_mode in
52604  :F)
52605  #
52606  # CONFIG_FILE
52607  #
52608
52609_ACEOF
52610
52611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52612# If the template does not know about datarootdir, expand it.
52613# FIXME: This hack should be removed a few years after 2.60.
52614ac_datarootdir_hack=; ac_datarootdir_seen=
52615ac_sed_dataroot='
52616/datarootdir/ {
52617  p
52618  q
52619}
52620/@datadir@/p
52621/@docdir@/p
52622/@infodir@/p
52623/@localedir@/p
52624/@mandir@/p'
52625case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52626*datarootdir*) ac_datarootdir_seen=yes;;
52627*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52628  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52629$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52630_ACEOF
52631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52632  ac_datarootdir_hack='
52633  s&@datadir@&$datadir&g
52634  s&@docdir@&$docdir&g
52635  s&@infodir@&$infodir&g
52636  s&@localedir@&$localedir&g
52637  s&@mandir@&$mandir&g
52638  s&\\\${datarootdir}&$datarootdir&g' ;;
52639esac
52640_ACEOF
52641
52642# Neutralize VPATH when `$srcdir' = `.'.
52643# Shell code in configure.ac might set extrasub.
52644# FIXME: do we really want to maintain this feature?
52645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52646ac_sed_extra="$ac_vpsub
52647$extrasub
52648_ACEOF
52649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52650:t
52651/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52652s|@configure_input@|$ac_sed_conf_input|;t t
52653s&@top_builddir@&$ac_top_builddir_sub&;t t
52654s&@top_build_prefix@&$ac_top_build_prefix&;t t
52655s&@srcdir@&$ac_srcdir&;t t
52656s&@abs_srcdir@&$ac_abs_srcdir&;t t
52657s&@top_srcdir@&$ac_top_srcdir&;t t
52658s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52659s&@builddir@&$ac_builddir&;t t
52660s&@abs_builddir@&$ac_abs_builddir&;t t
52661s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52662$ac_datarootdir_hack
52663"
52664eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52665  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52666
52667test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52668  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52669  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52670      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52671  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52672which seems to be undefined.  Please make sure it is defined" >&5
52673$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52674which seems to be undefined.  Please make sure it is defined" >&2;}
52675
52676  rm -f "$ac_tmp/stdin"
52677  case $ac_file in
52678  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52679  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52680  esac \
52681  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52682 ;;
52683
52684
52685
52686  esac
52687
52688done # for ac_tag
52689
52690
52691as_fn_exit 0
52692_ACEOF
52693ac_clean_files=$ac_clean_files_save
52694
52695test $ac_write_fail = 0 ||
52696  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52697
52698
52699# configure is writing to config.log, and then calls config.status.
52700# config.status does its own redirection, appending to config.log.
52701# Unfortunately, on DOS this fails, as config.log is still kept open
52702# by configure, so config.status won't be able to write to it; its
52703# output is simply discarded.  So we exec the FD to /dev/null,
52704# effectively closing config.log, so it can be properly (re)opened and
52705# appended to by config.status.  When coming back to configure, we
52706# need to make the FD available again.
52707if test "$no_create" != yes; then
52708  ac_cs_success=:
52709  ac_config_status_args=
52710  test "$silent" = yes &&
52711    ac_config_status_args="$ac_config_status_args --quiet"
52712  exec 5>/dev/null
52713  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52714  exec 5>>config.log
52715  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52716  # would make configure fail if this is the last instruction.
52717  $ac_cs_success || as_fn_exit 1
52718fi
52719if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52720  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52721$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52722fi
52723
52724
52725# Try to move the config.log file to the output directory.
52726if test -e ./config.log; then
52727  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52728fi
52729
52730# Make the compare script executable
52731$CHMOD +x $OUTPUT_ROOT/compare.sh
52732
52733# Finally output some useful information to the user
52734
52735  # Finally output some useful information to the user
52736
52737  printf "\n"
52738  printf "====================================================\n"
52739  if test "x$no_create" != "xyes"; then
52740    if test "x$IS_RECONFIGURE" != "xyes"; then
52741      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52742    else
52743      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52744    fi
52745  else
52746    if test "x$IS_RECONFIGURE" != "xyes"; then
52747      printf "A configuration has been successfully checked but not created\n"
52748    else
52749      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52750    fi
52751  fi
52752  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52753    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52754  else
52755    printf "using default settings.\n"
52756  fi
52757
52758  printf "\n"
52759  printf "Configuration summary:\n"
52760  printf "* Debug level:    $DEBUG_LEVEL\n"
52761  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52762  printf "* JDK variant:    $JDK_VARIANT\n"
52763  printf "* JVM variants:   $with_jvm_variants\n"
52764  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52765
52766  printf "\n"
52767  printf "Tools summary:\n"
52768  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52769    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52770  fi
52771  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52772  if test "x$TOOLCHAIN_VERSION" != "x"; then
52773    print_version=" $TOOLCHAIN_VERSION"
52774  fi
52775  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
52776  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52777  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52778
52779  printf "\n"
52780  printf "Build performance summary:\n"
52781  printf "* Cores to use:   $JOBS\n"
52782  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52783  if test "x$CCACHE_STATUS" != "x"; then
52784    printf "* ccache status:  $CCACHE_STATUS\n"
52785  fi
52786  printf "\n"
52787
52788  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52789    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52790    printf "will result in longer build times.\n"
52791    printf "\n"
52792  fi
52793
52794  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52795    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52796    printf "These are not respected, and will be ignored. It is recommended\n"
52797    printf "that you clean your environment. The following variables are set:\n"
52798    printf "$FOUND_ALT_VARIABLES\n"
52799    printf "\n"
52800  fi
52801
52802  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52803    printf "WARNING: Your build output directory is not on a local disk.\n"
52804    printf "This will severely degrade build performance!\n"
52805    printf "It is recommended that you create an output directory on a local disk,\n"
52806    printf "and run the configure script again from that directory.\n"
52807    printf "\n"
52808  fi
52809
52810  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52811    printf "WARNING: The result of this configuration has overridden an older\n"
52812    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52813    printf "proper build. Failure to do so might result in strange build problems.\n"
52814    printf "\n"
52815  fi
52816
52817  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52818    printf "WARNING: The result of this configuration was not saved.\n"
52819    printf "You should run without '--no-create | -n' to create the configuration.\n"
52820    printf "\n"
52821  fi
52822
52823
52824
52825if test -e "$OUTPUT_ROOT/config.log"; then
52826  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52827  if test $? -eq 0; then
52828    printf "The following warnings were produced. Repeated here for convenience:\n"
52829    # We must quote sed expression (using []) to stop m4 from eating the [].
52830    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52831    printf "\n"
52832  fi
52833fi
52834
52835
52836