generated-configure.sh revision 1333:b3d5aeadac2d
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
995ORIGINAL_PATH
996CONFIGURE_COMMAND_LINE
997target_alias
998host_alias
999build_alias
1000LIBS
1001ECHO_T
1002ECHO_N
1003ECHO_C
1004DEFS
1005mandir
1006localedir
1007libdir
1008psdir
1009pdfdir
1010dvidir
1011htmldir
1012infodir
1013docdir
1014oldincludedir
1015includedir
1016localstatedir
1017sharedstatedir
1018sysconfdir
1019datadir
1020datarootdir
1021libexecdir
1022sbindir
1023bindir
1024program_transform_name
1025prefix
1026exec_prefix
1027PACKAGE_URL
1028PACKAGE_BUGREPORT
1029PACKAGE_STRING
1030PACKAGE_VERSION
1031PACKAGE_TARNAME
1032PACKAGE_NAME
1033PATH_SEPARATOR
1034SHELL'
1035ac_subst_files=''
1036ac_user_opts='
1037enable_option_checking
1038with_target_bits
1039enable_openjdk_only
1040with_custom_make_dir
1041with_jdk_variant
1042with_jvm_interpreter
1043with_jvm_variants
1044enable_debug
1045with_debug_level
1046with_devkit
1047with_sys_root
1048with_sysroot
1049with_tools_dir
1050with_toolchain_path
1051with_extra_path
1052with_sdk_name
1053with_conf_name
1054with_output_sync
1055with_builddeps_conf
1056with_builddeps_server
1057with_builddeps_dir
1058with_builddeps_group
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063enable_rmiconnector_iiop
1064with_milestone
1065with_update_version
1066with_user_release_suffix
1067with_build_number
1068with_copyright_year
1069with_boot_jdk
1070with_add_source_root
1071with_override_source_root
1072with_adds_and_overrides
1073with_override_langtools
1074with_override_corba
1075with_override_jaxp
1076with_override_jaxws
1077with_override_hotspot
1078with_override_nashorn
1079with_override_jdk
1080with_import_hotspot
1081with_toolchain_type
1082with_toolchain_version
1083with_jtreg
1084with_extra_cflags
1085with_extra_cxxflags
1086with_extra_ldflags
1087enable_debug_symbols
1088enable_zip_debug_info
1089with_x
1090with_cups
1091with_cups_include
1092with_freetype
1093with_freetype_include
1094with_freetype_lib
1095with_freetype_src
1096enable_freetype_bundling
1097with_alsa
1098with_alsa_include
1099with_alsa_lib
1100with_libjpeg
1101with_giflib
1102with_lcms
1103with_libpng
1104with_zlib
1105with_stdc__lib
1106with_msvcr_dll
1107with_msvcp_dll
1108with_dxsdk
1109with_dxsdk_lib
1110with_dxsdk_include
1111with_num_cores
1112with_memory_size
1113with_jobs
1114with_boot_jdk_jvmargs
1115with_sjavac_server_java
1116enable_sjavac
1117enable_precompiled_headers
1118enable_ccache
1119with_ccache_dir
1120'
1121      ac_precious_vars='build_alias
1122host_alias
1123target_alias
1124BASENAME
1125BASH
1126CAT
1127CHMOD
1128CMP
1129COMM
1130CP
1131CUT
1132DATE
1133DIFF
1134DIRNAME
1135ECHO
1136EXPR
1137FILE
1138FIND
1139HEAD
1140LN
1141LS
1142MKDIR
1143MKTEMP
1144MV
1145NAWK
1146PRINTF
1147RM
1148SH
1149SORT
1150TAIL
1151TAR
1152TEE
1153TOUCH
1154TR
1155UNAME
1156UNIQ
1157WC
1158WHICH
1159XARGS
1160AWK
1161GREP
1162EGREP
1163FGREP
1164SED
1165CYGPATH
1166READLINK
1167DF
1168SETFILE
1169CPIO
1170UNZIP
1171ZIP
1172LDD
1173OTOOL
1174READELF
1175HG
1176STAT
1177TIME
1178DSYMUTIL
1179XATTR
1180CODESIGN
1181PKG_CONFIG
1182JAVA
1183JAVAC
1184JAVAH
1185JAR
1186NATIVE2ASCII
1187JARSIGNER
1188CC
1189CFLAGS
1190LDFLAGS
1191LIBS
1192CPPFLAGS
1193CXX
1194CXXFLAGS
1195CCC
1196CPP
1197CXXCPP
1198AS
1199AR
1200OBJC
1201OBJCFLAGS
1202LIPO
1203STRIP
1204NM
1205GNM
1206MCS
1207OBJCOPY
1208OBJDUMP
1209BUILD_CC
1210BUILD_CXX
1211BUILD_LD
1212JTREGEXE
1213XMKMF
1214FREETYPE_CFLAGS
1215FREETYPE_LIBS
1216ALSA_CFLAGS
1217ALSA_LIBS
1218LCMS_CFLAGS
1219LCMS_LIBS
1220PNG_CFLAGS
1221PNG_LIBS
1222LIBFFI_CFLAGS
1223LIBFFI_LIBS
1224CCACHE'
1225
1226
1227# Initialize some variables set by options.
1228ac_init_help=
1229ac_init_version=false
1230ac_unrecognized_opts=
1231ac_unrecognized_sep=
1232# The variables have the same names as the options, with
1233# dashes changed to underlines.
1234cache_file=/dev/null
1235exec_prefix=NONE
1236no_create=
1237no_recursion=
1238prefix=NONE
1239program_prefix=NONE
1240program_suffix=NONE
1241program_transform_name=s,x,x,
1242silent=
1243site=
1244srcdir=
1245verbose=
1246x_includes=NONE
1247x_libraries=NONE
1248
1249# Installation directory options.
1250# These are left unexpanded so users can "make install exec_prefix=/foo"
1251# and all the variables that are supposed to be based on exec_prefix
1252# by default will actually change.
1253# Use braces instead of parens because sh, perl, etc. also accept them.
1254# (The list follows the same order as the GNU Coding Standards.)
1255bindir='${exec_prefix}/bin'
1256sbindir='${exec_prefix}/sbin'
1257libexecdir='${exec_prefix}/libexec'
1258datarootdir='${prefix}/share'
1259datadir='${datarootdir}'
1260sysconfdir='${prefix}/etc'
1261sharedstatedir='${prefix}/com'
1262localstatedir='${prefix}/var'
1263includedir='${prefix}/include'
1264oldincludedir='/usr/include'
1265docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1266infodir='${datarootdir}/info'
1267htmldir='${docdir}'
1268dvidir='${docdir}'
1269pdfdir='${docdir}'
1270psdir='${docdir}'
1271libdir='${exec_prefix}/lib'
1272localedir='${datarootdir}/locale'
1273mandir='${datarootdir}/man'
1274
1275ac_prev=
1276ac_dashdash=
1277for ac_option
1278do
1279  # If the previous option needs an argument, assign it.
1280  if test -n "$ac_prev"; then
1281    eval $ac_prev=\$ac_option
1282    ac_prev=
1283    continue
1284  fi
1285
1286  case $ac_option in
1287  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1288  *=)   ac_optarg= ;;
1289  *)    ac_optarg=yes ;;
1290  esac
1291
1292  # Accept the important Cygnus configure options, so we can diagnose typos.
1293
1294  case $ac_dashdash$ac_option in
1295  --)
1296    ac_dashdash=yes ;;
1297
1298  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1299    ac_prev=bindir ;;
1300  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1301    bindir=$ac_optarg ;;
1302
1303  -build | --build | --buil | --bui | --bu)
1304    ac_prev=build_alias ;;
1305  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1306    build_alias=$ac_optarg ;;
1307
1308  -cache-file | --cache-file | --cache-fil | --cache-fi \
1309  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1310    ac_prev=cache_file ;;
1311  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1312  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1313    cache_file=$ac_optarg ;;
1314
1315  --config-cache | -C)
1316    cache_file=config.cache ;;
1317
1318  -datadir | --datadir | --datadi | --datad)
1319    ac_prev=datadir ;;
1320  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1321    datadir=$ac_optarg ;;
1322
1323  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1324  | --dataroo | --dataro | --datar)
1325    ac_prev=datarootdir ;;
1326  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1327  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1328    datarootdir=$ac_optarg ;;
1329
1330  -disable-* | --disable-*)
1331    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1332    # Reject names that are not valid shell variable names.
1333    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1334      as_fn_error $? "invalid feature name: $ac_useropt"
1335    ac_useropt_orig=$ac_useropt
1336    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1337    case $ac_user_opts in
1338      *"
1339"enable_$ac_useropt"
1340"*) ;;
1341      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1342	 ac_unrecognized_sep=', ';;
1343    esac
1344    eval enable_$ac_useropt=no ;;
1345
1346  -docdir | --docdir | --docdi | --doc | --do)
1347    ac_prev=docdir ;;
1348  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1349    docdir=$ac_optarg ;;
1350
1351  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1352    ac_prev=dvidir ;;
1353  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1354    dvidir=$ac_optarg ;;
1355
1356  -enable-* | --enable-*)
1357    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1358    # Reject names that are not valid shell variable names.
1359    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1360      as_fn_error $? "invalid feature name: $ac_useropt"
1361    ac_useropt_orig=$ac_useropt
1362    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1363    case $ac_user_opts in
1364      *"
1365"enable_$ac_useropt"
1366"*) ;;
1367      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1368	 ac_unrecognized_sep=', ';;
1369    esac
1370    eval enable_$ac_useropt=\$ac_optarg ;;
1371
1372  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1373  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1374  | --exec | --exe | --ex)
1375    ac_prev=exec_prefix ;;
1376  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1377  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1378  | --exec=* | --exe=* | --ex=*)
1379    exec_prefix=$ac_optarg ;;
1380
1381  -gas | --gas | --ga | --g)
1382    # Obsolete; use --with-gas.
1383    with_gas=yes ;;
1384
1385  -help | --help | --hel | --he | -h)
1386    ac_init_help=long ;;
1387  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1388    ac_init_help=recursive ;;
1389  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1390    ac_init_help=short ;;
1391
1392  -host | --host | --hos | --ho)
1393    ac_prev=host_alias ;;
1394  -host=* | --host=* | --hos=* | --ho=*)
1395    host_alias=$ac_optarg ;;
1396
1397  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1398    ac_prev=htmldir ;;
1399  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1400  | --ht=*)
1401    htmldir=$ac_optarg ;;
1402
1403  -includedir | --includedir | --includedi | --included | --include \
1404  | --includ | --inclu | --incl | --inc)
1405    ac_prev=includedir ;;
1406  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1407  | --includ=* | --inclu=* | --incl=* | --inc=*)
1408    includedir=$ac_optarg ;;
1409
1410  -infodir | --infodir | --infodi | --infod | --info | --inf)
1411    ac_prev=infodir ;;
1412  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1413    infodir=$ac_optarg ;;
1414
1415  -libdir | --libdir | --libdi | --libd)
1416    ac_prev=libdir ;;
1417  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1418    libdir=$ac_optarg ;;
1419
1420  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1421  | --libexe | --libex | --libe)
1422    ac_prev=libexecdir ;;
1423  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1424  | --libexe=* | --libex=* | --libe=*)
1425    libexecdir=$ac_optarg ;;
1426
1427  -localedir | --localedir | --localedi | --localed | --locale)
1428    ac_prev=localedir ;;
1429  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1430    localedir=$ac_optarg ;;
1431
1432  -localstatedir | --localstatedir | --localstatedi | --localstated \
1433  | --localstate | --localstat | --localsta | --localst | --locals)
1434    ac_prev=localstatedir ;;
1435  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1436  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1437    localstatedir=$ac_optarg ;;
1438
1439  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1440    ac_prev=mandir ;;
1441  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1442    mandir=$ac_optarg ;;
1443
1444  -nfp | --nfp | --nf)
1445    # Obsolete; use --without-fp.
1446    with_fp=no ;;
1447
1448  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1449  | --no-cr | --no-c | -n)
1450    no_create=yes ;;
1451
1452  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1453  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1454    no_recursion=yes ;;
1455
1456  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1457  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1458  | --oldin | --oldi | --old | --ol | --o)
1459    ac_prev=oldincludedir ;;
1460  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1461  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1462  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1463    oldincludedir=$ac_optarg ;;
1464
1465  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1466    ac_prev=prefix ;;
1467  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1468    prefix=$ac_optarg ;;
1469
1470  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1471  | --program-pre | --program-pr | --program-p)
1472    ac_prev=program_prefix ;;
1473  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1474  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1475    program_prefix=$ac_optarg ;;
1476
1477  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1478  | --program-suf | --program-su | --program-s)
1479    ac_prev=program_suffix ;;
1480  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1481  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1482    program_suffix=$ac_optarg ;;
1483
1484  -program-transform-name | --program-transform-name \
1485  | --program-transform-nam | --program-transform-na \
1486  | --program-transform-n | --program-transform- \
1487  | --program-transform | --program-transfor \
1488  | --program-transfo | --program-transf \
1489  | --program-trans | --program-tran \
1490  | --progr-tra | --program-tr | --program-t)
1491    ac_prev=program_transform_name ;;
1492  -program-transform-name=* | --program-transform-name=* \
1493  | --program-transform-nam=* | --program-transform-na=* \
1494  | --program-transform-n=* | --program-transform-=* \
1495  | --program-transform=* | --program-transfor=* \
1496  | --program-transfo=* | --program-transf=* \
1497  | --program-trans=* | --program-tran=* \
1498  | --progr-tra=* | --program-tr=* | --program-t=*)
1499    program_transform_name=$ac_optarg ;;
1500
1501  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1502    ac_prev=pdfdir ;;
1503  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1504    pdfdir=$ac_optarg ;;
1505
1506  -psdir | --psdir | --psdi | --psd | --ps)
1507    ac_prev=psdir ;;
1508  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1509    psdir=$ac_optarg ;;
1510
1511  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1512  | -silent | --silent | --silen | --sile | --sil)
1513    silent=yes ;;
1514
1515  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1516    ac_prev=sbindir ;;
1517  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1518  | --sbi=* | --sb=*)
1519    sbindir=$ac_optarg ;;
1520
1521  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1522  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1523  | --sharedst | --shareds | --shared | --share | --shar \
1524  | --sha | --sh)
1525    ac_prev=sharedstatedir ;;
1526  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1527  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1528  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1529  | --sha=* | --sh=*)
1530    sharedstatedir=$ac_optarg ;;
1531
1532  -site | --site | --sit)
1533    ac_prev=site ;;
1534  -site=* | --site=* | --sit=*)
1535    site=$ac_optarg ;;
1536
1537  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1538    ac_prev=srcdir ;;
1539  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1540    srcdir=$ac_optarg ;;
1541
1542  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1543  | --syscon | --sysco | --sysc | --sys | --sy)
1544    ac_prev=sysconfdir ;;
1545  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1546  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1547    sysconfdir=$ac_optarg ;;
1548
1549  -target | --target | --targe | --targ | --tar | --ta | --t)
1550    ac_prev=target_alias ;;
1551  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1552    target_alias=$ac_optarg ;;
1553
1554  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1555    verbose=yes ;;
1556
1557  -version | --version | --versio | --versi | --vers | -V)
1558    ac_init_version=: ;;
1559
1560  -with-* | --with-*)
1561    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1562    # Reject names that are not valid shell variable names.
1563    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1564      as_fn_error $? "invalid package name: $ac_useropt"
1565    ac_useropt_orig=$ac_useropt
1566    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1567    case $ac_user_opts in
1568      *"
1569"with_$ac_useropt"
1570"*) ;;
1571      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1572	 ac_unrecognized_sep=', ';;
1573    esac
1574    eval with_$ac_useropt=\$ac_optarg ;;
1575
1576  -without-* | --without-*)
1577    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1578    # Reject names that are not valid shell variable names.
1579    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1580      as_fn_error $? "invalid package name: $ac_useropt"
1581    ac_useropt_orig=$ac_useropt
1582    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1583    case $ac_user_opts in
1584      *"
1585"with_$ac_useropt"
1586"*) ;;
1587      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1588	 ac_unrecognized_sep=', ';;
1589    esac
1590    eval with_$ac_useropt=no ;;
1591
1592  --x)
1593    # Obsolete; use --with-x.
1594    with_x=yes ;;
1595
1596  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1597  | --x-incl | --x-inc | --x-in | --x-i)
1598    ac_prev=x_includes ;;
1599  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1600  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1601    x_includes=$ac_optarg ;;
1602
1603  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1604  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1605    ac_prev=x_libraries ;;
1606  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1607  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1608    x_libraries=$ac_optarg ;;
1609
1610  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1611Try \`$0 --help' for more information"
1612    ;;
1613
1614  *=*)
1615    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1616    # Reject names that are not valid shell variable names.
1617    case $ac_envvar in #(
1618      '' | [0-9]* | *[!_$as_cr_alnum]* )
1619      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1620    esac
1621    eval $ac_envvar=\$ac_optarg
1622    export $ac_envvar ;;
1623
1624  *)
1625    # FIXME: should be removed in autoconf 3.0.
1626    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1627    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1628      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1629    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1630    ;;
1631
1632  esac
1633done
1634
1635if test -n "$ac_prev"; then
1636  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1637  as_fn_error $? "missing argument to $ac_option"
1638fi
1639
1640if test -n "$ac_unrecognized_opts"; then
1641  case $enable_option_checking in
1642    no) ;;
1643    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1644    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1645  esac
1646fi
1647
1648# Check all directory arguments for consistency.
1649for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1650		datadir sysconfdir sharedstatedir localstatedir includedir \
1651		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1652		libdir localedir mandir
1653do
1654  eval ac_val=\$$ac_var
1655  # Remove trailing slashes.
1656  case $ac_val in
1657    */ )
1658      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1659      eval $ac_var=\$ac_val;;
1660  esac
1661  # Be sure to have absolute directory names.
1662  case $ac_val in
1663    [\\/$]* | ?:[\\/]* )  continue;;
1664    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1665  esac
1666  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1667done
1668
1669# There might be people who depend on the old broken behavior: `$host'
1670# used to hold the argument of --host etc.
1671# FIXME: To remove some day.
1672build=$build_alias
1673host=$host_alias
1674target=$target_alias
1675
1676# FIXME: To remove some day.
1677if test "x$host_alias" != x; then
1678  if test "x$build_alias" = x; then
1679    cross_compiling=maybe
1680  elif test "x$build_alias" != "x$host_alias"; then
1681    cross_compiling=yes
1682  fi
1683fi
1684
1685ac_tool_prefix=
1686test -n "$host_alias" && ac_tool_prefix=$host_alias-
1687
1688test "$silent" = yes && exec 6>/dev/null
1689
1690
1691ac_pwd=`pwd` && test -n "$ac_pwd" &&
1692ac_ls_di=`ls -di .` &&
1693ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1694  as_fn_error $? "working directory cannot be determined"
1695test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1696  as_fn_error $? "pwd does not report name of working directory"
1697
1698
1699# Find the source files, if location was not specified.
1700if test -z "$srcdir"; then
1701  ac_srcdir_defaulted=yes
1702  # Try the directory containing this script, then the parent directory.
1703  ac_confdir=`$as_dirname -- "$as_myself" ||
1704$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1705	 X"$as_myself" : 'X\(//\)[^/]' \| \
1706	 X"$as_myself" : 'X\(//\)$' \| \
1707	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1708$as_echo X"$as_myself" |
1709    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)[^/].*/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\/\)$/{
1718	    s//\1/
1719	    q
1720	  }
1721	  /^X\(\/\).*/{
1722	    s//\1/
1723	    q
1724	  }
1725	  s/.*/./; q'`
1726  srcdir=$ac_confdir
1727  if test ! -r "$srcdir/$ac_unique_file"; then
1728    srcdir=..
1729  fi
1730else
1731  ac_srcdir_defaulted=no
1732fi
1733if test ! -r "$srcdir/$ac_unique_file"; then
1734  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1735  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1736fi
1737ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1738ac_abs_confdir=`(
1739	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1740	pwd)`
1741# When building in place, set srcdir=.
1742if test "$ac_abs_confdir" = "$ac_pwd"; then
1743  srcdir=.
1744fi
1745# Remove unnecessary trailing slashes from srcdir.
1746# Double slashes in file names in object file debugging info
1747# mess up M-x gdb in Emacs.
1748case $srcdir in
1749*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1750esac
1751for ac_var in $ac_precious_vars; do
1752  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_env_${ac_var}_value=\$${ac_var}
1754  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1756done
1757
1758#
1759# Report the --help message.
1760#
1761if test "$ac_init_help" = "long"; then
1762  # Omit some internal or obsolete options to make the list less imposing.
1763  # This message is too long to be a string in the A/UX 3.1 sh.
1764  cat <<_ACEOF
1765\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1766
1767Usage: $0 [OPTION]... [VAR=VALUE]...
1768
1769To assign environment variables (e.g., CC, CFLAGS...), specify them as
1770VAR=VALUE.  See below for descriptions of some of the useful variables.
1771
1772Defaults for the options are specified in brackets.
1773
1774Configuration:
1775  -h, --help              display this help and exit
1776      --help=short        display options specific to this package
1777      --help=recursive    display the short help of all the included packages
1778  -V, --version           display version information and exit
1779  -q, --quiet, --silent   do not print \`checking ...' messages
1780      --cache-file=FILE   cache test results in FILE [disabled]
1781  -C, --config-cache      alias for \`--cache-file=config.cache'
1782  -n, --no-create         do not create output files
1783      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1784
1785Installation directories:
1786  --prefix=PREFIX         install architecture-independent files in PREFIX
1787                          [$ac_default_prefix]
1788  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1789                          [PREFIX]
1790
1791By default, \`make install' will install all the files in
1792\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1793an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1794for instance \`--prefix=\$HOME'.
1795
1796For better control, use the options below.
1797
1798Fine tuning of the installation directories:
1799  --bindir=DIR            user executables [EPREFIX/bin]
1800  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1801  --libexecdir=DIR        program executables [EPREFIX/libexec]
1802  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1803  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1804  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1805  --libdir=DIR            object code libraries [EPREFIX/lib]
1806  --includedir=DIR        C header files [PREFIX/include]
1807  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1808  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1809  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1810  --infodir=DIR           info documentation [DATAROOTDIR/info]
1811  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1812  --mandir=DIR            man documentation [DATAROOTDIR/man]
1813  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1814  --htmldir=DIR           html documentation [DOCDIR]
1815  --dvidir=DIR            dvi documentation [DOCDIR]
1816  --pdfdir=DIR            pdf documentation [DOCDIR]
1817  --psdir=DIR             ps documentation [DOCDIR]
1818_ACEOF
1819
1820  cat <<\_ACEOF
1821
1822X features:
1823  --x-includes=DIR    X include files are in DIR
1824  --x-libraries=DIR   X library files are in DIR
1825
1826System types:
1827  --build=BUILD     configure for building on BUILD [guessed]
1828  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1829  --target=TARGET   configure for building compilers for TARGET [HOST]
1830_ACEOF
1831fi
1832
1833if test -n "$ac_init_help"; then
1834  case $ac_init_help in
1835     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1836   esac
1837  cat <<\_ACEOF
1838
1839Optional Features:
1840  --disable-option-checking  ignore unrecognized --enable/--with options
1841  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1842  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1843  --enable-openjdk-only   suppress building custom source even if present
1844                          [disabled]
1845  --enable-debug          set the debug level to fastdebug (shorthand for
1846                          --with-debug-level=fastdebug) [disabled]
1847  --disable-headful       disable building headful support (graphical UI
1848                          support) [enabled]
1849  --enable-hotspot-test-in-build
1850                          run the Queens test after Hotspot build [disabled]
1851  --enable-unlimited-crypto
1852                          Enable unlimited crypto policy [disabled]
1853  --enable-rmiconnector-iiop
1854                          enable the JMX RMIConnector iiop transport
1855                          [disabled]
1856  --disable-debug-symbols disable generation of debug symbols [enabled]
1857  --disable-zip-debug-info
1858                          disable zipping of debug-info files [enabled]
1859  --disable-freetype-bundling
1860                          disable bundling of the freetype library with the
1861                          build result [enabled on Windows or when using
1862                          --with-freetype, disabled otherwise]
1863  --enable-sjavac         use sjavac to do fast incremental compiles
1864                          [disabled]
1865  --disable-precompiled-headers
1866                          disable using precompiled headers when compiling C++
1867                          [enabled]
1868  --enable-ccache         enable using ccache to speed up recompilations
1869                          [disabled]
1870
1871Optional Packages:
1872  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1873  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1874  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1875                          support it), e.g. --with-target-bits=32 [guessed]
1876  --with-custom-make-dir  Deprecated. Option is kept for backwards
1877                          compatibility and is ignored
1878  --with-jdk-variant      JDK variant to build (normal) [normal]
1879  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1880  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1881                          client, minimal1, kernel, zero, zeroshark, core)
1882                          [server]
1883  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1884                          optimized (HotSpot build only)) [release]
1885  --with-devkit           use this devkit for compilers, tools and resources
1886  --with-sys-root         alias for --with-sysroot for backwards compatability
1887  --with-sysroot          use this directory as sysroot
1888  --with-tools-dir        alias for --with-toolchain-path for backwards
1889                          compatibility
1890  --with-toolchain-path   prepend these directories when searching for
1891                          toolchain binaries (compilers etc)
1892  --with-extra-path       prepend these directories to the default path
1893  --with-sdk-name         use the platform SDK of the given name. [macosx]
1894  --with-conf-name        use this as the name of the configuration [generated
1895                          from important configuration options]
1896  --with-output-sync      set make output sync type if supported by make.
1897                          [recurse]
1898  --with-builddeps-conf   use this configuration file for the builddeps
1899  --with-builddeps-server download and use build dependencies from this server
1900                          url
1901  --with-builddeps-dir    store downloaded build dependencies here
1902                          [/localhome/builddeps]
1903  --with-builddeps-group  chgrp the downloaded build dependencies to this
1904                          group
1905  --with-cacerts-file     specify alternative cacerts file
1906  --with-milestone        Set milestone value for build [internal]
1907  --with-update-version   Set update version value for build [b00]
1908  --with-user-release-suffix
1909                          Add a custom string to the version string if build
1910                          number is not set.[username_builddateb00]
1911  --with-build-number     Set build number value for build [b00]
1912  --with-copyright-year   Set copyright year value for build [current year]
1913  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1914  --with-add-source-root  for each and every source directory, look in this
1915                          additional source root for the same directory; if it
1916                          exists and have files in it, include it in the build
1917  --with-override-source-root
1918                          for each and every source directory, look in this
1919                          override source root for the same directory; if it
1920                          exists, use that directory instead and ignore the
1921                          directory in the original source root
1922  --with-adds-and-overrides
1923                          use the subdirs 'adds' and 'overrides' in the
1924                          specified directory as add-source-root and
1925                          override-source-root
1926  --with-override-langtools
1927                          use this langtools dir for the build
1928  --with-override-corba   use this corba dir for the build
1929  --with-override-jaxp    use this jaxp dir for the build
1930  --with-override-jaxws   use this jaxws dir for the build
1931  --with-override-hotspot use this hotspot dir for the build
1932  --with-override-nashorn use this nashorn dir for the build
1933  --with-override-jdk     use this jdk dir for the build
1934  --with-import-hotspot   import hotspot binaries from this jdk image or
1935                          hotspot build dist dir instead of building from
1936                          source
1937  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1938                          to show possible values [platform dependent]
1939  --with-toolchain-version
1940                          the version of the toolchain to look for, use
1941                          '--help' to show possible values [platform
1942                          dependent]
1943  --with-jtreg            Regression Test Harness [probed]
1944  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1945  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1946  --with-extra-ldflags    extra flags to be used when linking jdk
1947  --with-x                use the X Window System
1948  --with-cups             specify prefix directory for the cups package
1949                          (expecting the headers under PATH/include)
1950  --with-cups-include     specify directory for the cups include files
1951  --with-freetype         specify prefix directory for the freetype package
1952                          (expecting the libraries under PATH/lib and the
1953                          headers under PATH/include)
1954  --with-freetype-include specify directory for the freetype include files
1955  --with-freetype-lib     specify directory for the freetype library
1956  --with-freetype-src     specify directory with freetype sources to
1957                          automatically build the library (experimental,
1958                          Windows-only)
1959  --with-alsa             specify prefix directory for the alsa package
1960                          (expecting the libraries under PATH/lib and the
1961                          headers under PATH/include)
1962  --with-alsa-include     specify directory for the alsa include files
1963  --with-alsa-lib         specify directory for the alsa library
1964  --with-libjpeg          use libjpeg from build system or OpenJDK source
1965                          (system, bundled) [bundled]
1966  --with-giflib           use giflib from build system or OpenJDK source
1967                          (system, bundled) [bundled]
1968  --with-lcms             use lcms2 from build system or OpenJDK source
1969                          (system, bundled) [bundled]
1970  --with-libpng           use libpng from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-zlib             use zlib from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-stdc++lib=<static>,<dynamic>,<default>
1975                          force linking of the C++ runtime on Linux to either
1976                          static or dynamic, default is static with dynamic as
1977                          fallback
1978  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1979                          (Windows only) [probed]
1980  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1981                          (Windows only) [probed]
1982  --with-dxsdk            Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-dxsdk-include    Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-num-cores        number of cores in the build system, e.g.
1989                          --with-num-cores=8 [probed]
1990  --with-memory-size      memory (in MB) available in the build system, e.g.
1991                          --with-memory-size=1024 [probed]
1992  --with-jobs             number of parallel jobs to let make run [calculated
1993                          based on cores and memory]
1994  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1995                          invocations of boot JDK, overriding the default
1996                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1997                          -enableassertions"
1998  --with-sjavac-server-java
1999                          use this java binary for running the sjavac
2000                          background server [Boot JDK java]
2001  --with-ccache-dir       where to store ccache files [~/.ccache]
2002
2003Some influential environment variables:
2004  BASENAME    Override default value for BASENAME
2005  BASH        Override default value for BASH
2006  CAT         Override default value for CAT
2007  CHMOD       Override default value for CHMOD
2008  CMP         Override default value for CMP
2009  COMM        Override default value for COMM
2010  CP          Override default value for CP
2011  CUT         Override default value for CUT
2012  DATE        Override default value for DATE
2013  DIFF        Override default value for DIFF
2014  DIRNAME     Override default value for DIRNAME
2015  ECHO        Override default value for ECHO
2016  EXPR        Override default value for EXPR
2017  FILE        Override default value for FILE
2018  FIND        Override default value for FIND
2019  HEAD        Override default value for HEAD
2020  LN          Override default value for LN
2021  LS          Override default value for LS
2022  MKDIR       Override default value for MKDIR
2023  MKTEMP      Override default value for MKTEMP
2024  MV          Override default value for MV
2025  NAWK        Override default value for NAWK
2026  PRINTF      Override default value for PRINTF
2027  RM          Override default value for RM
2028  SH          Override default value for SH
2029  SORT        Override default value for SORT
2030  TAIL        Override default value for TAIL
2031  TAR         Override default value for TAR
2032  TEE         Override default value for TEE
2033  TOUCH       Override default value for TOUCH
2034  TR          Override default value for TR
2035  UNAME       Override default value for UNAME
2036  UNIQ        Override default value for UNIQ
2037  WC          Override default value for WC
2038  WHICH       Override default value for WHICH
2039  XARGS       Override default value for XARGS
2040  AWK         Override default value for AWK
2041  GREP        Override default value for GREP
2042  EGREP       Override default value for EGREP
2043  FGREP       Override default value for FGREP
2044  SED         Override default value for SED
2045  CYGPATH     Override default value for CYGPATH
2046  READLINK    Override default value for READLINK
2047  DF          Override default value for DF
2048  SETFILE     Override default value for SETFILE
2049  CPIO        Override default value for CPIO
2050  UNZIP       Override default value for UNZIP
2051  ZIP         Override default value for ZIP
2052  LDD         Override default value for LDD
2053  OTOOL       Override default value for OTOOL
2054  READELF     Override default value for READELF
2055  HG          Override default value for HG
2056  STAT        Override default value for STAT
2057  TIME        Override default value for TIME
2058  DSYMUTIL    Override default value for DSYMUTIL
2059  XATTR       Override default value for XATTR
2060  CODESIGN    Override default value for CODESIGN
2061  PKG_CONFIG  path to pkg-config utility
2062  JAVA        Override default value for JAVA
2063  JAVAC       Override default value for JAVAC
2064  JAVAH       Override default value for JAVAH
2065  JAR         Override default value for JAR
2066  NATIVE2ASCII
2067              Override default value for NATIVE2ASCII
2068  JARSIGNER   Override default value for JARSIGNER
2069  CC          C compiler command
2070  CFLAGS      C compiler flags
2071  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2072              nonstandard directory <lib dir>
2073  LIBS        libraries to pass to the linker, e.g. -l<library>
2074  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2075              you have headers in a nonstandard directory <include dir>
2076  CXX         C++ compiler command
2077  CXXFLAGS    C++ compiler flags
2078  CPP         C preprocessor
2079  CXXCPP      C++ preprocessor
2080  AS          Override default value for AS
2081  AR          Override default value for AR
2082  OBJC        Objective C compiler command
2083  OBJCFLAGS   Objective C compiler flags
2084  LIPO        Override default value for LIPO
2085  STRIP       Override default value for STRIP
2086  NM          Override default value for NM
2087  GNM         Override default value for GNM
2088  MCS         Override default value for MCS
2089  OBJCOPY     Override default value for OBJCOPY
2090  OBJDUMP     Override default value for OBJDUMP
2091  BUILD_CC    Override default value for BUILD_CC
2092  BUILD_CXX   Override default value for BUILD_CXX
2093  BUILD_LD    Override default value for BUILD_LD
2094  JTREGEXE    Override default value for JTREGEXE
2095  XMKMF       Path to xmkmf, Makefile generator for X Window System
2096  FREETYPE_CFLAGS
2097              C compiler flags for FREETYPE, overriding pkg-config
2098  FREETYPE_LIBS
2099              linker flags for FREETYPE, overriding pkg-config
2100  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2101  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2102  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2103  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2104  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2105  PNG_LIBS    linker flags for PNG, overriding pkg-config
2106  LIBFFI_CFLAGS
2107              C compiler flags for LIBFFI, overriding pkg-config
2108  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2109  CCACHE      Override default value for CCACHE
2110
2111Use these variables to override the choices made by `configure' or to help
2112it to find libraries and programs with nonstandard names/locations.
2113
2114Report bugs to <build-dev@openjdk.java.net>.
2115OpenJDK home page: <http://openjdk.java.net>.
2116_ACEOF
2117ac_status=$?
2118fi
2119
2120if test "$ac_init_help" = "recursive"; then
2121  # If there are subdirs, report their specific --help.
2122  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2123    test -d "$ac_dir" ||
2124      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2125      continue
2126    ac_builddir=.
2127
2128case "$ac_dir" in
2129.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2130*)
2131  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2132  # A ".." for each directory in $ac_dir_suffix.
2133  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2134  case $ac_top_builddir_sub in
2135  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2136  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2137  esac ;;
2138esac
2139ac_abs_top_builddir=$ac_pwd
2140ac_abs_builddir=$ac_pwd$ac_dir_suffix
2141# for backward compatibility:
2142ac_top_builddir=$ac_top_build_prefix
2143
2144case $srcdir in
2145  .)  # We are building in place.
2146    ac_srcdir=.
2147    ac_top_srcdir=$ac_top_builddir_sub
2148    ac_abs_top_srcdir=$ac_pwd ;;
2149  [\\/]* | ?:[\\/]* )  # Absolute name.
2150    ac_srcdir=$srcdir$ac_dir_suffix;
2151    ac_top_srcdir=$srcdir
2152    ac_abs_top_srcdir=$srcdir ;;
2153  *) # Relative name.
2154    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2155    ac_top_srcdir=$ac_top_build_prefix$srcdir
2156    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2157esac
2158ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2159
2160    cd "$ac_dir" || { ac_status=$?; continue; }
2161    # Check for guested configure.
2162    if test -f "$ac_srcdir/configure.gnu"; then
2163      echo &&
2164      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2165    elif test -f "$ac_srcdir/configure"; then
2166      echo &&
2167      $SHELL "$ac_srcdir/configure" --help=recursive
2168    else
2169      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2170    fi || ac_status=$?
2171    cd "$ac_pwd" || { ac_status=$?; break; }
2172  done
2173fi
2174
2175test -n "$ac_init_help" && exit $ac_status
2176if $ac_init_version; then
2177  cat <<\_ACEOF
2178OpenJDK configure jdk9
2179generated by GNU Autoconf 2.69
2180
2181Copyright (C) 2012 Free Software Foundation, Inc.
2182This configure script is free software; the Free Software Foundation
2183gives unlimited permission to copy, distribute and modify it.
2184_ACEOF
2185  exit
2186fi
2187
2188## ------------------------ ##
2189## Autoconf initialization. ##
2190## ------------------------ ##
2191
2192# ac_fn_c_try_compile LINENO
2193# --------------------------
2194# Try to compile conftest.$ac_ext, and return whether this succeeded.
2195ac_fn_c_try_compile ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  rm -f conftest.$ac_objext
2199  if { { ac_try="$ac_compile"
2200case "(($ac_try" in
2201  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2202  *) ac_try_echo=$ac_try;;
2203esac
2204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2205$as_echo "$ac_try_echo"; } >&5
2206  (eval "$ac_compile") 2>conftest.err
2207  ac_status=$?
2208  if test -s conftest.err; then
2209    grep -v '^ *+' conftest.err >conftest.er1
2210    cat conftest.er1 >&5
2211    mv -f conftest.er1 conftest.err
2212  fi
2213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2214  test $ac_status = 0; } && {
2215	 test -z "$ac_c_werror_flag" ||
2216	 test ! -s conftest.err
2217       } && test -s conftest.$ac_objext; then :
2218  ac_retval=0
2219else
2220  $as_echo "$as_me: failed program was:" >&5
2221sed 's/^/| /' conftest.$ac_ext >&5
2222
2223	ac_retval=1
2224fi
2225  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2226  as_fn_set_status $ac_retval
2227
2228} # ac_fn_c_try_compile
2229
2230# ac_fn_cxx_try_compile LINENO
2231# ----------------------------
2232# Try to compile conftest.$ac_ext, and return whether this succeeded.
2233ac_fn_cxx_try_compile ()
2234{
2235  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236  rm -f conftest.$ac_objext
2237  if { { ac_try="$ac_compile"
2238case "(($ac_try" in
2239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2240  *) ac_try_echo=$ac_try;;
2241esac
2242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2243$as_echo "$ac_try_echo"; } >&5
2244  (eval "$ac_compile") 2>conftest.err
2245  ac_status=$?
2246  if test -s conftest.err; then
2247    grep -v '^ *+' conftest.err >conftest.er1
2248    cat conftest.er1 >&5
2249    mv -f conftest.er1 conftest.err
2250  fi
2251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2252  test $ac_status = 0; } && {
2253	 test -z "$ac_cxx_werror_flag" ||
2254	 test ! -s conftest.err
2255       } && test -s conftest.$ac_objext; then :
2256  ac_retval=0
2257else
2258  $as_echo "$as_me: failed program was:" >&5
2259sed 's/^/| /' conftest.$ac_ext >&5
2260
2261	ac_retval=1
2262fi
2263  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2264  as_fn_set_status $ac_retval
2265
2266} # ac_fn_cxx_try_compile
2267
2268# ac_fn_c_try_cpp LINENO
2269# ----------------------
2270# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2271ac_fn_c_try_cpp ()
2272{
2273  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274  if { { ac_try="$ac_cpp conftest.$ac_ext"
2275case "(($ac_try" in
2276  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2277  *) ac_try_echo=$ac_try;;
2278esac
2279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2280$as_echo "$ac_try_echo"; } >&5
2281  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2282  ac_status=$?
2283  if test -s conftest.err; then
2284    grep -v '^ *+' conftest.err >conftest.er1
2285    cat conftest.er1 >&5
2286    mv -f conftest.er1 conftest.err
2287  fi
2288  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2289  test $ac_status = 0; } > conftest.i && {
2290	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2291	 test ! -s conftest.err
2292       }; then :
2293  ac_retval=0
2294else
2295  $as_echo "$as_me: failed program was:" >&5
2296sed 's/^/| /' conftest.$ac_ext >&5
2297
2298    ac_retval=1
2299fi
2300  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301  as_fn_set_status $ac_retval
2302
2303} # ac_fn_c_try_cpp
2304
2305# ac_fn_cxx_try_cpp LINENO
2306# ------------------------
2307# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2308ac_fn_cxx_try_cpp ()
2309{
2310  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311  if { { ac_try="$ac_cpp conftest.$ac_ext"
2312case "(($ac_try" in
2313  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2314  *) ac_try_echo=$ac_try;;
2315esac
2316eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2317$as_echo "$ac_try_echo"; } >&5
2318  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2319  ac_status=$?
2320  if test -s conftest.err; then
2321    grep -v '^ *+' conftest.err >conftest.er1
2322    cat conftest.er1 >&5
2323    mv -f conftest.er1 conftest.err
2324  fi
2325  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2326  test $ac_status = 0; } > conftest.i && {
2327	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2328	 test ! -s conftest.err
2329       }; then :
2330  ac_retval=0
2331else
2332  $as_echo "$as_me: failed program was:" >&5
2333sed 's/^/| /' conftest.$ac_ext >&5
2334
2335    ac_retval=1
2336fi
2337  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2338  as_fn_set_status $ac_retval
2339
2340} # ac_fn_cxx_try_cpp
2341
2342# ac_fn_objc_try_compile LINENO
2343# -----------------------------
2344# Try to compile conftest.$ac_ext, and return whether this succeeded.
2345ac_fn_objc_try_compile ()
2346{
2347  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348  rm -f conftest.$ac_objext
2349  if { { ac_try="$ac_compile"
2350case "(($ac_try" in
2351  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2352  *) ac_try_echo=$ac_try;;
2353esac
2354eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2355$as_echo "$ac_try_echo"; } >&5
2356  (eval "$ac_compile") 2>conftest.err
2357  ac_status=$?
2358  if test -s conftest.err; then
2359    grep -v '^ *+' conftest.err >conftest.er1
2360    cat conftest.er1 >&5
2361    mv -f conftest.er1 conftest.err
2362  fi
2363  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2364  test $ac_status = 0; } && {
2365	 test -z "$ac_objc_werror_flag" ||
2366	 test ! -s conftest.err
2367       } && test -s conftest.$ac_objext; then :
2368  ac_retval=0
2369else
2370  $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373	ac_retval=1
2374fi
2375  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376  as_fn_set_status $ac_retval
2377
2378} # ac_fn_objc_try_compile
2379
2380# ac_fn_c_try_link LINENO
2381# -----------------------
2382# Try to link conftest.$ac_ext, and return whether this succeeded.
2383ac_fn_c_try_link ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  rm -f conftest.$ac_objext conftest$ac_exeext
2387  if { { ac_try="$ac_link"
2388case "(($ac_try" in
2389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2390  *) ac_try_echo=$ac_try;;
2391esac
2392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2393$as_echo "$ac_try_echo"; } >&5
2394  (eval "$ac_link") 2>conftest.err
2395  ac_status=$?
2396  if test -s conftest.err; then
2397    grep -v '^ *+' conftest.err >conftest.er1
2398    cat conftest.er1 >&5
2399    mv -f conftest.er1 conftest.err
2400  fi
2401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2402  test $ac_status = 0; } && {
2403	 test -z "$ac_c_werror_flag" ||
2404	 test ! -s conftest.err
2405       } && test -s conftest$ac_exeext && {
2406	 test "$cross_compiling" = yes ||
2407	 test -x conftest$ac_exeext
2408       }; then :
2409  ac_retval=0
2410else
2411  $as_echo "$as_me: failed program was:" >&5
2412sed 's/^/| /' conftest.$ac_ext >&5
2413
2414	ac_retval=1
2415fi
2416  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2417  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2418  # interfere with the next link command; also delete a directory that is
2419  # left behind by Apple's compiler.  We do this before executing the actions.
2420  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422  as_fn_set_status $ac_retval
2423
2424} # ac_fn_c_try_link
2425
2426# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2427# ---------------------------------------------------------
2428# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2429# the include files in INCLUDES and setting the cache variable VAR
2430# accordingly.
2431ac_fn_cxx_check_header_mongrel ()
2432{
2433  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2434  if eval \${$3+:} false; then :
2435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2436$as_echo_n "checking for $2... " >&6; }
2437if eval \${$3+:} false; then :
2438  $as_echo_n "(cached) " >&6
2439fi
2440eval ac_res=\$$3
2441	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2442$as_echo "$ac_res" >&6; }
2443else
2444  # Is the header compilable?
2445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2446$as_echo_n "checking $2 usability... " >&6; }
2447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2448/* end confdefs.h.  */
2449$4
2450#include <$2>
2451_ACEOF
2452if ac_fn_cxx_try_compile "$LINENO"; then :
2453  ac_header_compiler=yes
2454else
2455  ac_header_compiler=no
2456fi
2457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2459$as_echo "$ac_header_compiler" >&6; }
2460
2461# Is the header present?
2462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2463$as_echo_n "checking $2 presence... " >&6; }
2464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2465/* end confdefs.h.  */
2466#include <$2>
2467_ACEOF
2468if ac_fn_cxx_try_cpp "$LINENO"; then :
2469  ac_header_preproc=yes
2470else
2471  ac_header_preproc=no
2472fi
2473rm -f conftest.err conftest.i conftest.$ac_ext
2474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2475$as_echo "$ac_header_preproc" >&6; }
2476
2477# So?  What about this header?
2478case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2479  yes:no: )
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2481$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2483$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2484    ;;
2485  no:yes:* )
2486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2487$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2489$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2491$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2493$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2494    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2495$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2496( $as_echo "## ----------------------------------------- ##
2497## Report this to build-dev@openjdk.java.net ##
2498## ----------------------------------------- ##"
2499     ) | sed "s/^/$as_me: WARNING:     /" >&2
2500    ;;
2501esac
2502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2503$as_echo_n "checking for $2... " >&6; }
2504if eval \${$3+:} false; then :
2505  $as_echo_n "(cached) " >&6
2506else
2507  eval "$3=\$ac_header_compiler"
2508fi
2509eval ac_res=\$$3
2510	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2511$as_echo "$ac_res" >&6; }
2512fi
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514
2515} # ac_fn_cxx_check_header_mongrel
2516
2517# ac_fn_cxx_try_run LINENO
2518# ------------------------
2519# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2520# that executables *can* be run.
2521ac_fn_cxx_try_run ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  if { { ac_try="$ac_link"
2525case "(($ac_try" in
2526  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527  *) ac_try_echo=$ac_try;;
2528esac
2529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530$as_echo "$ac_try_echo"; } >&5
2531  (eval "$ac_link") 2>&5
2532  ac_status=$?
2533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2535  { { case "(($ac_try" in
2536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537  *) ac_try_echo=$ac_try;;
2538esac
2539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2540$as_echo "$ac_try_echo"; } >&5
2541  (eval "$ac_try") 2>&5
2542  ac_status=$?
2543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544  test $ac_status = 0; }; }; then :
2545  ac_retval=0
2546else
2547  $as_echo "$as_me: program exited with status $ac_status" >&5
2548       $as_echo "$as_me: failed program was:" >&5
2549sed 's/^/| /' conftest.$ac_ext >&5
2550
2551       ac_retval=$ac_status
2552fi
2553  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_run
2558
2559# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2560# ---------------------------------------------------------
2561# Tests whether HEADER exists and can be compiled using the include files in
2562# INCLUDES, setting the cache variable VAR accordingly.
2563ac_fn_cxx_check_header_compile ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2567$as_echo_n "checking for $2... " >&6; }
2568if eval \${$3+:} false; then :
2569  $as_echo_n "(cached) " >&6
2570else
2571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2572/* end confdefs.h.  */
2573$4
2574#include <$2>
2575_ACEOF
2576if ac_fn_cxx_try_compile "$LINENO"; then :
2577  eval "$3=yes"
2578else
2579  eval "$3=no"
2580fi
2581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582fi
2583eval ac_res=\$$3
2584	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2585$as_echo "$ac_res" >&6; }
2586  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2587
2588} # ac_fn_cxx_check_header_compile
2589
2590# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2591# ----------------------------------------------
2592# Tries to find the compile-time value of EXPR in a program that includes
2593# INCLUDES, setting VAR accordingly. Returns whether the value could be
2594# computed
2595ac_fn_cxx_compute_int ()
2596{
2597  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2598  if test "$cross_compiling" = yes; then
2599    # Depending upon the size, compute the lo and hi bounds.
2600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603int
2604main ()
2605{
2606static int test_array [1 - 2 * !(($2) >= 0)];
2607test_array [0] = 0;
2608return test_array [0];
2609
2610  ;
2611  return 0;
2612}
2613_ACEOF
2614if ac_fn_cxx_try_compile "$LINENO"; then :
2615  ac_lo=0 ac_mid=0
2616  while :; do
2617    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620int
2621main ()
2622{
2623static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2624test_array [0] = 0;
2625return test_array [0];
2626
2627  ;
2628  return 0;
2629}
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_hi=$ac_mid; break
2633else
2634  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2635			if test $ac_lo -le $ac_mid; then
2636			  ac_lo= ac_hi=
2637			  break
2638			fi
2639			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642  done
2643else
2644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2645/* end confdefs.h.  */
2646$4
2647int
2648main ()
2649{
2650static int test_array [1 - 2 * !(($2) < 0)];
2651test_array [0] = 0;
2652return test_array [0];
2653
2654  ;
2655  return 0;
2656}
2657_ACEOF
2658if ac_fn_cxx_try_compile "$LINENO"; then :
2659  ac_hi=-1 ac_mid=-1
2660  while :; do
2661    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2662/* end confdefs.h.  */
2663$4
2664int
2665main ()
2666{
2667static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2668test_array [0] = 0;
2669return test_array [0];
2670
2671  ;
2672  return 0;
2673}
2674_ACEOF
2675if ac_fn_cxx_try_compile "$LINENO"; then :
2676  ac_lo=$ac_mid; break
2677else
2678  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2679			if test $ac_mid -le $ac_hi; then
2680			  ac_lo= ac_hi=
2681			  break
2682			fi
2683			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686  done
2687else
2688  ac_lo= ac_hi=
2689fi
2690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2691fi
2692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2693# Binary search between lo and hi bounds.
2694while test "x$ac_lo" != "x$ac_hi"; do
2695  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2697/* end confdefs.h.  */
2698$4
2699int
2700main ()
2701{
2702static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2703test_array [0] = 0;
2704return test_array [0];
2705
2706  ;
2707  return 0;
2708}
2709_ACEOF
2710if ac_fn_cxx_try_compile "$LINENO"; then :
2711  ac_hi=$ac_mid
2712else
2713  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2714fi
2715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2716done
2717case $ac_lo in #((
2718?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2719'') ac_retval=1 ;;
2720esac
2721  else
2722    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2723/* end confdefs.h.  */
2724$4
2725static long int longval () { return $2; }
2726static unsigned long int ulongval () { return $2; }
2727#include <stdio.h>
2728#include <stdlib.h>
2729int
2730main ()
2731{
2732
2733  FILE *f = fopen ("conftest.val", "w");
2734  if (! f)
2735    return 1;
2736  if (($2) < 0)
2737    {
2738      long int i = longval ();
2739      if (i != ($2))
2740	return 1;
2741      fprintf (f, "%ld", i);
2742    }
2743  else
2744    {
2745      unsigned long int i = ulongval ();
2746      if (i != ($2))
2747	return 1;
2748      fprintf (f, "%lu", i);
2749    }
2750  /* Do not output a trailing newline, as this causes \r\n confusion
2751     on some platforms.  */
2752  return ferror (f) || fclose (f) != 0;
2753
2754  ;
2755  return 0;
2756}
2757_ACEOF
2758if ac_fn_cxx_try_run "$LINENO"; then :
2759  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2760else
2761  ac_retval=1
2762fi
2763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2764  conftest.$ac_objext conftest.beam conftest.$ac_ext
2765rm -f conftest.val
2766
2767  fi
2768  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2769  as_fn_set_status $ac_retval
2770
2771} # ac_fn_cxx_compute_int
2772
2773# ac_fn_cxx_try_link LINENO
2774# -------------------------
2775# Try to link conftest.$ac_ext, and return whether this succeeded.
2776ac_fn_cxx_try_link ()
2777{
2778  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2779  rm -f conftest.$ac_objext conftest$ac_exeext
2780  if { { ac_try="$ac_link"
2781case "(($ac_try" in
2782  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2783  *) ac_try_echo=$ac_try;;
2784esac
2785eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2786$as_echo "$ac_try_echo"; } >&5
2787  (eval "$ac_link") 2>conftest.err
2788  ac_status=$?
2789  if test -s conftest.err; then
2790    grep -v '^ *+' conftest.err >conftest.er1
2791    cat conftest.er1 >&5
2792    mv -f conftest.er1 conftest.err
2793  fi
2794  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2795  test $ac_status = 0; } && {
2796	 test -z "$ac_cxx_werror_flag" ||
2797	 test ! -s conftest.err
2798       } && test -s conftest$ac_exeext && {
2799	 test "$cross_compiling" = yes ||
2800	 test -x conftest$ac_exeext
2801       }; then :
2802  ac_retval=0
2803else
2804  $as_echo "$as_me: failed program was:" >&5
2805sed 's/^/| /' conftest.$ac_ext >&5
2806
2807	ac_retval=1
2808fi
2809  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2810  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2811  # interfere with the next link command; also delete a directory that is
2812  # left behind by Apple's compiler.  We do this before executing the actions.
2813  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2814  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2815  as_fn_set_status $ac_retval
2816
2817} # ac_fn_cxx_try_link
2818
2819# ac_fn_cxx_check_func LINENO FUNC VAR
2820# ------------------------------------
2821# Tests whether FUNC exists, setting the cache variable VAR accordingly
2822ac_fn_cxx_check_func ()
2823{
2824  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2826$as_echo_n "checking for $2... " >&6; }
2827if eval \${$3+:} false; then :
2828  $as_echo_n "(cached) " >&6
2829else
2830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831/* end confdefs.h.  */
2832/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2833   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2834#define $2 innocuous_$2
2835
2836/* System header to define __stub macros and hopefully few prototypes,
2837    which can conflict with char $2 (); below.
2838    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2839    <limits.h> exists even on freestanding compilers.  */
2840
2841#ifdef __STDC__
2842# include <limits.h>
2843#else
2844# include <assert.h>
2845#endif
2846
2847#undef $2
2848
2849/* Override any GCC internal prototype to avoid an error.
2850   Use char because int might match the return type of a GCC
2851   builtin and then its argument prototype would still apply.  */
2852#ifdef __cplusplus
2853extern "C"
2854#endif
2855char $2 ();
2856/* The GNU C library defines this for functions which it implements
2857    to always fail with ENOSYS.  Some functions are actually named
2858    something starting with __ and the normal name is an alias.  */
2859#if defined __stub_$2 || defined __stub___$2
2860choke me
2861#endif
2862
2863int
2864main ()
2865{
2866return $2 ();
2867  ;
2868  return 0;
2869}
2870_ACEOF
2871if ac_fn_cxx_try_link "$LINENO"; then :
2872  eval "$3=yes"
2873else
2874  eval "$3=no"
2875fi
2876rm -f core conftest.err conftest.$ac_objext \
2877    conftest$ac_exeext conftest.$ac_ext
2878fi
2879eval ac_res=\$$3
2880	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2881$as_echo "$ac_res" >&6; }
2882  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2883
2884} # ac_fn_cxx_check_func
2885
2886# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2887# -------------------------------------------------------
2888# Tests whether HEADER exists and can be compiled using the include files in
2889# INCLUDES, setting the cache variable VAR accordingly.
2890ac_fn_c_check_header_compile ()
2891{
2892  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2894$as_echo_n "checking for $2... " >&6; }
2895if eval \${$3+:} false; then :
2896  $as_echo_n "(cached) " >&6
2897else
2898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2899/* end confdefs.h.  */
2900$4
2901#include <$2>
2902_ACEOF
2903if ac_fn_c_try_compile "$LINENO"; then :
2904  eval "$3=yes"
2905else
2906  eval "$3=no"
2907fi
2908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2909fi
2910eval ac_res=\$$3
2911	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2912$as_echo "$ac_res" >&6; }
2913  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2914
2915} # ac_fn_c_check_header_compile
2916cat >config.log <<_ACEOF
2917This file contains any messages produced by compilers while
2918running configure, to aid debugging if configure makes a mistake.
2919
2920It was created by OpenJDK $as_me jdk9, which was
2921generated by GNU Autoconf 2.69.  Invocation command line was
2922
2923  $ $0 $@
2924
2925_ACEOF
2926exec 5>>config.log
2927{
2928cat <<_ASUNAME
2929## --------- ##
2930## Platform. ##
2931## --------- ##
2932
2933hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2934uname -m = `(uname -m) 2>/dev/null || echo unknown`
2935uname -r = `(uname -r) 2>/dev/null || echo unknown`
2936uname -s = `(uname -s) 2>/dev/null || echo unknown`
2937uname -v = `(uname -v) 2>/dev/null || echo unknown`
2938
2939/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2940/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2941
2942/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2943/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2944/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2945/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2946/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2947/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2948/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2949
2950_ASUNAME
2951
2952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953for as_dir in $PATH
2954do
2955  IFS=$as_save_IFS
2956  test -z "$as_dir" && as_dir=.
2957    $as_echo "PATH: $as_dir"
2958  done
2959IFS=$as_save_IFS
2960
2961} >&5
2962
2963cat >&5 <<_ACEOF
2964
2965
2966## ----------- ##
2967## Core tests. ##
2968## ----------- ##
2969
2970_ACEOF
2971
2972
2973# Keep a trace of the command line.
2974# Strip out --no-create and --no-recursion so they do not pile up.
2975# Strip out --silent because we don't want to record it for future runs.
2976# Also quote any args containing shell meta-characters.
2977# Make two passes to allow for proper duplicate-argument suppression.
2978ac_configure_args=
2979ac_configure_args0=
2980ac_configure_args1=
2981ac_must_keep_next=false
2982for ac_pass in 1 2
2983do
2984  for ac_arg
2985  do
2986    case $ac_arg in
2987    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2988    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2989    | -silent | --silent | --silen | --sile | --sil)
2990      continue ;;
2991    *\'*)
2992      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2993    esac
2994    case $ac_pass in
2995    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2996    2)
2997      as_fn_append ac_configure_args1 " '$ac_arg'"
2998      if test $ac_must_keep_next = true; then
2999	ac_must_keep_next=false # Got value, back to normal.
3000      else
3001	case $ac_arg in
3002	  *=* | --config-cache | -C | -disable-* | --disable-* \
3003	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3004	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3005	  | -with-* | --with-* | -without-* | --without-* | --x)
3006	    case "$ac_configure_args0 " in
3007	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3008	    esac
3009	    ;;
3010	  -* ) ac_must_keep_next=true ;;
3011	esac
3012      fi
3013      as_fn_append ac_configure_args " '$ac_arg'"
3014      ;;
3015    esac
3016  done
3017done
3018{ ac_configure_args0=; unset ac_configure_args0;}
3019{ ac_configure_args1=; unset ac_configure_args1;}
3020
3021# When interrupted or exit'd, cleanup temporary files, and complete
3022# config.log.  We remove comments because anyway the quotes in there
3023# would cause problems or look ugly.
3024# WARNING: Use '\'' to represent an apostrophe within the trap.
3025# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3026trap 'exit_status=$?
3027  # Save into config.log some information that might help in debugging.
3028  {
3029    echo
3030
3031    $as_echo "## ---------------- ##
3032## Cache variables. ##
3033## ---------------- ##"
3034    echo
3035    # The following way of writing the cache mishandles newlines in values,
3036(
3037  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3038    eval ac_val=\$$ac_var
3039    case $ac_val in #(
3040    *${as_nl}*)
3041      case $ac_var in #(
3042      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3043$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3044      esac
3045      case $ac_var in #(
3046      _ | IFS | as_nl) ;; #(
3047      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3048      *) { eval $ac_var=; unset $ac_var;} ;;
3049      esac ;;
3050    esac
3051  done
3052  (set) 2>&1 |
3053    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3054    *${as_nl}ac_space=\ *)
3055      sed -n \
3056	"s/'\''/'\''\\\\'\'''\''/g;
3057	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3058      ;; #(
3059    *)
3060      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3061      ;;
3062    esac |
3063    sort
3064)
3065    echo
3066
3067    $as_echo "## ----------------- ##
3068## Output variables. ##
3069## ----------------- ##"
3070    echo
3071    for ac_var in $ac_subst_vars
3072    do
3073      eval ac_val=\$$ac_var
3074      case $ac_val in
3075      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3076      esac
3077      $as_echo "$ac_var='\''$ac_val'\''"
3078    done | sort
3079    echo
3080
3081    if test -n "$ac_subst_files"; then
3082      $as_echo "## ------------------- ##
3083## File substitutions. ##
3084## ------------------- ##"
3085      echo
3086      for ac_var in $ac_subst_files
3087      do
3088	eval ac_val=\$$ac_var
3089	case $ac_val in
3090	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3091	esac
3092	$as_echo "$ac_var='\''$ac_val'\''"
3093      done | sort
3094      echo
3095    fi
3096
3097    if test -s confdefs.h; then
3098      $as_echo "## ----------- ##
3099## confdefs.h. ##
3100## ----------- ##"
3101      echo
3102      cat confdefs.h
3103      echo
3104    fi
3105    test "$ac_signal" != 0 &&
3106      $as_echo "$as_me: caught signal $ac_signal"
3107    $as_echo "$as_me: exit $exit_status"
3108  } >&5
3109  rm -f core *.core core.conftest.* &&
3110    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3111    exit $exit_status
3112' 0
3113for ac_signal in 1 2 13 15; do
3114  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3115done
3116ac_signal=0
3117
3118# confdefs.h avoids OS command line length limits that DEFS can exceed.
3119rm -f -r conftest* confdefs.h
3120
3121$as_echo "/* confdefs.h */" > confdefs.h
3122
3123# Predefined preprocessor variables.
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_NAME "$PACKAGE_NAME"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3131_ACEOF
3132
3133cat >>confdefs.h <<_ACEOF
3134#define PACKAGE_VERSION "$PACKAGE_VERSION"
3135_ACEOF
3136
3137cat >>confdefs.h <<_ACEOF
3138#define PACKAGE_STRING "$PACKAGE_STRING"
3139_ACEOF
3140
3141cat >>confdefs.h <<_ACEOF
3142#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3143_ACEOF
3144
3145cat >>confdefs.h <<_ACEOF
3146#define PACKAGE_URL "$PACKAGE_URL"
3147_ACEOF
3148
3149
3150# Let the site file select an alternate cache file if it wants to.
3151# Prefer an explicitly selected file to automatically selected ones.
3152ac_site_file1=NONE
3153ac_site_file2=NONE
3154if test -n "$CONFIG_SITE"; then
3155  # We do not want a PATH search for config.site.
3156  case $CONFIG_SITE in #((
3157    -*)  ac_site_file1=./$CONFIG_SITE;;
3158    */*) ac_site_file1=$CONFIG_SITE;;
3159    *)   ac_site_file1=./$CONFIG_SITE;;
3160  esac
3161elif test "x$prefix" != xNONE; then
3162  ac_site_file1=$prefix/share/config.site
3163  ac_site_file2=$prefix/etc/config.site
3164else
3165  ac_site_file1=$ac_default_prefix/share/config.site
3166  ac_site_file2=$ac_default_prefix/etc/config.site
3167fi
3168for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3169do
3170  test "x$ac_site_file" = xNONE && continue
3171  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3172    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3173$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3174    sed 's/^/| /' "$ac_site_file" >&5
3175    . "$ac_site_file" \
3176      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3178as_fn_error $? "failed to load site script $ac_site_file
3179See \`config.log' for more details" "$LINENO" 5; }
3180  fi
3181done
3182
3183if test -r "$cache_file"; then
3184  # Some versions of bash will fail to source /dev/null (special files
3185  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3186  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3187    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3188$as_echo "$as_me: loading cache $cache_file" >&6;}
3189    case $cache_file in
3190      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3191      *)                      . "./$cache_file";;
3192    esac
3193  fi
3194else
3195  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3196$as_echo "$as_me: creating cache $cache_file" >&6;}
3197  >$cache_file
3198fi
3199
3200# Check that the precious variables saved in the cache have kept the same
3201# value.
3202ac_cache_corrupted=false
3203for ac_var in $ac_precious_vars; do
3204  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3205  eval ac_new_set=\$ac_env_${ac_var}_set
3206  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3207  eval ac_new_val=\$ac_env_${ac_var}_value
3208  case $ac_old_set,$ac_new_set in
3209    set,)
3210      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3211$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3212      ac_cache_corrupted=: ;;
3213    ,set)
3214      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3215$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3216      ac_cache_corrupted=: ;;
3217    ,);;
3218    *)
3219      if test "x$ac_old_val" != "x$ac_new_val"; then
3220	# differences in whitespace do not lead to failure.
3221	ac_old_val_w=`echo x $ac_old_val`
3222	ac_new_val_w=`echo x $ac_new_val`
3223	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3224	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3225$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3226	  ac_cache_corrupted=:
3227	else
3228	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3229$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3230	  eval $ac_var=\$ac_old_val
3231	fi
3232	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3233$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3234	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3235$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3236      fi;;
3237  esac
3238  # Pass precious variables to config.status.
3239  if test "$ac_new_set" = set; then
3240    case $ac_new_val in
3241    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3242    *) ac_arg=$ac_var=$ac_new_val ;;
3243    esac
3244    case " $ac_configure_args " in
3245      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3246      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3247    esac
3248  fi
3249done
3250if $ac_cache_corrupted; then
3251  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3253  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3254$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3255  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3256fi
3257## -------------------- ##
3258## Main body of script. ##
3259## -------------------- ##
3260
3261ac_ext=c
3262ac_cpp='$CPP $CPPFLAGS'
3263ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3264ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3265ac_compiler_gnu=$ac_cv_c_compiler_gnu
3266
3267
3268
3269ac_aux_dir=
3270for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3271  if test -f "$ac_dir/install-sh"; then
3272    ac_aux_dir=$ac_dir
3273    ac_install_sh="$ac_aux_dir/install-sh -c"
3274    break
3275  elif test -f "$ac_dir/install.sh"; then
3276    ac_aux_dir=$ac_dir
3277    ac_install_sh="$ac_aux_dir/install.sh -c"
3278    break
3279  elif test -f "$ac_dir/shtool"; then
3280    ac_aux_dir=$ac_dir
3281    ac_install_sh="$ac_aux_dir/shtool install -c"
3282    break
3283  fi
3284done
3285if test -z "$ac_aux_dir"; then
3286  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
3287fi
3288
3289# These three variables are undocumented and unsupported,
3290# and are intended to be withdrawn in a future Autoconf release.
3291# They can cause serious problems if a builder's source tree is in a directory
3292# whose full name contains unusual characters.
3293ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3294ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3295ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3296
3297
3298# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3299
3300#
3301# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3302# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3303#
3304# This code is free software; you can redistribute it and/or modify it
3305# under the terms of the GNU General Public License version 2 only, as
3306# published by the Free Software Foundation.  Oracle designates this
3307# particular file as subject to the "Classpath" exception as provided
3308# by Oracle in the LICENSE file that accompanied this code.
3309#
3310# This code is distributed in the hope that it will be useful, but WITHOUT
3311# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3312# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3313# version 2 for more details (a copy is included in the LICENSE file that
3314# accompanied this code).
3315#
3316# You should have received a copy of the GNU General Public License version
3317# 2 along with this work; if not, write to the Free Software Foundation,
3318# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3319#
3320# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3321# or visit www.oracle.com if you need additional information or have any
3322# questions.
3323#
3324
3325#
3326# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3327#
3328# This program is free software; you can redistribute it and/or modify
3329# it under the terms of the GNU General Public License as published by
3330# the Free Software Foundation; either version 2 of the License, or
3331# (at your option) any later version.
3332#
3333# This program is distributed in the hope that it will be useful, but
3334# WITHOUT ANY WARRANTY; without even the implied warranty of
3335# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3336# General Public License for more details.
3337#
3338# You should have received a copy of the GNU General Public License
3339# along with this program; if not, write to the Free Software
3340# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3341#
3342# As a special exception to the GNU General Public License, if you
3343# distribute this file as part of a program that contains a
3344# configuration script generated by Autoconf, you may include it under
3345# the same distribution terms that you use for the rest of that program.
3346
3347# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3348# ----------------------------------
3349# PKG_PROG_PKG_CONFIG
3350
3351# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3352#
3353# Check to see whether a particular set of modules exists.  Similar
3354# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3355#
3356#
3357# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3358# this or PKG_CHECK_MODULES is called, or make sure to call
3359# PKG_CHECK_EXISTS manually
3360# --------------------------------------------------------------
3361
3362
3363
3364# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3365# ---------------------------------------------
3366# _PKG_CONFIG
3367
3368# _PKG_SHORT_ERRORS_SUPPORTED
3369# -----------------------------
3370# _PKG_SHORT_ERRORS_SUPPORTED
3371
3372
3373# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3374# [ACTION-IF-NOT-FOUND])
3375#
3376#
3377# Note that if there is a possibility the first call to
3378# PKG_CHECK_MODULES might not happen, you should be sure to include an
3379# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3380#
3381#
3382# --------------------------------------------------------------
3383# PKG_CHECK_MODULES
3384
3385
3386# Include these first...
3387#
3388# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3389# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3390#
3391# This code is free software; you can redistribute it and/or modify it
3392# under the terms of the GNU General Public License version 2 only, as
3393# published by the Free Software Foundation.  Oracle designates this
3394# particular file as subject to the "Classpath" exception as provided
3395# by Oracle in the LICENSE file that accompanied this code.
3396#
3397# This code is distributed in the hope that it will be useful, but WITHOUT
3398# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3399# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3400# version 2 for more details (a copy is included in the LICENSE file that
3401# accompanied this code).
3402#
3403# You should have received a copy of the GNU General Public License version
3404# 2 along with this work; if not, write to the Free Software Foundation,
3405# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3406#
3407# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3408# or visit www.oracle.com if you need additional information or have any
3409# questions.
3410#
3411
3412# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3413# If so, then append $1 to $2 \
3414# Also set JVM_ARG_OK to true/false depending on outcome.
3415
3416
3417# Appends a string to a path variable, only adding the : when needed.
3418
3419
3420# Prepends a string to a path variable, only adding the : when needed.
3421
3422
3423# This will make sure the given variable points to a full and proper
3424# path. This means:
3425# 1) There will be no spaces in the path. On unix platforms,
3426#    spaces in the path will result in an error. On Windows,
3427#    the path will be rewritten using short-style to be space-free.
3428# 2) The path will be absolute, and it will be in unix-style (on
3429#     cygwin).
3430# $1: The name of the variable to fix
3431
3432
3433# This will make sure the given variable points to a executable
3434# with a full and proper path. This means:
3435# 1) There will be no spaces in the path. On unix platforms,
3436#    spaces in the path will result in an error. On Windows,
3437#    the path will be rewritten using short-style to be space-free.
3438# 2) The path will be absolute, and it will be in unix-style (on
3439#     cygwin).
3440# Any arguments given to the executable is preserved.
3441# If the input variable does not have a directory specification, then
3442# it need to be in the PATH.
3443# $1: The name of the variable to fix
3444
3445
3446
3447
3448# Register a --with argument but mark it as deprecated
3449# $1: The name of the with argument to deprecate, not including --with-
3450
3451
3452# Register a --enable argument but mark it as deprecated
3453# $1: The name of the with argument to deprecate, not including --enable-
3454# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3455
3456
3457
3458
3459# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3460# $1: variable to check
3461
3462
3463# Check that there are no unprocessed overridden variables left.
3464# If so, they are an incorrect argument and we will exit with an error.
3465
3466
3467# Setup a tool for the given variable. If correctly specified by the user,
3468# use that value, otherwise search for the tool using the supplied code snippet.
3469# $1: variable to set
3470# $2: code snippet to call to look for the tool
3471
3472
3473# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3479# $1: variable to set
3480# $2: executable name (or list of names) to look for
3481
3482
3483# Like BASIC_PATH_PROGS but fails if no tool was found.
3484# $1: variable to set
3485# $2: executable name (or list of names) to look for
3486
3487
3488# Like BASIC_SETUP_TOOL but fails if no tool was found.
3489# $1: variable to set
3490# $2: autoconf macro to call to look for the special tool
3491
3492
3493# Setup the most fundamental tools that relies on not much else to set up,
3494# but is used by much of the early bootstrap code.
3495
3496
3497# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507#%%% Simple tools %%%
3508
3509# Check if we have found a usable version of make
3510# $1: the path to a potential make binary (or empty)
3511# $2: the description on how we found this
3512
3513
3514
3515
3516# Goes looking for a usable version of GNU make.
3517
3518
3519
3520
3521
3522
3523# Check if build directory is on local disk. If not possible to determine,
3524# we prefer to claim it's local.
3525# Argument 1: directory to test
3526# Argument 2: what to do if it is on local disk
3527# Argument 3: what to do otherwise (remote disk or failure)
3528
3529
3530# Check that source files have basic read permissions set. This might
3531# not be the case in cygwin in certain conditions.
3532
3533
3534
3535
3536# Check for support for specific options in bash
3537
3538
3539#
3540# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3542#
3543# This code is free software; you can redistribute it and/or modify it
3544# under the terms of the GNU General Public License version 2 only, as
3545# published by the Free Software Foundation.  Oracle designates this
3546# particular file as subject to the "Classpath" exception as provided
3547# by Oracle in the LICENSE file that accompanied this code.
3548#
3549# This code is distributed in the hope that it will be useful, but WITHOUT
3550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3552# version 2 for more details (a copy is included in the LICENSE file that
3553# accompanied this code).
3554#
3555# You should have received a copy of the GNU General Public License version
3556# 2 along with this work; if not, write to the Free Software Foundation,
3557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3558#
3559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3560# or visit www.oracle.com if you need additional information or have any
3561# questions.
3562#
3563
3564
3565
3566
3567
3568# Helper function which possibly converts a path using DOS-style short mode.
3569# If so, the updated path is stored in $new_path.
3570# $1: The path to check
3571
3572
3573# Helper function which possibly converts a path using DOS-style short mode.
3574# If so, the updated path is stored in $new_path.
3575# $1: The path to check
3576
3577
3578# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3579# and could probably be heavily simplified. However, all changes in this
3580# area tend to need lot of testing in different scenarios, and in lack of
3581# proper unit testing, cleaning this up has not been deemed worth the effort
3582# at the moment.
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3593
3594
3595
3596
3597#
3598# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3599# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3600#
3601# This code is free software; you can redistribute it and/or modify it
3602# under the terms of the GNU General Public License version 2 only, as
3603# published by the Free Software Foundation.  Oracle designates this
3604# particular file as subject to the "Classpath" exception as provided
3605# by Oracle in the LICENSE file that accompanied this code.
3606#
3607# This code is distributed in the hope that it will be useful, but WITHOUT
3608# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3609# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3610# version 2 for more details (a copy is included in the LICENSE file that
3611# accompanied this code).
3612#
3613# You should have received a copy of the GNU General Public License version
3614# 2 along with this work; if not, write to the Free Software Foundation,
3615# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3616#
3617# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3618# or visit www.oracle.com if you need additional information or have any
3619# questions.
3620#
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632# ... then the rest
3633#
3634# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3635# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3636#
3637# This code is free software; you can redistribute it and/or modify it
3638# under the terms of the GNU General Public License version 2 only, as
3639# published by the Free Software Foundation.  Oracle designates this
3640# particular file as subject to the "Classpath" exception as provided
3641# by Oracle in the LICENSE file that accompanied this code.
3642#
3643# This code is distributed in the hope that it will be useful, but WITHOUT
3644# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3645# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3646# version 2 for more details (a copy is included in the LICENSE file that
3647# accompanied this code).
3648#
3649# You should have received a copy of the GNU General Public License version
3650# 2 along with this work; if not, write to the Free Software Foundation,
3651# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3652#
3653# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3654# or visit www.oracle.com if you need additional information or have any
3655# questions.
3656#
3657
3658########################################################################
3659# This file handles detection of the Boot JDK. The Boot JDK detection
3660# process has been developed as a response to solve a complex real-world
3661# problem. Initially, it was simple, but it has grown as platform after
3662# platform, idiosyncracy after idiosyncracy has been supported.
3663#
3664# The basic idea is this:
3665# 1) You need an acceptable *) JDK to use as a Boot JDK
3666# 2) There are several ways to locate a JDK, that are mostly platform
3667#    dependent **)
3668# 3) You can have multiple JDKs installed
3669# 4) If possible, configure should try to dig out an acceptable JDK
3670#    automatically, without having to resort to command-line options
3671#
3672# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3673#     javac) and not a JRE, etc.
3674#
3675# **) On Windows we typically use a well-known path.
3676#     On MacOSX we typically use the tool java_home.
3677#     On Linux we typically find javac in the $PATH, and then follow a
3678#     chain of symlinks that often ends up in a real JDK.
3679#
3680# This leads to the code where we check in different ways to locate a
3681# JDK, and if one is found, check if it is acceptable. If not, we print
3682# our reasons for rejecting it (useful when debugging non-working
3683# configure situations) and continue checking the next one.
3684########################################################################
3685
3686# Execute the check given as argument, and verify the result
3687# If the Boot JDK was previously found, do nothing
3688# $1 A command line (typically autoconf macro) to execute
3689
3690
3691# Test: Is bootjdk explicitely set by command line arguments?
3692
3693
3694# Test: Is bootjdk available from builddeps?
3695
3696
3697# Test: Is $JAVA_HOME set?
3698
3699
3700# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3701
3702
3703# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3704# $1: Argument to the java_home binary (optional)
3705
3706
3707# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3708
3709
3710# Look for a jdk in the given path. If there are multiple, try to select the newest.
3711# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3712# $1 = Path to directory containing jdk installations.
3713# $2 = String to append to the found JDK directory to get the proper JDK home
3714
3715
3716# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3717# environmental variable as base for where to look.
3718# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3719
3720
3721# Test: Is there a JDK installed in default, well-known locations?
3722
3723
3724# Check that a command-line tool in the Boot JDK is correct
3725# $1 = name of variable to assign
3726# $2 = name of binary
3727
3728
3729###############################################################################
3730#
3731# We need a Boot JDK to bootstrap the build.
3732#
3733
3734
3735
3736
3737
3738#
3739# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3740# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3741#
3742# This code is free software; you can redistribute it and/or modify it
3743# under the terms of the GNU General Public License version 2 only, as
3744# published by the Free Software Foundation.  Oracle designates this
3745# particular file as subject to the "Classpath" exception as provided
3746# by Oracle in the LICENSE file that accompanied this code.
3747#
3748# This code is distributed in the hope that it will be useful, but WITHOUT
3749# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3750# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3751# version 2 for more details (a copy is included in the LICENSE file that
3752# accompanied this code).
3753#
3754# You should have received a copy of the GNU General Public License version
3755# 2 along with this work; if not, write to the Free Software Foundation,
3756# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3757#
3758# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3759# or visit www.oracle.com if you need additional information or have any
3760# questions.
3761#
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782#
3783# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3784# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3785#
3786# This code is free software; you can redistribute it and/or modify it
3787# under the terms of the GNU General Public License version 2 only, as
3788# published by the Free Software Foundation.  Oracle designates this
3789# particular file as subject to the "Classpath" exception as provided
3790# by Oracle in the LICENSE file that accompanied this code.
3791#
3792# This code is distributed in the hope that it will be useful, but WITHOUT
3793# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3794# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3795# version 2 for more details (a copy is included in the LICENSE file that
3796# accompanied this code).
3797#
3798# You should have received a copy of the GNU General Public License version
3799# 2 along with this work; if not, write to the Free Software Foundation,
3800# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3801#
3802# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3803# or visit www.oracle.com if you need additional information or have any
3804# questions.
3805#
3806
3807
3808
3809
3810
3811# Documentation on common flags used for solstudio in HIGHEST.
3812#
3813# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3814#          done with care, there are some assumptions below that need to
3815#          be understood about the use of pointers, and IEEE behavior.
3816#
3817# -fns: Use non-standard floating point mode (not IEEE 754)
3818# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3819# -fsingle: Use single precision floating point with 'float'
3820# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3821#   (Source with excessing pointer casting and data access with mixed
3822#    pointer types are not recommended)
3823# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3824#   (If you expect perfect errno behavior, do not use this)
3825# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3826# -xrestrict: Pointer parameters to functions do not overlap
3827#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3828#    If you pass in multiple pointers to the same data, do not use this)
3829# -xlibmil: Inline some library routines
3830#   (If you expect perfect errno behavior, do not use this)
3831# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3832#   (If you expect perfect errno behavior, do not use this)
3833#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3834
3835    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3836    # Bug?
3837    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3838    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3839    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3840    #fi
3841
3842
3843
3844
3845
3846# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3847#                                   [RUN-IF-FALSE])
3848# ------------------------------------------------------------
3849# Check that the c and c++ compilers support an argument
3850
3851
3852# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3853#                                    [RUN-IF-FALSE])
3854# ------------------------------------------------------------
3855# Check that the linker support an argument
3856
3857
3858
3859
3860#
3861# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3862# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3863#
3864# This code is free software; you can redistribute it and/or modify it
3865# under the terms of the GNU General Public License version 2 only, as
3866# published by the Free Software Foundation.  Oracle designates this
3867# particular file as subject to the "Classpath" exception as provided
3868# by Oracle in the LICENSE file that accompanied this code.
3869#
3870# This code is distributed in the hope that it will be useful, but WITHOUT
3871# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3872# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3873# version 2 for more details (a copy is included in the LICENSE file that
3874# accompanied this code).
3875#
3876# You should have received a copy of the GNU General Public License version
3877# 2 along with this work; if not, write to the Free Software Foundation,
3878# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3879#
3880# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3881# or visit www.oracle.com if you need additional information or have any
3882# questions.
3883#
3884
3885
3886
3887
3888
3889cygwin_help() {
3890  case $1 in
3891    unzip)
3892      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3893      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3894      ;;
3895    zip)
3896      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3897      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3898      ;;
3899    make)
3900      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3901      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3902      ;;
3903    freetype)
3904      HELP_MSG="
3905The freetype library can now be build during the configure process.
3906Download the freetype sources and unpack them into an arbitrary directory:
3907
3908wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3909tar -xzf freetype-2.5.3.tar.gz
3910
3911Then run configure with '--with-freetype-src=<freetype_src>'. This will
3912automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3913builds or into '<freetype_src>/lib32' for 32-bit builds.
3914Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3915and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3916      ;;
3917  esac
3918}
3919
3920msys_help() {
3921  PKGHANDLER_COMMAND=""
3922}
3923
3924apt_help() {
3925  case $1 in
3926    devkit)
3927      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3928    openjdk)
3929      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3930    alsa)
3931      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3932    cups)
3933      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3934    freetype)
3935      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3936    pulse)
3937      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3938    x11)
3939      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3940    ccache)
3941      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3942  esac
3943}
3944
3945yum_help() {
3946  case $1 in
3947    devkit)
3948      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3949    openjdk)
3950      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3951    alsa)
3952      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3953    cups)
3954      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3955    freetype)
3956      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3957    pulse)
3958      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3959    x11)
3960      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3961    ccache)
3962      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3963  esac
3964}
3965
3966port_help() {
3967  PKGHANDLER_COMMAND=""
3968}
3969
3970pkgutil_help() {
3971  PKGHANDLER_COMMAND=""
3972}
3973
3974pkgadd_help() {
3975  PKGHANDLER_COMMAND=""
3976}
3977
3978# This function will check if we're called from the "configure" wrapper while
3979# printing --help. If so, we will print out additional information that can
3980# only be extracted within the autoconf script, and then exit. This must be
3981# called at the very beginning in configure.ac.
3982
3983
3984
3985
3986
3987
3988#
3989# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3990# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3991#
3992# This code is free software; you can redistribute it and/or modify it
3993# under the terms of the GNU General Public License version 2 only, as
3994# published by the Free Software Foundation.  Oracle designates this
3995# particular file as subject to the "Classpath" exception as provided
3996# by Oracle in the LICENSE file that accompanied this code.
3997#
3998# This code is distributed in the hope that it will be useful, but WITHOUT
3999# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4000# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4001# version 2 for more details (a copy is included in the LICENSE file that
4002# accompanied this code).
4003#
4004# You should have received a copy of the GNU General Public License version
4005# 2 along with this work; if not, write to the Free Software Foundation,
4006# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4007#
4008# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4009# or visit www.oracle.com if you need additional information or have any
4010# questions.
4011#
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022###############################################################################
4023#
4024# Should we build only OpenJDK even if closed sources are present?
4025#
4026
4027
4028
4029
4030###############################################################################
4031#
4032# Setup version numbers
4033#
4034
4035
4036
4037
4038
4039
4040#
4041# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4042# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4043#
4044# This code is free software; you can redistribute it and/or modify it
4045# under the terms of the GNU General Public License version 2 only, as
4046# published by the Free Software Foundation.  Oracle designates this
4047# particular file as subject to the "Classpath" exception as provided
4048# by Oracle in the LICENSE file that accompanied this code.
4049#
4050# This code is distributed in the hope that it will be useful, but WITHOUT
4051# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4052# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4053# version 2 for more details (a copy is included in the LICENSE file that
4054# accompanied this code).
4055#
4056# You should have received a copy of the GNU General Public License version
4057# 2 along with this work; if not, write to the Free Software Foundation,
4058# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4059#
4060# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4061# or visit www.oracle.com if you need additional information or have any
4062# questions.
4063#
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085#
4086# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4111# Converts autoconf style CPU name to OpenJDK style, into
4112# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4113
4114
4115# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4116# Converts autoconf style OS name to OpenJDK style, into
4117# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4118
4119
4120# Expects $host_os $host_cpu $build_os and $build_cpu
4121# and $with_target_bits to have been setup!
4122#
4123# Translate the standard triplet(quadruplet) definition
4124# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4125# OPENJDK_BUILD_OS, etc.
4126
4127
4128# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4129# accordingly. Must be done after setting up build and target system, but before
4130# doing anything else with these values.
4131
4132
4133# Setup the legacy variables, for controlling the old makefiles.
4134#
4135
4136
4137
4138
4139#%%% Build and target systems %%%
4140
4141
4142
4143
4144# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4145# Add -mX to various FLAGS variables.
4146
4147
4148
4149
4150
4151
4152#
4153# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4154# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4155#
4156# This code is free software; you can redistribute it and/or modify it
4157# under the terms of the GNU General Public License version 2 only, as
4158# published by the Free Software Foundation.  Oracle designates this
4159# particular file as subject to the "Classpath" exception as provided
4160# by Oracle in the LICENSE file that accompanied this code.
4161#
4162# This code is distributed in the hope that it will be useful, but WITHOUT
4163# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4164# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4165# version 2 for more details (a copy is included in the LICENSE file that
4166# accompanied this code).
4167#
4168# You should have received a copy of the GNU General Public License version
4169# 2 along with this work; if not, write to the Free Software Foundation,
4170# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4171#
4172# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4173# or visit www.oracle.com if you need additional information or have any
4174# questions.
4175#
4176
4177
4178
4179
4180
4181
4182
4183
4184#
4185# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4186# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4187#
4188# This code is free software; you can redistribute it and/or modify it
4189# under the terms of the GNU General Public License version 2 only, as
4190# published by the Free Software Foundation.  Oracle designates this
4191# particular file as subject to the "Classpath" exception as provided
4192# by Oracle in the LICENSE file that accompanied this code.
4193#
4194# This code is distributed in the hope that it will be useful, but WITHOUT
4195# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4196# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4197# version 2 for more details (a copy is included in the LICENSE file that
4198# accompanied this code).
4199#
4200# You should have received a copy of the GNU General Public License version
4201# 2 along with this work; if not, write to the Free Software Foundation,
4202# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4203#
4204# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4205# or visit www.oracle.com if you need additional information or have any
4206# questions.
4207#
4208
4209########################################################################
4210# This file is responsible for detecting, verifying and setting up the
4211# toolchain, i.e. the compiler, linker and related utilities. It will setup
4212# proper paths to the binaries, but it will not setup any flags.
4213#
4214# The binaries used is determined by the toolchain type, which is the family of
4215# compilers and related tools that are used.
4216########################################################################
4217
4218
4219# All valid toolchains, regardless of platform (used by help.m4)
4220VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4221
4222# These toolchains are valid on different platforms
4223VALID_TOOLCHAINS_linux="gcc clang"
4224VALID_TOOLCHAINS_solaris="solstudio"
4225VALID_TOOLCHAINS_macosx="gcc clang"
4226VALID_TOOLCHAINS_aix="xlc"
4227VALID_TOOLCHAINS_windows="microsoft"
4228
4229# Toolchain descriptions
4230TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4231TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4232TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4233TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4234TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4235
4236# Setup a number of variables describing how native output files are
4237# named on this platform/toolchain.
4238
4239
4240# Determine which toolchain type to use, and make sure it is valid for this
4241# platform. Setup various information about the selected toolchain.
4242
4243
4244# Before we start detecting the toolchain executables, we might need some
4245# special setup, e.g. additional paths etc.
4246
4247
4248# Restore path, etc
4249
4250
4251# Check if a compiler is of the toolchain type we expect, and save the version
4252# information from it. If the compiler does not match the expected type,
4253# this function will abort using AC_MSG_ERROR. If it matches, the version will
4254# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4255# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4256#
4257# $1 = compiler to test (CC or CXX)
4258# $2 = human readable name of compiler (C or C++)
4259
4260
4261# Try to locate the given C or C++ compiler in the path, or otherwise.
4262#
4263# $1 = compiler to test (CC or CXX)
4264# $2 = human readable name of compiler (C or C++)
4265# $3 = list of compiler names to search for
4266
4267
4268# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4269# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4270# archiver (AR). Verify that the compilers are correct according to the
4271# toolchain type.
4272
4273
4274# Setup additional tools that is considered a part of the toolchain, but not the
4275# core part. Many of these are highly platform-specific and do not exist,
4276# and/or are not needed on all platforms.
4277
4278
4279# Setup the build tools (i.e, the compiler and linker used to build programs
4280# that should be run on the build platform, not the target platform, as a build
4281# helper). Since the non-cross-compile case uses the normal, target compilers
4282# for this, we can only do this after these have been setup.
4283
4284
4285# Setup legacy variables that are still needed as alternative ways to refer to
4286# parts of the toolchain.
4287
4288
4289# Do some additional checks on the detected tools.
4290
4291
4292# Setup the JTReg Regression Test Harness.
4293
4294
4295#
4296# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4297# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4298#
4299# This code is free software; you can redistribute it and/or modify it
4300# under the terms of the GNU General Public License version 2 only, as
4301# published by the Free Software Foundation.  Oracle designates this
4302# particular file as subject to the "Classpath" exception as provided
4303# by Oracle in the LICENSE file that accompanied this code.
4304#
4305# This code is distributed in the hope that it will be useful, but WITHOUT
4306# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4307# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4308# version 2 for more details (a copy is included in the LICENSE file that
4309# accompanied this code).
4310#
4311# You should have received a copy of the GNU General Public License version
4312# 2 along with this work; if not, write to the Free Software Foundation,
4313# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4314#
4315# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4316# or visit www.oracle.com if you need additional information or have any
4317# questions.
4318#
4319
4320################################################################################
4321
4322VALID_VS_VERSIONS="2010 2012 2013"
4323
4324VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4325VS_VERSION_INTERNAL_2010=100
4326VS_MSVCR_2010=msvcr100.dll
4327# We don't use msvcp on Visual Studio 2010
4328#VS_MSVCP_2010=msvcp100.dll
4329VS_ENVVAR_2010="VS100COMNTOOLS"
4330VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4331VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4332VS_VS_PLATFORM_NAME_2010="v100"
4333VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4334
4335VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4336VS_VERSION_INTERNAL_2012=110
4337VS_MSVCR_2012=msvcr110.dll
4338VS_MSVCP_2012=msvcp110.dll
4339VS_ENVVAR_2012="VS110COMNTOOLS"
4340VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4341VS_SDK_INSTALLDIR_2012=
4342VS_VS_PLATFORM_NAME_2012="v110"
4343VS_SDK_PLATFORM_NAME_2012=
4344
4345VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4346VS_VERSION_INTERNAL_2013=120
4347VS_MSVCR_2013=msvcr120.dll
4348VS_MSVCP_2013=msvcp120.dll
4349VS_ENVVAR_2013="VS120COMNTOOLS"
4350VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4351VS_SDK_INSTALLDIR_2013=
4352VS_VS_PLATFORM_NAME_2013="v120"
4353VS_SDK_PLATFORM_NAME_2013=
4354
4355################################################################################
4356
4357
4358
4359################################################################################
4360
4361
4362
4363################################################################################
4364# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4365# build environment and assigns it to VS_ENV_CMD
4366
4367
4368################################################################################
4369
4370
4371
4372################################################################################
4373# Check if the VS env variables were setup prior to running configure.
4374# If not, then find vcvarsall.bat and run it automatically, and integrate
4375# the set env variables into the spec file.
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389# This line needs to be here, verbatim, after all includes and the dummy hook
4390# definitions. It is replaced with custom functionality when building
4391# custom sources.
4392#CUSTOM_AUTOCONF_INCLUDE
4393
4394# Do not change or remove the following line, it is needed for consistency checks:
4395DATE_WHEN_GENERATED=1423504354
4396
4397###############################################################################
4398#
4399# Initialization / Boot-strapping
4400#
4401# The bootstrapping process needs to solve the "chicken or the egg" problem,
4402# thus it jumps back and forth, each time gaining something needed later on.
4403#
4404###############################################################################
4405
4406# If we are requested to print additional help, do that and then exit.
4407# This must be the very first call.
4408
4409  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4410    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4411    $PRINTF "Which are valid to use depends on the build platform.\n"
4412    for toolchain in $VALID_TOOLCHAINS_all; do
4413      # Use indirect variable referencing
4414      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4415      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4416      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4417    done
4418
4419    # And now exit directly
4420    exit 0
4421  fi
4422
4423
4424# Basic initialization that must happen first of all in the normal process.
4425
4426  # Save the original command line. This is passed to us by the wrapper configure script.
4427
4428  # Save the path variable before it gets changed
4429  ORIGINAL_PATH="$PATH"
4430
4431  DATE_WHEN_CONFIGURED=`LANG=C date`
4432
4433  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4434$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4435  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4436$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4437
4438
4439  # Start with tools that do not need have cross compilation support
4440  # and can be expected to be found in the default PATH. These tools are
4441  # used by configure. Nor are these tools expected to be found in the
4442  # devkit from the builddeps server either, since they are
4443  # needed to download the devkit.
4444
4445  # First are all the simple required tools.
4446
4447
4448
4449  # Publish this variable in the help.
4450
4451
4452  if test "x$BASENAME" = x; then
4453    # The variable is not set by user, try to locate tool using the code snippet
4454    for ac_prog in basename
4455do
4456  # Extract the first word of "$ac_prog", so it can be a program name with args.
4457set dummy $ac_prog; ac_word=$2
4458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4459$as_echo_n "checking for $ac_word... " >&6; }
4460if ${ac_cv_path_BASENAME+:} false; then :
4461  $as_echo_n "(cached) " >&6
4462else
4463  case $BASENAME in
4464  [\\/]* | ?:[\\/]*)
4465  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4466  ;;
4467  *)
4468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in $PATH
4470do
4471  IFS=$as_save_IFS
4472  test -z "$as_dir" && as_dir=.
4473    for ac_exec_ext in '' $ac_executable_extensions; do
4474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4475    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4477    break 2
4478  fi
4479done
4480  done
4481IFS=$as_save_IFS
4482
4483  ;;
4484esac
4485fi
4486BASENAME=$ac_cv_path_BASENAME
4487if test -n "$BASENAME"; then
4488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4489$as_echo "$BASENAME" >&6; }
4490else
4491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492$as_echo "no" >&6; }
4493fi
4494
4495
4496  test -n "$BASENAME" && break
4497done
4498
4499  else
4500    # The variable is set, but is it from the command line or the environment?
4501
4502    # Try to remove the string !BASENAME! from our list.
4503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4505      # If it failed, the variable was not from the command line. Ignore it,
4506      # but warn the user (except for BASH, which is always set by the calling BASH).
4507      if test "xBASENAME" != xBASH; then
4508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4509$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4510      fi
4511      # Try to locate tool using the code snippet
4512      for ac_prog in basename
4513do
4514  # Extract the first word of "$ac_prog", so it can be a program name with args.
4515set dummy $ac_prog; ac_word=$2
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4517$as_echo_n "checking for $ac_word... " >&6; }
4518if ${ac_cv_path_BASENAME+:} false; then :
4519  $as_echo_n "(cached) " >&6
4520else
4521  case $BASENAME in
4522  [\\/]* | ?:[\\/]*)
4523  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4524  ;;
4525  *)
4526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH
4528do
4529  IFS=$as_save_IFS
4530  test -z "$as_dir" && as_dir=.
4531    for ac_exec_ext in '' $ac_executable_extensions; do
4532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4533    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4535    break 2
4536  fi
4537done
4538  done
4539IFS=$as_save_IFS
4540
4541  ;;
4542esac
4543fi
4544BASENAME=$ac_cv_path_BASENAME
4545if test -n "$BASENAME"; then
4546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4547$as_echo "$BASENAME" >&6; }
4548else
4549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4550$as_echo "no" >&6; }
4551fi
4552
4553
4554  test -n "$BASENAME" && break
4555done
4556
4557    else
4558      # If it succeeded, then it was overridden by the user. We will use it
4559      # for the tool.
4560
4561      # First remove it from the list of overridden variables, so we can test
4562      # for unknown variables in the end.
4563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4564
4565      # Check if the provided tool contains a complete path.
4566      tool_specified="$BASENAME"
4567      tool_basename="${tool_specified##*/}"
4568      if test "x$tool_basename" = "x$tool_specified"; then
4569        # A command without a complete path is provided, search $PATH.
4570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4571$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4572        # Extract the first word of "$tool_basename", so it can be a program name with args.
4573set dummy $tool_basename; ac_word=$2
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4575$as_echo_n "checking for $ac_word... " >&6; }
4576if ${ac_cv_path_BASENAME+:} false; then :
4577  $as_echo_n "(cached) " >&6
4578else
4579  case $BASENAME in
4580  [\\/]* | ?:[\\/]*)
4581  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4582  ;;
4583  *)
4584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4585for as_dir in $PATH
4586do
4587  IFS=$as_save_IFS
4588  test -z "$as_dir" && as_dir=.
4589    for ac_exec_ext in '' $ac_executable_extensions; do
4590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4591    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4593    break 2
4594  fi
4595done
4596  done
4597IFS=$as_save_IFS
4598
4599  ;;
4600esac
4601fi
4602BASENAME=$ac_cv_path_BASENAME
4603if test -n "$BASENAME"; then
4604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4605$as_echo "$BASENAME" >&6; }
4606else
4607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4608$as_echo "no" >&6; }
4609fi
4610
4611
4612        if test "x$BASENAME" = x; then
4613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4614        fi
4615      else
4616        # Otherwise we believe it is a complete path. Use it as it is.
4617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4618$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4620$as_echo_n "checking for BASENAME... " >&6; }
4621        if test ! -x "$tool_specified"; then
4622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4623$as_echo "not found" >&6; }
4624          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4625        fi
4626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4627$as_echo "$tool_specified" >&6; }
4628      fi
4629    fi
4630  fi
4631
4632
4633
4634  if test "x$BASENAME" = x; then
4635    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4636  fi
4637
4638
4639
4640
4641
4642  # Publish this variable in the help.
4643
4644
4645  if test "x$BASH" = x; then
4646    # The variable is not set by user, try to locate tool using the code snippet
4647    for ac_prog in bash
4648do
4649  # Extract the first word of "$ac_prog", so it can be a program name with args.
4650set dummy $ac_prog; ac_word=$2
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4652$as_echo_n "checking for $ac_word... " >&6; }
4653if ${ac_cv_path_BASH+:} false; then :
4654  $as_echo_n "(cached) " >&6
4655else
4656  case $BASH in
4657  [\\/]* | ?:[\\/]*)
4658  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4659  ;;
4660  *)
4661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4662for as_dir in $PATH
4663do
4664  IFS=$as_save_IFS
4665  test -z "$as_dir" && as_dir=.
4666    for ac_exec_ext in '' $ac_executable_extensions; do
4667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4668    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4670    break 2
4671  fi
4672done
4673  done
4674IFS=$as_save_IFS
4675
4676  ;;
4677esac
4678fi
4679BASH=$ac_cv_path_BASH
4680if test -n "$BASH"; then
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4682$as_echo "$BASH" >&6; }
4683else
4684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4685$as_echo "no" >&6; }
4686fi
4687
4688
4689  test -n "$BASH" && break
4690done
4691
4692  else
4693    # The variable is set, but is it from the command line or the environment?
4694
4695    # Try to remove the string !BASH! from our list.
4696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4698      # If it failed, the variable was not from the command line. Ignore it,
4699      # but warn the user (except for BASH, which is always set by the calling BASH).
4700      if test "xBASH" != xBASH; then
4701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4702$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4703      fi
4704      # Try to locate tool using the code snippet
4705      for ac_prog in bash
4706do
4707  # Extract the first word of "$ac_prog", so it can be a program name with args.
4708set dummy $ac_prog; ac_word=$2
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710$as_echo_n "checking for $ac_word... " >&6; }
4711if ${ac_cv_path_BASH+:} false; then :
4712  $as_echo_n "(cached) " >&6
4713else
4714  case $BASH in
4715  [\\/]* | ?:[\\/]*)
4716  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4717  ;;
4718  *)
4719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in $PATH
4721do
4722  IFS=$as_save_IFS
4723  test -z "$as_dir" && as_dir=.
4724    for ac_exec_ext in '' $ac_executable_extensions; do
4725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4726    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4728    break 2
4729  fi
4730done
4731  done
4732IFS=$as_save_IFS
4733
4734  ;;
4735esac
4736fi
4737BASH=$ac_cv_path_BASH
4738if test -n "$BASH"; then
4739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4740$as_echo "$BASH" >&6; }
4741else
4742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
4744fi
4745
4746
4747  test -n "$BASH" && break
4748done
4749
4750    else
4751      # If it succeeded, then it was overridden by the user. We will use it
4752      # for the tool.
4753
4754      # First remove it from the list of overridden variables, so we can test
4755      # for unknown variables in the end.
4756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4757
4758      # Check if the provided tool contains a complete path.
4759      tool_specified="$BASH"
4760      tool_basename="${tool_specified##*/}"
4761      if test "x$tool_basename" = "x$tool_specified"; then
4762        # A command without a complete path is provided, search $PATH.
4763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4764$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4765        # Extract the first word of "$tool_basename", so it can be a program name with args.
4766set dummy $tool_basename; ac_word=$2
4767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4768$as_echo_n "checking for $ac_word... " >&6; }
4769if ${ac_cv_path_BASH+:} false; then :
4770  $as_echo_n "(cached) " >&6
4771else
4772  case $BASH in
4773  [\\/]* | ?:[\\/]*)
4774  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4775  ;;
4776  *)
4777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4778for as_dir in $PATH
4779do
4780  IFS=$as_save_IFS
4781  test -z "$as_dir" && as_dir=.
4782    for ac_exec_ext in '' $ac_executable_extensions; do
4783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4784    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4786    break 2
4787  fi
4788done
4789  done
4790IFS=$as_save_IFS
4791
4792  ;;
4793esac
4794fi
4795BASH=$ac_cv_path_BASH
4796if test -n "$BASH"; then
4797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4798$as_echo "$BASH" >&6; }
4799else
4800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4801$as_echo "no" >&6; }
4802fi
4803
4804
4805        if test "x$BASH" = x; then
4806          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4807        fi
4808      else
4809        # Otherwise we believe it is a complete path. Use it as it is.
4810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4811$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4813$as_echo_n "checking for BASH... " >&6; }
4814        if test ! -x "$tool_specified"; then
4815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4816$as_echo "not found" >&6; }
4817          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4818        fi
4819        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4820$as_echo "$tool_specified" >&6; }
4821      fi
4822    fi
4823  fi
4824
4825
4826
4827  if test "x$BASH" = x; then
4828    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4829  fi
4830
4831
4832
4833
4834
4835  # Publish this variable in the help.
4836
4837
4838  if test "x$CAT" = x; then
4839    # The variable is not set by user, try to locate tool using the code snippet
4840    for ac_prog in cat
4841do
4842  # Extract the first word of "$ac_prog", so it can be a program name with args.
4843set dummy $ac_prog; ac_word=$2
4844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4845$as_echo_n "checking for $ac_word... " >&6; }
4846if ${ac_cv_path_CAT+:} false; then :
4847  $as_echo_n "(cached) " >&6
4848else
4849  case $CAT in
4850  [\\/]* | ?:[\\/]*)
4851  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4852  ;;
4853  *)
4854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855for as_dir in $PATH
4856do
4857  IFS=$as_save_IFS
4858  test -z "$as_dir" && as_dir=.
4859    for ac_exec_ext in '' $ac_executable_extensions; do
4860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4861    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4863    break 2
4864  fi
4865done
4866  done
4867IFS=$as_save_IFS
4868
4869  ;;
4870esac
4871fi
4872CAT=$ac_cv_path_CAT
4873if test -n "$CAT"; then
4874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4875$as_echo "$CAT" >&6; }
4876else
4877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878$as_echo "no" >&6; }
4879fi
4880
4881
4882  test -n "$CAT" && break
4883done
4884
4885  else
4886    # The variable is set, but is it from the command line or the environment?
4887
4888    # Try to remove the string !CAT! from our list.
4889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4891      # If it failed, the variable was not from the command line. Ignore it,
4892      # but warn the user (except for BASH, which is always set by the calling BASH).
4893      if test "xCAT" != xBASH; then
4894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4895$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4896      fi
4897      # Try to locate tool using the code snippet
4898      for ac_prog in cat
4899do
4900  # Extract the first word of "$ac_prog", so it can be a program name with args.
4901set dummy $ac_prog; ac_word=$2
4902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903$as_echo_n "checking for $ac_word... " >&6; }
4904if ${ac_cv_path_CAT+:} false; then :
4905  $as_echo_n "(cached) " >&6
4906else
4907  case $CAT in
4908  [\\/]* | ?:[\\/]*)
4909  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4910  ;;
4911  *)
4912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4913for as_dir in $PATH
4914do
4915  IFS=$as_save_IFS
4916  test -z "$as_dir" && as_dir=.
4917    for ac_exec_ext in '' $ac_executable_extensions; do
4918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4919    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4921    break 2
4922  fi
4923done
4924  done
4925IFS=$as_save_IFS
4926
4927  ;;
4928esac
4929fi
4930CAT=$ac_cv_path_CAT
4931if test -n "$CAT"; then
4932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4933$as_echo "$CAT" >&6; }
4934else
4935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4936$as_echo "no" >&6; }
4937fi
4938
4939
4940  test -n "$CAT" && break
4941done
4942
4943    else
4944      # If it succeeded, then it was overridden by the user. We will use it
4945      # for the tool.
4946
4947      # First remove it from the list of overridden variables, so we can test
4948      # for unknown variables in the end.
4949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4950
4951      # Check if the provided tool contains a complete path.
4952      tool_specified="$CAT"
4953      tool_basename="${tool_specified##*/}"
4954      if test "x$tool_basename" = "x$tool_specified"; then
4955        # A command without a complete path is provided, search $PATH.
4956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4957$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4958        # Extract the first word of "$tool_basename", so it can be a program name with args.
4959set dummy $tool_basename; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if ${ac_cv_path_CAT+:} false; then :
4963  $as_echo_n "(cached) " >&6
4964else
4965  case $CAT in
4966  [\\/]* | ?:[\\/]*)
4967  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4968  ;;
4969  *)
4970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in $PATH
4972do
4973  IFS=$as_save_IFS
4974  test -z "$as_dir" && as_dir=.
4975    for ac_exec_ext in '' $ac_executable_extensions; do
4976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979    break 2
4980  fi
4981done
4982  done
4983IFS=$as_save_IFS
4984
4985  ;;
4986esac
4987fi
4988CAT=$ac_cv_path_CAT
4989if test -n "$CAT"; then
4990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4991$as_echo "$CAT" >&6; }
4992else
4993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997
4998        if test "x$CAT" = x; then
4999          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5000        fi
5001      else
5002        # Otherwise we believe it is a complete path. Use it as it is.
5003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5004$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5006$as_echo_n "checking for CAT... " >&6; }
5007        if test ! -x "$tool_specified"; then
5008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5009$as_echo "not found" >&6; }
5010          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5011        fi
5012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5013$as_echo "$tool_specified" >&6; }
5014      fi
5015    fi
5016  fi
5017
5018
5019
5020  if test "x$CAT" = x; then
5021    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5022  fi
5023
5024
5025
5026
5027
5028  # Publish this variable in the help.
5029
5030
5031  if test "x$CHMOD" = x; then
5032    # The variable is not set by user, try to locate tool using the code snippet
5033    for ac_prog in chmod
5034do
5035  # Extract the first word of "$ac_prog", so it can be a program name with args.
5036set dummy $ac_prog; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_CHMOD+:} false; then :
5040  $as_echo_n "(cached) " >&6
5041else
5042  case $CHMOD in
5043  [\\/]* | ?:[\\/]*)
5044  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5045  ;;
5046  *)
5047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050  IFS=$as_save_IFS
5051  test -z "$as_dir" && as_dir=.
5052    for ac_exec_ext in '' $ac_executable_extensions; do
5053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056    break 2
5057  fi
5058done
5059  done
5060IFS=$as_save_IFS
5061
5062  ;;
5063esac
5064fi
5065CHMOD=$ac_cv_path_CHMOD
5066if test -n "$CHMOD"; then
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5068$as_echo "$CHMOD" >&6; }
5069else
5070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074
5075  test -n "$CHMOD" && break
5076done
5077
5078  else
5079    # The variable is set, but is it from the command line or the environment?
5080
5081    # Try to remove the string !CHMOD! from our list.
5082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5084      # If it failed, the variable was not from the command line. Ignore it,
5085      # but warn the user (except for BASH, which is always set by the calling BASH).
5086      if test "xCHMOD" != xBASH; then
5087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5088$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5089      fi
5090      # Try to locate tool using the code snippet
5091      for ac_prog in chmod
5092do
5093  # Extract the first word of "$ac_prog", so it can be a program name with args.
5094set dummy $ac_prog; ac_word=$2
5095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
5097if ${ac_cv_path_CHMOD+:} false; then :
5098  $as_echo_n "(cached) " >&6
5099else
5100  case $CHMOD in
5101  [\\/]* | ?:[\\/]*)
5102  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5103  ;;
5104  *)
5105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106for as_dir in $PATH
5107do
5108  IFS=$as_save_IFS
5109  test -z "$as_dir" && as_dir=.
5110    for ac_exec_ext in '' $ac_executable_extensions; do
5111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5112    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5114    break 2
5115  fi
5116done
5117  done
5118IFS=$as_save_IFS
5119
5120  ;;
5121esac
5122fi
5123CHMOD=$ac_cv_path_CHMOD
5124if test -n "$CHMOD"; then
5125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5126$as_echo "$CHMOD" >&6; }
5127else
5128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129$as_echo "no" >&6; }
5130fi
5131
5132
5133  test -n "$CHMOD" && break
5134done
5135
5136    else
5137      # If it succeeded, then it was overridden by the user. We will use it
5138      # for the tool.
5139
5140      # First remove it from the list of overridden variables, so we can test
5141      # for unknown variables in the end.
5142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5143
5144      # Check if the provided tool contains a complete path.
5145      tool_specified="$CHMOD"
5146      tool_basename="${tool_specified##*/}"
5147      if test "x$tool_basename" = "x$tool_specified"; then
5148        # A command without a complete path is provided, search $PATH.
5149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5150$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5151        # Extract the first word of "$tool_basename", so it can be a program name with args.
5152set dummy $tool_basename; ac_word=$2
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5154$as_echo_n "checking for $ac_word... " >&6; }
5155if ${ac_cv_path_CHMOD+:} false; then :
5156  $as_echo_n "(cached) " >&6
5157else
5158  case $CHMOD in
5159  [\\/]* | ?:[\\/]*)
5160  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5161  ;;
5162  *)
5163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166  IFS=$as_save_IFS
5167  test -z "$as_dir" && as_dir=.
5168    for ac_exec_ext in '' $ac_executable_extensions; do
5169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5170    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5172    break 2
5173  fi
5174done
5175  done
5176IFS=$as_save_IFS
5177
5178  ;;
5179esac
5180fi
5181CHMOD=$ac_cv_path_CHMOD
5182if test -n "$CHMOD"; then
5183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5184$as_echo "$CHMOD" >&6; }
5185else
5186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188fi
5189
5190
5191        if test "x$CHMOD" = x; then
5192          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5193        fi
5194      else
5195        # Otherwise we believe it is a complete path. Use it as it is.
5196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5197$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5199$as_echo_n "checking for CHMOD... " >&6; }
5200        if test ! -x "$tool_specified"; then
5201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5202$as_echo "not found" >&6; }
5203          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5204        fi
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5206$as_echo "$tool_specified" >&6; }
5207      fi
5208    fi
5209  fi
5210
5211
5212
5213  if test "x$CHMOD" = x; then
5214    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5215  fi
5216
5217
5218
5219
5220
5221  # Publish this variable in the help.
5222
5223
5224  if test "x$CMP" = x; then
5225    # The variable is not set by user, try to locate tool using the code snippet
5226    for ac_prog in cmp
5227do
5228  # Extract the first word of "$ac_prog", so it can be a program name with args.
5229set dummy $ac_prog; ac_word=$2
5230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5231$as_echo_n "checking for $ac_word... " >&6; }
5232if ${ac_cv_path_CMP+:} false; then :
5233  $as_echo_n "(cached) " >&6
5234else
5235  case $CMP in
5236  [\\/]* | ?:[\\/]*)
5237  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5238  ;;
5239  *)
5240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5241for as_dir in $PATH
5242do
5243  IFS=$as_save_IFS
5244  test -z "$as_dir" && as_dir=.
5245    for ac_exec_ext in '' $ac_executable_extensions; do
5246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5247    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5249    break 2
5250  fi
5251done
5252  done
5253IFS=$as_save_IFS
5254
5255  ;;
5256esac
5257fi
5258CMP=$ac_cv_path_CMP
5259if test -n "$CMP"; then
5260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5261$as_echo "$CMP" >&6; }
5262else
5263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5264$as_echo "no" >&6; }
5265fi
5266
5267
5268  test -n "$CMP" && break
5269done
5270
5271  else
5272    # The variable is set, but is it from the command line or the environment?
5273
5274    # Try to remove the string !CMP! from our list.
5275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5277      # If it failed, the variable was not from the command line. Ignore it,
5278      # but warn the user (except for BASH, which is always set by the calling BASH).
5279      if test "xCMP" != xBASH; then
5280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5281$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5282      fi
5283      # Try to locate tool using the code snippet
5284      for ac_prog in cmp
5285do
5286  # Extract the first word of "$ac_prog", so it can be a program name with args.
5287set dummy $ac_prog; ac_word=$2
5288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289$as_echo_n "checking for $ac_word... " >&6; }
5290if ${ac_cv_path_CMP+:} false; then :
5291  $as_echo_n "(cached) " >&6
5292else
5293  case $CMP in
5294  [\\/]* | ?:[\\/]*)
5295  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5296  ;;
5297  *)
5298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299for as_dir in $PATH
5300do
5301  IFS=$as_save_IFS
5302  test -z "$as_dir" && as_dir=.
5303    for ac_exec_ext in '' $ac_executable_extensions; do
5304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5305    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5307    break 2
5308  fi
5309done
5310  done
5311IFS=$as_save_IFS
5312
5313  ;;
5314esac
5315fi
5316CMP=$ac_cv_path_CMP
5317if test -n "$CMP"; then
5318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5319$as_echo "$CMP" >&6; }
5320else
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5322$as_echo "no" >&6; }
5323fi
5324
5325
5326  test -n "$CMP" && break
5327done
5328
5329    else
5330      # If it succeeded, then it was overridden by the user. We will use it
5331      # for the tool.
5332
5333      # First remove it from the list of overridden variables, so we can test
5334      # for unknown variables in the end.
5335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5336
5337      # Check if the provided tool contains a complete path.
5338      tool_specified="$CMP"
5339      tool_basename="${tool_specified##*/}"
5340      if test "x$tool_basename" = "x$tool_specified"; then
5341        # A command without a complete path is provided, search $PATH.
5342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5343$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5344        # Extract the first word of "$tool_basename", so it can be a program name with args.
5345set dummy $tool_basename; ac_word=$2
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347$as_echo_n "checking for $ac_word... " >&6; }
5348if ${ac_cv_path_CMP+:} false; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  case $CMP in
5352  [\\/]* | ?:[\\/]*)
5353  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5354  ;;
5355  *)
5356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357for as_dir in $PATH
5358do
5359  IFS=$as_save_IFS
5360  test -z "$as_dir" && as_dir=.
5361    for ac_exec_ext in '' $ac_executable_extensions; do
5362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5363    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365    break 2
5366  fi
5367done
5368  done
5369IFS=$as_save_IFS
5370
5371  ;;
5372esac
5373fi
5374CMP=$ac_cv_path_CMP
5375if test -n "$CMP"; then
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5377$as_echo "$CMP" >&6; }
5378else
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
5382
5383
5384        if test "x$CMP" = x; then
5385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5386        fi
5387      else
5388        # Otherwise we believe it is a complete path. Use it as it is.
5389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5390$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5392$as_echo_n "checking for CMP... " >&6; }
5393        if test ! -x "$tool_specified"; then
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5395$as_echo "not found" >&6; }
5396          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5397        fi
5398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5399$as_echo "$tool_specified" >&6; }
5400      fi
5401    fi
5402  fi
5403
5404
5405
5406  if test "x$CMP" = x; then
5407    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5408  fi
5409
5410
5411
5412
5413
5414  # Publish this variable in the help.
5415
5416
5417  if test "x$COMM" = x; then
5418    # The variable is not set by user, try to locate tool using the code snippet
5419    for ac_prog in comm
5420do
5421  # Extract the first word of "$ac_prog", so it can be a program name with args.
5422set dummy $ac_prog; ac_word=$2
5423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5424$as_echo_n "checking for $ac_word... " >&6; }
5425if ${ac_cv_path_COMM+:} false; then :
5426  $as_echo_n "(cached) " >&6
5427else
5428  case $COMM in
5429  [\\/]* | ?:[\\/]*)
5430  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5431  ;;
5432  *)
5433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434for as_dir in $PATH
5435do
5436  IFS=$as_save_IFS
5437  test -z "$as_dir" && as_dir=.
5438    for ac_exec_ext in '' $ac_executable_extensions; do
5439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5440    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5442    break 2
5443  fi
5444done
5445  done
5446IFS=$as_save_IFS
5447
5448  ;;
5449esac
5450fi
5451COMM=$ac_cv_path_COMM
5452if test -n "$COMM"; then
5453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5454$as_echo "$COMM" >&6; }
5455else
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5457$as_echo "no" >&6; }
5458fi
5459
5460
5461  test -n "$COMM" && break
5462done
5463
5464  else
5465    # The variable is set, but is it from the command line or the environment?
5466
5467    # Try to remove the string !COMM! from our list.
5468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5470      # If it failed, the variable was not from the command line. Ignore it,
5471      # but warn the user (except for BASH, which is always set by the calling BASH).
5472      if test "xCOMM" != xBASH; then
5473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5474$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5475      fi
5476      # Try to locate tool using the code snippet
5477      for ac_prog in comm
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if ${ac_cv_path_COMM+:} false; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $COMM in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5498    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509COMM=$ac_cv_path_COMM
5510if test -n "$COMM"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5512$as_echo "$COMM" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$COMM" && break
5520done
5521
5522    else
5523      # If it succeeded, then it was overridden by the user. We will use it
5524      # for the tool.
5525
5526      # First remove it from the list of overridden variables, so we can test
5527      # for unknown variables in the end.
5528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5529
5530      # Check if the provided tool contains a complete path.
5531      tool_specified="$COMM"
5532      tool_basename="${tool_specified##*/}"
5533      if test "x$tool_basename" = "x$tool_specified"; then
5534        # A command without a complete path is provided, search $PATH.
5535        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5536$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5537        # Extract the first word of "$tool_basename", so it can be a program name with args.
5538set dummy $tool_basename; ac_word=$2
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5540$as_echo_n "checking for $ac_word... " >&6; }
5541if ${ac_cv_path_COMM+:} false; then :
5542  $as_echo_n "(cached) " >&6
5543else
5544  case $COMM in
5545  [\\/]* | ?:[\\/]*)
5546  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5547  ;;
5548  *)
5549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5550for as_dir in $PATH
5551do
5552  IFS=$as_save_IFS
5553  test -z "$as_dir" && as_dir=.
5554    for ac_exec_ext in '' $ac_executable_extensions; do
5555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5556    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5558    break 2
5559  fi
5560done
5561  done
5562IFS=$as_save_IFS
5563
5564  ;;
5565esac
5566fi
5567COMM=$ac_cv_path_COMM
5568if test -n "$COMM"; then
5569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5570$as_echo "$COMM" >&6; }
5571else
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5573$as_echo "no" >&6; }
5574fi
5575
5576
5577        if test "x$COMM" = x; then
5578          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5579        fi
5580      else
5581        # Otherwise we believe it is a complete path. Use it as it is.
5582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5583$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5585$as_echo_n "checking for COMM... " >&6; }
5586        if test ! -x "$tool_specified"; then
5587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5588$as_echo "not found" >&6; }
5589          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5590        fi
5591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5592$as_echo "$tool_specified" >&6; }
5593      fi
5594    fi
5595  fi
5596
5597
5598
5599  if test "x$COMM" = x; then
5600    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5601  fi
5602
5603
5604
5605
5606
5607  # Publish this variable in the help.
5608
5609
5610  if test "x$CP" = x; then
5611    # The variable is not set by user, try to locate tool using the code snippet
5612    for ac_prog in cp
5613do
5614  # Extract the first word of "$ac_prog", so it can be a program name with args.
5615set dummy $ac_prog; ac_word=$2
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5617$as_echo_n "checking for $ac_word... " >&6; }
5618if ${ac_cv_path_CP+:} false; then :
5619  $as_echo_n "(cached) " >&6
5620else
5621  case $CP in
5622  [\\/]* | ?:[\\/]*)
5623  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5624  ;;
5625  *)
5626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629  IFS=$as_save_IFS
5630  test -z "$as_dir" && as_dir=.
5631    for ac_exec_ext in '' $ac_executable_extensions; do
5632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5633    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5635    break 2
5636  fi
5637done
5638  done
5639IFS=$as_save_IFS
5640
5641  ;;
5642esac
5643fi
5644CP=$ac_cv_path_CP
5645if test -n "$CP"; then
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5647$as_echo "$CP" >&6; }
5648else
5649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5650$as_echo "no" >&6; }
5651fi
5652
5653
5654  test -n "$CP" && break
5655done
5656
5657  else
5658    # The variable is set, but is it from the command line or the environment?
5659
5660    # Try to remove the string !CP! from our list.
5661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5663      # If it failed, the variable was not from the command line. Ignore it,
5664      # but warn the user (except for BASH, which is always set by the calling BASH).
5665      if test "xCP" != xBASH; then
5666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5667$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5668      fi
5669      # Try to locate tool using the code snippet
5670      for ac_prog in cp
5671do
5672  # Extract the first word of "$ac_prog", so it can be a program name with args.
5673set dummy $ac_prog; ac_word=$2
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675$as_echo_n "checking for $ac_word... " >&6; }
5676if ${ac_cv_path_CP+:} false; then :
5677  $as_echo_n "(cached) " >&6
5678else
5679  case $CP in
5680  [\\/]* | ?:[\\/]*)
5681  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5682  ;;
5683  *)
5684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685for as_dir in $PATH
5686do
5687  IFS=$as_save_IFS
5688  test -z "$as_dir" && as_dir=.
5689    for ac_exec_ext in '' $ac_executable_extensions; do
5690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5691    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5693    break 2
5694  fi
5695done
5696  done
5697IFS=$as_save_IFS
5698
5699  ;;
5700esac
5701fi
5702CP=$ac_cv_path_CP
5703if test -n "$CP"; then
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5705$as_echo "$CP" >&6; }
5706else
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708$as_echo "no" >&6; }
5709fi
5710
5711
5712  test -n "$CP" && break
5713done
5714
5715    else
5716      # If it succeeded, then it was overridden by the user. We will use it
5717      # for the tool.
5718
5719      # First remove it from the list of overridden variables, so we can test
5720      # for unknown variables in the end.
5721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5722
5723      # Check if the provided tool contains a complete path.
5724      tool_specified="$CP"
5725      tool_basename="${tool_specified##*/}"
5726      if test "x$tool_basename" = "x$tool_specified"; then
5727        # A command without a complete path is provided, search $PATH.
5728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5729$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5730        # Extract the first word of "$tool_basename", so it can be a program name with args.
5731set dummy $tool_basename; ac_word=$2
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5733$as_echo_n "checking for $ac_word... " >&6; }
5734if ${ac_cv_path_CP+:} false; then :
5735  $as_echo_n "(cached) " >&6
5736else
5737  case $CP in
5738  [\\/]* | ?:[\\/]*)
5739  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5740  ;;
5741  *)
5742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745  IFS=$as_save_IFS
5746  test -z "$as_dir" && as_dir=.
5747    for ac_exec_ext in '' $ac_executable_extensions; do
5748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5749    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5751    break 2
5752  fi
5753done
5754  done
5755IFS=$as_save_IFS
5756
5757  ;;
5758esac
5759fi
5760CP=$ac_cv_path_CP
5761if test -n "$CP"; then
5762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5763$as_echo "$CP" >&6; }
5764else
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5766$as_echo "no" >&6; }
5767fi
5768
5769
5770        if test "x$CP" = x; then
5771          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5772        fi
5773      else
5774        # Otherwise we believe it is a complete path. Use it as it is.
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5776$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5778$as_echo_n "checking for CP... " >&6; }
5779        if test ! -x "$tool_specified"; then
5780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5781$as_echo "not found" >&6; }
5782          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5783        fi
5784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5785$as_echo "$tool_specified" >&6; }
5786      fi
5787    fi
5788  fi
5789
5790
5791
5792  if test "x$CP" = x; then
5793    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5794  fi
5795
5796
5797
5798
5799
5800  # Publish this variable in the help.
5801
5802
5803  if test "x$CUT" = x; then
5804    # The variable is not set by user, try to locate tool using the code snippet
5805    for ac_prog in cut
5806do
5807  # Extract the first word of "$ac_prog", so it can be a program name with args.
5808set dummy $ac_prog; ac_word=$2
5809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5810$as_echo_n "checking for $ac_word... " >&6; }
5811if ${ac_cv_path_CUT+:} false; then :
5812  $as_echo_n "(cached) " >&6
5813else
5814  case $CUT in
5815  [\\/]* | ?:[\\/]*)
5816  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5817  ;;
5818  *)
5819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5820for as_dir in $PATH
5821do
5822  IFS=$as_save_IFS
5823  test -z "$as_dir" && as_dir=.
5824    for ac_exec_ext in '' $ac_executable_extensions; do
5825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5826    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5828    break 2
5829  fi
5830done
5831  done
5832IFS=$as_save_IFS
5833
5834  ;;
5835esac
5836fi
5837CUT=$ac_cv_path_CUT
5838if test -n "$CUT"; then
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5840$as_echo "$CUT" >&6; }
5841else
5842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5843$as_echo "no" >&6; }
5844fi
5845
5846
5847  test -n "$CUT" && break
5848done
5849
5850  else
5851    # The variable is set, but is it from the command line or the environment?
5852
5853    # Try to remove the string !CUT! from our list.
5854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5856      # If it failed, the variable was not from the command line. Ignore it,
5857      # but warn the user (except for BASH, which is always set by the calling BASH).
5858      if test "xCUT" != xBASH; then
5859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5860$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5861      fi
5862      # Try to locate tool using the code snippet
5863      for ac_prog in cut
5864do
5865  # Extract the first word of "$ac_prog", so it can be a program name with args.
5866set dummy $ac_prog; ac_word=$2
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5868$as_echo_n "checking for $ac_word... " >&6; }
5869if ${ac_cv_path_CUT+:} false; then :
5870  $as_echo_n "(cached) " >&6
5871else
5872  case $CUT in
5873  [\\/]* | ?:[\\/]*)
5874  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5875  ;;
5876  *)
5877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880  IFS=$as_save_IFS
5881  test -z "$as_dir" && as_dir=.
5882    for ac_exec_ext in '' $ac_executable_extensions; do
5883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5884    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886    break 2
5887  fi
5888done
5889  done
5890IFS=$as_save_IFS
5891
5892  ;;
5893esac
5894fi
5895CUT=$ac_cv_path_CUT
5896if test -n "$CUT"; then
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5898$as_echo "$CUT" >&6; }
5899else
5900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901$as_echo "no" >&6; }
5902fi
5903
5904
5905  test -n "$CUT" && break
5906done
5907
5908    else
5909      # If it succeeded, then it was overridden by the user. We will use it
5910      # for the tool.
5911
5912      # First remove it from the list of overridden variables, so we can test
5913      # for unknown variables in the end.
5914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5915
5916      # Check if the provided tool contains a complete path.
5917      tool_specified="$CUT"
5918      tool_basename="${tool_specified##*/}"
5919      if test "x$tool_basename" = "x$tool_specified"; then
5920        # A command without a complete path is provided, search $PATH.
5921        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5922$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5923        # Extract the first word of "$tool_basename", so it can be a program name with args.
5924set dummy $tool_basename; ac_word=$2
5925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5926$as_echo_n "checking for $ac_word... " >&6; }
5927if ${ac_cv_path_CUT+:} false; then :
5928  $as_echo_n "(cached) " >&6
5929else
5930  case $CUT in
5931  [\\/]* | ?:[\\/]*)
5932  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5933  ;;
5934  *)
5935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5936for as_dir in $PATH
5937do
5938  IFS=$as_save_IFS
5939  test -z "$as_dir" && as_dir=.
5940    for ac_exec_ext in '' $ac_executable_extensions; do
5941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5942    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5944    break 2
5945  fi
5946done
5947  done
5948IFS=$as_save_IFS
5949
5950  ;;
5951esac
5952fi
5953CUT=$ac_cv_path_CUT
5954if test -n "$CUT"; then
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5956$as_echo "$CUT" >&6; }
5957else
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5959$as_echo "no" >&6; }
5960fi
5961
5962
5963        if test "x$CUT" = x; then
5964          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5965        fi
5966      else
5967        # Otherwise we believe it is a complete path. Use it as it is.
5968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5969$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5971$as_echo_n "checking for CUT... " >&6; }
5972        if test ! -x "$tool_specified"; then
5973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5974$as_echo "not found" >&6; }
5975          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5976        fi
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5978$as_echo "$tool_specified" >&6; }
5979      fi
5980    fi
5981  fi
5982
5983
5984
5985  if test "x$CUT" = x; then
5986    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5987  fi
5988
5989
5990
5991
5992
5993  # Publish this variable in the help.
5994
5995
5996  if test "x$DATE" = x; then
5997    # The variable is not set by user, try to locate tool using the code snippet
5998    for ac_prog in date
5999do
6000  # Extract the first word of "$ac_prog", so it can be a program name with args.
6001set dummy $ac_prog; ac_word=$2
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003$as_echo_n "checking for $ac_word... " >&6; }
6004if ${ac_cv_path_DATE+:} false; then :
6005  $as_echo_n "(cached) " >&6
6006else
6007  case $DATE in
6008  [\\/]* | ?:[\\/]*)
6009  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6010  ;;
6011  *)
6012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013for as_dir in $PATH
6014do
6015  IFS=$as_save_IFS
6016  test -z "$as_dir" && as_dir=.
6017    for ac_exec_ext in '' $ac_executable_extensions; do
6018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6019    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6021    break 2
6022  fi
6023done
6024  done
6025IFS=$as_save_IFS
6026
6027  ;;
6028esac
6029fi
6030DATE=$ac_cv_path_DATE
6031if test -n "$DATE"; then
6032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6033$as_echo "$DATE" >&6; }
6034else
6035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036$as_echo "no" >&6; }
6037fi
6038
6039
6040  test -n "$DATE" && break
6041done
6042
6043  else
6044    # The variable is set, but is it from the command line or the environment?
6045
6046    # Try to remove the string !DATE! from our list.
6047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6049      # If it failed, the variable was not from the command line. Ignore it,
6050      # but warn the user (except for BASH, which is always set by the calling BASH).
6051      if test "xDATE" != xBASH; then
6052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6053$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6054      fi
6055      # Try to locate tool using the code snippet
6056      for ac_prog in date
6057do
6058  # Extract the first word of "$ac_prog", so it can be a program name with args.
6059set dummy $ac_prog; ac_word=$2
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6061$as_echo_n "checking for $ac_word... " >&6; }
6062if ${ac_cv_path_DATE+:} false; then :
6063  $as_echo_n "(cached) " >&6
6064else
6065  case $DATE in
6066  [\\/]* | ?:[\\/]*)
6067  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6068  ;;
6069  *)
6070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6071for as_dir in $PATH
6072do
6073  IFS=$as_save_IFS
6074  test -z "$as_dir" && as_dir=.
6075    for ac_exec_ext in '' $ac_executable_extensions; do
6076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6077    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6079    break 2
6080  fi
6081done
6082  done
6083IFS=$as_save_IFS
6084
6085  ;;
6086esac
6087fi
6088DATE=$ac_cv_path_DATE
6089if test -n "$DATE"; then
6090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6091$as_echo "$DATE" >&6; }
6092else
6093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094$as_echo "no" >&6; }
6095fi
6096
6097
6098  test -n "$DATE" && break
6099done
6100
6101    else
6102      # If it succeeded, then it was overridden by the user. We will use it
6103      # for the tool.
6104
6105      # First remove it from the list of overridden variables, so we can test
6106      # for unknown variables in the end.
6107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6108
6109      # Check if the provided tool contains a complete path.
6110      tool_specified="$DATE"
6111      tool_basename="${tool_specified##*/}"
6112      if test "x$tool_basename" = "x$tool_specified"; then
6113        # A command without a complete path is provided, search $PATH.
6114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6115$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6116        # Extract the first word of "$tool_basename", so it can be a program name with args.
6117set dummy $tool_basename; ac_word=$2
6118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6119$as_echo_n "checking for $ac_word... " >&6; }
6120if ${ac_cv_path_DATE+:} false; then :
6121  $as_echo_n "(cached) " >&6
6122else
6123  case $DATE in
6124  [\\/]* | ?:[\\/]*)
6125  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6126  ;;
6127  *)
6128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129for as_dir in $PATH
6130do
6131  IFS=$as_save_IFS
6132  test -z "$as_dir" && as_dir=.
6133    for ac_exec_ext in '' $ac_executable_extensions; do
6134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6135    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6137    break 2
6138  fi
6139done
6140  done
6141IFS=$as_save_IFS
6142
6143  ;;
6144esac
6145fi
6146DATE=$ac_cv_path_DATE
6147if test -n "$DATE"; then
6148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6149$as_echo "$DATE" >&6; }
6150else
6151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6152$as_echo "no" >&6; }
6153fi
6154
6155
6156        if test "x$DATE" = x; then
6157          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6158        fi
6159      else
6160        # Otherwise we believe it is a complete path. Use it as it is.
6161        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6162$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6164$as_echo_n "checking for DATE... " >&6; }
6165        if test ! -x "$tool_specified"; then
6166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6167$as_echo "not found" >&6; }
6168          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6169        fi
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6171$as_echo "$tool_specified" >&6; }
6172      fi
6173    fi
6174  fi
6175
6176
6177
6178  if test "x$DATE" = x; then
6179    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6180  fi
6181
6182
6183
6184
6185
6186  # Publish this variable in the help.
6187
6188
6189  if test "x$DIFF" = x; then
6190    # The variable is not set by user, try to locate tool using the code snippet
6191    for ac_prog in gdiff diff
6192do
6193  # Extract the first word of "$ac_prog", so it can be a program name with args.
6194set dummy $ac_prog; ac_word=$2
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6196$as_echo_n "checking for $ac_word... " >&6; }
6197if ${ac_cv_path_DIFF+:} false; then :
6198  $as_echo_n "(cached) " >&6
6199else
6200  case $DIFF in
6201  [\\/]* | ?:[\\/]*)
6202  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6203  ;;
6204  *)
6205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208  IFS=$as_save_IFS
6209  test -z "$as_dir" && as_dir=.
6210    for ac_exec_ext in '' $ac_executable_extensions; do
6211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6212    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214    break 2
6215  fi
6216done
6217  done
6218IFS=$as_save_IFS
6219
6220  ;;
6221esac
6222fi
6223DIFF=$ac_cv_path_DIFF
6224if test -n "$DIFF"; then
6225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6226$as_echo "$DIFF" >&6; }
6227else
6228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229$as_echo "no" >&6; }
6230fi
6231
6232
6233  test -n "$DIFF" && break
6234done
6235
6236  else
6237    # The variable is set, but is it from the command line or the environment?
6238
6239    # Try to remove the string !DIFF! from our list.
6240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6242      # If it failed, the variable was not from the command line. Ignore it,
6243      # but warn the user (except for BASH, which is always set by the calling BASH).
6244      if test "xDIFF" != xBASH; then
6245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6246$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6247      fi
6248      # Try to locate tool using the code snippet
6249      for ac_prog in gdiff diff
6250do
6251  # Extract the first word of "$ac_prog", so it can be a program name with args.
6252set dummy $ac_prog; ac_word=$2
6253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6254$as_echo_n "checking for $ac_word... " >&6; }
6255if ${ac_cv_path_DIFF+:} false; then :
6256  $as_echo_n "(cached) " >&6
6257else
6258  case $DIFF in
6259  [\\/]* | ?:[\\/]*)
6260  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6261  ;;
6262  *)
6263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH
6265do
6266  IFS=$as_save_IFS
6267  test -z "$as_dir" && as_dir=.
6268    for ac_exec_ext in '' $ac_executable_extensions; do
6269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6270    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6272    break 2
6273  fi
6274done
6275  done
6276IFS=$as_save_IFS
6277
6278  ;;
6279esac
6280fi
6281DIFF=$ac_cv_path_DIFF
6282if test -n "$DIFF"; then
6283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6284$as_echo "$DIFF" >&6; }
6285else
6286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287$as_echo "no" >&6; }
6288fi
6289
6290
6291  test -n "$DIFF" && break
6292done
6293
6294    else
6295      # If it succeeded, then it was overridden by the user. We will use it
6296      # for the tool.
6297
6298      # First remove it from the list of overridden variables, so we can test
6299      # for unknown variables in the end.
6300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6301
6302      # Check if the provided tool contains a complete path.
6303      tool_specified="$DIFF"
6304      tool_basename="${tool_specified##*/}"
6305      if test "x$tool_basename" = "x$tool_specified"; then
6306        # A command without a complete path is provided, search $PATH.
6307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6308$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6309        # Extract the first word of "$tool_basename", so it can be a program name with args.
6310set dummy $tool_basename; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_path_DIFF+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316  case $DIFF in
6317  [\\/]* | ?:[\\/]*)
6318  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6319  ;;
6320  *)
6321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322for as_dir in $PATH
6323do
6324  IFS=$as_save_IFS
6325  test -z "$as_dir" && as_dir=.
6326    for ac_exec_ext in '' $ac_executable_extensions; do
6327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330    break 2
6331  fi
6332done
6333  done
6334IFS=$as_save_IFS
6335
6336  ;;
6337esac
6338fi
6339DIFF=$ac_cv_path_DIFF
6340if test -n "$DIFF"; then
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6342$as_echo "$DIFF" >&6; }
6343else
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
6346fi
6347
6348
6349        if test "x$DIFF" = x; then
6350          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6351        fi
6352      else
6353        # Otherwise we believe it is a complete path. Use it as it is.
6354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6355$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6357$as_echo_n "checking for DIFF... " >&6; }
6358        if test ! -x "$tool_specified"; then
6359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6360$as_echo "not found" >&6; }
6361          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6362        fi
6363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6364$as_echo "$tool_specified" >&6; }
6365      fi
6366    fi
6367  fi
6368
6369
6370
6371  if test "x$DIFF" = x; then
6372    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6373  fi
6374
6375
6376
6377
6378
6379  # Publish this variable in the help.
6380
6381
6382  if test "x$DIRNAME" = x; then
6383    # The variable is not set by user, try to locate tool using the code snippet
6384    for ac_prog in dirname
6385do
6386  # Extract the first word of "$ac_prog", so it can be a program name with args.
6387set dummy $ac_prog; ac_word=$2
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if ${ac_cv_path_DIRNAME+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  case $DIRNAME in
6394  [\\/]* | ?:[\\/]*)
6395  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6396  ;;
6397  *)
6398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401  IFS=$as_save_IFS
6402  test -z "$as_dir" && as_dir=.
6403    for ac_exec_ext in '' $ac_executable_extensions; do
6404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407    break 2
6408  fi
6409done
6410  done
6411IFS=$as_save_IFS
6412
6413  ;;
6414esac
6415fi
6416DIRNAME=$ac_cv_path_DIRNAME
6417if test -n "$DIRNAME"; then
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6419$as_echo "$DIRNAME" >&6; }
6420else
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425
6426  test -n "$DIRNAME" && break
6427done
6428
6429  else
6430    # The variable is set, but is it from the command line or the environment?
6431
6432    # Try to remove the string !DIRNAME! from our list.
6433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6435      # If it failed, the variable was not from the command line. Ignore it,
6436      # but warn the user (except for BASH, which is always set by the calling BASH).
6437      if test "xDIRNAME" != xBASH; then
6438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6439$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6440      fi
6441      # Try to locate tool using the code snippet
6442      for ac_prog in dirname
6443do
6444  # Extract the first word of "$ac_prog", so it can be a program name with args.
6445set dummy $ac_prog; ac_word=$2
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6447$as_echo_n "checking for $ac_word... " >&6; }
6448if ${ac_cv_path_DIRNAME+:} false; then :
6449  $as_echo_n "(cached) " >&6
6450else
6451  case $DIRNAME in
6452  [\\/]* | ?:[\\/]*)
6453  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6454  ;;
6455  *)
6456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457for as_dir in $PATH
6458do
6459  IFS=$as_save_IFS
6460  test -z "$as_dir" && as_dir=.
6461    for ac_exec_ext in '' $ac_executable_extensions; do
6462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6463    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6465    break 2
6466  fi
6467done
6468  done
6469IFS=$as_save_IFS
6470
6471  ;;
6472esac
6473fi
6474DIRNAME=$ac_cv_path_DIRNAME
6475if test -n "$DIRNAME"; then
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6477$as_echo "$DIRNAME" >&6; }
6478else
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
6481fi
6482
6483
6484  test -n "$DIRNAME" && break
6485done
6486
6487    else
6488      # If it succeeded, then it was overridden by the user. We will use it
6489      # for the tool.
6490
6491      # First remove it from the list of overridden variables, so we can test
6492      # for unknown variables in the end.
6493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6494
6495      # Check if the provided tool contains a complete path.
6496      tool_specified="$DIRNAME"
6497      tool_basename="${tool_specified##*/}"
6498      if test "x$tool_basename" = "x$tool_specified"; then
6499        # A command without a complete path is provided, search $PATH.
6500        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6501$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6502        # Extract the first word of "$tool_basename", so it can be a program name with args.
6503set dummy $tool_basename; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if ${ac_cv_path_DIRNAME+:} false; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  case $DIRNAME in
6510  [\\/]* | ?:[\\/]*)
6511  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6512  ;;
6513  *)
6514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH
6516do
6517  IFS=$as_save_IFS
6518  test -z "$as_dir" && as_dir=.
6519    for ac_exec_ext in '' $ac_executable_extensions; do
6520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6521    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523    break 2
6524  fi
6525done
6526  done
6527IFS=$as_save_IFS
6528
6529  ;;
6530esac
6531fi
6532DIRNAME=$ac_cv_path_DIRNAME
6533if test -n "$DIRNAME"; then
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6535$as_echo "$DIRNAME" >&6; }
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
6542        if test "x$DIRNAME" = x; then
6543          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6544        fi
6545      else
6546        # Otherwise we believe it is a complete path. Use it as it is.
6547        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6548$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6550$as_echo_n "checking for DIRNAME... " >&6; }
6551        if test ! -x "$tool_specified"; then
6552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6553$as_echo "not found" >&6; }
6554          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6555        fi
6556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6557$as_echo "$tool_specified" >&6; }
6558      fi
6559    fi
6560  fi
6561
6562
6563
6564  if test "x$DIRNAME" = x; then
6565    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6566  fi
6567
6568
6569
6570
6571
6572  # Publish this variable in the help.
6573
6574
6575  if test "x$ECHO" = x; then
6576    # The variable is not set by user, try to locate tool using the code snippet
6577    for ac_prog in echo
6578do
6579  # Extract the first word of "$ac_prog", so it can be a program name with args.
6580set dummy $ac_prog; ac_word=$2
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6582$as_echo_n "checking for $ac_word... " >&6; }
6583if ${ac_cv_path_ECHO+:} false; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  case $ECHO in
6587  [\\/]* | ?:[\\/]*)
6588  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6589  ;;
6590  *)
6591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6592for as_dir in $PATH
6593do
6594  IFS=$as_save_IFS
6595  test -z "$as_dir" && as_dir=.
6596    for ac_exec_ext in '' $ac_executable_extensions; do
6597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6598    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6600    break 2
6601  fi
6602done
6603  done
6604IFS=$as_save_IFS
6605
6606  ;;
6607esac
6608fi
6609ECHO=$ac_cv_path_ECHO
6610if test -n "$ECHO"; then
6611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6612$as_echo "$ECHO" >&6; }
6613else
6614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6615$as_echo "no" >&6; }
6616fi
6617
6618
6619  test -n "$ECHO" && break
6620done
6621
6622  else
6623    # The variable is set, but is it from the command line or the environment?
6624
6625    # Try to remove the string !ECHO! from our list.
6626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6628      # If it failed, the variable was not from the command line. Ignore it,
6629      # but warn the user (except for BASH, which is always set by the calling BASH).
6630      if test "xECHO" != xBASH; then
6631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6632$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6633      fi
6634      # Try to locate tool using the code snippet
6635      for ac_prog in echo
6636do
6637  # Extract the first word of "$ac_prog", so it can be a program name with args.
6638set dummy $ac_prog; ac_word=$2
6639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6640$as_echo_n "checking for $ac_word... " >&6; }
6641if ${ac_cv_path_ECHO+:} false; then :
6642  $as_echo_n "(cached) " >&6
6643else
6644  case $ECHO in
6645  [\\/]* | ?:[\\/]*)
6646  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6647  ;;
6648  *)
6649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6650for as_dir in $PATH
6651do
6652  IFS=$as_save_IFS
6653  test -z "$as_dir" && as_dir=.
6654    for ac_exec_ext in '' $ac_executable_extensions; do
6655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6656    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6658    break 2
6659  fi
6660done
6661  done
6662IFS=$as_save_IFS
6663
6664  ;;
6665esac
6666fi
6667ECHO=$ac_cv_path_ECHO
6668if test -n "$ECHO"; then
6669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6670$as_echo "$ECHO" >&6; }
6671else
6672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6673$as_echo "no" >&6; }
6674fi
6675
6676
6677  test -n "$ECHO" && break
6678done
6679
6680    else
6681      # If it succeeded, then it was overridden by the user. We will use it
6682      # for the tool.
6683
6684      # First remove it from the list of overridden variables, so we can test
6685      # for unknown variables in the end.
6686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6687
6688      # Check if the provided tool contains a complete path.
6689      tool_specified="$ECHO"
6690      tool_basename="${tool_specified##*/}"
6691      if test "x$tool_basename" = "x$tool_specified"; then
6692        # A command without a complete path is provided, search $PATH.
6693        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6694$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6695        # Extract the first word of "$tool_basename", so it can be a program name with args.
6696set dummy $tool_basename; ac_word=$2
6697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6698$as_echo_n "checking for $ac_word... " >&6; }
6699if ${ac_cv_path_ECHO+:} false; then :
6700  $as_echo_n "(cached) " >&6
6701else
6702  case $ECHO in
6703  [\\/]* | ?:[\\/]*)
6704  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6705  ;;
6706  *)
6707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6708for as_dir in $PATH
6709do
6710  IFS=$as_save_IFS
6711  test -z "$as_dir" && as_dir=.
6712    for ac_exec_ext in '' $ac_executable_extensions; do
6713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6714    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6716    break 2
6717  fi
6718done
6719  done
6720IFS=$as_save_IFS
6721
6722  ;;
6723esac
6724fi
6725ECHO=$ac_cv_path_ECHO
6726if test -n "$ECHO"; then
6727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6728$as_echo "$ECHO" >&6; }
6729else
6730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6731$as_echo "no" >&6; }
6732fi
6733
6734
6735        if test "x$ECHO" = x; then
6736          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6737        fi
6738      else
6739        # Otherwise we believe it is a complete path. Use it as it is.
6740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6741$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6743$as_echo_n "checking for ECHO... " >&6; }
6744        if test ! -x "$tool_specified"; then
6745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6746$as_echo "not found" >&6; }
6747          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6748        fi
6749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6750$as_echo "$tool_specified" >&6; }
6751      fi
6752    fi
6753  fi
6754
6755
6756
6757  if test "x$ECHO" = x; then
6758    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6759  fi
6760
6761
6762
6763
6764
6765  # Publish this variable in the help.
6766
6767
6768  if test "x$EXPR" = x; then
6769    # The variable is not set by user, try to locate tool using the code snippet
6770    for ac_prog in expr
6771do
6772  # Extract the first word of "$ac_prog", so it can be a program name with args.
6773set dummy $ac_prog; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_EXPR+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $EXPR in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802EXPR=$ac_cv_path_EXPR
6803if test -n "$EXPR"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6805$as_echo "$EXPR" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812  test -n "$EXPR" && break
6813done
6814
6815  else
6816    # The variable is set, but is it from the command line or the environment?
6817
6818    # Try to remove the string !EXPR! from our list.
6819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6821      # If it failed, the variable was not from the command line. Ignore it,
6822      # but warn the user (except for BASH, which is always set by the calling BASH).
6823      if test "xEXPR" != xBASH; then
6824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6825$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6826      fi
6827      # Try to locate tool using the code snippet
6828      for ac_prog in expr
6829do
6830  # Extract the first word of "$ac_prog", so it can be a program name with args.
6831set dummy $ac_prog; ac_word=$2
6832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6833$as_echo_n "checking for $ac_word... " >&6; }
6834if ${ac_cv_path_EXPR+:} false; then :
6835  $as_echo_n "(cached) " >&6
6836else
6837  case $EXPR in
6838  [\\/]* | ?:[\\/]*)
6839  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6840  ;;
6841  *)
6842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6843for as_dir in $PATH
6844do
6845  IFS=$as_save_IFS
6846  test -z "$as_dir" && as_dir=.
6847    for ac_exec_ext in '' $ac_executable_extensions; do
6848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6849    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6851    break 2
6852  fi
6853done
6854  done
6855IFS=$as_save_IFS
6856
6857  ;;
6858esac
6859fi
6860EXPR=$ac_cv_path_EXPR
6861if test -n "$EXPR"; then
6862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6863$as_echo "$EXPR" >&6; }
6864else
6865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6866$as_echo "no" >&6; }
6867fi
6868
6869
6870  test -n "$EXPR" && break
6871done
6872
6873    else
6874      # If it succeeded, then it was overridden by the user. We will use it
6875      # for the tool.
6876
6877      # First remove it from the list of overridden variables, so we can test
6878      # for unknown variables in the end.
6879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6880
6881      # Check if the provided tool contains a complete path.
6882      tool_specified="$EXPR"
6883      tool_basename="${tool_specified##*/}"
6884      if test "x$tool_basename" = "x$tool_specified"; then
6885        # A command without a complete path is provided, search $PATH.
6886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6887$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6888        # Extract the first word of "$tool_basename", so it can be a program name with args.
6889set dummy $tool_basename; ac_word=$2
6890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6891$as_echo_n "checking for $ac_word... " >&6; }
6892if ${ac_cv_path_EXPR+:} false; then :
6893  $as_echo_n "(cached) " >&6
6894else
6895  case $EXPR in
6896  [\\/]* | ?:[\\/]*)
6897  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6898  ;;
6899  *)
6900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6901for as_dir in $PATH
6902do
6903  IFS=$as_save_IFS
6904  test -z "$as_dir" && as_dir=.
6905    for ac_exec_ext in '' $ac_executable_extensions; do
6906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6907    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6909    break 2
6910  fi
6911done
6912  done
6913IFS=$as_save_IFS
6914
6915  ;;
6916esac
6917fi
6918EXPR=$ac_cv_path_EXPR
6919if test -n "$EXPR"; then
6920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6921$as_echo "$EXPR" >&6; }
6922else
6923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6924$as_echo "no" >&6; }
6925fi
6926
6927
6928        if test "x$EXPR" = x; then
6929          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6930        fi
6931      else
6932        # Otherwise we believe it is a complete path. Use it as it is.
6933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6934$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6936$as_echo_n "checking for EXPR... " >&6; }
6937        if test ! -x "$tool_specified"; then
6938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6939$as_echo "not found" >&6; }
6940          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6941        fi
6942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6943$as_echo "$tool_specified" >&6; }
6944      fi
6945    fi
6946  fi
6947
6948
6949
6950  if test "x$EXPR" = x; then
6951    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6952  fi
6953
6954
6955
6956
6957
6958  # Publish this variable in the help.
6959
6960
6961  if test "x$FILE" = x; then
6962    # The variable is not set by user, try to locate tool using the code snippet
6963    for ac_prog in file
6964do
6965  # Extract the first word of "$ac_prog", so it can be a program name with args.
6966set dummy $ac_prog; ac_word=$2
6967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6968$as_echo_n "checking for $ac_word... " >&6; }
6969if ${ac_cv_path_FILE+:} false; then :
6970  $as_echo_n "(cached) " >&6
6971else
6972  case $FILE in
6973  [\\/]* | ?:[\\/]*)
6974  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6975  ;;
6976  *)
6977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6978for as_dir in $PATH
6979do
6980  IFS=$as_save_IFS
6981  test -z "$as_dir" && as_dir=.
6982    for ac_exec_ext in '' $ac_executable_extensions; do
6983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6984    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6986    break 2
6987  fi
6988done
6989  done
6990IFS=$as_save_IFS
6991
6992  ;;
6993esac
6994fi
6995FILE=$ac_cv_path_FILE
6996if test -n "$FILE"; then
6997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6998$as_echo "$FILE" >&6; }
6999else
7000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7001$as_echo "no" >&6; }
7002fi
7003
7004
7005  test -n "$FILE" && break
7006done
7007
7008  else
7009    # The variable is set, but is it from the command line or the environment?
7010
7011    # Try to remove the string !FILE! from our list.
7012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7014      # If it failed, the variable was not from the command line. Ignore it,
7015      # but warn the user (except for BASH, which is always set by the calling BASH).
7016      if test "xFILE" != xBASH; then
7017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7018$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7019      fi
7020      # Try to locate tool using the code snippet
7021      for ac_prog in file
7022do
7023  # Extract the first word of "$ac_prog", so it can be a program name with args.
7024set dummy $ac_prog; ac_word=$2
7025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026$as_echo_n "checking for $ac_word... " >&6; }
7027if ${ac_cv_path_FILE+:} false; then :
7028  $as_echo_n "(cached) " >&6
7029else
7030  case $FILE in
7031  [\\/]* | ?:[\\/]*)
7032  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7033  ;;
7034  *)
7035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7036for as_dir in $PATH
7037do
7038  IFS=$as_save_IFS
7039  test -z "$as_dir" && as_dir=.
7040    for ac_exec_ext in '' $ac_executable_extensions; do
7041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7042    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7044    break 2
7045  fi
7046done
7047  done
7048IFS=$as_save_IFS
7049
7050  ;;
7051esac
7052fi
7053FILE=$ac_cv_path_FILE
7054if test -n "$FILE"; then
7055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7056$as_echo "$FILE" >&6; }
7057else
7058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7059$as_echo "no" >&6; }
7060fi
7061
7062
7063  test -n "$FILE" && break
7064done
7065
7066    else
7067      # If it succeeded, then it was overridden by the user. We will use it
7068      # for the tool.
7069
7070      # First remove it from the list of overridden variables, so we can test
7071      # for unknown variables in the end.
7072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7073
7074      # Check if the provided tool contains a complete path.
7075      tool_specified="$FILE"
7076      tool_basename="${tool_specified##*/}"
7077      if test "x$tool_basename" = "x$tool_specified"; then
7078        # A command without a complete path is provided, search $PATH.
7079        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7080$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7081        # Extract the first word of "$tool_basename", so it can be a program name with args.
7082set dummy $tool_basename; ac_word=$2
7083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7084$as_echo_n "checking for $ac_word... " >&6; }
7085if ${ac_cv_path_FILE+:} false; then :
7086  $as_echo_n "(cached) " >&6
7087else
7088  case $FILE in
7089  [\\/]* | ?:[\\/]*)
7090  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7091  ;;
7092  *)
7093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7094for as_dir in $PATH
7095do
7096  IFS=$as_save_IFS
7097  test -z "$as_dir" && as_dir=.
7098    for ac_exec_ext in '' $ac_executable_extensions; do
7099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7100    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7102    break 2
7103  fi
7104done
7105  done
7106IFS=$as_save_IFS
7107
7108  ;;
7109esac
7110fi
7111FILE=$ac_cv_path_FILE
7112if test -n "$FILE"; then
7113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7114$as_echo "$FILE" >&6; }
7115else
7116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7117$as_echo "no" >&6; }
7118fi
7119
7120
7121        if test "x$FILE" = x; then
7122          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7123        fi
7124      else
7125        # Otherwise we believe it is a complete path. Use it as it is.
7126        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7127$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7128        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7129$as_echo_n "checking for FILE... " >&6; }
7130        if test ! -x "$tool_specified"; then
7131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7132$as_echo "not found" >&6; }
7133          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7134        fi
7135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7136$as_echo "$tool_specified" >&6; }
7137      fi
7138    fi
7139  fi
7140
7141
7142
7143  if test "x$FILE" = x; then
7144    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7145  fi
7146
7147
7148
7149
7150
7151  # Publish this variable in the help.
7152
7153
7154  if test "x$FIND" = x; then
7155    # The variable is not set by user, try to locate tool using the code snippet
7156    for ac_prog in find
7157do
7158  # Extract the first word of "$ac_prog", so it can be a program name with args.
7159set dummy $ac_prog; ac_word=$2
7160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7161$as_echo_n "checking for $ac_word... " >&6; }
7162if ${ac_cv_path_FIND+:} false; then :
7163  $as_echo_n "(cached) " >&6
7164else
7165  case $FIND in
7166  [\\/]* | ?:[\\/]*)
7167  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7168  ;;
7169  *)
7170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7171for as_dir in $PATH
7172do
7173  IFS=$as_save_IFS
7174  test -z "$as_dir" && as_dir=.
7175    for ac_exec_ext in '' $ac_executable_extensions; do
7176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7177    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7179    break 2
7180  fi
7181done
7182  done
7183IFS=$as_save_IFS
7184
7185  ;;
7186esac
7187fi
7188FIND=$ac_cv_path_FIND
7189if test -n "$FIND"; then
7190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7191$as_echo "$FIND" >&6; }
7192else
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7194$as_echo "no" >&6; }
7195fi
7196
7197
7198  test -n "$FIND" && break
7199done
7200
7201  else
7202    # The variable is set, but is it from the command line or the environment?
7203
7204    # Try to remove the string !FIND! from our list.
7205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7207      # If it failed, the variable was not from the command line. Ignore it,
7208      # but warn the user (except for BASH, which is always set by the calling BASH).
7209      if test "xFIND" != xBASH; then
7210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7211$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7212      fi
7213      # Try to locate tool using the code snippet
7214      for ac_prog in find
7215do
7216  # Extract the first word of "$ac_prog", so it can be a program name with args.
7217set dummy $ac_prog; ac_word=$2
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7219$as_echo_n "checking for $ac_word... " >&6; }
7220if ${ac_cv_path_FIND+:} false; then :
7221  $as_echo_n "(cached) " >&6
7222else
7223  case $FIND in
7224  [\\/]* | ?:[\\/]*)
7225  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7226  ;;
7227  *)
7228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7229for as_dir in $PATH
7230do
7231  IFS=$as_save_IFS
7232  test -z "$as_dir" && as_dir=.
7233    for ac_exec_ext in '' $ac_executable_extensions; do
7234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7235    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7237    break 2
7238  fi
7239done
7240  done
7241IFS=$as_save_IFS
7242
7243  ;;
7244esac
7245fi
7246FIND=$ac_cv_path_FIND
7247if test -n "$FIND"; then
7248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7249$as_echo "$FIND" >&6; }
7250else
7251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7252$as_echo "no" >&6; }
7253fi
7254
7255
7256  test -n "$FIND" && break
7257done
7258
7259    else
7260      # If it succeeded, then it was overridden by the user. We will use it
7261      # for the tool.
7262
7263      # First remove it from the list of overridden variables, so we can test
7264      # for unknown variables in the end.
7265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7266
7267      # Check if the provided tool contains a complete path.
7268      tool_specified="$FIND"
7269      tool_basename="${tool_specified##*/}"
7270      if test "x$tool_basename" = "x$tool_specified"; then
7271        # A command without a complete path is provided, search $PATH.
7272        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7273$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7274        # Extract the first word of "$tool_basename", so it can be a program name with args.
7275set dummy $tool_basename; ac_word=$2
7276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7277$as_echo_n "checking for $ac_word... " >&6; }
7278if ${ac_cv_path_FIND+:} false; then :
7279  $as_echo_n "(cached) " >&6
7280else
7281  case $FIND in
7282  [\\/]* | ?:[\\/]*)
7283  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7284  ;;
7285  *)
7286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7287for as_dir in $PATH
7288do
7289  IFS=$as_save_IFS
7290  test -z "$as_dir" && as_dir=.
7291    for ac_exec_ext in '' $ac_executable_extensions; do
7292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7293    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7295    break 2
7296  fi
7297done
7298  done
7299IFS=$as_save_IFS
7300
7301  ;;
7302esac
7303fi
7304FIND=$ac_cv_path_FIND
7305if test -n "$FIND"; then
7306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7307$as_echo "$FIND" >&6; }
7308else
7309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7310$as_echo "no" >&6; }
7311fi
7312
7313
7314        if test "x$FIND" = x; then
7315          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7316        fi
7317      else
7318        # Otherwise we believe it is a complete path. Use it as it is.
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7320$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7322$as_echo_n "checking for FIND... " >&6; }
7323        if test ! -x "$tool_specified"; then
7324          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7325$as_echo "not found" >&6; }
7326          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7327        fi
7328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7329$as_echo "$tool_specified" >&6; }
7330      fi
7331    fi
7332  fi
7333
7334
7335
7336  if test "x$FIND" = x; then
7337    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7338  fi
7339
7340
7341
7342
7343
7344  # Publish this variable in the help.
7345
7346
7347  if test "x$HEAD" = x; then
7348    # The variable is not set by user, try to locate tool using the code snippet
7349    for ac_prog in head
7350do
7351  # Extract the first word of "$ac_prog", so it can be a program name with args.
7352set dummy $ac_prog; ac_word=$2
7353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7354$as_echo_n "checking for $ac_word... " >&6; }
7355if ${ac_cv_path_HEAD+:} false; then :
7356  $as_echo_n "(cached) " >&6
7357else
7358  case $HEAD in
7359  [\\/]* | ?:[\\/]*)
7360  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7361  ;;
7362  *)
7363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7364for as_dir in $PATH
7365do
7366  IFS=$as_save_IFS
7367  test -z "$as_dir" && as_dir=.
7368    for ac_exec_ext in '' $ac_executable_extensions; do
7369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7370    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7372    break 2
7373  fi
7374done
7375  done
7376IFS=$as_save_IFS
7377
7378  ;;
7379esac
7380fi
7381HEAD=$ac_cv_path_HEAD
7382if test -n "$HEAD"; then
7383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7384$as_echo "$HEAD" >&6; }
7385else
7386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7387$as_echo "no" >&6; }
7388fi
7389
7390
7391  test -n "$HEAD" && break
7392done
7393
7394  else
7395    # The variable is set, but is it from the command line or the environment?
7396
7397    # Try to remove the string !HEAD! from our list.
7398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7400      # If it failed, the variable was not from the command line. Ignore it,
7401      # but warn the user (except for BASH, which is always set by the calling BASH).
7402      if test "xHEAD" != xBASH; then
7403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7404$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7405      fi
7406      # Try to locate tool using the code snippet
7407      for ac_prog in head
7408do
7409  # Extract the first word of "$ac_prog", so it can be a program name with args.
7410set dummy $ac_prog; ac_word=$2
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
7413if ${ac_cv_path_HEAD+:} false; then :
7414  $as_echo_n "(cached) " >&6
7415else
7416  case $HEAD in
7417  [\\/]* | ?:[\\/]*)
7418  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7419  ;;
7420  *)
7421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422for as_dir in $PATH
7423do
7424  IFS=$as_save_IFS
7425  test -z "$as_dir" && as_dir=.
7426    for ac_exec_ext in '' $ac_executable_extensions; do
7427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430    break 2
7431  fi
7432done
7433  done
7434IFS=$as_save_IFS
7435
7436  ;;
7437esac
7438fi
7439HEAD=$ac_cv_path_HEAD
7440if test -n "$HEAD"; then
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7442$as_echo "$HEAD" >&6; }
7443else
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
7446fi
7447
7448
7449  test -n "$HEAD" && break
7450done
7451
7452    else
7453      # If it succeeded, then it was overridden by the user. We will use it
7454      # for the tool.
7455
7456      # First remove it from the list of overridden variables, so we can test
7457      # for unknown variables in the end.
7458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7459
7460      # Check if the provided tool contains a complete path.
7461      tool_specified="$HEAD"
7462      tool_basename="${tool_specified##*/}"
7463      if test "x$tool_basename" = "x$tool_specified"; then
7464        # A command without a complete path is provided, search $PATH.
7465        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7466$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7467        # Extract the first word of "$tool_basename", so it can be a program name with args.
7468set dummy $tool_basename; ac_word=$2
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470$as_echo_n "checking for $ac_word... " >&6; }
7471if ${ac_cv_path_HEAD+:} false; then :
7472  $as_echo_n "(cached) " >&6
7473else
7474  case $HEAD in
7475  [\\/]* | ?:[\\/]*)
7476  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7477  ;;
7478  *)
7479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482  IFS=$as_save_IFS
7483  test -z "$as_dir" && as_dir=.
7484    for ac_exec_ext in '' $ac_executable_extensions; do
7485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7486    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488    break 2
7489  fi
7490done
7491  done
7492IFS=$as_save_IFS
7493
7494  ;;
7495esac
7496fi
7497HEAD=$ac_cv_path_HEAD
7498if test -n "$HEAD"; then
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7500$as_echo "$HEAD" >&6; }
7501else
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506
7507        if test "x$HEAD" = x; then
7508          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7509        fi
7510      else
7511        # Otherwise we believe it is a complete path. Use it as it is.
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7513$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7515$as_echo_n "checking for HEAD... " >&6; }
7516        if test ! -x "$tool_specified"; then
7517          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7518$as_echo "not found" >&6; }
7519          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7520        fi
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7522$as_echo "$tool_specified" >&6; }
7523      fi
7524    fi
7525  fi
7526
7527
7528
7529  if test "x$HEAD" = x; then
7530    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7531  fi
7532
7533
7534
7535
7536
7537  # Publish this variable in the help.
7538
7539
7540  if test "x$LN" = x; then
7541    # The variable is not set by user, try to locate tool using the code snippet
7542    for ac_prog in ln
7543do
7544  # Extract the first word of "$ac_prog", so it can be a program name with args.
7545set dummy $ac_prog; ac_word=$2
7546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7547$as_echo_n "checking for $ac_word... " >&6; }
7548if ${ac_cv_path_LN+:} false; then :
7549  $as_echo_n "(cached) " >&6
7550else
7551  case $LN in
7552  [\\/]* | ?:[\\/]*)
7553  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7554  ;;
7555  *)
7556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7557for as_dir in $PATH
7558do
7559  IFS=$as_save_IFS
7560  test -z "$as_dir" && as_dir=.
7561    for ac_exec_ext in '' $ac_executable_extensions; do
7562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7563    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7565    break 2
7566  fi
7567done
7568  done
7569IFS=$as_save_IFS
7570
7571  ;;
7572esac
7573fi
7574LN=$ac_cv_path_LN
7575if test -n "$LN"; then
7576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7577$as_echo "$LN" >&6; }
7578else
7579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7580$as_echo "no" >&6; }
7581fi
7582
7583
7584  test -n "$LN" && break
7585done
7586
7587  else
7588    # The variable is set, but is it from the command line or the environment?
7589
7590    # Try to remove the string !LN! from our list.
7591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7593      # If it failed, the variable was not from the command line. Ignore it,
7594      # but warn the user (except for BASH, which is always set by the calling BASH).
7595      if test "xLN" != xBASH; then
7596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7597$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7598      fi
7599      # Try to locate tool using the code snippet
7600      for ac_prog in ln
7601do
7602  # Extract the first word of "$ac_prog", so it can be a program name with args.
7603set dummy $ac_prog; ac_word=$2
7604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7605$as_echo_n "checking for $ac_word... " >&6; }
7606if ${ac_cv_path_LN+:} false; then :
7607  $as_echo_n "(cached) " >&6
7608else
7609  case $LN in
7610  [\\/]* | ?:[\\/]*)
7611  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7612  ;;
7613  *)
7614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7615for as_dir in $PATH
7616do
7617  IFS=$as_save_IFS
7618  test -z "$as_dir" && as_dir=.
7619    for ac_exec_ext in '' $ac_executable_extensions; do
7620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7621    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7623    break 2
7624  fi
7625done
7626  done
7627IFS=$as_save_IFS
7628
7629  ;;
7630esac
7631fi
7632LN=$ac_cv_path_LN
7633if test -n "$LN"; then
7634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7635$as_echo "$LN" >&6; }
7636else
7637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7638$as_echo "no" >&6; }
7639fi
7640
7641
7642  test -n "$LN" && break
7643done
7644
7645    else
7646      # If it succeeded, then it was overridden by the user. We will use it
7647      # for the tool.
7648
7649      # First remove it from the list of overridden variables, so we can test
7650      # for unknown variables in the end.
7651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7652
7653      # Check if the provided tool contains a complete path.
7654      tool_specified="$LN"
7655      tool_basename="${tool_specified##*/}"
7656      if test "x$tool_basename" = "x$tool_specified"; then
7657        # A command without a complete path is provided, search $PATH.
7658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7659$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7660        # Extract the first word of "$tool_basename", so it can be a program name with args.
7661set dummy $tool_basename; ac_word=$2
7662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7663$as_echo_n "checking for $ac_word... " >&6; }
7664if ${ac_cv_path_LN+:} false; then :
7665  $as_echo_n "(cached) " >&6
7666else
7667  case $LN in
7668  [\\/]* | ?:[\\/]*)
7669  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7670  ;;
7671  *)
7672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7673for as_dir in $PATH
7674do
7675  IFS=$as_save_IFS
7676  test -z "$as_dir" && as_dir=.
7677    for ac_exec_ext in '' $ac_executable_extensions; do
7678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7679    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7681    break 2
7682  fi
7683done
7684  done
7685IFS=$as_save_IFS
7686
7687  ;;
7688esac
7689fi
7690LN=$ac_cv_path_LN
7691if test -n "$LN"; then
7692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7693$as_echo "$LN" >&6; }
7694else
7695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7696$as_echo "no" >&6; }
7697fi
7698
7699
7700        if test "x$LN" = x; then
7701          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7702        fi
7703      else
7704        # Otherwise we believe it is a complete path. Use it as it is.
7705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7706$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7708$as_echo_n "checking for LN... " >&6; }
7709        if test ! -x "$tool_specified"; then
7710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7711$as_echo "not found" >&6; }
7712          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7713        fi
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7715$as_echo "$tool_specified" >&6; }
7716      fi
7717    fi
7718  fi
7719
7720
7721
7722  if test "x$LN" = x; then
7723    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7724  fi
7725
7726
7727
7728
7729
7730  # Publish this variable in the help.
7731
7732
7733  if test "x$LS" = x; then
7734    # The variable is not set by user, try to locate tool using the code snippet
7735    for ac_prog in ls
7736do
7737  # Extract the first word of "$ac_prog", so it can be a program name with args.
7738set dummy $ac_prog; ac_word=$2
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740$as_echo_n "checking for $ac_word... " >&6; }
7741if ${ac_cv_path_LS+:} false; then :
7742  $as_echo_n "(cached) " >&6
7743else
7744  case $LS in
7745  [\\/]* | ?:[\\/]*)
7746  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7747  ;;
7748  *)
7749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750for as_dir in $PATH
7751do
7752  IFS=$as_save_IFS
7753  test -z "$as_dir" && as_dir=.
7754    for ac_exec_ext in '' $ac_executable_extensions; do
7755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758    break 2
7759  fi
7760done
7761  done
7762IFS=$as_save_IFS
7763
7764  ;;
7765esac
7766fi
7767LS=$ac_cv_path_LS
7768if test -n "$LS"; then
7769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7770$as_echo "$LS" >&6; }
7771else
7772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773$as_echo "no" >&6; }
7774fi
7775
7776
7777  test -n "$LS" && break
7778done
7779
7780  else
7781    # The variable is set, but is it from the command line or the environment?
7782
7783    # Try to remove the string !LS! from our list.
7784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7786      # If it failed, the variable was not from the command line. Ignore it,
7787      # but warn the user (except for BASH, which is always set by the calling BASH).
7788      if test "xLS" != xBASH; then
7789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7790$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7791      fi
7792      # Try to locate tool using the code snippet
7793      for ac_prog in ls
7794do
7795  # Extract the first word of "$ac_prog", so it can be a program name with args.
7796set dummy $ac_prog; ac_word=$2
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798$as_echo_n "checking for $ac_word... " >&6; }
7799if ${ac_cv_path_LS+:} false; then :
7800  $as_echo_n "(cached) " >&6
7801else
7802  case $LS in
7803  [\\/]* | ?:[\\/]*)
7804  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7805  ;;
7806  *)
7807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808for as_dir in $PATH
7809do
7810  IFS=$as_save_IFS
7811  test -z "$as_dir" && as_dir=.
7812    for ac_exec_ext in '' $ac_executable_extensions; do
7813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816    break 2
7817  fi
7818done
7819  done
7820IFS=$as_save_IFS
7821
7822  ;;
7823esac
7824fi
7825LS=$ac_cv_path_LS
7826if test -n "$LS"; then
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7828$as_echo "$LS" >&6; }
7829else
7830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831$as_echo "no" >&6; }
7832fi
7833
7834
7835  test -n "$LS" && break
7836done
7837
7838    else
7839      # If it succeeded, then it was overridden by the user. We will use it
7840      # for the tool.
7841
7842      # First remove it from the list of overridden variables, so we can test
7843      # for unknown variables in the end.
7844      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7845
7846      # Check if the provided tool contains a complete path.
7847      tool_specified="$LS"
7848      tool_basename="${tool_specified##*/}"
7849      if test "x$tool_basename" = "x$tool_specified"; then
7850        # A command without a complete path is provided, search $PATH.
7851        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7852$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7853        # Extract the first word of "$tool_basename", so it can be a program name with args.
7854set dummy $tool_basename; ac_word=$2
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7856$as_echo_n "checking for $ac_word... " >&6; }
7857if ${ac_cv_path_LS+:} false; then :
7858  $as_echo_n "(cached) " >&6
7859else
7860  case $LS in
7861  [\\/]* | ?:[\\/]*)
7862  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7863  ;;
7864  *)
7865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7866for as_dir in $PATH
7867do
7868  IFS=$as_save_IFS
7869  test -z "$as_dir" && as_dir=.
7870    for ac_exec_ext in '' $ac_executable_extensions; do
7871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7872    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7874    break 2
7875  fi
7876done
7877  done
7878IFS=$as_save_IFS
7879
7880  ;;
7881esac
7882fi
7883LS=$ac_cv_path_LS
7884if test -n "$LS"; then
7885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7886$as_echo "$LS" >&6; }
7887else
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7889$as_echo "no" >&6; }
7890fi
7891
7892
7893        if test "x$LS" = x; then
7894          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7895        fi
7896      else
7897        # Otherwise we believe it is a complete path. Use it as it is.
7898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7899$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7901$as_echo_n "checking for LS... " >&6; }
7902        if test ! -x "$tool_specified"; then
7903          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7904$as_echo "not found" >&6; }
7905          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7906        fi
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7908$as_echo "$tool_specified" >&6; }
7909      fi
7910    fi
7911  fi
7912
7913
7914
7915  if test "x$LS" = x; then
7916    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7917  fi
7918
7919
7920
7921
7922
7923  # Publish this variable in the help.
7924
7925
7926  if test "x$MKDIR" = x; then
7927    # The variable is not set by user, try to locate tool using the code snippet
7928    for ac_prog in mkdir
7929do
7930  # Extract the first word of "$ac_prog", so it can be a program name with args.
7931set dummy $ac_prog; ac_word=$2
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
7934if ${ac_cv_path_MKDIR+:} false; then :
7935  $as_echo_n "(cached) " >&6
7936else
7937  case $MKDIR in
7938  [\\/]* | ?:[\\/]*)
7939  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7940  ;;
7941  *)
7942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7943for as_dir in $PATH
7944do
7945  IFS=$as_save_IFS
7946  test -z "$as_dir" && as_dir=.
7947    for ac_exec_ext in '' $ac_executable_extensions; do
7948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7949    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7951    break 2
7952  fi
7953done
7954  done
7955IFS=$as_save_IFS
7956
7957  ;;
7958esac
7959fi
7960MKDIR=$ac_cv_path_MKDIR
7961if test -n "$MKDIR"; then
7962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7963$as_echo "$MKDIR" >&6; }
7964else
7965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7966$as_echo "no" >&6; }
7967fi
7968
7969
7970  test -n "$MKDIR" && break
7971done
7972
7973  else
7974    # The variable is set, but is it from the command line or the environment?
7975
7976    # Try to remove the string !MKDIR! from our list.
7977    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7978    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7979      # If it failed, the variable was not from the command line. Ignore it,
7980      # but warn the user (except for BASH, which is always set by the calling BASH).
7981      if test "xMKDIR" != xBASH; then
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7983$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7984      fi
7985      # Try to locate tool using the code snippet
7986      for ac_prog in mkdir
7987do
7988  # Extract the first word of "$ac_prog", so it can be a program name with args.
7989set dummy $ac_prog; ac_word=$2
7990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7991$as_echo_n "checking for $ac_word... " >&6; }
7992if ${ac_cv_path_MKDIR+:} false; then :
7993  $as_echo_n "(cached) " >&6
7994else
7995  case $MKDIR in
7996  [\\/]* | ?:[\\/]*)
7997  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7998  ;;
7999  *)
8000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8001for as_dir in $PATH
8002do
8003  IFS=$as_save_IFS
8004  test -z "$as_dir" && as_dir=.
8005    for ac_exec_ext in '' $ac_executable_extensions; do
8006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8007    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8009    break 2
8010  fi
8011done
8012  done
8013IFS=$as_save_IFS
8014
8015  ;;
8016esac
8017fi
8018MKDIR=$ac_cv_path_MKDIR
8019if test -n "$MKDIR"; then
8020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8021$as_echo "$MKDIR" >&6; }
8022else
8023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8024$as_echo "no" >&6; }
8025fi
8026
8027
8028  test -n "$MKDIR" && break
8029done
8030
8031    else
8032      # If it succeeded, then it was overridden by the user. We will use it
8033      # for the tool.
8034
8035      # First remove it from the list of overridden variables, so we can test
8036      # for unknown variables in the end.
8037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8038
8039      # Check if the provided tool contains a complete path.
8040      tool_specified="$MKDIR"
8041      tool_basename="${tool_specified##*/}"
8042      if test "x$tool_basename" = "x$tool_specified"; then
8043        # A command without a complete path is provided, search $PATH.
8044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8045$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8046        # Extract the first word of "$tool_basename", so it can be a program name with args.
8047set dummy $tool_basename; ac_word=$2
8048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8049$as_echo_n "checking for $ac_word... " >&6; }
8050if ${ac_cv_path_MKDIR+:} false; then :
8051  $as_echo_n "(cached) " >&6
8052else
8053  case $MKDIR in
8054  [\\/]* | ?:[\\/]*)
8055  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8056  ;;
8057  *)
8058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8059for as_dir in $PATH
8060do
8061  IFS=$as_save_IFS
8062  test -z "$as_dir" && as_dir=.
8063    for ac_exec_ext in '' $ac_executable_extensions; do
8064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8065    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8067    break 2
8068  fi
8069done
8070  done
8071IFS=$as_save_IFS
8072
8073  ;;
8074esac
8075fi
8076MKDIR=$ac_cv_path_MKDIR
8077if test -n "$MKDIR"; then
8078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8079$as_echo "$MKDIR" >&6; }
8080else
8081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8082$as_echo "no" >&6; }
8083fi
8084
8085
8086        if test "x$MKDIR" = x; then
8087          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8088        fi
8089      else
8090        # Otherwise we believe it is a complete path. Use it as it is.
8091        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8092$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8094$as_echo_n "checking for MKDIR... " >&6; }
8095        if test ! -x "$tool_specified"; then
8096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8097$as_echo "not found" >&6; }
8098          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8099        fi
8100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8101$as_echo "$tool_specified" >&6; }
8102      fi
8103    fi
8104  fi
8105
8106
8107
8108  if test "x$MKDIR" = x; then
8109    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8110  fi
8111
8112
8113
8114
8115
8116  # Publish this variable in the help.
8117
8118
8119  if test "x$MKTEMP" = x; then
8120    # The variable is not set by user, try to locate tool using the code snippet
8121    for ac_prog in mktemp
8122do
8123  # Extract the first word of "$ac_prog", so it can be a program name with args.
8124set dummy $ac_prog; ac_word=$2
8125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8126$as_echo_n "checking for $ac_word... " >&6; }
8127if ${ac_cv_path_MKTEMP+:} false; then :
8128  $as_echo_n "(cached) " >&6
8129else
8130  case $MKTEMP in
8131  [\\/]* | ?:[\\/]*)
8132  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8133  ;;
8134  *)
8135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8136for as_dir in $PATH
8137do
8138  IFS=$as_save_IFS
8139  test -z "$as_dir" && as_dir=.
8140    for ac_exec_ext in '' $ac_executable_extensions; do
8141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8142    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8144    break 2
8145  fi
8146done
8147  done
8148IFS=$as_save_IFS
8149
8150  ;;
8151esac
8152fi
8153MKTEMP=$ac_cv_path_MKTEMP
8154if test -n "$MKTEMP"; then
8155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8156$as_echo "$MKTEMP" >&6; }
8157else
8158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8159$as_echo "no" >&6; }
8160fi
8161
8162
8163  test -n "$MKTEMP" && break
8164done
8165
8166  else
8167    # The variable is set, but is it from the command line or the environment?
8168
8169    # Try to remove the string !MKTEMP! from our list.
8170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8172      # If it failed, the variable was not from the command line. Ignore it,
8173      # but warn the user (except for BASH, which is always set by the calling BASH).
8174      if test "xMKTEMP" != xBASH; then
8175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8176$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8177      fi
8178      # Try to locate tool using the code snippet
8179      for ac_prog in mktemp
8180do
8181  # Extract the first word of "$ac_prog", so it can be a program name with args.
8182set dummy $ac_prog; ac_word=$2
8183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8184$as_echo_n "checking for $ac_word... " >&6; }
8185if ${ac_cv_path_MKTEMP+:} false; then :
8186  $as_echo_n "(cached) " >&6
8187else
8188  case $MKTEMP in
8189  [\\/]* | ?:[\\/]*)
8190  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8191  ;;
8192  *)
8193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8194for as_dir in $PATH
8195do
8196  IFS=$as_save_IFS
8197  test -z "$as_dir" && as_dir=.
8198    for ac_exec_ext in '' $ac_executable_extensions; do
8199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8200    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8202    break 2
8203  fi
8204done
8205  done
8206IFS=$as_save_IFS
8207
8208  ;;
8209esac
8210fi
8211MKTEMP=$ac_cv_path_MKTEMP
8212if test -n "$MKTEMP"; then
8213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8214$as_echo "$MKTEMP" >&6; }
8215else
8216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217$as_echo "no" >&6; }
8218fi
8219
8220
8221  test -n "$MKTEMP" && break
8222done
8223
8224    else
8225      # If it succeeded, then it was overridden by the user. We will use it
8226      # for the tool.
8227
8228      # First remove it from the list of overridden variables, so we can test
8229      # for unknown variables in the end.
8230      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8231
8232      # Check if the provided tool contains a complete path.
8233      tool_specified="$MKTEMP"
8234      tool_basename="${tool_specified##*/}"
8235      if test "x$tool_basename" = "x$tool_specified"; then
8236        # A command without a complete path is provided, search $PATH.
8237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8238$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8239        # Extract the first word of "$tool_basename", so it can be a program name with args.
8240set dummy $tool_basename; ac_word=$2
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8242$as_echo_n "checking for $ac_word... " >&6; }
8243if ${ac_cv_path_MKTEMP+:} false; then :
8244  $as_echo_n "(cached) " >&6
8245else
8246  case $MKTEMP in
8247  [\\/]* | ?:[\\/]*)
8248  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8249  ;;
8250  *)
8251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8252for as_dir in $PATH
8253do
8254  IFS=$as_save_IFS
8255  test -z "$as_dir" && as_dir=.
8256    for ac_exec_ext in '' $ac_executable_extensions; do
8257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8258    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8260    break 2
8261  fi
8262done
8263  done
8264IFS=$as_save_IFS
8265
8266  ;;
8267esac
8268fi
8269MKTEMP=$ac_cv_path_MKTEMP
8270if test -n "$MKTEMP"; then
8271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8272$as_echo "$MKTEMP" >&6; }
8273else
8274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8275$as_echo "no" >&6; }
8276fi
8277
8278
8279        if test "x$MKTEMP" = x; then
8280          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8281        fi
8282      else
8283        # Otherwise we believe it is a complete path. Use it as it is.
8284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8285$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8287$as_echo_n "checking for MKTEMP... " >&6; }
8288        if test ! -x "$tool_specified"; then
8289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8290$as_echo "not found" >&6; }
8291          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8292        fi
8293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8294$as_echo "$tool_specified" >&6; }
8295      fi
8296    fi
8297  fi
8298
8299
8300
8301  if test "x$MKTEMP" = x; then
8302    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8303  fi
8304
8305
8306
8307
8308
8309  # Publish this variable in the help.
8310
8311
8312  if test "x$MV" = x; then
8313    # The variable is not set by user, try to locate tool using the code snippet
8314    for ac_prog in mv
8315do
8316  # Extract the first word of "$ac_prog", so it can be a program name with args.
8317set dummy $ac_prog; ac_word=$2
8318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8319$as_echo_n "checking for $ac_word... " >&6; }
8320if ${ac_cv_path_MV+:} false; then :
8321  $as_echo_n "(cached) " >&6
8322else
8323  case $MV in
8324  [\\/]* | ?:[\\/]*)
8325  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8326  ;;
8327  *)
8328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8329for as_dir in $PATH
8330do
8331  IFS=$as_save_IFS
8332  test -z "$as_dir" && as_dir=.
8333    for ac_exec_ext in '' $ac_executable_extensions; do
8334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8335    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8337    break 2
8338  fi
8339done
8340  done
8341IFS=$as_save_IFS
8342
8343  ;;
8344esac
8345fi
8346MV=$ac_cv_path_MV
8347if test -n "$MV"; then
8348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8349$as_echo "$MV" >&6; }
8350else
8351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8352$as_echo "no" >&6; }
8353fi
8354
8355
8356  test -n "$MV" && break
8357done
8358
8359  else
8360    # The variable is set, but is it from the command line or the environment?
8361
8362    # Try to remove the string !MV! from our list.
8363    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8364    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8365      # If it failed, the variable was not from the command line. Ignore it,
8366      # but warn the user (except for BASH, which is always set by the calling BASH).
8367      if test "xMV" != xBASH; then
8368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8369$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8370      fi
8371      # Try to locate tool using the code snippet
8372      for ac_prog in mv
8373do
8374  # Extract the first word of "$ac_prog", so it can be a program name with args.
8375set dummy $ac_prog; ac_word=$2
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8377$as_echo_n "checking for $ac_word... " >&6; }
8378if ${ac_cv_path_MV+:} false; then :
8379  $as_echo_n "(cached) " >&6
8380else
8381  case $MV in
8382  [\\/]* | ?:[\\/]*)
8383  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8384  ;;
8385  *)
8386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8387for as_dir in $PATH
8388do
8389  IFS=$as_save_IFS
8390  test -z "$as_dir" && as_dir=.
8391    for ac_exec_ext in '' $ac_executable_extensions; do
8392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8393    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8395    break 2
8396  fi
8397done
8398  done
8399IFS=$as_save_IFS
8400
8401  ;;
8402esac
8403fi
8404MV=$ac_cv_path_MV
8405if test -n "$MV"; then
8406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8407$as_echo "$MV" >&6; }
8408else
8409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8410$as_echo "no" >&6; }
8411fi
8412
8413
8414  test -n "$MV" && break
8415done
8416
8417    else
8418      # If it succeeded, then it was overridden by the user. We will use it
8419      # for the tool.
8420
8421      # First remove it from the list of overridden variables, so we can test
8422      # for unknown variables in the end.
8423      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8424
8425      # Check if the provided tool contains a complete path.
8426      tool_specified="$MV"
8427      tool_basename="${tool_specified##*/}"
8428      if test "x$tool_basename" = "x$tool_specified"; then
8429        # A command without a complete path is provided, search $PATH.
8430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8431$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8432        # Extract the first word of "$tool_basename", so it can be a program name with args.
8433set dummy $tool_basename; ac_word=$2
8434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8435$as_echo_n "checking for $ac_word... " >&6; }
8436if ${ac_cv_path_MV+:} false; then :
8437  $as_echo_n "(cached) " >&6
8438else
8439  case $MV in
8440  [\\/]* | ?:[\\/]*)
8441  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8442  ;;
8443  *)
8444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445for as_dir in $PATH
8446do
8447  IFS=$as_save_IFS
8448  test -z "$as_dir" && as_dir=.
8449    for ac_exec_ext in '' $ac_executable_extensions; do
8450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8451    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8453    break 2
8454  fi
8455done
8456  done
8457IFS=$as_save_IFS
8458
8459  ;;
8460esac
8461fi
8462MV=$ac_cv_path_MV
8463if test -n "$MV"; then
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8465$as_echo "$MV" >&6; }
8466else
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468$as_echo "no" >&6; }
8469fi
8470
8471
8472        if test "x$MV" = x; then
8473          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8474        fi
8475      else
8476        # Otherwise we believe it is a complete path. Use it as it is.
8477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8478$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8480$as_echo_n "checking for MV... " >&6; }
8481        if test ! -x "$tool_specified"; then
8482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8483$as_echo "not found" >&6; }
8484          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8485        fi
8486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8487$as_echo "$tool_specified" >&6; }
8488      fi
8489    fi
8490  fi
8491
8492
8493
8494  if test "x$MV" = x; then
8495    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8496  fi
8497
8498
8499
8500
8501
8502  # Publish this variable in the help.
8503
8504
8505  if test "x$NAWK" = x; then
8506    # The variable is not set by user, try to locate tool using the code snippet
8507    for ac_prog in nawk gawk awk
8508do
8509  # Extract the first word of "$ac_prog", so it can be a program name with args.
8510set dummy $ac_prog; ac_word=$2
8511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8512$as_echo_n "checking for $ac_word... " >&6; }
8513if ${ac_cv_path_NAWK+:} false; then :
8514  $as_echo_n "(cached) " >&6
8515else
8516  case $NAWK in
8517  [\\/]* | ?:[\\/]*)
8518  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8519  ;;
8520  *)
8521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8522for as_dir in $PATH
8523do
8524  IFS=$as_save_IFS
8525  test -z "$as_dir" && as_dir=.
8526    for ac_exec_ext in '' $ac_executable_extensions; do
8527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8528    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8530    break 2
8531  fi
8532done
8533  done
8534IFS=$as_save_IFS
8535
8536  ;;
8537esac
8538fi
8539NAWK=$ac_cv_path_NAWK
8540if test -n "$NAWK"; then
8541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8542$as_echo "$NAWK" >&6; }
8543else
8544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8545$as_echo "no" >&6; }
8546fi
8547
8548
8549  test -n "$NAWK" && break
8550done
8551
8552  else
8553    # The variable is set, but is it from the command line or the environment?
8554
8555    # Try to remove the string !NAWK! from our list.
8556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8558      # If it failed, the variable was not from the command line. Ignore it,
8559      # but warn the user (except for BASH, which is always set by the calling BASH).
8560      if test "xNAWK" != xBASH; then
8561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8562$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8563      fi
8564      # Try to locate tool using the code snippet
8565      for ac_prog in nawk gawk awk
8566do
8567  # Extract the first word of "$ac_prog", so it can be a program name with args.
8568set dummy $ac_prog; ac_word=$2
8569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8570$as_echo_n "checking for $ac_word... " >&6; }
8571if ${ac_cv_path_NAWK+:} false; then :
8572  $as_echo_n "(cached) " >&6
8573else
8574  case $NAWK in
8575  [\\/]* | ?:[\\/]*)
8576  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8577  ;;
8578  *)
8579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8580for as_dir in $PATH
8581do
8582  IFS=$as_save_IFS
8583  test -z "$as_dir" && as_dir=.
8584    for ac_exec_ext in '' $ac_executable_extensions; do
8585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8586    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8588    break 2
8589  fi
8590done
8591  done
8592IFS=$as_save_IFS
8593
8594  ;;
8595esac
8596fi
8597NAWK=$ac_cv_path_NAWK
8598if test -n "$NAWK"; then
8599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8600$as_echo "$NAWK" >&6; }
8601else
8602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8603$as_echo "no" >&6; }
8604fi
8605
8606
8607  test -n "$NAWK" && break
8608done
8609
8610    else
8611      # If it succeeded, then it was overridden by the user. We will use it
8612      # for the tool.
8613
8614      # First remove it from the list of overridden variables, so we can test
8615      # for unknown variables in the end.
8616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8617
8618      # Check if the provided tool contains a complete path.
8619      tool_specified="$NAWK"
8620      tool_basename="${tool_specified##*/}"
8621      if test "x$tool_basename" = "x$tool_specified"; then
8622        # A command without a complete path is provided, search $PATH.
8623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8624$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8625        # Extract the first word of "$tool_basename", so it can be a program name with args.
8626set dummy $tool_basename; ac_word=$2
8627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8628$as_echo_n "checking for $ac_word... " >&6; }
8629if ${ac_cv_path_NAWK+:} false; then :
8630  $as_echo_n "(cached) " >&6
8631else
8632  case $NAWK in
8633  [\\/]* | ?:[\\/]*)
8634  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8635  ;;
8636  *)
8637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8638for as_dir in $PATH
8639do
8640  IFS=$as_save_IFS
8641  test -z "$as_dir" && as_dir=.
8642    for ac_exec_ext in '' $ac_executable_extensions; do
8643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8644    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8646    break 2
8647  fi
8648done
8649  done
8650IFS=$as_save_IFS
8651
8652  ;;
8653esac
8654fi
8655NAWK=$ac_cv_path_NAWK
8656if test -n "$NAWK"; then
8657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8658$as_echo "$NAWK" >&6; }
8659else
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8661$as_echo "no" >&6; }
8662fi
8663
8664
8665        if test "x$NAWK" = x; then
8666          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8667        fi
8668      else
8669        # Otherwise we believe it is a complete path. Use it as it is.
8670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8671$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8673$as_echo_n "checking for NAWK... " >&6; }
8674        if test ! -x "$tool_specified"; then
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8676$as_echo "not found" >&6; }
8677          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8678        fi
8679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8680$as_echo "$tool_specified" >&6; }
8681      fi
8682    fi
8683  fi
8684
8685
8686
8687  if test "x$NAWK" = x; then
8688    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8689  fi
8690
8691
8692
8693
8694
8695  # Publish this variable in the help.
8696
8697
8698  if test "x$PRINTF" = x; then
8699    # The variable is not set by user, try to locate tool using the code snippet
8700    for ac_prog in printf
8701do
8702  # Extract the first word of "$ac_prog", so it can be a program name with args.
8703set dummy $ac_prog; ac_word=$2
8704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8705$as_echo_n "checking for $ac_word... " >&6; }
8706if ${ac_cv_path_PRINTF+:} false; then :
8707  $as_echo_n "(cached) " >&6
8708else
8709  case $PRINTF in
8710  [\\/]* | ?:[\\/]*)
8711  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8712  ;;
8713  *)
8714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8715for as_dir in $PATH
8716do
8717  IFS=$as_save_IFS
8718  test -z "$as_dir" && as_dir=.
8719    for ac_exec_ext in '' $ac_executable_extensions; do
8720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8721    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8723    break 2
8724  fi
8725done
8726  done
8727IFS=$as_save_IFS
8728
8729  ;;
8730esac
8731fi
8732PRINTF=$ac_cv_path_PRINTF
8733if test -n "$PRINTF"; then
8734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8735$as_echo "$PRINTF" >&6; }
8736else
8737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8738$as_echo "no" >&6; }
8739fi
8740
8741
8742  test -n "$PRINTF" && break
8743done
8744
8745  else
8746    # The variable is set, but is it from the command line or the environment?
8747
8748    # Try to remove the string !PRINTF! from our list.
8749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8751      # If it failed, the variable was not from the command line. Ignore it,
8752      # but warn the user (except for BASH, which is always set by the calling BASH).
8753      if test "xPRINTF" != xBASH; then
8754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8755$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8756      fi
8757      # Try to locate tool using the code snippet
8758      for ac_prog in printf
8759do
8760  # Extract the first word of "$ac_prog", so it can be a program name with args.
8761set dummy $ac_prog; ac_word=$2
8762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8763$as_echo_n "checking for $ac_word... " >&6; }
8764if ${ac_cv_path_PRINTF+:} false; then :
8765  $as_echo_n "(cached) " >&6
8766else
8767  case $PRINTF in
8768  [\\/]* | ?:[\\/]*)
8769  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8770  ;;
8771  *)
8772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8773for as_dir in $PATH
8774do
8775  IFS=$as_save_IFS
8776  test -z "$as_dir" && as_dir=.
8777    for ac_exec_ext in '' $ac_executable_extensions; do
8778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8779    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8781    break 2
8782  fi
8783done
8784  done
8785IFS=$as_save_IFS
8786
8787  ;;
8788esac
8789fi
8790PRINTF=$ac_cv_path_PRINTF
8791if test -n "$PRINTF"; then
8792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8793$as_echo "$PRINTF" >&6; }
8794else
8795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8796$as_echo "no" >&6; }
8797fi
8798
8799
8800  test -n "$PRINTF" && break
8801done
8802
8803    else
8804      # If it succeeded, then it was overridden by the user. We will use it
8805      # for the tool.
8806
8807      # First remove it from the list of overridden variables, so we can test
8808      # for unknown variables in the end.
8809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8810
8811      # Check if the provided tool contains a complete path.
8812      tool_specified="$PRINTF"
8813      tool_basename="${tool_specified##*/}"
8814      if test "x$tool_basename" = "x$tool_specified"; then
8815        # A command without a complete path is provided, search $PATH.
8816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8817$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8818        # Extract the first word of "$tool_basename", so it can be a program name with args.
8819set dummy $tool_basename; ac_word=$2
8820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8821$as_echo_n "checking for $ac_word... " >&6; }
8822if ${ac_cv_path_PRINTF+:} false; then :
8823  $as_echo_n "(cached) " >&6
8824else
8825  case $PRINTF in
8826  [\\/]* | ?:[\\/]*)
8827  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8828  ;;
8829  *)
8830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8831for as_dir in $PATH
8832do
8833  IFS=$as_save_IFS
8834  test -z "$as_dir" && as_dir=.
8835    for ac_exec_ext in '' $ac_executable_extensions; do
8836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8837    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8839    break 2
8840  fi
8841done
8842  done
8843IFS=$as_save_IFS
8844
8845  ;;
8846esac
8847fi
8848PRINTF=$ac_cv_path_PRINTF
8849if test -n "$PRINTF"; then
8850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8851$as_echo "$PRINTF" >&6; }
8852else
8853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
8855fi
8856
8857
8858        if test "x$PRINTF" = x; then
8859          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8860        fi
8861      else
8862        # Otherwise we believe it is a complete path. Use it as it is.
8863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8864$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8866$as_echo_n "checking for PRINTF... " >&6; }
8867        if test ! -x "$tool_specified"; then
8868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8869$as_echo "not found" >&6; }
8870          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8871        fi
8872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8873$as_echo "$tool_specified" >&6; }
8874      fi
8875    fi
8876  fi
8877
8878
8879
8880  if test "x$PRINTF" = x; then
8881    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8882  fi
8883
8884
8885
8886
8887
8888  # Publish this variable in the help.
8889
8890
8891  if test "x$RM" = x; then
8892    # The variable is not set by user, try to locate tool using the code snippet
8893    for ac_prog in rm
8894do
8895  # Extract the first word of "$ac_prog", so it can be a program name with args.
8896set dummy $ac_prog; ac_word=$2
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898$as_echo_n "checking for $ac_word... " >&6; }
8899if ${ac_cv_path_RM+:} false; then :
8900  $as_echo_n "(cached) " >&6
8901else
8902  case $RM in
8903  [\\/]* | ?:[\\/]*)
8904  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8905  ;;
8906  *)
8907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910  IFS=$as_save_IFS
8911  test -z "$as_dir" && as_dir=.
8912    for ac_exec_ext in '' $ac_executable_extensions; do
8913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8914    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916    break 2
8917  fi
8918done
8919  done
8920IFS=$as_save_IFS
8921
8922  ;;
8923esac
8924fi
8925RM=$ac_cv_path_RM
8926if test -n "$RM"; then
8927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8928$as_echo "$RM" >&6; }
8929else
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931$as_echo "no" >&6; }
8932fi
8933
8934
8935  test -n "$RM" && break
8936done
8937
8938  else
8939    # The variable is set, but is it from the command line or the environment?
8940
8941    # Try to remove the string !RM! from our list.
8942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8944      # If it failed, the variable was not from the command line. Ignore it,
8945      # but warn the user (except for BASH, which is always set by the calling BASH).
8946      if test "xRM" != xBASH; then
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8948$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8949      fi
8950      # Try to locate tool using the code snippet
8951      for ac_prog in rm
8952do
8953  # Extract the first word of "$ac_prog", so it can be a program name with args.
8954set dummy $ac_prog; ac_word=$2
8955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8956$as_echo_n "checking for $ac_word... " >&6; }
8957if ${ac_cv_path_RM+:} false; then :
8958  $as_echo_n "(cached) " >&6
8959else
8960  case $RM in
8961  [\\/]* | ?:[\\/]*)
8962  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8963  ;;
8964  *)
8965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8966for as_dir in $PATH
8967do
8968  IFS=$as_save_IFS
8969  test -z "$as_dir" && as_dir=.
8970    for ac_exec_ext in '' $ac_executable_extensions; do
8971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8972    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8974    break 2
8975  fi
8976done
8977  done
8978IFS=$as_save_IFS
8979
8980  ;;
8981esac
8982fi
8983RM=$ac_cv_path_RM
8984if test -n "$RM"; then
8985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8986$as_echo "$RM" >&6; }
8987else
8988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8989$as_echo "no" >&6; }
8990fi
8991
8992
8993  test -n "$RM" && break
8994done
8995
8996    else
8997      # If it succeeded, then it was overridden by the user. We will use it
8998      # for the tool.
8999
9000      # First remove it from the list of overridden variables, so we can test
9001      # for unknown variables in the end.
9002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9003
9004      # Check if the provided tool contains a complete path.
9005      tool_specified="$RM"
9006      tool_basename="${tool_specified##*/}"
9007      if test "x$tool_basename" = "x$tool_specified"; then
9008        # A command without a complete path is provided, search $PATH.
9009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9010$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9011        # Extract the first word of "$tool_basename", so it can be a program name with args.
9012set dummy $tool_basename; ac_word=$2
9013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9014$as_echo_n "checking for $ac_word... " >&6; }
9015if ${ac_cv_path_RM+:} false; then :
9016  $as_echo_n "(cached) " >&6
9017else
9018  case $RM in
9019  [\\/]* | ?:[\\/]*)
9020  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9021  ;;
9022  *)
9023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9024for as_dir in $PATH
9025do
9026  IFS=$as_save_IFS
9027  test -z "$as_dir" && as_dir=.
9028    for ac_exec_ext in '' $ac_executable_extensions; do
9029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9030    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9032    break 2
9033  fi
9034done
9035  done
9036IFS=$as_save_IFS
9037
9038  ;;
9039esac
9040fi
9041RM=$ac_cv_path_RM
9042if test -n "$RM"; then
9043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9044$as_echo "$RM" >&6; }
9045else
9046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9047$as_echo "no" >&6; }
9048fi
9049
9050
9051        if test "x$RM" = x; then
9052          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9053        fi
9054      else
9055        # Otherwise we believe it is a complete path. Use it as it is.
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9057$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9058        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9059$as_echo_n "checking for RM... " >&6; }
9060        if test ! -x "$tool_specified"; then
9061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9062$as_echo "not found" >&6; }
9063          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9064        fi
9065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9066$as_echo "$tool_specified" >&6; }
9067      fi
9068    fi
9069  fi
9070
9071
9072
9073  if test "x$RM" = x; then
9074    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9075  fi
9076
9077
9078
9079
9080
9081  # Publish this variable in the help.
9082
9083
9084  if test "x$SH" = x; then
9085    # The variable is not set by user, try to locate tool using the code snippet
9086    for ac_prog in sh
9087do
9088  # Extract the first word of "$ac_prog", so it can be a program name with args.
9089set dummy $ac_prog; ac_word=$2
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9091$as_echo_n "checking for $ac_word... " >&6; }
9092if ${ac_cv_path_SH+:} false; then :
9093  $as_echo_n "(cached) " >&6
9094else
9095  case $SH in
9096  [\\/]* | ?:[\\/]*)
9097  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9098  ;;
9099  *)
9100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9101for as_dir in $PATH
9102do
9103  IFS=$as_save_IFS
9104  test -z "$as_dir" && as_dir=.
9105    for ac_exec_ext in '' $ac_executable_extensions; do
9106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9107    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9109    break 2
9110  fi
9111done
9112  done
9113IFS=$as_save_IFS
9114
9115  ;;
9116esac
9117fi
9118SH=$ac_cv_path_SH
9119if test -n "$SH"; then
9120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9121$as_echo "$SH" >&6; }
9122else
9123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
9125fi
9126
9127
9128  test -n "$SH" && break
9129done
9130
9131  else
9132    # The variable is set, but is it from the command line or the environment?
9133
9134    # Try to remove the string !SH! from our list.
9135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9137      # If it failed, the variable was not from the command line. Ignore it,
9138      # but warn the user (except for BASH, which is always set by the calling BASH).
9139      if test "xSH" != xBASH; then
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9141$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9142      fi
9143      # Try to locate tool using the code snippet
9144      for ac_prog in sh
9145do
9146  # Extract the first word of "$ac_prog", so it can be a program name with args.
9147set dummy $ac_prog; ac_word=$2
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9149$as_echo_n "checking for $ac_word... " >&6; }
9150if ${ac_cv_path_SH+:} false; then :
9151  $as_echo_n "(cached) " >&6
9152else
9153  case $SH in
9154  [\\/]* | ?:[\\/]*)
9155  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9156  ;;
9157  *)
9158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9159for as_dir in $PATH
9160do
9161  IFS=$as_save_IFS
9162  test -z "$as_dir" && as_dir=.
9163    for ac_exec_ext in '' $ac_executable_extensions; do
9164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9165    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9167    break 2
9168  fi
9169done
9170  done
9171IFS=$as_save_IFS
9172
9173  ;;
9174esac
9175fi
9176SH=$ac_cv_path_SH
9177if test -n "$SH"; then
9178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9179$as_echo "$SH" >&6; }
9180else
9181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9182$as_echo "no" >&6; }
9183fi
9184
9185
9186  test -n "$SH" && break
9187done
9188
9189    else
9190      # If it succeeded, then it was overridden by the user. We will use it
9191      # for the tool.
9192
9193      # First remove it from the list of overridden variables, so we can test
9194      # for unknown variables in the end.
9195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9196
9197      # Check if the provided tool contains a complete path.
9198      tool_specified="$SH"
9199      tool_basename="${tool_specified##*/}"
9200      if test "x$tool_basename" = "x$tool_specified"; then
9201        # A command without a complete path is provided, search $PATH.
9202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9203$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9204        # Extract the first word of "$tool_basename", so it can be a program name with args.
9205set dummy $tool_basename; ac_word=$2
9206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9207$as_echo_n "checking for $ac_word... " >&6; }
9208if ${ac_cv_path_SH+:} false; then :
9209  $as_echo_n "(cached) " >&6
9210else
9211  case $SH in
9212  [\\/]* | ?:[\\/]*)
9213  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9214  ;;
9215  *)
9216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9217for as_dir in $PATH
9218do
9219  IFS=$as_save_IFS
9220  test -z "$as_dir" && as_dir=.
9221    for ac_exec_ext in '' $ac_executable_extensions; do
9222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9223    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9225    break 2
9226  fi
9227done
9228  done
9229IFS=$as_save_IFS
9230
9231  ;;
9232esac
9233fi
9234SH=$ac_cv_path_SH
9235if test -n "$SH"; then
9236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9237$as_echo "$SH" >&6; }
9238else
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240$as_echo "no" >&6; }
9241fi
9242
9243
9244        if test "x$SH" = x; then
9245          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9246        fi
9247      else
9248        # Otherwise we believe it is a complete path. Use it as it is.
9249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9250$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9252$as_echo_n "checking for SH... " >&6; }
9253        if test ! -x "$tool_specified"; then
9254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9255$as_echo "not found" >&6; }
9256          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9257        fi
9258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9259$as_echo "$tool_specified" >&6; }
9260      fi
9261    fi
9262  fi
9263
9264
9265
9266  if test "x$SH" = x; then
9267    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9268  fi
9269
9270
9271
9272
9273
9274  # Publish this variable in the help.
9275
9276
9277  if test "x$SORT" = x; then
9278    # The variable is not set by user, try to locate tool using the code snippet
9279    for ac_prog in sort
9280do
9281  # Extract the first word of "$ac_prog", so it can be a program name with args.
9282set dummy $ac_prog; ac_word=$2
9283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9284$as_echo_n "checking for $ac_word... " >&6; }
9285if ${ac_cv_path_SORT+:} false; then :
9286  $as_echo_n "(cached) " >&6
9287else
9288  case $SORT in
9289  [\\/]* | ?:[\\/]*)
9290  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9291  ;;
9292  *)
9293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9294for as_dir in $PATH
9295do
9296  IFS=$as_save_IFS
9297  test -z "$as_dir" && as_dir=.
9298    for ac_exec_ext in '' $ac_executable_extensions; do
9299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9300    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9302    break 2
9303  fi
9304done
9305  done
9306IFS=$as_save_IFS
9307
9308  ;;
9309esac
9310fi
9311SORT=$ac_cv_path_SORT
9312if test -n "$SORT"; then
9313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9314$as_echo "$SORT" >&6; }
9315else
9316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
9318fi
9319
9320
9321  test -n "$SORT" && break
9322done
9323
9324  else
9325    # The variable is set, but is it from the command line or the environment?
9326
9327    # Try to remove the string !SORT! from our list.
9328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9330      # If it failed, the variable was not from the command line. Ignore it,
9331      # but warn the user (except for BASH, which is always set by the calling BASH).
9332      if test "xSORT" != xBASH; then
9333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9334$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9335      fi
9336      # Try to locate tool using the code snippet
9337      for ac_prog in sort
9338do
9339  # Extract the first word of "$ac_prog", so it can be a program name with args.
9340set dummy $ac_prog; ac_word=$2
9341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9342$as_echo_n "checking for $ac_word... " >&6; }
9343if ${ac_cv_path_SORT+:} false; then :
9344  $as_echo_n "(cached) " >&6
9345else
9346  case $SORT in
9347  [\\/]* | ?:[\\/]*)
9348  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9349  ;;
9350  *)
9351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9352for as_dir in $PATH
9353do
9354  IFS=$as_save_IFS
9355  test -z "$as_dir" && as_dir=.
9356    for ac_exec_ext in '' $ac_executable_extensions; do
9357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9358    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9360    break 2
9361  fi
9362done
9363  done
9364IFS=$as_save_IFS
9365
9366  ;;
9367esac
9368fi
9369SORT=$ac_cv_path_SORT
9370if test -n "$SORT"; then
9371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9372$as_echo "$SORT" >&6; }
9373else
9374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9375$as_echo "no" >&6; }
9376fi
9377
9378
9379  test -n "$SORT" && break
9380done
9381
9382    else
9383      # If it succeeded, then it was overridden by the user. We will use it
9384      # for the tool.
9385
9386      # First remove it from the list of overridden variables, so we can test
9387      # for unknown variables in the end.
9388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9389
9390      # Check if the provided tool contains a complete path.
9391      tool_specified="$SORT"
9392      tool_basename="${tool_specified##*/}"
9393      if test "x$tool_basename" = "x$tool_specified"; then
9394        # A command without a complete path is provided, search $PATH.
9395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9396$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9397        # Extract the first word of "$tool_basename", so it can be a program name with args.
9398set dummy $tool_basename; ac_word=$2
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9400$as_echo_n "checking for $ac_word... " >&6; }
9401if ${ac_cv_path_SORT+:} false; then :
9402  $as_echo_n "(cached) " >&6
9403else
9404  case $SORT in
9405  [\\/]* | ?:[\\/]*)
9406  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9407  ;;
9408  *)
9409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9410for as_dir in $PATH
9411do
9412  IFS=$as_save_IFS
9413  test -z "$as_dir" && as_dir=.
9414    for ac_exec_ext in '' $ac_executable_extensions; do
9415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9416    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9418    break 2
9419  fi
9420done
9421  done
9422IFS=$as_save_IFS
9423
9424  ;;
9425esac
9426fi
9427SORT=$ac_cv_path_SORT
9428if test -n "$SORT"; then
9429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9430$as_echo "$SORT" >&6; }
9431else
9432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433$as_echo "no" >&6; }
9434fi
9435
9436
9437        if test "x$SORT" = x; then
9438          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9439        fi
9440      else
9441        # Otherwise we believe it is a complete path. Use it as it is.
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9443$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9445$as_echo_n "checking for SORT... " >&6; }
9446        if test ! -x "$tool_specified"; then
9447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9448$as_echo "not found" >&6; }
9449          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9450        fi
9451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9452$as_echo "$tool_specified" >&6; }
9453      fi
9454    fi
9455  fi
9456
9457
9458
9459  if test "x$SORT" = x; then
9460    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9461  fi
9462
9463
9464
9465
9466
9467  # Publish this variable in the help.
9468
9469
9470  if test "x$TAIL" = x; then
9471    # The variable is not set by user, try to locate tool using the code snippet
9472    for ac_prog in tail
9473do
9474  # Extract the first word of "$ac_prog", so it can be a program name with args.
9475set dummy $ac_prog; ac_word=$2
9476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9477$as_echo_n "checking for $ac_word... " >&6; }
9478if ${ac_cv_path_TAIL+:} false; then :
9479  $as_echo_n "(cached) " >&6
9480else
9481  case $TAIL in
9482  [\\/]* | ?:[\\/]*)
9483  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9484  ;;
9485  *)
9486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9487for as_dir in $PATH
9488do
9489  IFS=$as_save_IFS
9490  test -z "$as_dir" && as_dir=.
9491    for ac_exec_ext in '' $ac_executable_extensions; do
9492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9493    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9495    break 2
9496  fi
9497done
9498  done
9499IFS=$as_save_IFS
9500
9501  ;;
9502esac
9503fi
9504TAIL=$ac_cv_path_TAIL
9505if test -n "$TAIL"; then
9506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9507$as_echo "$TAIL" >&6; }
9508else
9509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510$as_echo "no" >&6; }
9511fi
9512
9513
9514  test -n "$TAIL" && break
9515done
9516
9517  else
9518    # The variable is set, but is it from the command line or the environment?
9519
9520    # Try to remove the string !TAIL! from our list.
9521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9523      # If it failed, the variable was not from the command line. Ignore it,
9524      # but warn the user (except for BASH, which is always set by the calling BASH).
9525      if test "xTAIL" != xBASH; then
9526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9527$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9528      fi
9529      # Try to locate tool using the code snippet
9530      for ac_prog in tail
9531do
9532  # Extract the first word of "$ac_prog", so it can be a program name with args.
9533set dummy $ac_prog; ac_word=$2
9534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9535$as_echo_n "checking for $ac_word... " >&6; }
9536if ${ac_cv_path_TAIL+:} false; then :
9537  $as_echo_n "(cached) " >&6
9538else
9539  case $TAIL in
9540  [\\/]* | ?:[\\/]*)
9541  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9542  ;;
9543  *)
9544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9545for as_dir in $PATH
9546do
9547  IFS=$as_save_IFS
9548  test -z "$as_dir" && as_dir=.
9549    for ac_exec_ext in '' $ac_executable_extensions; do
9550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9551    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9553    break 2
9554  fi
9555done
9556  done
9557IFS=$as_save_IFS
9558
9559  ;;
9560esac
9561fi
9562TAIL=$ac_cv_path_TAIL
9563if test -n "$TAIL"; then
9564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9565$as_echo "$TAIL" >&6; }
9566else
9567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9568$as_echo "no" >&6; }
9569fi
9570
9571
9572  test -n "$TAIL" && break
9573done
9574
9575    else
9576      # If it succeeded, then it was overridden by the user. We will use it
9577      # for the tool.
9578
9579      # First remove it from the list of overridden variables, so we can test
9580      # for unknown variables in the end.
9581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9582
9583      # Check if the provided tool contains a complete path.
9584      tool_specified="$TAIL"
9585      tool_basename="${tool_specified##*/}"
9586      if test "x$tool_basename" = "x$tool_specified"; then
9587        # A command without a complete path is provided, search $PATH.
9588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9589$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9590        # Extract the first word of "$tool_basename", so it can be a program name with args.
9591set dummy $tool_basename; ac_word=$2
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if ${ac_cv_path_TAIL+:} false; then :
9595  $as_echo_n "(cached) " >&6
9596else
9597  case $TAIL in
9598  [\\/]* | ?:[\\/]*)
9599  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9600  ;;
9601  *)
9602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9603for as_dir in $PATH
9604do
9605  IFS=$as_save_IFS
9606  test -z "$as_dir" && as_dir=.
9607    for ac_exec_ext in '' $ac_executable_extensions; do
9608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9609    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9611    break 2
9612  fi
9613done
9614  done
9615IFS=$as_save_IFS
9616
9617  ;;
9618esac
9619fi
9620TAIL=$ac_cv_path_TAIL
9621if test -n "$TAIL"; then
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9623$as_echo "$TAIL" >&6; }
9624else
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627fi
9628
9629
9630        if test "x$TAIL" = x; then
9631          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9632        fi
9633      else
9634        # Otherwise we believe it is a complete path. Use it as it is.
9635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9636$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9638$as_echo_n "checking for TAIL... " >&6; }
9639        if test ! -x "$tool_specified"; then
9640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9641$as_echo "not found" >&6; }
9642          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9643        fi
9644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9645$as_echo "$tool_specified" >&6; }
9646      fi
9647    fi
9648  fi
9649
9650
9651
9652  if test "x$TAIL" = x; then
9653    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9654  fi
9655
9656
9657
9658
9659
9660  # Publish this variable in the help.
9661
9662
9663  if test "x$TAR" = x; then
9664    # The variable is not set by user, try to locate tool using the code snippet
9665    for ac_prog in tar
9666do
9667  # Extract the first word of "$ac_prog", so it can be a program name with args.
9668set dummy $ac_prog; ac_word=$2
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9670$as_echo_n "checking for $ac_word... " >&6; }
9671if ${ac_cv_path_TAR+:} false; then :
9672  $as_echo_n "(cached) " >&6
9673else
9674  case $TAR in
9675  [\\/]* | ?:[\\/]*)
9676  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9677  ;;
9678  *)
9679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9680for as_dir in $PATH
9681do
9682  IFS=$as_save_IFS
9683  test -z "$as_dir" && as_dir=.
9684    for ac_exec_ext in '' $ac_executable_extensions; do
9685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9686    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9688    break 2
9689  fi
9690done
9691  done
9692IFS=$as_save_IFS
9693
9694  ;;
9695esac
9696fi
9697TAR=$ac_cv_path_TAR
9698if test -n "$TAR"; then
9699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9700$as_echo "$TAR" >&6; }
9701else
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703$as_echo "no" >&6; }
9704fi
9705
9706
9707  test -n "$TAR" && break
9708done
9709
9710  else
9711    # The variable is set, but is it from the command line or the environment?
9712
9713    # Try to remove the string !TAR! from our list.
9714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9716      # If it failed, the variable was not from the command line. Ignore it,
9717      # but warn the user (except for BASH, which is always set by the calling BASH).
9718      if test "xTAR" != xBASH; then
9719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9720$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9721      fi
9722      # Try to locate tool using the code snippet
9723      for ac_prog in tar
9724do
9725  # Extract the first word of "$ac_prog", so it can be a program name with args.
9726set dummy $ac_prog; ac_word=$2
9727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9728$as_echo_n "checking for $ac_word... " >&6; }
9729if ${ac_cv_path_TAR+:} false; then :
9730  $as_echo_n "(cached) " >&6
9731else
9732  case $TAR in
9733  [\\/]* | ?:[\\/]*)
9734  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9735  ;;
9736  *)
9737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9738for as_dir in $PATH
9739do
9740  IFS=$as_save_IFS
9741  test -z "$as_dir" && as_dir=.
9742    for ac_exec_ext in '' $ac_executable_extensions; do
9743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9744    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9746    break 2
9747  fi
9748done
9749  done
9750IFS=$as_save_IFS
9751
9752  ;;
9753esac
9754fi
9755TAR=$ac_cv_path_TAR
9756if test -n "$TAR"; then
9757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9758$as_echo "$TAR" >&6; }
9759else
9760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761$as_echo "no" >&6; }
9762fi
9763
9764
9765  test -n "$TAR" && break
9766done
9767
9768    else
9769      # If it succeeded, then it was overridden by the user. We will use it
9770      # for the tool.
9771
9772      # First remove it from the list of overridden variables, so we can test
9773      # for unknown variables in the end.
9774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9775
9776      # Check if the provided tool contains a complete path.
9777      tool_specified="$TAR"
9778      tool_basename="${tool_specified##*/}"
9779      if test "x$tool_basename" = "x$tool_specified"; then
9780        # A command without a complete path is provided, search $PATH.
9781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9782$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9783        # Extract the first word of "$tool_basename", so it can be a program name with args.
9784set dummy $tool_basename; ac_word=$2
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9786$as_echo_n "checking for $ac_word... " >&6; }
9787if ${ac_cv_path_TAR+:} false; then :
9788  $as_echo_n "(cached) " >&6
9789else
9790  case $TAR in
9791  [\\/]* | ?:[\\/]*)
9792  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9793  ;;
9794  *)
9795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9796for as_dir in $PATH
9797do
9798  IFS=$as_save_IFS
9799  test -z "$as_dir" && as_dir=.
9800    for ac_exec_ext in '' $ac_executable_extensions; do
9801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9802    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9804    break 2
9805  fi
9806done
9807  done
9808IFS=$as_save_IFS
9809
9810  ;;
9811esac
9812fi
9813TAR=$ac_cv_path_TAR
9814if test -n "$TAR"; then
9815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9816$as_echo "$TAR" >&6; }
9817else
9818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9819$as_echo "no" >&6; }
9820fi
9821
9822
9823        if test "x$TAR" = x; then
9824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9825        fi
9826      else
9827        # Otherwise we believe it is a complete path. Use it as it is.
9828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9829$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9831$as_echo_n "checking for TAR... " >&6; }
9832        if test ! -x "$tool_specified"; then
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9834$as_echo "not found" >&6; }
9835          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9836        fi
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9838$as_echo "$tool_specified" >&6; }
9839      fi
9840    fi
9841  fi
9842
9843
9844
9845  if test "x$TAR" = x; then
9846    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9847  fi
9848
9849
9850
9851
9852
9853  # Publish this variable in the help.
9854
9855
9856  if test "x$TEE" = x; then
9857    # The variable is not set by user, try to locate tool using the code snippet
9858    for ac_prog in tee
9859do
9860  # Extract the first word of "$ac_prog", so it can be a program name with args.
9861set dummy $ac_prog; ac_word=$2
9862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863$as_echo_n "checking for $ac_word... " >&6; }
9864if ${ac_cv_path_TEE+:} false; then :
9865  $as_echo_n "(cached) " >&6
9866else
9867  case $TEE in
9868  [\\/]* | ?:[\\/]*)
9869  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9870  ;;
9871  *)
9872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873for as_dir in $PATH
9874do
9875  IFS=$as_save_IFS
9876  test -z "$as_dir" && as_dir=.
9877    for ac_exec_ext in '' $ac_executable_extensions; do
9878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881    break 2
9882  fi
9883done
9884  done
9885IFS=$as_save_IFS
9886
9887  ;;
9888esac
9889fi
9890TEE=$ac_cv_path_TEE
9891if test -n "$TEE"; then
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9893$as_echo "$TEE" >&6; }
9894else
9895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896$as_echo "no" >&6; }
9897fi
9898
9899
9900  test -n "$TEE" && break
9901done
9902
9903  else
9904    # The variable is set, but is it from the command line or the environment?
9905
9906    # Try to remove the string !TEE! from our list.
9907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9909      # If it failed, the variable was not from the command line. Ignore it,
9910      # but warn the user (except for BASH, which is always set by the calling BASH).
9911      if test "xTEE" != xBASH; then
9912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9913$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9914      fi
9915      # Try to locate tool using the code snippet
9916      for ac_prog in tee
9917do
9918  # Extract the first word of "$ac_prog", so it can be a program name with args.
9919set dummy $ac_prog; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_path_TEE+:} false; then :
9923  $as_echo_n "(cached) " >&6
9924else
9925  case $TEE in
9926  [\\/]* | ?:[\\/]*)
9927  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9928  ;;
9929  *)
9930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933  IFS=$as_save_IFS
9934  test -z "$as_dir" && as_dir=.
9935    for ac_exec_ext in '' $ac_executable_extensions; do
9936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939    break 2
9940  fi
9941done
9942  done
9943IFS=$as_save_IFS
9944
9945  ;;
9946esac
9947fi
9948TEE=$ac_cv_path_TEE
9949if test -n "$TEE"; then
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9951$as_echo "$TEE" >&6; }
9952else
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9954$as_echo "no" >&6; }
9955fi
9956
9957
9958  test -n "$TEE" && break
9959done
9960
9961    else
9962      # If it succeeded, then it was overridden by the user. We will use it
9963      # for the tool.
9964
9965      # First remove it from the list of overridden variables, so we can test
9966      # for unknown variables in the end.
9967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9968
9969      # Check if the provided tool contains a complete path.
9970      tool_specified="$TEE"
9971      tool_basename="${tool_specified##*/}"
9972      if test "x$tool_basename" = "x$tool_specified"; then
9973        # A command without a complete path is provided, search $PATH.
9974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9975$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9976        # Extract the first word of "$tool_basename", so it can be a program name with args.
9977set dummy $tool_basename; ac_word=$2
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9979$as_echo_n "checking for $ac_word... " >&6; }
9980if ${ac_cv_path_TEE+:} false; then :
9981  $as_echo_n "(cached) " >&6
9982else
9983  case $TEE in
9984  [\\/]* | ?:[\\/]*)
9985  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9986  ;;
9987  *)
9988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9989for as_dir in $PATH
9990do
9991  IFS=$as_save_IFS
9992  test -z "$as_dir" && as_dir=.
9993    for ac_exec_ext in '' $ac_executable_extensions; do
9994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9995    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9997    break 2
9998  fi
9999done
10000  done
10001IFS=$as_save_IFS
10002
10003  ;;
10004esac
10005fi
10006TEE=$ac_cv_path_TEE
10007if test -n "$TEE"; then
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10009$as_echo "$TEE" >&6; }
10010else
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
10013fi
10014
10015
10016        if test "x$TEE" = x; then
10017          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10018        fi
10019      else
10020        # Otherwise we believe it is a complete path. Use it as it is.
10021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10022$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10024$as_echo_n "checking for TEE... " >&6; }
10025        if test ! -x "$tool_specified"; then
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10027$as_echo "not found" >&6; }
10028          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10029        fi
10030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10031$as_echo "$tool_specified" >&6; }
10032      fi
10033    fi
10034  fi
10035
10036
10037
10038  if test "x$TEE" = x; then
10039    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10040  fi
10041
10042
10043
10044
10045
10046  # Publish this variable in the help.
10047
10048
10049  if test "x$TOUCH" = x; then
10050    # The variable is not set by user, try to locate tool using the code snippet
10051    for ac_prog in touch
10052do
10053  # Extract the first word of "$ac_prog", so it can be a program name with args.
10054set dummy $ac_prog; ac_word=$2
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056$as_echo_n "checking for $ac_word... " >&6; }
10057if ${ac_cv_path_TOUCH+:} false; then :
10058  $as_echo_n "(cached) " >&6
10059else
10060  case $TOUCH in
10061  [\\/]* | ?:[\\/]*)
10062  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10063  ;;
10064  *)
10065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10066for as_dir in $PATH
10067do
10068  IFS=$as_save_IFS
10069  test -z "$as_dir" && as_dir=.
10070    for ac_exec_ext in '' $ac_executable_extensions; do
10071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10072    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10074    break 2
10075  fi
10076done
10077  done
10078IFS=$as_save_IFS
10079
10080  ;;
10081esac
10082fi
10083TOUCH=$ac_cv_path_TOUCH
10084if test -n "$TOUCH"; then
10085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10086$as_echo "$TOUCH" >&6; }
10087else
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
10093  test -n "$TOUCH" && break
10094done
10095
10096  else
10097    # The variable is set, but is it from the command line or the environment?
10098
10099    # Try to remove the string !TOUCH! from our list.
10100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10102      # If it failed, the variable was not from the command line. Ignore it,
10103      # but warn the user (except for BASH, which is always set by the calling BASH).
10104      if test "xTOUCH" != xBASH; then
10105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10106$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10107      fi
10108      # Try to locate tool using the code snippet
10109      for ac_prog in touch
10110do
10111  # Extract the first word of "$ac_prog", so it can be a program name with args.
10112set dummy $ac_prog; ac_word=$2
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10114$as_echo_n "checking for $ac_word... " >&6; }
10115if ${ac_cv_path_TOUCH+:} false; then :
10116  $as_echo_n "(cached) " >&6
10117else
10118  case $TOUCH in
10119  [\\/]* | ?:[\\/]*)
10120  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10121  ;;
10122  *)
10123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10124for as_dir in $PATH
10125do
10126  IFS=$as_save_IFS
10127  test -z "$as_dir" && as_dir=.
10128    for ac_exec_ext in '' $ac_executable_extensions; do
10129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10130    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10132    break 2
10133  fi
10134done
10135  done
10136IFS=$as_save_IFS
10137
10138  ;;
10139esac
10140fi
10141TOUCH=$ac_cv_path_TOUCH
10142if test -n "$TOUCH"; then
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10144$as_echo "$TOUCH" >&6; }
10145else
10146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10147$as_echo "no" >&6; }
10148fi
10149
10150
10151  test -n "$TOUCH" && break
10152done
10153
10154    else
10155      # If it succeeded, then it was overridden by the user. We will use it
10156      # for the tool.
10157
10158      # First remove it from the list of overridden variables, so we can test
10159      # for unknown variables in the end.
10160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10161
10162      # Check if the provided tool contains a complete path.
10163      tool_specified="$TOUCH"
10164      tool_basename="${tool_specified##*/}"
10165      if test "x$tool_basename" = "x$tool_specified"; then
10166        # A command without a complete path is provided, search $PATH.
10167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10168$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10169        # Extract the first word of "$tool_basename", so it can be a program name with args.
10170set dummy $tool_basename; ac_word=$2
10171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10172$as_echo_n "checking for $ac_word... " >&6; }
10173if ${ac_cv_path_TOUCH+:} false; then :
10174  $as_echo_n "(cached) " >&6
10175else
10176  case $TOUCH in
10177  [\\/]* | ?:[\\/]*)
10178  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10179  ;;
10180  *)
10181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10182for as_dir in $PATH
10183do
10184  IFS=$as_save_IFS
10185  test -z "$as_dir" && as_dir=.
10186    for ac_exec_ext in '' $ac_executable_extensions; do
10187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10188    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10190    break 2
10191  fi
10192done
10193  done
10194IFS=$as_save_IFS
10195
10196  ;;
10197esac
10198fi
10199TOUCH=$ac_cv_path_TOUCH
10200if test -n "$TOUCH"; then
10201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10202$as_echo "$TOUCH" >&6; }
10203else
10204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10205$as_echo "no" >&6; }
10206fi
10207
10208
10209        if test "x$TOUCH" = x; then
10210          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10211        fi
10212      else
10213        # Otherwise we believe it is a complete path. Use it as it is.
10214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10215$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10217$as_echo_n "checking for TOUCH... " >&6; }
10218        if test ! -x "$tool_specified"; then
10219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10220$as_echo "not found" >&6; }
10221          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10222        fi
10223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10224$as_echo "$tool_specified" >&6; }
10225      fi
10226    fi
10227  fi
10228
10229
10230
10231  if test "x$TOUCH" = x; then
10232    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10233  fi
10234
10235
10236
10237
10238
10239  # Publish this variable in the help.
10240
10241
10242  if test "x$TR" = x; then
10243    # The variable is not set by user, try to locate tool using the code snippet
10244    for ac_prog in tr
10245do
10246  # Extract the first word of "$ac_prog", so it can be a program name with args.
10247set dummy $ac_prog; ac_word=$2
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10249$as_echo_n "checking for $ac_word... " >&6; }
10250if ${ac_cv_path_TR+:} false; then :
10251  $as_echo_n "(cached) " >&6
10252else
10253  case $TR in
10254  [\\/]* | ?:[\\/]*)
10255  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10256  ;;
10257  *)
10258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10259for as_dir in $PATH
10260do
10261  IFS=$as_save_IFS
10262  test -z "$as_dir" && as_dir=.
10263    for ac_exec_ext in '' $ac_executable_extensions; do
10264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10265    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10267    break 2
10268  fi
10269done
10270  done
10271IFS=$as_save_IFS
10272
10273  ;;
10274esac
10275fi
10276TR=$ac_cv_path_TR
10277if test -n "$TR"; then
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10279$as_echo "$TR" >&6; }
10280else
10281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286  test -n "$TR" && break
10287done
10288
10289  else
10290    # The variable is set, but is it from the command line or the environment?
10291
10292    # Try to remove the string !TR! from our list.
10293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10295      # If it failed, the variable was not from the command line. Ignore it,
10296      # but warn the user (except for BASH, which is always set by the calling BASH).
10297      if test "xTR" != xBASH; then
10298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10299$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10300      fi
10301      # Try to locate tool using the code snippet
10302      for ac_prog in tr
10303do
10304  # Extract the first word of "$ac_prog", so it can be a program name with args.
10305set dummy $ac_prog; ac_word=$2
10306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10307$as_echo_n "checking for $ac_word... " >&6; }
10308if ${ac_cv_path_TR+:} false; then :
10309  $as_echo_n "(cached) " >&6
10310else
10311  case $TR in
10312  [\\/]* | ?:[\\/]*)
10313  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10314  ;;
10315  *)
10316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10317for as_dir in $PATH
10318do
10319  IFS=$as_save_IFS
10320  test -z "$as_dir" && as_dir=.
10321    for ac_exec_ext in '' $ac_executable_extensions; do
10322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10323    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10325    break 2
10326  fi
10327done
10328  done
10329IFS=$as_save_IFS
10330
10331  ;;
10332esac
10333fi
10334TR=$ac_cv_path_TR
10335if test -n "$TR"; then
10336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10337$as_echo "$TR" >&6; }
10338else
10339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
10341fi
10342
10343
10344  test -n "$TR" && break
10345done
10346
10347    else
10348      # If it succeeded, then it was overridden by the user. We will use it
10349      # for the tool.
10350
10351      # First remove it from the list of overridden variables, so we can test
10352      # for unknown variables in the end.
10353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10354
10355      # Check if the provided tool contains a complete path.
10356      tool_specified="$TR"
10357      tool_basename="${tool_specified##*/}"
10358      if test "x$tool_basename" = "x$tool_specified"; then
10359        # A command without a complete path is provided, search $PATH.
10360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10361$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10362        # Extract the first word of "$tool_basename", so it can be a program name with args.
10363set dummy $tool_basename; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if ${ac_cv_path_TR+:} false; then :
10367  $as_echo_n "(cached) " >&6
10368else
10369  case $TR in
10370  [\\/]* | ?:[\\/]*)
10371  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10372  ;;
10373  *)
10374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377  IFS=$as_save_IFS
10378  test -z "$as_dir" && as_dir=.
10379    for ac_exec_ext in '' $ac_executable_extensions; do
10380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10381    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383    break 2
10384  fi
10385done
10386  done
10387IFS=$as_save_IFS
10388
10389  ;;
10390esac
10391fi
10392TR=$ac_cv_path_TR
10393if test -n "$TR"; then
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10395$as_echo "$TR" >&6; }
10396else
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401
10402        if test "x$TR" = x; then
10403          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10404        fi
10405      else
10406        # Otherwise we believe it is a complete path. Use it as it is.
10407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10408$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10410$as_echo_n "checking for TR... " >&6; }
10411        if test ! -x "$tool_specified"; then
10412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10413$as_echo "not found" >&6; }
10414          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10415        fi
10416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10417$as_echo "$tool_specified" >&6; }
10418      fi
10419    fi
10420  fi
10421
10422
10423
10424  if test "x$TR" = x; then
10425    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10426  fi
10427
10428
10429
10430
10431
10432  # Publish this variable in the help.
10433
10434
10435  if test "x$UNAME" = x; then
10436    # The variable is not set by user, try to locate tool using the code snippet
10437    for ac_prog in uname
10438do
10439  # Extract the first word of "$ac_prog", so it can be a program name with args.
10440set dummy $ac_prog; ac_word=$2
10441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10442$as_echo_n "checking for $ac_word... " >&6; }
10443if ${ac_cv_path_UNAME+:} false; then :
10444  $as_echo_n "(cached) " >&6
10445else
10446  case $UNAME in
10447  [\\/]* | ?:[\\/]*)
10448  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10449  ;;
10450  *)
10451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10452for as_dir in $PATH
10453do
10454  IFS=$as_save_IFS
10455  test -z "$as_dir" && as_dir=.
10456    for ac_exec_ext in '' $ac_executable_extensions; do
10457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10458    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10460    break 2
10461  fi
10462done
10463  done
10464IFS=$as_save_IFS
10465
10466  ;;
10467esac
10468fi
10469UNAME=$ac_cv_path_UNAME
10470if test -n "$UNAME"; then
10471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10472$as_echo "$UNAME" >&6; }
10473else
10474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10475$as_echo "no" >&6; }
10476fi
10477
10478
10479  test -n "$UNAME" && break
10480done
10481
10482  else
10483    # The variable is set, but is it from the command line or the environment?
10484
10485    # Try to remove the string !UNAME! from our list.
10486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10488      # If it failed, the variable was not from the command line. Ignore it,
10489      # but warn the user (except for BASH, which is always set by the calling BASH).
10490      if test "xUNAME" != xBASH; then
10491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10492$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10493      fi
10494      # Try to locate tool using the code snippet
10495      for ac_prog in uname
10496do
10497  # Extract the first word of "$ac_prog", so it can be a program name with args.
10498set dummy $ac_prog; ac_word=$2
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10500$as_echo_n "checking for $ac_word... " >&6; }
10501if ${ac_cv_path_UNAME+:} false; then :
10502  $as_echo_n "(cached) " >&6
10503else
10504  case $UNAME in
10505  [\\/]* | ?:[\\/]*)
10506  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10507  ;;
10508  *)
10509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10510for as_dir in $PATH
10511do
10512  IFS=$as_save_IFS
10513  test -z "$as_dir" && as_dir=.
10514    for ac_exec_ext in '' $ac_executable_extensions; do
10515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10516    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10518    break 2
10519  fi
10520done
10521  done
10522IFS=$as_save_IFS
10523
10524  ;;
10525esac
10526fi
10527UNAME=$ac_cv_path_UNAME
10528if test -n "$UNAME"; then
10529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10530$as_echo "$UNAME" >&6; }
10531else
10532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10533$as_echo "no" >&6; }
10534fi
10535
10536
10537  test -n "$UNAME" && break
10538done
10539
10540    else
10541      # If it succeeded, then it was overridden by the user. We will use it
10542      # for the tool.
10543
10544      # First remove it from the list of overridden variables, so we can test
10545      # for unknown variables in the end.
10546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10547
10548      # Check if the provided tool contains a complete path.
10549      tool_specified="$UNAME"
10550      tool_basename="${tool_specified##*/}"
10551      if test "x$tool_basename" = "x$tool_specified"; then
10552        # A command without a complete path is provided, search $PATH.
10553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10554$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10555        # Extract the first word of "$tool_basename", so it can be a program name with args.
10556set dummy $tool_basename; ac_word=$2
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10558$as_echo_n "checking for $ac_word... " >&6; }
10559if ${ac_cv_path_UNAME+:} false; then :
10560  $as_echo_n "(cached) " >&6
10561else
10562  case $UNAME in
10563  [\\/]* | ?:[\\/]*)
10564  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10565  ;;
10566  *)
10567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10568for as_dir in $PATH
10569do
10570  IFS=$as_save_IFS
10571  test -z "$as_dir" && as_dir=.
10572    for ac_exec_ext in '' $ac_executable_extensions; do
10573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10574    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10576    break 2
10577  fi
10578done
10579  done
10580IFS=$as_save_IFS
10581
10582  ;;
10583esac
10584fi
10585UNAME=$ac_cv_path_UNAME
10586if test -n "$UNAME"; then
10587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10588$as_echo "$UNAME" >&6; }
10589else
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592fi
10593
10594
10595        if test "x$UNAME" = x; then
10596          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10597        fi
10598      else
10599        # Otherwise we believe it is a complete path. Use it as it is.
10600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10601$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10603$as_echo_n "checking for UNAME... " >&6; }
10604        if test ! -x "$tool_specified"; then
10605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10606$as_echo "not found" >&6; }
10607          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10608        fi
10609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10610$as_echo "$tool_specified" >&6; }
10611      fi
10612    fi
10613  fi
10614
10615
10616
10617  if test "x$UNAME" = x; then
10618    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10619  fi
10620
10621
10622
10623
10624
10625  # Publish this variable in the help.
10626
10627
10628  if test "x$UNIQ" = x; then
10629    # The variable is not set by user, try to locate tool using the code snippet
10630    for ac_prog in uniq
10631do
10632  # Extract the first word of "$ac_prog", so it can be a program name with args.
10633set dummy $ac_prog; ac_word=$2
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10635$as_echo_n "checking for $ac_word... " >&6; }
10636if ${ac_cv_path_UNIQ+:} false; then :
10637  $as_echo_n "(cached) " >&6
10638else
10639  case $UNIQ in
10640  [\\/]* | ?:[\\/]*)
10641  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10642  ;;
10643  *)
10644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10645for as_dir in $PATH
10646do
10647  IFS=$as_save_IFS
10648  test -z "$as_dir" && as_dir=.
10649    for ac_exec_ext in '' $ac_executable_extensions; do
10650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10651    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10653    break 2
10654  fi
10655done
10656  done
10657IFS=$as_save_IFS
10658
10659  ;;
10660esac
10661fi
10662UNIQ=$ac_cv_path_UNIQ
10663if test -n "$UNIQ"; then
10664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10665$as_echo "$UNIQ" >&6; }
10666else
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10668$as_echo "no" >&6; }
10669fi
10670
10671
10672  test -n "$UNIQ" && break
10673done
10674
10675  else
10676    # The variable is set, but is it from the command line or the environment?
10677
10678    # Try to remove the string !UNIQ! from our list.
10679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10681      # If it failed, the variable was not from the command line. Ignore it,
10682      # but warn the user (except for BASH, which is always set by the calling BASH).
10683      if test "xUNIQ" != xBASH; then
10684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10685$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10686      fi
10687      # Try to locate tool using the code snippet
10688      for ac_prog in uniq
10689do
10690  # Extract the first word of "$ac_prog", so it can be a program name with args.
10691set dummy $ac_prog; ac_word=$2
10692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10693$as_echo_n "checking for $ac_word... " >&6; }
10694if ${ac_cv_path_UNIQ+:} false; then :
10695  $as_echo_n "(cached) " >&6
10696else
10697  case $UNIQ in
10698  [\\/]* | ?:[\\/]*)
10699  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10700  ;;
10701  *)
10702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10703for as_dir in $PATH
10704do
10705  IFS=$as_save_IFS
10706  test -z "$as_dir" && as_dir=.
10707    for ac_exec_ext in '' $ac_executable_extensions; do
10708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10709    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10711    break 2
10712  fi
10713done
10714  done
10715IFS=$as_save_IFS
10716
10717  ;;
10718esac
10719fi
10720UNIQ=$ac_cv_path_UNIQ
10721if test -n "$UNIQ"; then
10722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10723$as_echo "$UNIQ" >&6; }
10724else
10725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10726$as_echo "no" >&6; }
10727fi
10728
10729
10730  test -n "$UNIQ" && break
10731done
10732
10733    else
10734      # If it succeeded, then it was overridden by the user. We will use it
10735      # for the tool.
10736
10737      # First remove it from the list of overridden variables, so we can test
10738      # for unknown variables in the end.
10739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10740
10741      # Check if the provided tool contains a complete path.
10742      tool_specified="$UNIQ"
10743      tool_basename="${tool_specified##*/}"
10744      if test "x$tool_basename" = "x$tool_specified"; then
10745        # A command without a complete path is provided, search $PATH.
10746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10747$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10748        # Extract the first word of "$tool_basename", so it can be a program name with args.
10749set dummy $tool_basename; ac_word=$2
10750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10751$as_echo_n "checking for $ac_word... " >&6; }
10752if ${ac_cv_path_UNIQ+:} false; then :
10753  $as_echo_n "(cached) " >&6
10754else
10755  case $UNIQ in
10756  [\\/]* | ?:[\\/]*)
10757  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10758  ;;
10759  *)
10760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10761for as_dir in $PATH
10762do
10763  IFS=$as_save_IFS
10764  test -z "$as_dir" && as_dir=.
10765    for ac_exec_ext in '' $ac_executable_extensions; do
10766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10767    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10769    break 2
10770  fi
10771done
10772  done
10773IFS=$as_save_IFS
10774
10775  ;;
10776esac
10777fi
10778UNIQ=$ac_cv_path_UNIQ
10779if test -n "$UNIQ"; then
10780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10781$as_echo "$UNIQ" >&6; }
10782else
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10784$as_echo "no" >&6; }
10785fi
10786
10787
10788        if test "x$UNIQ" = x; then
10789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10790        fi
10791      else
10792        # Otherwise we believe it is a complete path. Use it as it is.
10793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10794$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10796$as_echo_n "checking for UNIQ... " >&6; }
10797        if test ! -x "$tool_specified"; then
10798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10799$as_echo "not found" >&6; }
10800          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10801        fi
10802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10803$as_echo "$tool_specified" >&6; }
10804      fi
10805    fi
10806  fi
10807
10808
10809
10810  if test "x$UNIQ" = x; then
10811    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10812  fi
10813
10814
10815
10816
10817
10818  # Publish this variable in the help.
10819
10820
10821  if test "x$WC" = x; then
10822    # The variable is not set by user, try to locate tool using the code snippet
10823    for ac_prog in wc
10824do
10825  # Extract the first word of "$ac_prog", so it can be a program name with args.
10826set dummy $ac_prog; ac_word=$2
10827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10828$as_echo_n "checking for $ac_word... " >&6; }
10829if ${ac_cv_path_WC+:} false; then :
10830  $as_echo_n "(cached) " >&6
10831else
10832  case $WC in
10833  [\\/]* | ?:[\\/]*)
10834  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10835  ;;
10836  *)
10837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10838for as_dir in $PATH
10839do
10840  IFS=$as_save_IFS
10841  test -z "$as_dir" && as_dir=.
10842    for ac_exec_ext in '' $ac_executable_extensions; do
10843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10844    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10846    break 2
10847  fi
10848done
10849  done
10850IFS=$as_save_IFS
10851
10852  ;;
10853esac
10854fi
10855WC=$ac_cv_path_WC
10856if test -n "$WC"; then
10857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10858$as_echo "$WC" >&6; }
10859else
10860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10861$as_echo "no" >&6; }
10862fi
10863
10864
10865  test -n "$WC" && break
10866done
10867
10868  else
10869    # The variable is set, but is it from the command line or the environment?
10870
10871    # Try to remove the string !WC! from our list.
10872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10874      # If it failed, the variable was not from the command line. Ignore it,
10875      # but warn the user (except for BASH, which is always set by the calling BASH).
10876      if test "xWC" != xBASH; then
10877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10878$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10879      fi
10880      # Try to locate tool using the code snippet
10881      for ac_prog in wc
10882do
10883  # Extract the first word of "$ac_prog", so it can be a program name with args.
10884set dummy $ac_prog; ac_word=$2
10885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10886$as_echo_n "checking for $ac_word... " >&6; }
10887if ${ac_cv_path_WC+:} false; then :
10888  $as_echo_n "(cached) " >&6
10889else
10890  case $WC in
10891  [\\/]* | ?:[\\/]*)
10892  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10893  ;;
10894  *)
10895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10896for as_dir in $PATH
10897do
10898  IFS=$as_save_IFS
10899  test -z "$as_dir" && as_dir=.
10900    for ac_exec_ext in '' $ac_executable_extensions; do
10901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10902    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10904    break 2
10905  fi
10906done
10907  done
10908IFS=$as_save_IFS
10909
10910  ;;
10911esac
10912fi
10913WC=$ac_cv_path_WC
10914if test -n "$WC"; then
10915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10916$as_echo "$WC" >&6; }
10917else
10918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10919$as_echo "no" >&6; }
10920fi
10921
10922
10923  test -n "$WC" && break
10924done
10925
10926    else
10927      # If it succeeded, then it was overridden by the user. We will use it
10928      # for the tool.
10929
10930      # First remove it from the list of overridden variables, so we can test
10931      # for unknown variables in the end.
10932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10933
10934      # Check if the provided tool contains a complete path.
10935      tool_specified="$WC"
10936      tool_basename="${tool_specified##*/}"
10937      if test "x$tool_basename" = "x$tool_specified"; then
10938        # A command without a complete path is provided, search $PATH.
10939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10940$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10941        # Extract the first word of "$tool_basename", so it can be a program name with args.
10942set dummy $tool_basename; ac_word=$2
10943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10944$as_echo_n "checking for $ac_word... " >&6; }
10945if ${ac_cv_path_WC+:} false; then :
10946  $as_echo_n "(cached) " >&6
10947else
10948  case $WC in
10949  [\\/]* | ?:[\\/]*)
10950  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10951  ;;
10952  *)
10953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10954for as_dir in $PATH
10955do
10956  IFS=$as_save_IFS
10957  test -z "$as_dir" && as_dir=.
10958    for ac_exec_ext in '' $ac_executable_extensions; do
10959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10960    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10962    break 2
10963  fi
10964done
10965  done
10966IFS=$as_save_IFS
10967
10968  ;;
10969esac
10970fi
10971WC=$ac_cv_path_WC
10972if test -n "$WC"; then
10973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10974$as_echo "$WC" >&6; }
10975else
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10977$as_echo "no" >&6; }
10978fi
10979
10980
10981        if test "x$WC" = x; then
10982          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10983        fi
10984      else
10985        # Otherwise we believe it is a complete path. Use it as it is.
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10987$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10989$as_echo_n "checking for WC... " >&6; }
10990        if test ! -x "$tool_specified"; then
10991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10992$as_echo "not found" >&6; }
10993          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10994        fi
10995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10996$as_echo "$tool_specified" >&6; }
10997      fi
10998    fi
10999  fi
11000
11001
11002
11003  if test "x$WC" = x; then
11004    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11005  fi
11006
11007
11008
11009
11010
11011  # Publish this variable in the help.
11012
11013
11014  if test "x$WHICH" = x; then
11015    # The variable is not set by user, try to locate tool using the code snippet
11016    for ac_prog in which
11017do
11018  # Extract the first word of "$ac_prog", so it can be a program name with args.
11019set dummy $ac_prog; ac_word=$2
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11021$as_echo_n "checking for $ac_word... " >&6; }
11022if ${ac_cv_path_WHICH+:} false; then :
11023  $as_echo_n "(cached) " >&6
11024else
11025  case $WHICH in
11026  [\\/]* | ?:[\\/]*)
11027  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11028  ;;
11029  *)
11030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033  IFS=$as_save_IFS
11034  test -z "$as_dir" && as_dir=.
11035    for ac_exec_ext in '' $ac_executable_extensions; do
11036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039    break 2
11040  fi
11041done
11042  done
11043IFS=$as_save_IFS
11044
11045  ;;
11046esac
11047fi
11048WHICH=$ac_cv_path_WHICH
11049if test -n "$WHICH"; then
11050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11051$as_echo "$WHICH" >&6; }
11052else
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
11055fi
11056
11057
11058  test -n "$WHICH" && break
11059done
11060
11061  else
11062    # The variable is set, but is it from the command line or the environment?
11063
11064    # Try to remove the string !WHICH! from our list.
11065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11067      # If it failed, the variable was not from the command line. Ignore it,
11068      # but warn the user (except for BASH, which is always set by the calling BASH).
11069      if test "xWHICH" != xBASH; then
11070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11071$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11072      fi
11073      # Try to locate tool using the code snippet
11074      for ac_prog in which
11075do
11076  # Extract the first word of "$ac_prog", so it can be a program name with args.
11077set dummy $ac_prog; ac_word=$2
11078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11079$as_echo_n "checking for $ac_word... " >&6; }
11080if ${ac_cv_path_WHICH+:} false; then :
11081  $as_echo_n "(cached) " >&6
11082else
11083  case $WHICH in
11084  [\\/]* | ?:[\\/]*)
11085  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11086  ;;
11087  *)
11088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11089for as_dir in $PATH
11090do
11091  IFS=$as_save_IFS
11092  test -z "$as_dir" && as_dir=.
11093    for ac_exec_ext in '' $ac_executable_extensions; do
11094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11095    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11097    break 2
11098  fi
11099done
11100  done
11101IFS=$as_save_IFS
11102
11103  ;;
11104esac
11105fi
11106WHICH=$ac_cv_path_WHICH
11107if test -n "$WHICH"; then
11108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11109$as_echo "$WHICH" >&6; }
11110else
11111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11112$as_echo "no" >&6; }
11113fi
11114
11115
11116  test -n "$WHICH" && break
11117done
11118
11119    else
11120      # If it succeeded, then it was overridden by the user. We will use it
11121      # for the tool.
11122
11123      # First remove it from the list of overridden variables, so we can test
11124      # for unknown variables in the end.
11125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11126
11127      # Check if the provided tool contains a complete path.
11128      tool_specified="$WHICH"
11129      tool_basename="${tool_specified##*/}"
11130      if test "x$tool_basename" = "x$tool_specified"; then
11131        # A command without a complete path is provided, search $PATH.
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11133$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11134        # Extract the first word of "$tool_basename", so it can be a program name with args.
11135set dummy $tool_basename; ac_word=$2
11136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11137$as_echo_n "checking for $ac_word... " >&6; }
11138if ${ac_cv_path_WHICH+:} false; then :
11139  $as_echo_n "(cached) " >&6
11140else
11141  case $WHICH in
11142  [\\/]* | ?:[\\/]*)
11143  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11144  ;;
11145  *)
11146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11147for as_dir in $PATH
11148do
11149  IFS=$as_save_IFS
11150  test -z "$as_dir" && as_dir=.
11151    for ac_exec_ext in '' $ac_executable_extensions; do
11152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11153    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11155    break 2
11156  fi
11157done
11158  done
11159IFS=$as_save_IFS
11160
11161  ;;
11162esac
11163fi
11164WHICH=$ac_cv_path_WHICH
11165if test -n "$WHICH"; then
11166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11167$as_echo "$WHICH" >&6; }
11168else
11169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11170$as_echo "no" >&6; }
11171fi
11172
11173
11174        if test "x$WHICH" = x; then
11175          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11176        fi
11177      else
11178        # Otherwise we believe it is a complete path. Use it as it is.
11179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11180$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11182$as_echo_n "checking for WHICH... " >&6; }
11183        if test ! -x "$tool_specified"; then
11184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11185$as_echo "not found" >&6; }
11186          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11187        fi
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11189$as_echo "$tool_specified" >&6; }
11190      fi
11191    fi
11192  fi
11193
11194
11195
11196  if test "x$WHICH" = x; then
11197    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11198  fi
11199
11200
11201
11202
11203
11204  # Publish this variable in the help.
11205
11206
11207  if test "x$XARGS" = x; then
11208    # The variable is not set by user, try to locate tool using the code snippet
11209    for ac_prog in xargs
11210do
11211  # Extract the first word of "$ac_prog", so it can be a program name with args.
11212set dummy $ac_prog; ac_word=$2
11213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11214$as_echo_n "checking for $ac_word... " >&6; }
11215if ${ac_cv_path_XARGS+:} false; then :
11216  $as_echo_n "(cached) " >&6
11217else
11218  case $XARGS in
11219  [\\/]* | ?:[\\/]*)
11220  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11221  ;;
11222  *)
11223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11224for as_dir in $PATH
11225do
11226  IFS=$as_save_IFS
11227  test -z "$as_dir" && as_dir=.
11228    for ac_exec_ext in '' $ac_executable_extensions; do
11229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11230    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11232    break 2
11233  fi
11234done
11235  done
11236IFS=$as_save_IFS
11237
11238  ;;
11239esac
11240fi
11241XARGS=$ac_cv_path_XARGS
11242if test -n "$XARGS"; then
11243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11244$as_echo "$XARGS" >&6; }
11245else
11246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11247$as_echo "no" >&6; }
11248fi
11249
11250
11251  test -n "$XARGS" && break
11252done
11253
11254  else
11255    # The variable is set, but is it from the command line or the environment?
11256
11257    # Try to remove the string !XARGS! from our list.
11258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11260      # If it failed, the variable was not from the command line. Ignore it,
11261      # but warn the user (except for BASH, which is always set by the calling BASH).
11262      if test "xXARGS" != xBASH; then
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11264$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11265      fi
11266      # Try to locate tool using the code snippet
11267      for ac_prog in xargs
11268do
11269  # Extract the first word of "$ac_prog", so it can be a program name with args.
11270set dummy $ac_prog; ac_word=$2
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11272$as_echo_n "checking for $ac_word... " >&6; }
11273if ${ac_cv_path_XARGS+:} false; then :
11274  $as_echo_n "(cached) " >&6
11275else
11276  case $XARGS in
11277  [\\/]* | ?:[\\/]*)
11278  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11279  ;;
11280  *)
11281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11282for as_dir in $PATH
11283do
11284  IFS=$as_save_IFS
11285  test -z "$as_dir" && as_dir=.
11286    for ac_exec_ext in '' $ac_executable_extensions; do
11287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11288    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11290    break 2
11291  fi
11292done
11293  done
11294IFS=$as_save_IFS
11295
11296  ;;
11297esac
11298fi
11299XARGS=$ac_cv_path_XARGS
11300if test -n "$XARGS"; then
11301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11302$as_echo "$XARGS" >&6; }
11303else
11304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
11306fi
11307
11308
11309  test -n "$XARGS" && break
11310done
11311
11312    else
11313      # If it succeeded, then it was overridden by the user. We will use it
11314      # for the tool.
11315
11316      # First remove it from the list of overridden variables, so we can test
11317      # for unknown variables in the end.
11318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11319
11320      # Check if the provided tool contains a complete path.
11321      tool_specified="$XARGS"
11322      tool_basename="${tool_specified##*/}"
11323      if test "x$tool_basename" = "x$tool_specified"; then
11324        # A command without a complete path is provided, search $PATH.
11325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11326$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11327        # Extract the first word of "$tool_basename", so it can be a program name with args.
11328set dummy $tool_basename; ac_word=$2
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330$as_echo_n "checking for $ac_word... " >&6; }
11331if ${ac_cv_path_XARGS+:} false; then :
11332  $as_echo_n "(cached) " >&6
11333else
11334  case $XARGS in
11335  [\\/]* | ?:[\\/]*)
11336  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11337  ;;
11338  *)
11339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340for as_dir in $PATH
11341do
11342  IFS=$as_save_IFS
11343  test -z "$as_dir" && as_dir=.
11344    for ac_exec_ext in '' $ac_executable_extensions; do
11345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348    break 2
11349  fi
11350done
11351  done
11352IFS=$as_save_IFS
11353
11354  ;;
11355esac
11356fi
11357XARGS=$ac_cv_path_XARGS
11358if test -n "$XARGS"; then
11359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11360$as_echo "$XARGS" >&6; }
11361else
11362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364fi
11365
11366
11367        if test "x$XARGS" = x; then
11368          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11369        fi
11370      else
11371        # Otherwise we believe it is a complete path. Use it as it is.
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11373$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11375$as_echo_n "checking for XARGS... " >&6; }
11376        if test ! -x "$tool_specified"; then
11377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11378$as_echo "not found" >&6; }
11379          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11380        fi
11381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11382$as_echo "$tool_specified" >&6; }
11383      fi
11384    fi
11385  fi
11386
11387
11388
11389  if test "x$XARGS" = x; then
11390    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11391  fi
11392
11393
11394
11395  # Then required tools that require some special treatment.
11396
11397
11398  # Publish this variable in the help.
11399
11400
11401  if test "x$AWK" = x; then
11402    # The variable is not set by user, try to locate tool using the code snippet
11403    for ac_prog in gawk mawk nawk awk
11404do
11405  # Extract the first word of "$ac_prog", so it can be a program name with args.
11406set dummy $ac_prog; ac_word=$2
11407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11408$as_echo_n "checking for $ac_word... " >&6; }
11409if ${ac_cv_prog_AWK+:} false; then :
11410  $as_echo_n "(cached) " >&6
11411else
11412  if test -n "$AWK"; then
11413  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11414else
11415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11416for as_dir in $PATH
11417do
11418  IFS=$as_save_IFS
11419  test -z "$as_dir" && as_dir=.
11420    for ac_exec_ext in '' $ac_executable_extensions; do
11421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11422    ac_cv_prog_AWK="$ac_prog"
11423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11424    break 2
11425  fi
11426done
11427  done
11428IFS=$as_save_IFS
11429
11430fi
11431fi
11432AWK=$ac_cv_prog_AWK
11433if test -n "$AWK"; then
11434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11435$as_echo "$AWK" >&6; }
11436else
11437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
11439fi
11440
11441
11442  test -n "$AWK" && break
11443done
11444
11445  else
11446    # The variable is set, but is it from the command line or the environment?
11447
11448    # Try to remove the string !AWK! from our list.
11449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11451      # If it failed, the variable was not from the command line. Ignore it,
11452      # but warn the user (except for BASH, which is always set by the calling BASH).
11453      if test "xAWK" != xBASH; then
11454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11455$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11456      fi
11457      # Try to locate tool using the code snippet
11458      for ac_prog in gawk mawk nawk awk
11459do
11460  # Extract the first word of "$ac_prog", so it can be a program name with args.
11461set dummy $ac_prog; ac_word=$2
11462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11463$as_echo_n "checking for $ac_word... " >&6; }
11464if ${ac_cv_prog_AWK+:} false; then :
11465  $as_echo_n "(cached) " >&6
11466else
11467  if test -n "$AWK"; then
11468  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11469else
11470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11471for as_dir in $PATH
11472do
11473  IFS=$as_save_IFS
11474  test -z "$as_dir" && as_dir=.
11475    for ac_exec_ext in '' $ac_executable_extensions; do
11476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11477    ac_cv_prog_AWK="$ac_prog"
11478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11479    break 2
11480  fi
11481done
11482  done
11483IFS=$as_save_IFS
11484
11485fi
11486fi
11487AWK=$ac_cv_prog_AWK
11488if test -n "$AWK"; then
11489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11490$as_echo "$AWK" >&6; }
11491else
11492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11493$as_echo "no" >&6; }
11494fi
11495
11496
11497  test -n "$AWK" && break
11498done
11499
11500    else
11501      # If it succeeded, then it was overridden by the user. We will use it
11502      # for the tool.
11503
11504      # First remove it from the list of overridden variables, so we can test
11505      # for unknown variables in the end.
11506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11507
11508      # Check if the provided tool contains a complete path.
11509      tool_specified="$AWK"
11510      tool_basename="${tool_specified##*/}"
11511      if test "x$tool_basename" = "x$tool_specified"; then
11512        # A command without a complete path is provided, search $PATH.
11513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11514$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11515        # Extract the first word of "$tool_basename", so it can be a program name with args.
11516set dummy $tool_basename; ac_word=$2
11517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11518$as_echo_n "checking for $ac_word... " >&6; }
11519if ${ac_cv_path_AWK+:} false; then :
11520  $as_echo_n "(cached) " >&6
11521else
11522  case $AWK in
11523  [\\/]* | ?:[\\/]*)
11524  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11525  ;;
11526  *)
11527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11528for as_dir in $PATH
11529do
11530  IFS=$as_save_IFS
11531  test -z "$as_dir" && as_dir=.
11532    for ac_exec_ext in '' $ac_executable_extensions; do
11533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11534    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11536    break 2
11537  fi
11538done
11539  done
11540IFS=$as_save_IFS
11541
11542  ;;
11543esac
11544fi
11545AWK=$ac_cv_path_AWK
11546if test -n "$AWK"; then
11547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11548$as_echo "$AWK" >&6; }
11549else
11550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
11552fi
11553
11554
11555        if test "x$AWK" = x; then
11556          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11557        fi
11558      else
11559        # Otherwise we believe it is a complete path. Use it as it is.
11560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11561$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11563$as_echo_n "checking for AWK... " >&6; }
11564        if test ! -x "$tool_specified"; then
11565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11566$as_echo "not found" >&6; }
11567          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11568        fi
11569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11570$as_echo "$tool_specified" >&6; }
11571      fi
11572    fi
11573  fi
11574
11575
11576  if test "x$AWK" = x; then
11577    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11578  fi
11579
11580
11581
11582
11583  # Publish this variable in the help.
11584
11585
11586  if test "x$GREP" = x; then
11587    # The variable is not set by user, try to locate tool using the code snippet
11588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11589$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11590if ${ac_cv_path_GREP+:} false; then :
11591  $as_echo_n "(cached) " >&6
11592else
11593  if test -z "$GREP"; then
11594  ac_path_GREP_found=false
11595  # Loop through the user's path and test for each of PROGNAME-LIST
11596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11597for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11598do
11599  IFS=$as_save_IFS
11600  test -z "$as_dir" && as_dir=.
11601    for ac_prog in grep ggrep; do
11602    for ac_exec_ext in '' $ac_executable_extensions; do
11603      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11604      as_fn_executable_p "$ac_path_GREP" || continue
11605# Check for GNU ac_path_GREP and select it if it is found.
11606  # Check for GNU $ac_path_GREP
11607case `"$ac_path_GREP" --version 2>&1` in
11608*GNU*)
11609  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11610*)
11611  ac_count=0
11612  $as_echo_n 0123456789 >"conftest.in"
11613  while :
11614  do
11615    cat "conftest.in" "conftest.in" >"conftest.tmp"
11616    mv "conftest.tmp" "conftest.in"
11617    cp "conftest.in" "conftest.nl"
11618    $as_echo 'GREP' >> "conftest.nl"
11619    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11620    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11621    as_fn_arith $ac_count + 1 && ac_count=$as_val
11622    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11623      # Best one so far, save it but keep looking for a better one
11624      ac_cv_path_GREP="$ac_path_GREP"
11625      ac_path_GREP_max=$ac_count
11626    fi
11627    # 10*(2^10) chars as input seems more than enough
11628    test $ac_count -gt 10 && break
11629  done
11630  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11631esac
11632
11633      $ac_path_GREP_found && break 3
11634    done
11635  done
11636  done
11637IFS=$as_save_IFS
11638  if test -z "$ac_cv_path_GREP"; then
11639    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11640  fi
11641else
11642  ac_cv_path_GREP=$GREP
11643fi
11644
11645fi
11646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11647$as_echo "$ac_cv_path_GREP" >&6; }
11648 GREP="$ac_cv_path_GREP"
11649
11650
11651  else
11652    # The variable is set, but is it from the command line or the environment?
11653
11654    # Try to remove the string !GREP! from our list.
11655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11657      # If it failed, the variable was not from the command line. Ignore it,
11658      # but warn the user (except for BASH, which is always set by the calling BASH).
11659      if test "xGREP" != xBASH; then
11660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11661$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11662      fi
11663      # Try to locate tool using the code snippet
11664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11665$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11666if ${ac_cv_path_GREP+:} false; then :
11667  $as_echo_n "(cached) " >&6
11668else
11669  if test -z "$GREP"; then
11670  ac_path_GREP_found=false
11671  # Loop through the user's path and test for each of PROGNAME-LIST
11672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11673for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11674do
11675  IFS=$as_save_IFS
11676  test -z "$as_dir" && as_dir=.
11677    for ac_prog in grep ggrep; do
11678    for ac_exec_ext in '' $ac_executable_extensions; do
11679      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11680      as_fn_executable_p "$ac_path_GREP" || continue
11681# Check for GNU ac_path_GREP and select it if it is found.
11682  # Check for GNU $ac_path_GREP
11683case `"$ac_path_GREP" --version 2>&1` in
11684*GNU*)
11685  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11686*)
11687  ac_count=0
11688  $as_echo_n 0123456789 >"conftest.in"
11689  while :
11690  do
11691    cat "conftest.in" "conftest.in" >"conftest.tmp"
11692    mv "conftest.tmp" "conftest.in"
11693    cp "conftest.in" "conftest.nl"
11694    $as_echo 'GREP' >> "conftest.nl"
11695    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11696    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11697    as_fn_arith $ac_count + 1 && ac_count=$as_val
11698    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11699      # Best one so far, save it but keep looking for a better one
11700      ac_cv_path_GREP="$ac_path_GREP"
11701      ac_path_GREP_max=$ac_count
11702    fi
11703    # 10*(2^10) chars as input seems more than enough
11704    test $ac_count -gt 10 && break
11705  done
11706  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11707esac
11708
11709      $ac_path_GREP_found && break 3
11710    done
11711  done
11712  done
11713IFS=$as_save_IFS
11714  if test -z "$ac_cv_path_GREP"; then
11715    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11716  fi
11717else
11718  ac_cv_path_GREP=$GREP
11719fi
11720
11721fi
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11723$as_echo "$ac_cv_path_GREP" >&6; }
11724 GREP="$ac_cv_path_GREP"
11725
11726
11727    else
11728      # If it succeeded, then it was overridden by the user. We will use it
11729      # for the tool.
11730
11731      # First remove it from the list of overridden variables, so we can test
11732      # for unknown variables in the end.
11733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11734
11735      # Check if the provided tool contains a complete path.
11736      tool_specified="$GREP"
11737      tool_basename="${tool_specified##*/}"
11738      if test "x$tool_basename" = "x$tool_specified"; then
11739        # A command without a complete path is provided, search $PATH.
11740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11741$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11742        # Extract the first word of "$tool_basename", so it can be a program name with args.
11743set dummy $tool_basename; ac_word=$2
11744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11745$as_echo_n "checking for $ac_word... " >&6; }
11746if ${ac_cv_path_GREP+:} false; then :
11747  $as_echo_n "(cached) " >&6
11748else
11749  case $GREP in
11750  [\\/]* | ?:[\\/]*)
11751  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11752  ;;
11753  *)
11754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11755for as_dir in $PATH
11756do
11757  IFS=$as_save_IFS
11758  test -z "$as_dir" && as_dir=.
11759    for ac_exec_ext in '' $ac_executable_extensions; do
11760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11761    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11763    break 2
11764  fi
11765done
11766  done
11767IFS=$as_save_IFS
11768
11769  ;;
11770esac
11771fi
11772GREP=$ac_cv_path_GREP
11773if test -n "$GREP"; then
11774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11775$as_echo "$GREP" >&6; }
11776else
11777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11778$as_echo "no" >&6; }
11779fi
11780
11781
11782        if test "x$GREP" = x; then
11783          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11784        fi
11785      else
11786        # Otherwise we believe it is a complete path. Use it as it is.
11787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11788$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11790$as_echo_n "checking for GREP... " >&6; }
11791        if test ! -x "$tool_specified"; then
11792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11793$as_echo "not found" >&6; }
11794          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11795        fi
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11797$as_echo "$tool_specified" >&6; }
11798      fi
11799    fi
11800  fi
11801
11802
11803  if test "x$GREP" = x; then
11804    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11805  fi
11806
11807
11808
11809
11810  # Publish this variable in the help.
11811
11812
11813  if test "x$EGREP" = x; then
11814    # The variable is not set by user, try to locate tool using the code snippet
11815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11816$as_echo_n "checking for egrep... " >&6; }
11817if ${ac_cv_path_EGREP+:} false; then :
11818  $as_echo_n "(cached) " >&6
11819else
11820  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11821   then ac_cv_path_EGREP="$GREP -E"
11822   else
11823     if test -z "$EGREP"; then
11824  ac_path_EGREP_found=false
11825  # Loop through the user's path and test for each of PROGNAME-LIST
11826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11827for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11828do
11829  IFS=$as_save_IFS
11830  test -z "$as_dir" && as_dir=.
11831    for ac_prog in egrep; do
11832    for ac_exec_ext in '' $ac_executable_extensions; do
11833      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11834      as_fn_executable_p "$ac_path_EGREP" || continue
11835# Check for GNU ac_path_EGREP and select it if it is found.
11836  # Check for GNU $ac_path_EGREP
11837case `"$ac_path_EGREP" --version 2>&1` in
11838*GNU*)
11839  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11840*)
11841  ac_count=0
11842  $as_echo_n 0123456789 >"conftest.in"
11843  while :
11844  do
11845    cat "conftest.in" "conftest.in" >"conftest.tmp"
11846    mv "conftest.tmp" "conftest.in"
11847    cp "conftest.in" "conftest.nl"
11848    $as_echo 'EGREP' >> "conftest.nl"
11849    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11850    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11851    as_fn_arith $ac_count + 1 && ac_count=$as_val
11852    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11853      # Best one so far, save it but keep looking for a better one
11854      ac_cv_path_EGREP="$ac_path_EGREP"
11855      ac_path_EGREP_max=$ac_count
11856    fi
11857    # 10*(2^10) chars as input seems more than enough
11858    test $ac_count -gt 10 && break
11859  done
11860  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11861esac
11862
11863      $ac_path_EGREP_found && break 3
11864    done
11865  done
11866  done
11867IFS=$as_save_IFS
11868  if test -z "$ac_cv_path_EGREP"; then
11869    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11870  fi
11871else
11872  ac_cv_path_EGREP=$EGREP
11873fi
11874
11875   fi
11876fi
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11878$as_echo "$ac_cv_path_EGREP" >&6; }
11879 EGREP="$ac_cv_path_EGREP"
11880
11881
11882  else
11883    # The variable is set, but is it from the command line or the environment?
11884
11885    # Try to remove the string !EGREP! from our list.
11886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11888      # If it failed, the variable was not from the command line. Ignore it,
11889      # but warn the user (except for BASH, which is always set by the calling BASH).
11890      if test "xEGREP" != xBASH; then
11891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11892$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11893      fi
11894      # Try to locate tool using the code snippet
11895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11896$as_echo_n "checking for egrep... " >&6; }
11897if ${ac_cv_path_EGREP+:} false; then :
11898  $as_echo_n "(cached) " >&6
11899else
11900  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11901   then ac_cv_path_EGREP="$GREP -E"
11902   else
11903     if test -z "$EGREP"; then
11904  ac_path_EGREP_found=false
11905  # Loop through the user's path and test for each of PROGNAME-LIST
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_prog in egrep; do
11912    for ac_exec_ext in '' $ac_executable_extensions; do
11913      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11914      as_fn_executable_p "$ac_path_EGREP" || continue
11915# Check for GNU ac_path_EGREP and select it if it is found.
11916  # Check for GNU $ac_path_EGREP
11917case `"$ac_path_EGREP" --version 2>&1` in
11918*GNU*)
11919  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11920*)
11921  ac_count=0
11922  $as_echo_n 0123456789 >"conftest.in"
11923  while :
11924  do
11925    cat "conftest.in" "conftest.in" >"conftest.tmp"
11926    mv "conftest.tmp" "conftest.in"
11927    cp "conftest.in" "conftest.nl"
11928    $as_echo 'EGREP' >> "conftest.nl"
11929    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11930    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11931    as_fn_arith $ac_count + 1 && ac_count=$as_val
11932    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11933      # Best one so far, save it but keep looking for a better one
11934      ac_cv_path_EGREP="$ac_path_EGREP"
11935      ac_path_EGREP_max=$ac_count
11936    fi
11937    # 10*(2^10) chars as input seems more than enough
11938    test $ac_count -gt 10 && break
11939  done
11940  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11941esac
11942
11943      $ac_path_EGREP_found && break 3
11944    done
11945  done
11946  done
11947IFS=$as_save_IFS
11948  if test -z "$ac_cv_path_EGREP"; then
11949    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11950  fi
11951else
11952  ac_cv_path_EGREP=$EGREP
11953fi
11954
11955   fi
11956fi
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11958$as_echo "$ac_cv_path_EGREP" >&6; }
11959 EGREP="$ac_cv_path_EGREP"
11960
11961
11962    else
11963      # If it succeeded, then it was overridden by the user. We will use it
11964      # for the tool.
11965
11966      # First remove it from the list of overridden variables, so we can test
11967      # for unknown variables in the end.
11968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11969
11970      # Check if the provided tool contains a complete path.
11971      tool_specified="$EGREP"
11972      tool_basename="${tool_specified##*/}"
11973      if test "x$tool_basename" = "x$tool_specified"; then
11974        # A command without a complete path is provided, search $PATH.
11975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11976$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11977        # Extract the first word of "$tool_basename", so it can be a program name with args.
11978set dummy $tool_basename; ac_word=$2
11979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11980$as_echo_n "checking for $ac_word... " >&6; }
11981if ${ac_cv_path_EGREP+:} false; then :
11982  $as_echo_n "(cached) " >&6
11983else
11984  case $EGREP in
11985  [\\/]* | ?:[\\/]*)
11986  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11987  ;;
11988  *)
11989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11990for as_dir in $PATH
11991do
11992  IFS=$as_save_IFS
11993  test -z "$as_dir" && as_dir=.
11994    for ac_exec_ext in '' $ac_executable_extensions; do
11995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11996    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11998    break 2
11999  fi
12000done
12001  done
12002IFS=$as_save_IFS
12003
12004  ;;
12005esac
12006fi
12007EGREP=$ac_cv_path_EGREP
12008if test -n "$EGREP"; then
12009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12010$as_echo "$EGREP" >&6; }
12011else
12012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12013$as_echo "no" >&6; }
12014fi
12015
12016
12017        if test "x$EGREP" = x; then
12018          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12019        fi
12020      else
12021        # Otherwise we believe it is a complete path. Use it as it is.
12022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12023$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12025$as_echo_n "checking for EGREP... " >&6; }
12026        if test ! -x "$tool_specified"; then
12027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12028$as_echo "not found" >&6; }
12029          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12030        fi
12031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12032$as_echo "$tool_specified" >&6; }
12033      fi
12034    fi
12035  fi
12036
12037
12038  if test "x$EGREP" = x; then
12039    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12040  fi
12041
12042
12043
12044
12045  # Publish this variable in the help.
12046
12047
12048  if test "x$FGREP" = x; then
12049    # The variable is not set by user, try to locate tool using the code snippet
12050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12051$as_echo_n "checking for fgrep... " >&6; }
12052if ${ac_cv_path_FGREP+:} false; then :
12053  $as_echo_n "(cached) " >&6
12054else
12055  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12056   then ac_cv_path_FGREP="$GREP -F"
12057   else
12058     if test -z "$FGREP"; then
12059  ac_path_FGREP_found=false
12060  # Loop through the user's path and test for each of PROGNAME-LIST
12061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12062for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12063do
12064  IFS=$as_save_IFS
12065  test -z "$as_dir" && as_dir=.
12066    for ac_prog in fgrep; do
12067    for ac_exec_ext in '' $ac_executable_extensions; do
12068      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12069      as_fn_executable_p "$ac_path_FGREP" || continue
12070# Check for GNU ac_path_FGREP and select it if it is found.
12071  # Check for GNU $ac_path_FGREP
12072case `"$ac_path_FGREP" --version 2>&1` in
12073*GNU*)
12074  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12075*)
12076  ac_count=0
12077  $as_echo_n 0123456789 >"conftest.in"
12078  while :
12079  do
12080    cat "conftest.in" "conftest.in" >"conftest.tmp"
12081    mv "conftest.tmp" "conftest.in"
12082    cp "conftest.in" "conftest.nl"
12083    $as_echo 'FGREP' >> "conftest.nl"
12084    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12085    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12086    as_fn_arith $ac_count + 1 && ac_count=$as_val
12087    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12088      # Best one so far, save it but keep looking for a better one
12089      ac_cv_path_FGREP="$ac_path_FGREP"
12090      ac_path_FGREP_max=$ac_count
12091    fi
12092    # 10*(2^10) chars as input seems more than enough
12093    test $ac_count -gt 10 && break
12094  done
12095  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12096esac
12097
12098      $ac_path_FGREP_found && break 3
12099    done
12100  done
12101  done
12102IFS=$as_save_IFS
12103  if test -z "$ac_cv_path_FGREP"; then
12104    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12105  fi
12106else
12107  ac_cv_path_FGREP=$FGREP
12108fi
12109
12110   fi
12111fi
12112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12113$as_echo "$ac_cv_path_FGREP" >&6; }
12114 FGREP="$ac_cv_path_FGREP"
12115
12116
12117  else
12118    # The variable is set, but is it from the command line or the environment?
12119
12120    # Try to remove the string !FGREP! from our list.
12121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12123      # If it failed, the variable was not from the command line. Ignore it,
12124      # but warn the user (except for BASH, which is always set by the calling BASH).
12125      if test "xFGREP" != xBASH; then
12126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12127$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12128      fi
12129      # Try to locate tool using the code snippet
12130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12131$as_echo_n "checking for fgrep... " >&6; }
12132if ${ac_cv_path_FGREP+:} false; then :
12133  $as_echo_n "(cached) " >&6
12134else
12135  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12136   then ac_cv_path_FGREP="$GREP -F"
12137   else
12138     if test -z "$FGREP"; then
12139  ac_path_FGREP_found=false
12140  # Loop through the user's path and test for each of PROGNAME-LIST
12141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12142for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12143do
12144  IFS=$as_save_IFS
12145  test -z "$as_dir" && as_dir=.
12146    for ac_prog in fgrep; do
12147    for ac_exec_ext in '' $ac_executable_extensions; do
12148      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12149      as_fn_executable_p "$ac_path_FGREP" || continue
12150# Check for GNU ac_path_FGREP and select it if it is found.
12151  # Check for GNU $ac_path_FGREP
12152case `"$ac_path_FGREP" --version 2>&1` in
12153*GNU*)
12154  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12155*)
12156  ac_count=0
12157  $as_echo_n 0123456789 >"conftest.in"
12158  while :
12159  do
12160    cat "conftest.in" "conftest.in" >"conftest.tmp"
12161    mv "conftest.tmp" "conftest.in"
12162    cp "conftest.in" "conftest.nl"
12163    $as_echo 'FGREP' >> "conftest.nl"
12164    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12165    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12166    as_fn_arith $ac_count + 1 && ac_count=$as_val
12167    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12168      # Best one so far, save it but keep looking for a better one
12169      ac_cv_path_FGREP="$ac_path_FGREP"
12170      ac_path_FGREP_max=$ac_count
12171    fi
12172    # 10*(2^10) chars as input seems more than enough
12173    test $ac_count -gt 10 && break
12174  done
12175  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12176esac
12177
12178      $ac_path_FGREP_found && break 3
12179    done
12180  done
12181  done
12182IFS=$as_save_IFS
12183  if test -z "$ac_cv_path_FGREP"; then
12184    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12185  fi
12186else
12187  ac_cv_path_FGREP=$FGREP
12188fi
12189
12190   fi
12191fi
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12193$as_echo "$ac_cv_path_FGREP" >&6; }
12194 FGREP="$ac_cv_path_FGREP"
12195
12196
12197    else
12198      # If it succeeded, then it was overridden by the user. We will use it
12199      # for the tool.
12200
12201      # First remove it from the list of overridden variables, so we can test
12202      # for unknown variables in the end.
12203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12204
12205      # Check if the provided tool contains a complete path.
12206      tool_specified="$FGREP"
12207      tool_basename="${tool_specified##*/}"
12208      if test "x$tool_basename" = "x$tool_specified"; then
12209        # A command without a complete path is provided, search $PATH.
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12211$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12212        # Extract the first word of "$tool_basename", so it can be a program name with args.
12213set dummy $tool_basename; ac_word=$2
12214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12215$as_echo_n "checking for $ac_word... " >&6; }
12216if ${ac_cv_path_FGREP+:} false; then :
12217  $as_echo_n "(cached) " >&6
12218else
12219  case $FGREP in
12220  [\\/]* | ?:[\\/]*)
12221  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12222  ;;
12223  *)
12224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12225for as_dir in $PATH
12226do
12227  IFS=$as_save_IFS
12228  test -z "$as_dir" && as_dir=.
12229    for ac_exec_ext in '' $ac_executable_extensions; do
12230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12231    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12233    break 2
12234  fi
12235done
12236  done
12237IFS=$as_save_IFS
12238
12239  ;;
12240esac
12241fi
12242FGREP=$ac_cv_path_FGREP
12243if test -n "$FGREP"; then
12244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12245$as_echo "$FGREP" >&6; }
12246else
12247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12248$as_echo "no" >&6; }
12249fi
12250
12251
12252        if test "x$FGREP" = x; then
12253          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12254        fi
12255      else
12256        # Otherwise we believe it is a complete path. Use it as it is.
12257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12258$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12260$as_echo_n "checking for FGREP... " >&6; }
12261        if test ! -x "$tool_specified"; then
12262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12263$as_echo "not found" >&6; }
12264          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12265        fi
12266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12267$as_echo "$tool_specified" >&6; }
12268      fi
12269    fi
12270  fi
12271
12272
12273  if test "x$FGREP" = x; then
12274    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12275  fi
12276
12277
12278
12279
12280  # Publish this variable in the help.
12281
12282
12283  if test "x$SED" = x; then
12284    # The variable is not set by user, try to locate tool using the code snippet
12285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12286$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12287if ${ac_cv_path_SED+:} false; then :
12288  $as_echo_n "(cached) " >&6
12289else
12290            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12291     for ac_i in 1 2 3 4 5 6 7; do
12292       ac_script="$ac_script$as_nl$ac_script"
12293     done
12294     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12295     { ac_script=; unset ac_script;}
12296     if test -z "$SED"; then
12297  ac_path_SED_found=false
12298  # Loop through the user's path and test for each of PROGNAME-LIST
12299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12300for as_dir in $PATH
12301do
12302  IFS=$as_save_IFS
12303  test -z "$as_dir" && as_dir=.
12304    for ac_prog in sed gsed; do
12305    for ac_exec_ext in '' $ac_executable_extensions; do
12306      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12307      as_fn_executable_p "$ac_path_SED" || continue
12308# Check for GNU ac_path_SED and select it if it is found.
12309  # Check for GNU $ac_path_SED
12310case `"$ac_path_SED" --version 2>&1` in
12311*GNU*)
12312  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12313*)
12314  ac_count=0
12315  $as_echo_n 0123456789 >"conftest.in"
12316  while :
12317  do
12318    cat "conftest.in" "conftest.in" >"conftest.tmp"
12319    mv "conftest.tmp" "conftest.in"
12320    cp "conftest.in" "conftest.nl"
12321    $as_echo '' >> "conftest.nl"
12322    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12323    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12324    as_fn_arith $ac_count + 1 && ac_count=$as_val
12325    if test $ac_count -gt ${ac_path_SED_max-0}; then
12326      # Best one so far, save it but keep looking for a better one
12327      ac_cv_path_SED="$ac_path_SED"
12328      ac_path_SED_max=$ac_count
12329    fi
12330    # 10*(2^10) chars as input seems more than enough
12331    test $ac_count -gt 10 && break
12332  done
12333  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12334esac
12335
12336      $ac_path_SED_found && break 3
12337    done
12338  done
12339  done
12340IFS=$as_save_IFS
12341  if test -z "$ac_cv_path_SED"; then
12342    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12343  fi
12344else
12345  ac_cv_path_SED=$SED
12346fi
12347
12348fi
12349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12350$as_echo "$ac_cv_path_SED" >&6; }
12351 SED="$ac_cv_path_SED"
12352  rm -f conftest.sed
12353
12354  else
12355    # The variable is set, but is it from the command line or the environment?
12356
12357    # Try to remove the string !SED! from our list.
12358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12360      # If it failed, the variable was not from the command line. Ignore it,
12361      # but warn the user (except for BASH, which is always set by the calling BASH).
12362      if test "xSED" != xBASH; then
12363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12364$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12365      fi
12366      # Try to locate tool using the code snippet
12367      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12368$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12369if ${ac_cv_path_SED+:} false; then :
12370  $as_echo_n "(cached) " >&6
12371else
12372            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12373     for ac_i in 1 2 3 4 5 6 7; do
12374       ac_script="$ac_script$as_nl$ac_script"
12375     done
12376     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12377     { ac_script=; unset ac_script;}
12378     if test -z "$SED"; then
12379  ac_path_SED_found=false
12380  # Loop through the user's path and test for each of PROGNAME-LIST
12381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12382for as_dir in $PATH
12383do
12384  IFS=$as_save_IFS
12385  test -z "$as_dir" && as_dir=.
12386    for ac_prog in sed gsed; do
12387    for ac_exec_ext in '' $ac_executable_extensions; do
12388      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12389      as_fn_executable_p "$ac_path_SED" || continue
12390# Check for GNU ac_path_SED and select it if it is found.
12391  # Check for GNU $ac_path_SED
12392case `"$ac_path_SED" --version 2>&1` in
12393*GNU*)
12394  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12395*)
12396  ac_count=0
12397  $as_echo_n 0123456789 >"conftest.in"
12398  while :
12399  do
12400    cat "conftest.in" "conftest.in" >"conftest.tmp"
12401    mv "conftest.tmp" "conftest.in"
12402    cp "conftest.in" "conftest.nl"
12403    $as_echo '' >> "conftest.nl"
12404    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12405    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12406    as_fn_arith $ac_count + 1 && ac_count=$as_val
12407    if test $ac_count -gt ${ac_path_SED_max-0}; then
12408      # Best one so far, save it but keep looking for a better one
12409      ac_cv_path_SED="$ac_path_SED"
12410      ac_path_SED_max=$ac_count
12411    fi
12412    # 10*(2^10) chars as input seems more than enough
12413    test $ac_count -gt 10 && break
12414  done
12415  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12416esac
12417
12418      $ac_path_SED_found && break 3
12419    done
12420  done
12421  done
12422IFS=$as_save_IFS
12423  if test -z "$ac_cv_path_SED"; then
12424    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12425  fi
12426else
12427  ac_cv_path_SED=$SED
12428fi
12429
12430fi
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12432$as_echo "$ac_cv_path_SED" >&6; }
12433 SED="$ac_cv_path_SED"
12434  rm -f conftest.sed
12435
12436    else
12437      # If it succeeded, then it was overridden by the user. We will use it
12438      # for the tool.
12439
12440      # First remove it from the list of overridden variables, so we can test
12441      # for unknown variables in the end.
12442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12443
12444      # Check if the provided tool contains a complete path.
12445      tool_specified="$SED"
12446      tool_basename="${tool_specified##*/}"
12447      if test "x$tool_basename" = "x$tool_specified"; then
12448        # A command without a complete path is provided, search $PATH.
12449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12450$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12451        # Extract the first word of "$tool_basename", so it can be a program name with args.
12452set dummy $tool_basename; ac_word=$2
12453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12454$as_echo_n "checking for $ac_word... " >&6; }
12455if ${ac_cv_path_SED+:} false; then :
12456  $as_echo_n "(cached) " >&6
12457else
12458  case $SED in
12459  [\\/]* | ?:[\\/]*)
12460  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12461  ;;
12462  *)
12463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12464for as_dir in $PATH
12465do
12466  IFS=$as_save_IFS
12467  test -z "$as_dir" && as_dir=.
12468    for ac_exec_ext in '' $ac_executable_extensions; do
12469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12470    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12472    break 2
12473  fi
12474done
12475  done
12476IFS=$as_save_IFS
12477
12478  ;;
12479esac
12480fi
12481SED=$ac_cv_path_SED
12482if test -n "$SED"; then
12483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12484$as_echo "$SED" >&6; }
12485else
12486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12487$as_echo "no" >&6; }
12488fi
12489
12490
12491        if test "x$SED" = x; then
12492          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12493        fi
12494      else
12495        # Otherwise we believe it is a complete path. Use it as it is.
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12497$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12499$as_echo_n "checking for SED... " >&6; }
12500        if test ! -x "$tool_specified"; then
12501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12502$as_echo "not found" >&6; }
12503          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12504        fi
12505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12506$as_echo "$tool_specified" >&6; }
12507      fi
12508    fi
12509  fi
12510
12511
12512  if test "x$SED" = x; then
12513    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12514  fi
12515
12516
12517
12518  # Always force rm.
12519  RM="$RM -f"
12520
12521  # pwd behaves differently on various platforms and some don't support the -L flag.
12522  # Always use the bash builtin pwd to get uniform behavior.
12523  THEPWDCMD=pwd
12524
12525  # These are not required on all platforms
12526
12527
12528  # Publish this variable in the help.
12529
12530
12531  if test "x$CYGPATH" = x; then
12532    # The variable is not set by user, try to locate tool using the code snippet
12533    for ac_prog in cygpath
12534do
12535  # Extract the first word of "$ac_prog", so it can be a program name with args.
12536set dummy $ac_prog; ac_word=$2
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12538$as_echo_n "checking for $ac_word... " >&6; }
12539if ${ac_cv_path_CYGPATH+:} false; then :
12540  $as_echo_n "(cached) " >&6
12541else
12542  case $CYGPATH in
12543  [\\/]* | ?:[\\/]*)
12544  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12545  ;;
12546  *)
12547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12548for as_dir in $PATH
12549do
12550  IFS=$as_save_IFS
12551  test -z "$as_dir" && as_dir=.
12552    for ac_exec_ext in '' $ac_executable_extensions; do
12553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12554    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12556    break 2
12557  fi
12558done
12559  done
12560IFS=$as_save_IFS
12561
12562  ;;
12563esac
12564fi
12565CYGPATH=$ac_cv_path_CYGPATH
12566if test -n "$CYGPATH"; then
12567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12568$as_echo "$CYGPATH" >&6; }
12569else
12570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12571$as_echo "no" >&6; }
12572fi
12573
12574
12575  test -n "$CYGPATH" && break
12576done
12577
12578  else
12579    # The variable is set, but is it from the command line or the environment?
12580
12581    # Try to remove the string !CYGPATH! from our list.
12582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12584      # If it failed, the variable was not from the command line. Ignore it,
12585      # but warn the user (except for BASH, which is always set by the calling BASH).
12586      if test "xCYGPATH" != xBASH; then
12587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12588$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12589      fi
12590      # Try to locate tool using the code snippet
12591      for ac_prog in cygpath
12592do
12593  # Extract the first word of "$ac_prog", so it can be a program name with args.
12594set dummy $ac_prog; ac_word=$2
12595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12596$as_echo_n "checking for $ac_word... " >&6; }
12597if ${ac_cv_path_CYGPATH+:} false; then :
12598  $as_echo_n "(cached) " >&6
12599else
12600  case $CYGPATH in
12601  [\\/]* | ?:[\\/]*)
12602  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12603  ;;
12604  *)
12605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12606for as_dir in $PATH
12607do
12608  IFS=$as_save_IFS
12609  test -z "$as_dir" && as_dir=.
12610    for ac_exec_ext in '' $ac_executable_extensions; do
12611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12612    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12614    break 2
12615  fi
12616done
12617  done
12618IFS=$as_save_IFS
12619
12620  ;;
12621esac
12622fi
12623CYGPATH=$ac_cv_path_CYGPATH
12624if test -n "$CYGPATH"; then
12625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12626$as_echo "$CYGPATH" >&6; }
12627else
12628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629$as_echo "no" >&6; }
12630fi
12631
12632
12633  test -n "$CYGPATH" && break
12634done
12635
12636    else
12637      # If it succeeded, then it was overridden by the user. We will use it
12638      # for the tool.
12639
12640      # First remove it from the list of overridden variables, so we can test
12641      # for unknown variables in the end.
12642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12643
12644      # Check if the provided tool contains a complete path.
12645      tool_specified="$CYGPATH"
12646      tool_basename="${tool_specified##*/}"
12647      if test "x$tool_basename" = "x$tool_specified"; then
12648        # A command without a complete path is provided, search $PATH.
12649        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12650$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12651        # Extract the first word of "$tool_basename", so it can be a program name with args.
12652set dummy $tool_basename; ac_word=$2
12653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12654$as_echo_n "checking for $ac_word... " >&6; }
12655if ${ac_cv_path_CYGPATH+:} false; then :
12656  $as_echo_n "(cached) " >&6
12657else
12658  case $CYGPATH in
12659  [\\/]* | ?:[\\/]*)
12660  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12661  ;;
12662  *)
12663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12664for as_dir in $PATH
12665do
12666  IFS=$as_save_IFS
12667  test -z "$as_dir" && as_dir=.
12668    for ac_exec_ext in '' $ac_executable_extensions; do
12669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12670    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12672    break 2
12673  fi
12674done
12675  done
12676IFS=$as_save_IFS
12677
12678  ;;
12679esac
12680fi
12681CYGPATH=$ac_cv_path_CYGPATH
12682if test -n "$CYGPATH"; then
12683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12684$as_echo "$CYGPATH" >&6; }
12685else
12686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12687$as_echo "no" >&6; }
12688fi
12689
12690
12691        if test "x$CYGPATH" = x; then
12692          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12693        fi
12694      else
12695        # Otherwise we believe it is a complete path. Use it as it is.
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12697$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12699$as_echo_n "checking for CYGPATH... " >&6; }
12700        if test ! -x "$tool_specified"; then
12701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12702$as_echo "not found" >&6; }
12703          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12704        fi
12705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12706$as_echo "$tool_specified" >&6; }
12707      fi
12708    fi
12709  fi
12710
12711
12712
12713
12714  # Publish this variable in the help.
12715
12716
12717  if test "x$READLINK" = x; then
12718    # The variable is not set by user, try to locate tool using the code snippet
12719    for ac_prog in greadlink readlink
12720do
12721  # Extract the first word of "$ac_prog", so it can be a program name with args.
12722set dummy $ac_prog; ac_word=$2
12723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12724$as_echo_n "checking for $ac_word... " >&6; }
12725if ${ac_cv_path_READLINK+:} false; then :
12726  $as_echo_n "(cached) " >&6
12727else
12728  case $READLINK in
12729  [\\/]* | ?:[\\/]*)
12730  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12731  ;;
12732  *)
12733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12734for as_dir in $PATH
12735do
12736  IFS=$as_save_IFS
12737  test -z "$as_dir" && as_dir=.
12738    for ac_exec_ext in '' $ac_executable_extensions; do
12739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12740    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12742    break 2
12743  fi
12744done
12745  done
12746IFS=$as_save_IFS
12747
12748  ;;
12749esac
12750fi
12751READLINK=$ac_cv_path_READLINK
12752if test -n "$READLINK"; then
12753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12754$as_echo "$READLINK" >&6; }
12755else
12756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12757$as_echo "no" >&6; }
12758fi
12759
12760
12761  test -n "$READLINK" && break
12762done
12763
12764  else
12765    # The variable is set, but is it from the command line or the environment?
12766
12767    # Try to remove the string !READLINK! from our list.
12768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12770      # If it failed, the variable was not from the command line. Ignore it,
12771      # but warn the user (except for BASH, which is always set by the calling BASH).
12772      if test "xREADLINK" != xBASH; then
12773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12774$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12775      fi
12776      # Try to locate tool using the code snippet
12777      for ac_prog in greadlink readlink
12778do
12779  # Extract the first word of "$ac_prog", so it can be a program name with args.
12780set dummy $ac_prog; ac_word=$2
12781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12782$as_echo_n "checking for $ac_word... " >&6; }
12783if ${ac_cv_path_READLINK+:} false; then :
12784  $as_echo_n "(cached) " >&6
12785else
12786  case $READLINK in
12787  [\\/]* | ?:[\\/]*)
12788  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12789  ;;
12790  *)
12791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12792for as_dir in $PATH
12793do
12794  IFS=$as_save_IFS
12795  test -z "$as_dir" && as_dir=.
12796    for ac_exec_ext in '' $ac_executable_extensions; do
12797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12798    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12800    break 2
12801  fi
12802done
12803  done
12804IFS=$as_save_IFS
12805
12806  ;;
12807esac
12808fi
12809READLINK=$ac_cv_path_READLINK
12810if test -n "$READLINK"; then
12811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12812$as_echo "$READLINK" >&6; }
12813else
12814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12815$as_echo "no" >&6; }
12816fi
12817
12818
12819  test -n "$READLINK" && break
12820done
12821
12822    else
12823      # If it succeeded, then it was overridden by the user. We will use it
12824      # for the tool.
12825
12826      # First remove it from the list of overridden variables, so we can test
12827      # for unknown variables in the end.
12828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12829
12830      # Check if the provided tool contains a complete path.
12831      tool_specified="$READLINK"
12832      tool_basename="${tool_specified##*/}"
12833      if test "x$tool_basename" = "x$tool_specified"; then
12834        # A command without a complete path is provided, search $PATH.
12835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12836$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12837        # Extract the first word of "$tool_basename", so it can be a program name with args.
12838set dummy $tool_basename; ac_word=$2
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840$as_echo_n "checking for $ac_word... " >&6; }
12841if ${ac_cv_path_READLINK+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844  case $READLINK in
12845  [\\/]* | ?:[\\/]*)
12846  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12847  ;;
12848  *)
12849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864  ;;
12865esac
12866fi
12867READLINK=$ac_cv_path_READLINK
12868if test -n "$READLINK"; then
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12870$as_echo "$READLINK" >&6; }
12871else
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873$as_echo "no" >&6; }
12874fi
12875
12876
12877        if test "x$READLINK" = x; then
12878          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879        fi
12880      else
12881        # Otherwise we believe it is a complete path. Use it as it is.
12882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12883$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12885$as_echo_n "checking for READLINK... " >&6; }
12886        if test ! -x "$tool_specified"; then
12887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888$as_echo "not found" >&6; }
12889          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12890        fi
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892$as_echo "$tool_specified" >&6; }
12893      fi
12894    fi
12895  fi
12896
12897
12898
12899
12900  # Publish this variable in the help.
12901
12902
12903  if test "x$DF" = x; then
12904    # The variable is not set by user, try to locate tool using the code snippet
12905    for ac_prog in df
12906do
12907  # Extract the first word of "$ac_prog", so it can be a program name with args.
12908set dummy $ac_prog; ac_word=$2
12909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12910$as_echo_n "checking for $ac_word... " >&6; }
12911if ${ac_cv_path_DF+:} false; then :
12912  $as_echo_n "(cached) " >&6
12913else
12914  case $DF in
12915  [\\/]* | ?:[\\/]*)
12916  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12917  ;;
12918  *)
12919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12920for as_dir in $PATH
12921do
12922  IFS=$as_save_IFS
12923  test -z "$as_dir" && as_dir=.
12924    for ac_exec_ext in '' $ac_executable_extensions; do
12925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12926    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12928    break 2
12929  fi
12930done
12931  done
12932IFS=$as_save_IFS
12933
12934  ;;
12935esac
12936fi
12937DF=$ac_cv_path_DF
12938if test -n "$DF"; then
12939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12940$as_echo "$DF" >&6; }
12941else
12942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943$as_echo "no" >&6; }
12944fi
12945
12946
12947  test -n "$DF" && break
12948done
12949
12950  else
12951    # The variable is set, but is it from the command line or the environment?
12952
12953    # Try to remove the string !DF! from our list.
12954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12956      # If it failed, the variable was not from the command line. Ignore it,
12957      # but warn the user (except for BASH, which is always set by the calling BASH).
12958      if test "xDF" != xBASH; then
12959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12960$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12961      fi
12962      # Try to locate tool using the code snippet
12963      for ac_prog in df
12964do
12965  # Extract the first word of "$ac_prog", so it can be a program name with args.
12966set dummy $ac_prog; ac_word=$2
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12968$as_echo_n "checking for $ac_word... " >&6; }
12969if ${ac_cv_path_DF+:} false; then :
12970  $as_echo_n "(cached) " >&6
12971else
12972  case $DF in
12973  [\\/]* | ?:[\\/]*)
12974  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12975  ;;
12976  *)
12977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12978for as_dir in $PATH
12979do
12980  IFS=$as_save_IFS
12981  test -z "$as_dir" && as_dir=.
12982    for ac_exec_ext in '' $ac_executable_extensions; do
12983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12984    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12986    break 2
12987  fi
12988done
12989  done
12990IFS=$as_save_IFS
12991
12992  ;;
12993esac
12994fi
12995DF=$ac_cv_path_DF
12996if test -n "$DF"; then
12997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12998$as_echo "$DF" >&6; }
12999else
13000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13001$as_echo "no" >&6; }
13002fi
13003
13004
13005  test -n "$DF" && break
13006done
13007
13008    else
13009      # If it succeeded, then it was overridden by the user. We will use it
13010      # for the tool.
13011
13012      # First remove it from the list of overridden variables, so we can test
13013      # for unknown variables in the end.
13014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13015
13016      # Check if the provided tool contains a complete path.
13017      tool_specified="$DF"
13018      tool_basename="${tool_specified##*/}"
13019      if test "x$tool_basename" = "x$tool_specified"; then
13020        # A command without a complete path is provided, search $PATH.
13021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13022$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13023        # Extract the first word of "$tool_basename", so it can be a program name with args.
13024set dummy $tool_basename; ac_word=$2
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13026$as_echo_n "checking for $ac_word... " >&6; }
13027if ${ac_cv_path_DF+:} false; then :
13028  $as_echo_n "(cached) " >&6
13029else
13030  case $DF in
13031  [\\/]* | ?:[\\/]*)
13032  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13033  ;;
13034  *)
13035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13036for as_dir in $PATH
13037do
13038  IFS=$as_save_IFS
13039  test -z "$as_dir" && as_dir=.
13040    for ac_exec_ext in '' $ac_executable_extensions; do
13041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13042    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13044    break 2
13045  fi
13046done
13047  done
13048IFS=$as_save_IFS
13049
13050  ;;
13051esac
13052fi
13053DF=$ac_cv_path_DF
13054if test -n "$DF"; then
13055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13056$as_echo "$DF" >&6; }
13057else
13058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13059$as_echo "no" >&6; }
13060fi
13061
13062
13063        if test "x$DF" = x; then
13064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13065        fi
13066      else
13067        # Otherwise we believe it is a complete path. Use it as it is.
13068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13069$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13071$as_echo_n "checking for DF... " >&6; }
13072        if test ! -x "$tool_specified"; then
13073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13074$as_echo "not found" >&6; }
13075          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13076        fi
13077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13078$as_echo "$tool_specified" >&6; }
13079      fi
13080    fi
13081  fi
13082
13083
13084
13085
13086  # Publish this variable in the help.
13087
13088
13089  if test "x$SETFILE" = x; then
13090    # The variable is not set by user, try to locate tool using the code snippet
13091    for ac_prog in SetFile
13092do
13093  # Extract the first word of "$ac_prog", so it can be a program name with args.
13094set dummy $ac_prog; ac_word=$2
13095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13096$as_echo_n "checking for $ac_word... " >&6; }
13097if ${ac_cv_path_SETFILE+:} false; then :
13098  $as_echo_n "(cached) " >&6
13099else
13100  case $SETFILE in
13101  [\\/]* | ?:[\\/]*)
13102  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13103  ;;
13104  *)
13105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13106for as_dir in $PATH
13107do
13108  IFS=$as_save_IFS
13109  test -z "$as_dir" && as_dir=.
13110    for ac_exec_ext in '' $ac_executable_extensions; do
13111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13112    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13114    break 2
13115  fi
13116done
13117  done
13118IFS=$as_save_IFS
13119
13120  ;;
13121esac
13122fi
13123SETFILE=$ac_cv_path_SETFILE
13124if test -n "$SETFILE"; then
13125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13126$as_echo "$SETFILE" >&6; }
13127else
13128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13129$as_echo "no" >&6; }
13130fi
13131
13132
13133  test -n "$SETFILE" && break
13134done
13135
13136  else
13137    # The variable is set, but is it from the command line or the environment?
13138
13139    # Try to remove the string !SETFILE! from our list.
13140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13142      # If it failed, the variable was not from the command line. Ignore it,
13143      # but warn the user (except for BASH, which is always set by the calling BASH).
13144      if test "xSETFILE" != xBASH; then
13145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13146$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13147      fi
13148      # Try to locate tool using the code snippet
13149      for ac_prog in SetFile
13150do
13151  # Extract the first word of "$ac_prog", so it can be a program name with args.
13152set dummy $ac_prog; ac_word=$2
13153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13154$as_echo_n "checking for $ac_word... " >&6; }
13155if ${ac_cv_path_SETFILE+:} false; then :
13156  $as_echo_n "(cached) " >&6
13157else
13158  case $SETFILE in
13159  [\\/]* | ?:[\\/]*)
13160  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13161  ;;
13162  *)
13163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13164for as_dir in $PATH
13165do
13166  IFS=$as_save_IFS
13167  test -z "$as_dir" && as_dir=.
13168    for ac_exec_ext in '' $ac_executable_extensions; do
13169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13170    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13172    break 2
13173  fi
13174done
13175  done
13176IFS=$as_save_IFS
13177
13178  ;;
13179esac
13180fi
13181SETFILE=$ac_cv_path_SETFILE
13182if test -n "$SETFILE"; then
13183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13184$as_echo "$SETFILE" >&6; }
13185else
13186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13187$as_echo "no" >&6; }
13188fi
13189
13190
13191  test -n "$SETFILE" && break
13192done
13193
13194    else
13195      # If it succeeded, then it was overridden by the user. We will use it
13196      # for the tool.
13197
13198      # First remove it from the list of overridden variables, so we can test
13199      # for unknown variables in the end.
13200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13201
13202      # Check if the provided tool contains a complete path.
13203      tool_specified="$SETFILE"
13204      tool_basename="${tool_specified##*/}"
13205      if test "x$tool_basename" = "x$tool_specified"; then
13206        # A command without a complete path is provided, search $PATH.
13207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13208$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13209        # Extract the first word of "$tool_basename", so it can be a program name with args.
13210set dummy $tool_basename; ac_word=$2
13211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13212$as_echo_n "checking for $ac_word... " >&6; }
13213if ${ac_cv_path_SETFILE+:} false; then :
13214  $as_echo_n "(cached) " >&6
13215else
13216  case $SETFILE in
13217  [\\/]* | ?:[\\/]*)
13218  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13219  ;;
13220  *)
13221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13222for as_dir in $PATH
13223do
13224  IFS=$as_save_IFS
13225  test -z "$as_dir" && as_dir=.
13226    for ac_exec_ext in '' $ac_executable_extensions; do
13227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13228    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13230    break 2
13231  fi
13232done
13233  done
13234IFS=$as_save_IFS
13235
13236  ;;
13237esac
13238fi
13239SETFILE=$ac_cv_path_SETFILE
13240if test -n "$SETFILE"; then
13241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13242$as_echo "$SETFILE" >&6; }
13243else
13244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13245$as_echo "no" >&6; }
13246fi
13247
13248
13249        if test "x$SETFILE" = x; then
13250          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13251        fi
13252      else
13253        # Otherwise we believe it is a complete path. Use it as it is.
13254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13255$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13257$as_echo_n "checking for SETFILE... " >&6; }
13258        if test ! -x "$tool_specified"; then
13259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13260$as_echo "not found" >&6; }
13261          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13262        fi
13263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13264$as_echo "$tool_specified" >&6; }
13265      fi
13266    fi
13267  fi
13268
13269
13270
13271
13272  # Publish this variable in the help.
13273
13274
13275  if test "x$CPIO" = x; then
13276    # The variable is not set by user, try to locate tool using the code snippet
13277    for ac_prog in cpio bsdcpio
13278do
13279  # Extract the first word of "$ac_prog", so it can be a program name with args.
13280set dummy $ac_prog; ac_word=$2
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13282$as_echo_n "checking for $ac_word... " >&6; }
13283if ${ac_cv_path_CPIO+:} false; then :
13284  $as_echo_n "(cached) " >&6
13285else
13286  case $CPIO in
13287  [\\/]* | ?:[\\/]*)
13288  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13289  ;;
13290  *)
13291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13292for as_dir in $PATH
13293do
13294  IFS=$as_save_IFS
13295  test -z "$as_dir" && as_dir=.
13296    for ac_exec_ext in '' $ac_executable_extensions; do
13297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13298    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13300    break 2
13301  fi
13302done
13303  done
13304IFS=$as_save_IFS
13305
13306  ;;
13307esac
13308fi
13309CPIO=$ac_cv_path_CPIO
13310if test -n "$CPIO"; then
13311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13312$as_echo "$CPIO" >&6; }
13313else
13314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13315$as_echo "no" >&6; }
13316fi
13317
13318
13319  test -n "$CPIO" && break
13320done
13321
13322  else
13323    # The variable is set, but is it from the command line or the environment?
13324
13325    # Try to remove the string !CPIO! from our list.
13326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13328      # If it failed, the variable was not from the command line. Ignore it,
13329      # but warn the user (except for BASH, which is always set by the calling BASH).
13330      if test "xCPIO" != xBASH; then
13331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13332$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13333      fi
13334      # Try to locate tool using the code snippet
13335      for ac_prog in cpio bsdcpio
13336do
13337  # Extract the first word of "$ac_prog", so it can be a program name with args.
13338set dummy $ac_prog; ac_word=$2
13339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13340$as_echo_n "checking for $ac_word... " >&6; }
13341if ${ac_cv_path_CPIO+:} false; then :
13342  $as_echo_n "(cached) " >&6
13343else
13344  case $CPIO in
13345  [\\/]* | ?:[\\/]*)
13346  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13347  ;;
13348  *)
13349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13350for as_dir in $PATH
13351do
13352  IFS=$as_save_IFS
13353  test -z "$as_dir" && as_dir=.
13354    for ac_exec_ext in '' $ac_executable_extensions; do
13355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13356    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13358    break 2
13359  fi
13360done
13361  done
13362IFS=$as_save_IFS
13363
13364  ;;
13365esac
13366fi
13367CPIO=$ac_cv_path_CPIO
13368if test -n "$CPIO"; then
13369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13370$as_echo "$CPIO" >&6; }
13371else
13372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13373$as_echo "no" >&6; }
13374fi
13375
13376
13377  test -n "$CPIO" && break
13378done
13379
13380    else
13381      # If it succeeded, then it was overridden by the user. We will use it
13382      # for the tool.
13383
13384      # First remove it from the list of overridden variables, so we can test
13385      # for unknown variables in the end.
13386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13387
13388      # Check if the provided tool contains a complete path.
13389      tool_specified="$CPIO"
13390      tool_basename="${tool_specified##*/}"
13391      if test "x$tool_basename" = "x$tool_specified"; then
13392        # A command without a complete path is provided, search $PATH.
13393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13394$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13395        # Extract the first word of "$tool_basename", so it can be a program name with args.
13396set dummy $tool_basename; ac_word=$2
13397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13398$as_echo_n "checking for $ac_word... " >&6; }
13399if ${ac_cv_path_CPIO+:} false; then :
13400  $as_echo_n "(cached) " >&6
13401else
13402  case $CPIO in
13403  [\\/]* | ?:[\\/]*)
13404  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13405  ;;
13406  *)
13407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13408for as_dir in $PATH
13409do
13410  IFS=$as_save_IFS
13411  test -z "$as_dir" && as_dir=.
13412    for ac_exec_ext in '' $ac_executable_extensions; do
13413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13414    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13416    break 2
13417  fi
13418done
13419  done
13420IFS=$as_save_IFS
13421
13422  ;;
13423esac
13424fi
13425CPIO=$ac_cv_path_CPIO
13426if test -n "$CPIO"; then
13427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13428$as_echo "$CPIO" >&6; }
13429else
13430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431$as_echo "no" >&6; }
13432fi
13433
13434
13435        if test "x$CPIO" = x; then
13436          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13437        fi
13438      else
13439        # Otherwise we believe it is a complete path. Use it as it is.
13440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13441$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13443$as_echo_n "checking for CPIO... " >&6; }
13444        if test ! -x "$tool_specified"; then
13445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13446$as_echo "not found" >&6; }
13447          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13448        fi
13449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13450$as_echo "$tool_specified" >&6; }
13451      fi
13452    fi
13453  fi
13454
13455
13456
13457
13458# Now we can determine OpenJDK build and target platforms. This is required to
13459# have early on.
13460# Make sure we can run config.sub.
13461$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13462  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13463
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13465$as_echo_n "checking build system type... " >&6; }
13466if ${ac_cv_build+:} false; then :
13467  $as_echo_n "(cached) " >&6
13468else
13469  ac_build_alias=$build_alias
13470test "x$ac_build_alias" = x &&
13471  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13472test "x$ac_build_alias" = x &&
13473  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13474ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13475  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13476
13477fi
13478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13479$as_echo "$ac_cv_build" >&6; }
13480case $ac_cv_build in
13481*-*-*) ;;
13482*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13483esac
13484build=$ac_cv_build
13485ac_save_IFS=$IFS; IFS='-'
13486set x $ac_cv_build
13487shift
13488build_cpu=$1
13489build_vendor=$2
13490shift; shift
13491# Remember, the first character of IFS is used to create $*,
13492# except with old shells:
13493build_os=$*
13494IFS=$ac_save_IFS
13495case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13496
13497
13498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13499$as_echo_n "checking host system type... " >&6; }
13500if ${ac_cv_host+:} false; then :
13501  $as_echo_n "(cached) " >&6
13502else
13503  if test "x$host_alias" = x; then
13504  ac_cv_host=$ac_cv_build
13505else
13506  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13507    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13508fi
13509
13510fi
13511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13512$as_echo "$ac_cv_host" >&6; }
13513case $ac_cv_host in
13514*-*-*) ;;
13515*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13516esac
13517host=$ac_cv_host
13518ac_save_IFS=$IFS; IFS='-'
13519set x $ac_cv_host
13520shift
13521host_cpu=$1
13522host_vendor=$2
13523shift; shift
13524# Remember, the first character of IFS is used to create $*,
13525# except with old shells:
13526host_os=$*
13527IFS=$ac_save_IFS
13528case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13529
13530
13531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13532$as_echo_n "checking target system type... " >&6; }
13533if ${ac_cv_target+:} false; then :
13534  $as_echo_n "(cached) " >&6
13535else
13536  if test "x$target_alias" = x; then
13537  ac_cv_target=$ac_cv_host
13538else
13539  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13540    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13541fi
13542
13543fi
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13545$as_echo "$ac_cv_target" >&6; }
13546case $ac_cv_target in
13547*-*-*) ;;
13548*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13549esac
13550target=$ac_cv_target
13551ac_save_IFS=$IFS; IFS='-'
13552set x $ac_cv_target
13553shift
13554target_cpu=$1
13555target_vendor=$2
13556shift; shift
13557# Remember, the first character of IFS is used to create $*,
13558# except with old shells:
13559target_os=$*
13560IFS=$ac_save_IFS
13561case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13562
13563
13564# The aliases save the names the user supplied, while $host etc.
13565# will get canonicalized.
13566test -n "$target_alias" &&
13567  test "$program_prefix$program_suffix$program_transform_name" = \
13568    NONENONEs,x,x, &&
13569  program_prefix=${target_alias}-
13570
13571  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13572  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13573  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13574  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13575  # to use the configure naming style.
13576
13577
13578
13579
13580
13581  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13582  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13583  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13584  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13585  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13586  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13587
13588
13589
13590  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13591
13592  case "$build_os" in
13593    *linux*)
13594      VAR_OS=linux
13595      VAR_OS_TYPE=unix
13596      ;;
13597    *solaris*)
13598      VAR_OS=solaris
13599      VAR_OS_TYPE=unix
13600      ;;
13601    *darwin*)
13602      VAR_OS=macosx
13603      VAR_OS_TYPE=unix
13604      ;;
13605    *bsd*)
13606      VAR_OS=bsd
13607      VAR_OS_TYPE=unix
13608      ;;
13609    *cygwin*)
13610      VAR_OS=windows
13611      VAR_OS_ENV=windows.cygwin
13612      ;;
13613    *mingw*)
13614      VAR_OS=windows
13615      VAR_OS_ENV=windows.msys
13616      ;;
13617    *aix*)
13618      VAR_OS=aix
13619      VAR_OS_TYPE=unix
13620      ;;
13621    *)
13622      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13623      ;;
13624  esac
13625
13626
13627  # First argument is the cpu name from the trip/quad
13628  case "$build_cpu" in
13629    x86_64)
13630      VAR_CPU=x86_64
13631      VAR_CPU_ARCH=x86
13632      VAR_CPU_BITS=64
13633      VAR_CPU_ENDIAN=little
13634      ;;
13635    i?86)
13636      VAR_CPU=x86
13637      VAR_CPU_ARCH=x86
13638      VAR_CPU_BITS=32
13639      VAR_CPU_ENDIAN=little
13640      ;;
13641    arm*)
13642      VAR_CPU=arm
13643      VAR_CPU_ARCH=arm
13644      VAR_CPU_BITS=32
13645      VAR_CPU_ENDIAN=little
13646      ;;
13647    powerpc)
13648      VAR_CPU=ppc
13649      VAR_CPU_ARCH=ppc
13650      VAR_CPU_BITS=32
13651      VAR_CPU_ENDIAN=big
13652      ;;
13653    powerpc64)
13654      VAR_CPU=ppc64
13655      VAR_CPU_ARCH=ppc
13656      VAR_CPU_BITS=64
13657      VAR_CPU_ENDIAN=big
13658      ;;
13659    powerpc64le)
13660      VAR_CPU=ppc64
13661      VAR_CPU_ARCH=ppc
13662      VAR_CPU_BITS=64
13663      VAR_CPU_ENDIAN=little
13664      ;;
13665    s390)
13666      VAR_CPU=s390
13667      VAR_CPU_ARCH=s390
13668      VAR_CPU_BITS=32
13669      VAR_CPU_ENDIAN=big
13670      ;;
13671    s390x)
13672      VAR_CPU=s390x
13673      VAR_CPU_ARCH=s390
13674      VAR_CPU_BITS=64
13675      VAR_CPU_ENDIAN=big
13676      ;;
13677    sparc)
13678      VAR_CPU=sparc
13679      VAR_CPU_ARCH=sparc
13680      VAR_CPU_BITS=32
13681      VAR_CPU_ENDIAN=big
13682      ;;
13683    sparcv9|sparc64)
13684      VAR_CPU=sparcv9
13685      VAR_CPU_ARCH=sparc
13686      VAR_CPU_BITS=64
13687      VAR_CPU_ENDIAN=big
13688      ;;
13689    *)
13690      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13691      ;;
13692  esac
13693
13694  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13695  OPENJDK_BUILD_OS="$VAR_OS"
13696  if test "x$VAR_OS_TYPE" != x; then
13697    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13698  else
13699    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13700  fi
13701  if test "x$VAR_OS_ENV" != x; then
13702    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13703  else
13704    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13705  fi
13706  OPENJDK_BUILD_CPU="$VAR_CPU"
13707  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13708  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13709  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13710
13711
13712
13713
13714
13715
13716
13717
13718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13719$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13721$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13722
13723  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13724
13725  case "$host_os" in
13726    *linux*)
13727      VAR_OS=linux
13728      VAR_OS_TYPE=unix
13729      ;;
13730    *solaris*)
13731      VAR_OS=solaris
13732      VAR_OS_TYPE=unix
13733      ;;
13734    *darwin*)
13735      VAR_OS=macosx
13736      VAR_OS_TYPE=unix
13737      ;;
13738    *bsd*)
13739      VAR_OS=bsd
13740      VAR_OS_TYPE=unix
13741      ;;
13742    *cygwin*)
13743      VAR_OS=windows
13744      VAR_OS_ENV=windows.cygwin
13745      ;;
13746    *mingw*)
13747      VAR_OS=windows
13748      VAR_OS_ENV=windows.msys
13749      ;;
13750    *aix*)
13751      VAR_OS=aix
13752      VAR_OS_TYPE=unix
13753      ;;
13754    *)
13755      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13756      ;;
13757  esac
13758
13759
13760  # First argument is the cpu name from the trip/quad
13761  case "$host_cpu" in
13762    x86_64)
13763      VAR_CPU=x86_64
13764      VAR_CPU_ARCH=x86
13765      VAR_CPU_BITS=64
13766      VAR_CPU_ENDIAN=little
13767      ;;
13768    i?86)
13769      VAR_CPU=x86
13770      VAR_CPU_ARCH=x86
13771      VAR_CPU_BITS=32
13772      VAR_CPU_ENDIAN=little
13773      ;;
13774    arm*)
13775      VAR_CPU=arm
13776      VAR_CPU_ARCH=arm
13777      VAR_CPU_BITS=32
13778      VAR_CPU_ENDIAN=little
13779      ;;
13780    powerpc)
13781      VAR_CPU=ppc
13782      VAR_CPU_ARCH=ppc
13783      VAR_CPU_BITS=32
13784      VAR_CPU_ENDIAN=big
13785      ;;
13786    powerpc64)
13787      VAR_CPU=ppc64
13788      VAR_CPU_ARCH=ppc
13789      VAR_CPU_BITS=64
13790      VAR_CPU_ENDIAN=big
13791      ;;
13792    powerpc64le)
13793      VAR_CPU=ppc64
13794      VAR_CPU_ARCH=ppc
13795      VAR_CPU_BITS=64
13796      VAR_CPU_ENDIAN=little
13797      ;;
13798    s390)
13799      VAR_CPU=s390
13800      VAR_CPU_ARCH=s390
13801      VAR_CPU_BITS=32
13802      VAR_CPU_ENDIAN=big
13803      ;;
13804    s390x)
13805      VAR_CPU=s390x
13806      VAR_CPU_ARCH=s390
13807      VAR_CPU_BITS=64
13808      VAR_CPU_ENDIAN=big
13809      ;;
13810    sparc)
13811      VAR_CPU=sparc
13812      VAR_CPU_ARCH=sparc
13813      VAR_CPU_BITS=32
13814      VAR_CPU_ENDIAN=big
13815      ;;
13816    sparcv9|sparc64)
13817      VAR_CPU=sparcv9
13818      VAR_CPU_ARCH=sparc
13819      VAR_CPU_BITS=64
13820      VAR_CPU_ENDIAN=big
13821      ;;
13822    *)
13823      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13824      ;;
13825  esac
13826
13827  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13828  OPENJDK_TARGET_OS="$VAR_OS"
13829  if test "x$VAR_OS_TYPE" != x; then
13830    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13831  else
13832    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13833  fi
13834  if test "x$VAR_OS_ENV" != x; then
13835    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13836  else
13837    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13838  fi
13839  OPENJDK_TARGET_CPU="$VAR_CPU"
13840  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13841  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13842  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13843
13844
13845
13846
13847
13848
13849
13850
13851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13852$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13854$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13855
13856
13857
13858# Check whether --with-target-bits was given.
13859if test "${with_target_bits+set}" = set; then :
13860  withval=$with_target_bits;
13861fi
13862
13863
13864  # We have three types of compiles:
13865  # native  == normal compilation, target system == build system
13866  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13867  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13868  #
13869  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13870    # We're doing a proper cross-compilation
13871    COMPILE_TYPE="cross"
13872  else
13873    COMPILE_TYPE="native"
13874  fi
13875
13876  if test "x$with_target_bits" != x; then
13877    if test "x$COMPILE_TYPE" = "xcross"; then
13878      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13879    fi
13880
13881    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13882      # A reduced build is requested
13883      COMPILE_TYPE="reduced"
13884      OPENJDK_TARGET_CPU_BITS=32
13885      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13886        OPENJDK_TARGET_CPU=x86
13887      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13888        OPENJDK_TARGET_CPU=sparc
13889      else
13890        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13891      fi
13892    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13893      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
13894    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13895      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13896$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13897    else
13898      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13899    fi
13900  fi
13901
13902
13903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13904$as_echo_n "checking compilation type... " >&6; }
13905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13906$as_echo "$COMPILE_TYPE" >&6; }
13907
13908
13909  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13910    REQUIRED_OS_NAME=SunOS
13911    REQUIRED_OS_VERSION=5.10
13912  fi
13913  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13914    REQUIRED_OS_NAME=Linux
13915    REQUIRED_OS_VERSION=2.6
13916  fi
13917  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13918    REQUIRED_OS_NAME=Windows
13919    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13920      REQUIRED_OS_VERSION=5.2
13921    else
13922      REQUIRED_OS_VERSION=5.1
13923    fi
13924  fi
13925  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13926    REQUIRED_OS_NAME=Darwin
13927    REQUIRED_OS_VERSION=11.2
13928  fi
13929
13930
13931
13932
13933
13934  # Also store the legacy naming of the cpu.
13935  # Ie i586 and amd64 instead of x86 and x86_64
13936  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13937  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13938    OPENJDK_TARGET_CPU_LEGACY="i586"
13939  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13940    # On all platforms except MacOSX replace x86_64 with amd64.
13941    OPENJDK_TARGET_CPU_LEGACY="amd64"
13942  fi
13943
13944
13945  # And the second legacy naming of the cpu.
13946  # Ie i386 and amd64 instead of x86 and x86_64.
13947  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13948  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13949    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13950  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13951    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13952  fi
13953
13954
13955  # This is the name of the cpu (but using i386 and amd64 instead of
13956  # x86 and x86_64, respectively), preceeded by a /, to be used when
13957  # locating libraries. On macosx, it's empty, though.
13958  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13959  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13960    OPENJDK_TARGET_CPU_LIBDIR=""
13961  fi
13962
13963
13964  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13965  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13966  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13967  OPENJDK_TARGET_CPU_ISADIR=""
13968  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13969    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13970      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13971    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13972      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13973    fi
13974  fi
13975
13976
13977  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13978  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13979  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13980    # On linux only, we replace x86 with i386.
13981    OPENJDK_TARGET_CPU_OSARCH="i386"
13982  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13983    # On all platforms except macosx, we replace x86_64 with amd64.
13984    OPENJDK_TARGET_CPU_OSARCH="amd64"
13985  fi
13986
13987
13988  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13989  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13990    OPENJDK_TARGET_CPU_JLI="i386"
13991  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13992    # On all platforms except macosx, we replace x86_64 with amd64.
13993    OPENJDK_TARGET_CPU_JLI="amd64"
13994  fi
13995  # Now setup the -D flags for building libjli.
13996  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13997  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13998    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13999      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14000    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14001      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14002    fi
14003  fi
14004
14005
14006  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14007      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14008  else
14009      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14010  fi
14011
14012
14013  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14014    A_LP64="LP64:="
14015    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14016    # unpack200.exe
14017    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14018      ADD_LP64="-D_LP64=1"
14019    fi
14020  fi
14021  LP64=$A_LP64
14022
14023
14024  if test "x$COMPILE_TYPE" = "xcross"; then
14025    # FIXME: ... or should this include reduced builds..?
14026    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14027  else
14028    DEFINE_CROSS_COMPILE_ARCH=""
14029  fi
14030
14031
14032  # ZERO_ARCHDEF is used to enable architecture-specific code
14033  case "${OPENJDK_TARGET_CPU}" in
14034    ppc)     ZERO_ARCHDEF=PPC32 ;;
14035    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14036    s390*)   ZERO_ARCHDEF=S390  ;;
14037    sparc*)  ZERO_ARCHDEF=SPARC ;;
14038    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14039    x86)     ZERO_ARCHDEF=IA32  ;;
14040    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14041  esac
14042
14043
14044
14045
14046# Continue setting up basic stuff. Most remaining code require fundamental tools.
14047
14048  # Save the current directory this script was started from
14049  CURDIR="$PWD"
14050
14051  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14052    PATH_SEP=";"
14053
14054  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14055  if test $SRC_ROOT_LENGTH -gt 100; then
14056    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14057  fi
14058
14059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14061$as_echo_n "checking cygwin release... " >&6; }
14062    CYGWIN_VERSION=`$UNAME -r`
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14064$as_echo "$CYGWIN_VERSION" >&6; }
14065    WINDOWS_ENV_VENDOR='cygwin'
14066    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14067
14068    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14069    if test "x$CYGWIN_VERSION_OK" = x; then
14070      { $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
14071$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;}
14072      as_fn_error $? "Cannot continue" "$LINENO" 5
14073    fi
14074    if test "x$CYGPATH" = x; then
14075      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14076    fi
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14078$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14079    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14080    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14081    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14082    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14084$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14085    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14086    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14087    if test "x$test_cygdrive_prefix" = x; then
14088      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14089    fi
14090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14092$as_echo_n "checking msys release... " >&6; }
14093    MSYS_VERSION=`$UNAME -r`
14094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14095$as_echo "$MSYS_VERSION" >&6; }
14096
14097    WINDOWS_ENV_VENDOR='msys'
14098    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14099
14100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14101$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14102    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14103    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14104
14105  windows_path="$MSYS_ROOT_PATH"
14106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14107    unix_path=`$CYGPATH -u "$windows_path"`
14108    MSYS_ROOT_PATH="$unix_path"
14109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14111    MSYS_ROOT_PATH="$unix_path"
14112  fi
14113
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14115$as_echo "$MSYS_ROOT_PATH" >&6; }
14116    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14117  else
14118    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14119  fi
14120
14121  # Test if windows or unix (cygwin/msys) find is first in path.
14122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14123$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14124  FIND_BINARY_OUTPUT=`find --version 2>&1`
14125  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14127$as_echo "unix style" >&6; }
14128  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14130$as_echo "Windows" >&6; }
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14132$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14133    { $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
14134$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14135    as_fn_error $? "Cannot continue" "$LINENO" 5
14136  else
14137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14138$as_echo "unknown" >&6; }
14139    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14140$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14141  fi
14142
14143  else
14144    PATH_SEP=":"
14145  fi
14146
14147
14148  # We get the top-level directory from the supporting wrappers.
14149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14150$as_echo_n "checking for top-level directory... " >&6; }
14151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14152$as_echo "$TOPDIR" >&6; }
14153
14154
14155  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14156
14157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14158
14159  # Input might be given as Windows format, start by converting to
14160  # unix format.
14161  path="$CURDIR"
14162  new_path=`$CYGPATH -u "$path"`
14163
14164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14167  # "foo.exe" is OK but "foo" is an error.
14168  #
14169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14170  # It is also a way to make sure we got the proper file name for the real test later on.
14171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14172  if test "x$test_shortpath" = x; then
14173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14174$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14175    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14176  fi
14177
14178  # Call helper function which possibly converts this using DOS-style short mode.
14179  # If so, the updated path is stored in $new_path.
14180
14181  input_path="$new_path"
14182  # Check if we need to convert this using DOS-style short mode. If the path
14183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14184  # take no chances and rewrite it.
14185  # Note: m4 eats our [], so we need to use [ and ] instead.
14186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14187  if test "x$has_forbidden_chars" != x; then
14188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14192      # Going to short mode and back again did indeed matter. Since short mode is
14193      # case insensitive, let's make it lowercase to improve readability.
14194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14195      # Now convert it back to Unix-stile (cygpath)
14196      input_path=`$CYGPATH -u "$shortmode_path"`
14197      new_path="$input_path"
14198    fi
14199  fi
14200
14201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14202  if test "x$test_cygdrive_prefix" = x; then
14203    # As a simple fix, exclude /usr/bin since it's not a real path.
14204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14206      # a path prefixed by /cygdrive for fixpath to work.
14207      new_path="$CYGWIN_ROOT_PATH$input_path"
14208    fi
14209  fi
14210
14211
14212  if test "x$path" != "x$new_path"; then
14213    CURDIR="$new_path"
14214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14215$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14216  fi
14217
14218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14219
14220  path="$CURDIR"
14221  has_colon=`$ECHO $path | $GREP ^.:`
14222  new_path="$path"
14223  if test "x$has_colon" = x; then
14224    # Not in mixed or Windows style, start by that.
14225    new_path=`cmd //c echo $path`
14226  fi
14227
14228
14229  input_path="$new_path"
14230  # Check if we need to convert this using DOS-style short mode. If the path
14231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14232  # take no chances and rewrite it.
14233  # Note: m4 eats our [], so we need to use [ and ] instead.
14234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14235  if test "x$has_forbidden_chars" != x; then
14236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14238  fi
14239
14240
14241  windows_path="$new_path"
14242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14243    unix_path=`$CYGPATH -u "$windows_path"`
14244    new_path="$unix_path"
14245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14247    new_path="$unix_path"
14248  fi
14249
14250  if test "x$path" != "x$new_path"; then
14251    CURDIR="$new_path"
14252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14253$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14254  fi
14255
14256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14258
14259  else
14260    # We're on a unix platform. Hooray! :)
14261    path="$CURDIR"
14262    has_space=`$ECHO "$path" | $GREP " "`
14263    if test "x$has_space" != x; then
14264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14265$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14266      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14267    fi
14268
14269    # Use eval to expand a potential ~
14270    eval path="$path"
14271    if test ! -f "$path" && test ! -d "$path"; then
14272      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14273    fi
14274
14275    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14276  fi
14277
14278
14279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14280
14281  # Input might be given as Windows format, start by converting to
14282  # unix format.
14283  path="$TOPDIR"
14284  new_path=`$CYGPATH -u "$path"`
14285
14286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14289  # "foo.exe" is OK but "foo" is an error.
14290  #
14291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14292  # It is also a way to make sure we got the proper file name for the real test later on.
14293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14294  if test "x$test_shortpath" = x; then
14295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14296$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14297    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14298  fi
14299
14300  # Call helper function which possibly converts this using DOS-style short mode.
14301  # If so, the updated path is stored in $new_path.
14302
14303  input_path="$new_path"
14304  # Check if we need to convert this using DOS-style short mode. If the path
14305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14306  # take no chances and rewrite it.
14307  # Note: m4 eats our [], so we need to use [ and ] instead.
14308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14309  if test "x$has_forbidden_chars" != x; then
14310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14314      # Going to short mode and back again did indeed matter. Since short mode is
14315      # case insensitive, let's make it lowercase to improve readability.
14316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14317      # Now convert it back to Unix-stile (cygpath)
14318      input_path=`$CYGPATH -u "$shortmode_path"`
14319      new_path="$input_path"
14320    fi
14321  fi
14322
14323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14324  if test "x$test_cygdrive_prefix" = x; then
14325    # As a simple fix, exclude /usr/bin since it's not a real path.
14326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14328      # a path prefixed by /cygdrive for fixpath to work.
14329      new_path="$CYGWIN_ROOT_PATH$input_path"
14330    fi
14331  fi
14332
14333
14334  if test "x$path" != "x$new_path"; then
14335    TOPDIR="$new_path"
14336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14337$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14338  fi
14339
14340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14341
14342  path="$TOPDIR"
14343  has_colon=`$ECHO $path | $GREP ^.:`
14344  new_path="$path"
14345  if test "x$has_colon" = x; then
14346    # Not in mixed or Windows style, start by that.
14347    new_path=`cmd //c echo $path`
14348  fi
14349
14350
14351  input_path="$new_path"
14352  # Check if we need to convert this using DOS-style short mode. If the path
14353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14354  # take no chances and rewrite it.
14355  # Note: m4 eats our [], so we need to use [ and ] instead.
14356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14357  if test "x$has_forbidden_chars" != x; then
14358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14360  fi
14361
14362
14363  windows_path="$new_path"
14364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14365    unix_path=`$CYGPATH -u "$windows_path"`
14366    new_path="$unix_path"
14367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14369    new_path="$unix_path"
14370  fi
14371
14372  if test "x$path" != "x$new_path"; then
14373    TOPDIR="$new_path"
14374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14375$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14376  fi
14377
14378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14380
14381  else
14382    # We're on a unix platform. Hooray! :)
14383    path="$TOPDIR"
14384    has_space=`$ECHO "$path" | $GREP " "`
14385    if test "x$has_space" != x; then
14386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14387$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14388      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14389    fi
14390
14391    # Use eval to expand a potential ~
14392    eval path="$path"
14393    if test ! -f "$path" && test ! -d "$path"; then
14394      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14395    fi
14396
14397    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14398  fi
14399
14400  # SRC_ROOT is a traditional alias for TOPDIR.
14401  SRC_ROOT=$TOPDIR
14402
14403  # Locate the directory of this script.
14404  AUTOCONF_DIR=$TOPDIR/common/autoconf
14405
14406
14407  # Setup default logging of stdout and stderr to build.log in the output root.
14408  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14409  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14410  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14411
14412
14413
14414
14415
14416# Check if it's a pure open build or if custom sources are to be used.
14417
14418  # Check whether --enable-openjdk-only was given.
14419if test "${enable_openjdk_only+set}" = set; then :
14420  enableval=$enable_openjdk_only;
14421else
14422  enable_openjdk_only="no"
14423fi
14424
14425
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14427$as_echo_n "checking for presence of closed sources... " >&6; }
14428  if test -d "$SRC_ROOT/jdk/src/closed"; then
14429    CLOSED_SOURCE_PRESENT=yes
14430  else
14431    CLOSED_SOURCE_PRESENT=no
14432  fi
14433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14434$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14435
14436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14437$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14438  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14440$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14441
14442  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14443    OPENJDK=true
14444    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14445      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14446$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14447    fi
14448  else
14449    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14450      OPENJDK=true
14451    else
14452      OPENJDK=false
14453    fi
14454  fi
14455
14456  if test "x$OPENJDK" = "xtrue"; then
14457    SET_OPENJDK="OPENJDK=true"
14458  fi
14459
14460
14461
14462  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14463  # the IncludeCustomExtension macro.
14464
14465
14466# Check whether --with-custom-make-dir was given.
14467if test "${with_custom_make_dir+set}" = set; then :
14468  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
14469$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14470fi
14471
14472
14473
14474
14475# These are needed to be able to create a configuration name (and thus the output directory)
14476
14477  ###############################################################################
14478  #
14479  # Check which variant of the JDK that we want to build.
14480  # Currently we have:
14481  #    normal:   standard edition
14482  # but the custom make system may add other variants
14483  #
14484  # Effectively the JDK variant gives a name to a specific set of
14485  # modules to compile into the JDK. In the future, these modules
14486  # might even be Jigsaw modules.
14487  #
14488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14489$as_echo_n "checking which variant of the JDK to build... " >&6; }
14490
14491# Check whether --with-jdk-variant was given.
14492if test "${with_jdk_variant+set}" = set; then :
14493  withval=$with_jdk_variant;
14494fi
14495
14496
14497  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14498    JDK_VARIANT="normal"
14499  else
14500    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14501  fi
14502
14503
14504
14505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14506$as_echo "$JDK_VARIANT" >&6; }
14507
14508
14509###############################################################################
14510#
14511# Check which interpreter of the JVM we want to build.
14512# Currently we have:
14513#    template: Template interpreter (the default)
14514#    cpp     : C++ interpreter
14515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14516$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14517
14518# Check whether --with-jvm-interpreter was given.
14519if test "${with_jvm_interpreter+set}" = set; then :
14520  withval=$with_jvm_interpreter;
14521fi
14522
14523
14524if test "x$with_jvm_interpreter" = x; then
14525     with_jvm_interpreter="template"
14526fi
14527
14528JVM_INTERPRETER="$with_jvm_interpreter"
14529
14530if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14531   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14532fi
14533
14534
14535
14536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14537$as_echo "$with_jvm_interpreter" >&6; }
14538
14539
14540
14541  ###############################################################################
14542  #
14543  # Check which variants of the JVM that we want to build.
14544  # Currently we have:
14545  #    server: normal interpreter and a tiered C1/C2 compiler
14546  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14547  #    minimal1: reduced form of client with optional VM services and features stripped out
14548  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14549  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14550  #    zero: no machine code interpreter, no compiler
14551  #    zeroshark: zero interpreter and shark/llvm compiler backend
14552#    core: interpreter only, no compiler (only works on some platforms)
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14554$as_echo_n "checking which variants of the JVM to build... " >&6; }
14555
14556# Check whether --with-jvm-variants was given.
14557if test "${with_jvm_variants+set}" = set; then :
14558  withval=$with_jvm_variants;
14559fi
14560
14561
14562  if test "x$with_jvm_variants" = x; then
14563    with_jvm_variants="server"
14564  fi
14565
14566  JVM_VARIANTS=",$with_jvm_variants,"
14567  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,//'`
14568
14569  if test "x$TEST_VARIANTS" != "x,"; then
14570     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14571  fi
14572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14573$as_echo "$with_jvm_variants" >&6; }
14574
14575  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14576  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14577  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14578  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14579  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14580  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14581  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14582
14583  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14584    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14585      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14586    fi
14587  fi
14588  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14589    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14590      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14591    fi
14592  fi
14593  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14594    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14595      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14596    fi
14597  fi
14598
14599  # Replace the commas with AND for use in the build directory name.
14600  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14601  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/'`
14602  if test "x$COUNT_VARIANTS" != "x,1"; then
14603    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14604  else
14605    BUILDING_MULTIPLE_JVM_VARIANTS=no
14606  fi
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617  INCLUDE_SA=true
14618  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14619    INCLUDE_SA=false
14620  fi
14621  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14622    INCLUDE_SA=false
14623  fi
14624  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14625    INCLUDE_SA=false
14626  fi
14627
14628
14629  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14630    MACOSX_UNIVERSAL="true"
14631  fi
14632
14633
14634
14635
14636  ###############################################################################
14637  #
14638  # Set the debug level
14639  #    release: no debug information, all optimizations, no asserts.
14640  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14641  #    fastdebug: debug information (-g), all optimizations, all asserts
14642  #    slowdebug: debug information (-g), no optimizations, all asserts
14643  #
14644  DEBUG_LEVEL="release"
14645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14646$as_echo_n "checking which debug level to use... " >&6; }
14647  # Check whether --enable-debug was given.
14648if test "${enable_debug+set}" = set; then :
14649  enableval=$enable_debug;
14650        ENABLE_DEBUG="${enableval}"
14651        DEBUG_LEVEL="fastdebug"
14652
14653else
14654  ENABLE_DEBUG="no"
14655fi
14656
14657
14658
14659# Check whether --with-debug-level was given.
14660if test "${with_debug_level+set}" = set; then :
14661  withval=$with_debug_level;
14662        DEBUG_LEVEL="${withval}"
14663        if test "x$ENABLE_DEBUG" = xyes; then
14664          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14665        fi
14666
14667fi
14668
14669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14670$as_echo "$DEBUG_LEVEL" >&6; }
14671
14672  if test "x$DEBUG_LEVEL" != xrelease && \
14673      test "x$DEBUG_LEVEL" != xoptimized && \
14674      test "x$DEBUG_LEVEL" != xfastdebug && \
14675      test "x$DEBUG_LEVEL" != xslowdebug; then
14676    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14677  fi
14678
14679
14680  ###############################################################################
14681  #
14682  # Setup legacy vars/targets and new vars to deal with different debug levels.
14683  #
14684
14685  case $DEBUG_LEVEL in
14686    release )
14687      VARIANT="OPT"
14688      FASTDEBUG="false"
14689      DEBUG_CLASSFILES="false"
14690      BUILD_VARIANT_RELEASE=""
14691      HOTSPOT_DEBUG_LEVEL="product"
14692      HOTSPOT_EXPORT="product"
14693      ;;
14694    fastdebug )
14695      VARIANT="DBG"
14696      FASTDEBUG="true"
14697      DEBUG_CLASSFILES="true"
14698      BUILD_VARIANT_RELEASE="-fastdebug"
14699      HOTSPOT_DEBUG_LEVEL="fastdebug"
14700      HOTSPOT_EXPORT="fastdebug"
14701      ;;
14702    slowdebug )
14703      VARIANT="DBG"
14704      FASTDEBUG="false"
14705      DEBUG_CLASSFILES="true"
14706      BUILD_VARIANT_RELEASE="-debug"
14707      HOTSPOT_DEBUG_LEVEL="debug"
14708      HOTSPOT_EXPORT="debug"
14709      ;;
14710    optimized )
14711      VARIANT="OPT"
14712      FASTDEBUG="false"
14713      DEBUG_CLASSFILES="false"
14714      BUILD_VARIANT_RELEASE="-optimized"
14715      HOTSPOT_DEBUG_LEVEL="optimized"
14716      HOTSPOT_EXPORT="optimized"
14717      ;;
14718  esac
14719
14720  # The debug level 'optimized' is a little special because it is currently only
14721  # applicable to the HotSpot build where it means to build a completely
14722  # optimized version of the VM without any debugging code (like for the
14723  # 'release' debug level which is called 'product' in the HotSpot build) but
14724  # with the exception that it can contain additional code which is otherwise
14725  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14726  # test new and/or experimental features which are not intended for customer
14727  # shipment. Because these new features need to be tested and benchmarked in
14728  # real world scenarios, we want to build the containing JDK at the 'release'
14729  # debug level.
14730  if test "x$DEBUG_LEVEL" = xoptimized; then
14731    DEBUG_LEVEL="release"
14732  fi
14733
14734  #####
14735  # Generate the legacy makefile targets for hotspot.
14736  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14737  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14738  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14739  # But until then ...
14740  HOTSPOT_TARGET=""
14741
14742  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14743    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14744  fi
14745
14746  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14747    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14748  fi
14749
14750  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14752  fi
14753
14754  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14755    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14756  fi
14757
14758  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14759    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14760  fi
14761
14762  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14764  fi
14765
14766  if test "x$JVM_VARIANT_CORE" = xtrue; then
14767    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14768  fi
14769
14770  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14771
14772  # On Macosx universal binaries are produced, but they only contain
14773  # 64 bit intel. This invalidates control of which jvms are built
14774  # from configure, but only server is valid anyway. Fix this
14775  # when hotspot makefiles are rewritten.
14776  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14777    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14778  fi
14779
14780  #####
14781
14782
14783
14784
14785
14786
14787
14788
14789# With basic setup done, call the custom early hook.
14790
14791
14792# Check if we have devkits, extra paths or sysroot set.
14793
14794
14795# Check whether --with-devkit was given.
14796if test "${with_devkit+set}" = set; then :
14797  withval=$with_devkit;
14798
14799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14800
14801  # Input might be given as Windows format, start by converting to
14802  # unix format.
14803  path="$with_devkit"
14804  new_path=`$CYGPATH -u "$path"`
14805
14806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14809  # "foo.exe" is OK but "foo" is an error.
14810  #
14811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14812  # It is also a way to make sure we got the proper file name for the real test later on.
14813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14814  if test "x$test_shortpath" = x; then
14815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14816$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14817    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14818  fi
14819
14820  # Call helper function which possibly converts this using DOS-style short mode.
14821  # If so, the updated path is stored in $new_path.
14822
14823  input_path="$new_path"
14824  # Check if we need to convert this using DOS-style short mode. If the path
14825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14826  # take no chances and rewrite it.
14827  # Note: m4 eats our [], so we need to use [ and ] instead.
14828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14829  if test "x$has_forbidden_chars" != x; then
14830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14834      # Going to short mode and back again did indeed matter. Since short mode is
14835      # case insensitive, let's make it lowercase to improve readability.
14836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14837      # Now convert it back to Unix-stile (cygpath)
14838      input_path=`$CYGPATH -u "$shortmode_path"`
14839      new_path="$input_path"
14840    fi
14841  fi
14842
14843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14844  if test "x$test_cygdrive_prefix" = x; then
14845    # As a simple fix, exclude /usr/bin since it's not a real path.
14846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14848      # a path prefixed by /cygdrive for fixpath to work.
14849      new_path="$CYGWIN_ROOT_PATH$input_path"
14850    fi
14851  fi
14852
14853
14854  if test "x$path" != "x$new_path"; then
14855    with_devkit="$new_path"
14856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14857$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14858  fi
14859
14860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14861
14862  path="$with_devkit"
14863  has_colon=`$ECHO $path | $GREP ^.:`
14864  new_path="$path"
14865  if test "x$has_colon" = x; then
14866    # Not in mixed or Windows style, start by that.
14867    new_path=`cmd //c echo $path`
14868  fi
14869
14870
14871  input_path="$new_path"
14872  # Check if we need to convert this using DOS-style short mode. If the path
14873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14874  # take no chances and rewrite it.
14875  # Note: m4 eats our [], so we need to use [ and ] instead.
14876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14877  if test "x$has_forbidden_chars" != x; then
14878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14880  fi
14881
14882
14883  windows_path="$new_path"
14884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14885    unix_path=`$CYGPATH -u "$windows_path"`
14886    new_path="$unix_path"
14887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14889    new_path="$unix_path"
14890  fi
14891
14892  if test "x$path" != "x$new_path"; then
14893    with_devkit="$new_path"
14894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14895$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14896  fi
14897
14898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14900
14901  else
14902    # We're on a unix platform. Hooray! :)
14903    path="$with_devkit"
14904    has_space=`$ECHO "$path" | $GREP " "`
14905    if test "x$has_space" != x; then
14906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14907$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14908      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14909    fi
14910
14911    # Use eval to expand a potential ~
14912    eval path="$path"
14913    if test ! -f "$path" && test ! -d "$path"; then
14914      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14915    fi
14916
14917    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14918  fi
14919
14920        DEVKIT_ROOT="$with_devkit"
14921        # Check for a meta data info file in the root of the devkit
14922        if test -f "$DEVKIT_ROOT/devkit.info"; then
14923          # This potentially sets the following:
14924          # DEVKIT_NAME: A descriptive name of the devkit
14925          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14926          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14927          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14928          . $DEVKIT_ROOT/devkit.info
14929        fi
14930
14931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14932$as_echo_n "checking for devkit... " >&6; }
14933        if test "x$DEVKIT_NAME" != x; then
14934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14935$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14936        else
14937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14938$as_echo "$DEVKIT_ROOT" >&6; }
14939        fi
14940
14941        if test "x$DEVKIT_EXTRA_PATH" != x; then
14942
14943  if test "x$DEVKIT_EXTRA_PATH" != x; then
14944    if test "x$EXTRA_PATH" = x; then
14945      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14946    else
14947      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14948    fi
14949  fi
14950
14951        fi
14952
14953        # Fallback default of just /bin if DEVKIT_PATH is not defined
14954        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14955          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14956        fi
14957
14958  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14959    if test "x$TOOLCHAIN_PATH" = x; then
14960      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14961    else
14962      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14963    fi
14964  fi
14965
14966
14967        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14968        # places for backwards compatiblity.
14969        if test "x$DEVKIT_SYSROOT" != x; then
14970          SYSROOT="$DEVKIT_SYSROOT"
14971        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14972          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14973        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14974          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14975        fi
14976
14977
14978fi
14979
14980
14981  # You can force the sysroot if the sysroot encoded into the compiler tools
14982  # is not correct.
14983
14984# Check whether --with-sys-root was given.
14985if test "${with_sys_root+set}" = set; then :
14986  withval=$with_sys_root; SYSROOT=$with_sys_root
14987
14988fi
14989
14990
14991
14992# Check whether --with-sysroot was given.
14993if test "${with_sysroot+set}" = set; then :
14994  withval=$with_sysroot; SYSROOT=$with_sysroot
14995
14996fi
14997
14998
14999
15000# Check whether --with-tools-dir was given.
15001if test "${with_tools_dir+set}" = set; then :
15002  withval=$with_tools_dir;
15003  if test "x$with_tools_dir" != x; then
15004    if test "x$TOOLCHAIN_PATH" = x; then
15005      TOOLCHAIN_PATH="$with_tools_dir"
15006    else
15007      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15008    fi
15009  fi
15010
15011
15012fi
15013
15014
15015
15016# Check whether --with-toolchain-path was given.
15017if test "${with_toolchain_path+set}" = set; then :
15018  withval=$with_toolchain_path;
15019  if test "x$with_toolchain_path" != x; then
15020    if test "x$TOOLCHAIN_PATH" = x; then
15021      TOOLCHAIN_PATH="$with_toolchain_path"
15022    else
15023      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15024    fi
15025  fi
15026
15027
15028fi
15029
15030
15031
15032# Check whether --with-extra-path was given.
15033if test "${with_extra_path+set}" = set; then :
15034  withval=$with_extra_path;
15035  if test "x$with_extra_path" != x; then
15036    if test "x$EXTRA_PATH" = x; then
15037      EXTRA_PATH="$with_extra_path"
15038    else
15039      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15040    fi
15041  fi
15042
15043
15044fi
15045
15046
15047  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15048    # detect if Xcode is installed by running xcodebuild -version
15049    # if no Xcode installed, xcodebuild exits with 1
15050    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15051    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15052      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15053      # fall back on the stub binary in /usr/bin/xcodebuild
15054      # Extract the first word of "xcodebuild", so it can be a program name with args.
15055set dummy xcodebuild; ac_word=$2
15056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15057$as_echo_n "checking for $ac_word... " >&6; }
15058if ${ac_cv_path_XCODEBUILD+:} false; then :
15059  $as_echo_n "(cached) " >&6
15060else
15061  case $XCODEBUILD in
15062  [\\/]* | ?:[\\/]*)
15063  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15064  ;;
15065  *)
15066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15067for as_dir in $TOOLCHAIN_PATH
15068do
15069  IFS=$as_save_IFS
15070  test -z "$as_dir" && as_dir=.
15071    for ac_exec_ext in '' $ac_executable_extensions; do
15072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15073    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15075    break 2
15076  fi
15077done
15078  done
15079IFS=$as_save_IFS
15080
15081  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15082  ;;
15083esac
15084fi
15085XCODEBUILD=$ac_cv_path_XCODEBUILD
15086if test -n "$XCODEBUILD"; then
15087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15088$as_echo "$XCODEBUILD" >&6; }
15089else
15090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15091$as_echo "no" >&6; }
15092fi
15093
15094
15095    else
15096      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15097      # when only the command line tools are installed there are no SDKs, so headers
15098      # are copied into the system frameworks
15099      XCODEBUILD=
15100
15101    fi
15102
15103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15104$as_echo_n "checking for sdk name... " >&6; }
15105
15106# Check whether --with-sdk-name was given.
15107if test "${with_sdk_name+set}" = set; then :
15108  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15109
15110fi
15111
15112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15113$as_echo "$SDKNAME" >&6; }
15114
15115    # if toolchain path is specified then don't rely on system headers, they may not compile
15116    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15117    test -z "$TOOLCHAIN_PATH" && \
15118      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15119
15120    if test -z "$SYSROOT"; then
15121      if test -n "$XCODEBUILD"; then
15122        # if we don't have system headers, use default SDK name (last resort)
15123        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15124          SDKNAME=${SDKNAME:-macosx}
15125        fi
15126
15127        if test -n "$SDKNAME"; then
15128          # Call xcodebuild to determine SYSROOT
15129          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15130        fi
15131      else
15132        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15133          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
15134        fi
15135      fi
15136    else
15137      # warn user if --with-sdk-name was also set
15138      if test -n "$with_sdk_name"; then
15139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15140$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15141      fi
15142    fi
15143
15144    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15145      # If no system framework headers, then SYSROOT must be set, or we won't build
15146      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
15147    fi
15148
15149    # Perform a basic sanity test
15150    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15151      if test -z "$SYSROOT"; then
15152        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
15153      else
15154        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15155      fi
15156    fi
15157
15158    # set SDKROOT too, Xcode tools will pick it up
15159    SDKROOT=$SYSROOT
15160
15161  fi
15162
15163  # Prepend the extra path to the global path
15164
15165  if test "x$EXTRA_PATH" != x; then
15166    if test "x$PATH" = x; then
15167      PATH="$EXTRA_PATH"
15168    else
15169      PATH="$EXTRA_PATH:$PATH"
15170    fi
15171  fi
15172
15173
15174  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15175    # Add extra search paths on solaris for utilities like ar and as etc...
15176    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15177  fi
15178
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15180$as_echo_n "checking for sysroot... " >&6; }
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15182$as_echo "$SYSROOT" >&6; }
15183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15184$as_echo_n "checking for toolchain path... " >&6; }
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15186$as_echo "$TOOLCHAIN_PATH" >&6; }
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15188$as_echo_n "checking for extra path... " >&6; }
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15190$as_echo "$EXTRA_PATH" >&6; }
15191
15192
15193# To properly create a configuration name, we need to have the OpenJDK target
15194# and options (variants and debug level) parsed.
15195
15196
15197
15198# Check whether --with-conf-name was given.
15199if test "${with_conf_name+set}" = set; then :
15200  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15201fi
15202
15203
15204  # Test from where we are running configure, in or outside of src root.
15205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15206$as_echo_n "checking where to store configuration... " >&6; }
15207  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15208      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15209      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15210    # We are running configure from the src root.
15211    # Create a default ./build/target-variant-debuglevel output root.
15212    if test "x${CONF_NAME}" = x; then
15213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15214$as_echo "in default location" >&6; }
15215      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15216    else
15217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15218$as_echo "in build directory with custom name" >&6; }
15219    fi
15220    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15221    $MKDIR -p "$OUTPUT_ROOT"
15222    if test ! -d "$OUTPUT_ROOT"; then
15223      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15224    fi
15225  else
15226    # We are running configure from outside of the src dir.
15227    # Then use the current directory as output dir!
15228    # If configuration is situated in normal build directory, just use the build
15229    # directory name as configuration name, otherwise use the complete path.
15230    if test "x${CONF_NAME}" = x; then
15231      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15232    fi
15233    OUTPUT_ROOT="$CURDIR"
15234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15235$as_echo "in current directory" >&6; }
15236
15237    # WARNING: This might be a bad thing to do. You need to be sure you want to
15238    # have a configuration in this directory. Do some sanity checks!
15239
15240    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15241      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15242      # other files
15243      files_present=`$LS $OUTPUT_ROOT`
15244      # Configure has already touched config.log and confdefs.h in the current dir when this check
15245      # is performed.
15246      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15247      | $TR -d '\n'`
15248      if test "x$filtered_files" != x; then
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15250$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15252$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15253        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15254$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15255        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15256$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15257        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15258$as_echo "$as_me: seriously mess up just about everything." >&6;}
15259        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15260$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15261        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15262$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15263        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15264      fi
15265    fi
15266  fi
15267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15268$as_echo_n "checking what configuration name to use... " >&6; }
15269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15270$as_echo "$CONF_NAME" >&6; }
15271
15272
15273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15274
15275  # Input might be given as Windows format, start by converting to
15276  # unix format.
15277  path="$OUTPUT_ROOT"
15278  new_path=`$CYGPATH -u "$path"`
15279
15280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15283  # "foo.exe" is OK but "foo" is an error.
15284  #
15285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15286  # It is also a way to make sure we got the proper file name for the real test later on.
15287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15288  if test "x$test_shortpath" = x; then
15289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15290$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15291    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15292  fi
15293
15294  # Call helper function which possibly converts this using DOS-style short mode.
15295  # If so, the updated path is stored in $new_path.
15296
15297  input_path="$new_path"
15298  # Check if we need to convert this using DOS-style short mode. If the path
15299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15300  # take no chances and rewrite it.
15301  # Note: m4 eats our [], so we need to use [ and ] instead.
15302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15303  if test "x$has_forbidden_chars" != x; then
15304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15308      # Going to short mode and back again did indeed matter. Since short mode is
15309      # case insensitive, let's make it lowercase to improve readability.
15310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15311      # Now convert it back to Unix-stile (cygpath)
15312      input_path=`$CYGPATH -u "$shortmode_path"`
15313      new_path="$input_path"
15314    fi
15315  fi
15316
15317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15318  if test "x$test_cygdrive_prefix" = x; then
15319    # As a simple fix, exclude /usr/bin since it's not a real path.
15320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15322      # a path prefixed by /cygdrive for fixpath to work.
15323      new_path="$CYGWIN_ROOT_PATH$input_path"
15324    fi
15325  fi
15326
15327
15328  if test "x$path" != "x$new_path"; then
15329    OUTPUT_ROOT="$new_path"
15330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15331$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15332  fi
15333
15334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15335
15336  path="$OUTPUT_ROOT"
15337  has_colon=`$ECHO $path | $GREP ^.:`
15338  new_path="$path"
15339  if test "x$has_colon" = x; then
15340    # Not in mixed or Windows style, start by that.
15341    new_path=`cmd //c echo $path`
15342  fi
15343
15344
15345  input_path="$new_path"
15346  # Check if we need to convert this using DOS-style short mode. If the path
15347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15348  # take no chances and rewrite it.
15349  # Note: m4 eats our [], so we need to use [ and ] instead.
15350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15351  if test "x$has_forbidden_chars" != x; then
15352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15354  fi
15355
15356
15357  windows_path="$new_path"
15358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15359    unix_path=`$CYGPATH -u "$windows_path"`
15360    new_path="$unix_path"
15361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15363    new_path="$unix_path"
15364  fi
15365
15366  if test "x$path" != "x$new_path"; then
15367    OUTPUT_ROOT="$new_path"
15368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15369$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15370  fi
15371
15372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15374
15375  else
15376    # We're on a unix platform. Hooray! :)
15377    path="$OUTPUT_ROOT"
15378    has_space=`$ECHO "$path" | $GREP " "`
15379    if test "x$has_space" != x; then
15380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15381$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15382      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15383    fi
15384
15385    # Use eval to expand a potential ~
15386    eval path="$path"
15387    if test ! -f "$path" && test ! -d "$path"; then
15388      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15389    fi
15390
15391    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15392  fi
15393
15394
15395  SPEC=$OUTPUT_ROOT/spec.gmk
15396
15397  CONF_NAME=$CONF_NAME
15398
15399  OUTPUT_ROOT=$OUTPUT_ROOT
15400
15401
15402  # The spec.gmk file contains all variables for the make system.
15403  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15404
15405  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15406  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15407
15408  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15409  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15410
15411  # The compare.sh is used to compare the build output to other builds.
15412  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15413
15414  # The generated Makefile knows where the spec.gmk is and where the source is.
15415  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15416  # which will look for generated configurations
15417  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15418
15419
15420
15421# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15422
15423  for ac_prog in apt-get yum port pkgutil pkgadd
15424do
15425  # Extract the first word of "$ac_prog", so it can be a program name with args.
15426set dummy $ac_prog; ac_word=$2
15427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15428$as_echo_n "checking for $ac_word... " >&6; }
15429if ${ac_cv_prog_PKGHANDLER+:} false; then :
15430  $as_echo_n "(cached) " >&6
15431else
15432  if test -n "$PKGHANDLER"; then
15433  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15434else
15435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15436for as_dir in $PATH
15437do
15438  IFS=$as_save_IFS
15439  test -z "$as_dir" && as_dir=.
15440    for ac_exec_ext in '' $ac_executable_extensions; do
15441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15442    ac_cv_prog_PKGHANDLER="$ac_prog"
15443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15444    break 2
15445  fi
15446done
15447  done
15448IFS=$as_save_IFS
15449
15450fi
15451fi
15452PKGHANDLER=$ac_cv_prog_PKGHANDLER
15453if test -n "$PKGHANDLER"; then
15454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15455$as_echo "$PKGHANDLER" >&6; }
15456else
15457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15458$as_echo "no" >&6; }
15459fi
15460
15461
15462  test -n "$PKGHANDLER" && break
15463done
15464
15465
15466
15467# Setup tools that requires more complex handling, or that is not needed by the configure script.
15468
15469
15470  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15471  if test "x$MAKE" != x; then
15472    # User has supplied a make, test it.
15473    if test ! -f "$MAKE"; then
15474      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15475    fi
15476
15477  MAKE_CANDIDATE=""$MAKE""
15478  DESCRIPTION="user supplied MAKE=$MAKE"
15479  if test "x$MAKE_CANDIDATE" != x; then
15480    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15481$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15482    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15483    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15484    if test "x$IS_GNU_MAKE" = x; then
15485      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15486$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15487    else
15488      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15489      if test "x$IS_MODERN_MAKE" = x; then
15490        { $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
15491$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;}
15492      else
15493        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15494          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15495            MAKE_EXPECTED_ENV='cygwin'
15496          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15497            MAKE_EXPECTED_ENV='msys'
15498          else
15499            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15500          fi
15501          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15502          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15503        else
15504          # Not relevant for non-Windows
15505          IS_MAKE_CORRECT_ENV=true
15506        fi
15507        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15508          { $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
15509$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;}
15510        else
15511          FOUND_MAKE=$MAKE_CANDIDATE
15512
15513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15514
15515  # First separate the path from the arguments. This will split at the first
15516  # space.
15517  complete="$FOUND_MAKE"
15518  path="${complete%% *}"
15519  tmp="$complete EOL"
15520  arguments="${tmp#* }"
15521
15522  # Input might be given as Windows format, start by converting to
15523  # unix format.
15524  new_path=`$CYGPATH -u "$path"`
15525
15526  # Now try to locate executable using which
15527  new_path=`$WHICH "$new_path" 2> /dev/null`
15528  # bat and cmd files are not always considered executable in cygwin causing which
15529  # to not find them
15530  if test "x$new_path" = x \
15531      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15532      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15533    new_path=`$CYGPATH -u "$path"`
15534  fi
15535  if test "x$new_path" = x; then
15536    # Oops. Which didn't find the executable.
15537    # The splitting of arguments from the executable at a space might have been incorrect,
15538    # since paths with space are more likely in Windows. Give it another try with the whole
15539    # argument.
15540    path="$complete"
15541    arguments="EOL"
15542    new_path=`$CYGPATH -u "$path"`
15543    new_path=`$WHICH "$new_path" 2> /dev/null`
15544    # bat and cmd files are not always considered executable in cygwin causing which
15545    # to not find them
15546    if test "x$new_path" = x \
15547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15549      new_path=`$CYGPATH -u "$path"`
15550    fi
15551    if test "x$new_path" = x; then
15552      # It's still not found. Now this is an unrecoverable error.
15553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15554$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15555      has_space=`$ECHO "$complete" | $GREP " "`
15556      if test "x$has_space" != x; then
15557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15559      fi
15560      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15561    fi
15562  fi
15563
15564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15567  # "foo.exe" is OK but "foo" is an error.
15568  #
15569  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15570  # It is also a way to make sure we got the proper file name for the real test later on.
15571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15572  if test "x$test_shortpath" = x; then
15573    # Short path failed, file does not exist as specified.
15574    # Try adding .exe or .cmd
15575    if test -f "${new_path}.exe"; then
15576      input_to_shortpath="${new_path}.exe"
15577    elif test -f "${new_path}.cmd"; then
15578      input_to_shortpath="${new_path}.cmd"
15579    else
15580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15581$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15584      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15585    fi
15586  else
15587    input_to_shortpath="$new_path"
15588  fi
15589
15590  # Call helper function which possibly converts this using DOS-style short mode.
15591  # If so, the updated path is stored in $new_path.
15592  new_path="$input_to_shortpath"
15593
15594  input_path="$input_to_shortpath"
15595  # Check if we need to convert this using DOS-style short mode. If the path
15596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15597  # take no chances and rewrite it.
15598  # Note: m4 eats our [], so we need to use [ and ] instead.
15599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15600  if test "x$has_forbidden_chars" != x; then
15601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15605      # Going to short mode and back again did indeed matter. Since short mode is
15606      # case insensitive, let's make it lowercase to improve readability.
15607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15608      # Now convert it back to Unix-stile (cygpath)
15609      input_path=`$CYGPATH -u "$shortmode_path"`
15610      new_path="$input_path"
15611    fi
15612  fi
15613
15614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15615  if test "x$test_cygdrive_prefix" = x; then
15616    # As a simple fix, exclude /usr/bin since it's not a real path.
15617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15619      # a path prefixed by /cygdrive for fixpath to work.
15620      new_path="$CYGWIN_ROOT_PATH$input_path"
15621    fi
15622  fi
15623
15624  # remove trailing .exe if any
15625  new_path="${new_path/%.exe/}"
15626
15627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15628
15629  # First separate the path from the arguments. This will split at the first
15630  # space.
15631  complete="$FOUND_MAKE"
15632  path="${complete%% *}"
15633  tmp="$complete EOL"
15634  arguments="${tmp#* }"
15635
15636  # Input might be given as Windows format, start by converting to
15637  # unix format.
15638  new_path="$path"
15639
15640  windows_path="$new_path"
15641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15642    unix_path=`$CYGPATH -u "$windows_path"`
15643    new_path="$unix_path"
15644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15646    new_path="$unix_path"
15647  fi
15648
15649
15650  # Now try to locate executable using which
15651  new_path=`$WHICH "$new_path" 2> /dev/null`
15652
15653  if test "x$new_path" = x; then
15654    # Oops. Which didn't find the executable.
15655    # The splitting of arguments from the executable at a space might have been incorrect,
15656    # since paths with space are more likely in Windows. Give it another try with the whole
15657    # argument.
15658    path="$complete"
15659    arguments="EOL"
15660    new_path="$path"
15661
15662  windows_path="$new_path"
15663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15664    unix_path=`$CYGPATH -u "$windows_path"`
15665    new_path="$unix_path"
15666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15668    new_path="$unix_path"
15669  fi
15670
15671
15672    new_path=`$WHICH "$new_path" 2> /dev/null`
15673    # bat and cmd files are not always considered executable in MSYS causing which
15674    # to not find them
15675    if test "x$new_path" = x \
15676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15678      new_path="$path"
15679
15680  windows_path="$new_path"
15681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15682    unix_path=`$CYGPATH -u "$windows_path"`
15683    new_path="$unix_path"
15684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15686    new_path="$unix_path"
15687  fi
15688
15689    fi
15690
15691    if test "x$new_path" = x; then
15692      # It's still not found. Now this is an unrecoverable error.
15693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15695      has_space=`$ECHO "$complete" | $GREP " "`
15696      if test "x$has_space" != x; then
15697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15699      fi
15700      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15701    fi
15702  fi
15703
15704  # Now new_path has a complete unix path to the binary
15705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15706    # Keep paths in /bin as-is, but remove trailing .exe if any
15707    new_path="${new_path/%.exe/}"
15708    # Do not save /bin paths to all_fixpath_prefixes!
15709  else
15710    # Not in mixed or Windows style, start by that.
15711    new_path=`cmd //c echo $new_path`
15712
15713  input_path="$new_path"
15714  # Check if we need to convert this using DOS-style short mode. If the path
15715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15716  # take no chances and rewrite it.
15717  # Note: m4 eats our [], so we need to use [ and ] instead.
15718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15719  if test "x$has_forbidden_chars" != x; then
15720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15722  fi
15723
15724    # Output is in $new_path
15725
15726  windows_path="$new_path"
15727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15728    unix_path=`$CYGPATH -u "$windows_path"`
15729    new_path="$unix_path"
15730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15732    new_path="$unix_path"
15733  fi
15734
15735    # remove trailing .exe if any
15736    new_path="${new_path/%.exe/}"
15737
15738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15740  fi
15741
15742  else
15743    # We're on a unix platform. Hooray! :)
15744    # First separate the path from the arguments. This will split at the first
15745    # space.
15746    complete="$FOUND_MAKE"
15747    path="${complete%% *}"
15748    tmp="$complete EOL"
15749    arguments="${tmp#* }"
15750
15751    # Cannot rely on the command "which" here since it doesn't always work.
15752    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15753    if test -z "$is_absolute_path"; then
15754      # Path to executable is not absolute. Find it.
15755      IFS_save="$IFS"
15756      IFS=:
15757      for p in $PATH; do
15758        if test -f "$p/$path" && test -x "$p/$path"; then
15759          new_path="$p/$path"
15760          break
15761        fi
15762      done
15763      IFS="$IFS_save"
15764    else
15765      # This is an absolute path, we can use it without further modifications.
15766      new_path="$path"
15767    fi
15768
15769    if test "x$new_path" = x; then
15770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15771$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15772      has_space=`$ECHO "$complete" | $GREP " "`
15773      if test "x$has_space" != x; then
15774        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15775$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15776      fi
15777      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15778    fi
15779  fi
15780
15781  # Now join together the path and the arguments once again
15782  if test "x$arguments" != xEOL; then
15783    new_complete="$new_path ${arguments% *}"
15784  else
15785    new_complete="$new_path"
15786  fi
15787
15788  if test "x$complete" != "x$new_complete"; then
15789    FOUND_MAKE="$new_complete"
15790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15791$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15792  fi
15793
15794        fi
15795      fi
15796    fi
15797  fi
15798
15799    if test "x$FOUND_MAKE" = x; then
15800      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15801    fi
15802  else
15803    # Try our hardest to locate a correct version of GNU make
15804    for ac_prog in gmake
15805do
15806  # Extract the first word of "$ac_prog", so it can be a program name with args.
15807set dummy $ac_prog; ac_word=$2
15808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15809$as_echo_n "checking for $ac_word... " >&6; }
15810if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15811  $as_echo_n "(cached) " >&6
15812else
15813  case $CHECK_GMAKE in
15814  [\\/]* | ?:[\\/]*)
15815  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15816  ;;
15817  *)
15818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15819for as_dir in $PATH
15820do
15821  IFS=$as_save_IFS
15822  test -z "$as_dir" && as_dir=.
15823    for ac_exec_ext in '' $ac_executable_extensions; do
15824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15825    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15827    break 2
15828  fi
15829done
15830  done
15831IFS=$as_save_IFS
15832
15833  ;;
15834esac
15835fi
15836CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15837if test -n "$CHECK_GMAKE"; then
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15839$as_echo "$CHECK_GMAKE" >&6; }
15840else
15841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15842$as_echo "no" >&6; }
15843fi
15844
15845
15846  test -n "$CHECK_GMAKE" && break
15847done
15848
15849
15850  MAKE_CANDIDATE=""$CHECK_GMAKE""
15851  DESCRIPTION="gmake in PATH"
15852  if test "x$MAKE_CANDIDATE" != x; then
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15854$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15855    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15856    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15857    if test "x$IS_GNU_MAKE" = x; then
15858      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15859$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15860    else
15861      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15862      if test "x$IS_MODERN_MAKE" = x; then
15863        { $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
15864$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;}
15865      else
15866        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15867          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15868            MAKE_EXPECTED_ENV='cygwin'
15869          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15870            MAKE_EXPECTED_ENV='msys'
15871          else
15872            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15873          fi
15874          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15875          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15876        else
15877          # Not relevant for non-Windows
15878          IS_MAKE_CORRECT_ENV=true
15879        fi
15880        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15881          { $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
15882$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;}
15883        else
15884          FOUND_MAKE=$MAKE_CANDIDATE
15885
15886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15887
15888  # First separate the path from the arguments. This will split at the first
15889  # space.
15890  complete="$FOUND_MAKE"
15891  path="${complete%% *}"
15892  tmp="$complete EOL"
15893  arguments="${tmp#* }"
15894
15895  # Input might be given as Windows format, start by converting to
15896  # unix format.
15897  new_path=`$CYGPATH -u "$path"`
15898
15899  # Now try to locate executable using which
15900  new_path=`$WHICH "$new_path" 2> /dev/null`
15901  # bat and cmd files are not always considered executable in cygwin causing which
15902  # to not find them
15903  if test "x$new_path" = x \
15904      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15905      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15906    new_path=`$CYGPATH -u "$path"`
15907  fi
15908  if test "x$new_path" = x; then
15909    # Oops. Which didn't find the executable.
15910    # The splitting of arguments from the executable at a space might have been incorrect,
15911    # since paths with space are more likely in Windows. Give it another try with the whole
15912    # argument.
15913    path="$complete"
15914    arguments="EOL"
15915    new_path=`$CYGPATH -u "$path"`
15916    new_path=`$WHICH "$new_path" 2> /dev/null`
15917    # bat and cmd files are not always considered executable in cygwin causing which
15918    # to not find them
15919    if test "x$new_path" = x \
15920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15922      new_path=`$CYGPATH -u "$path"`
15923    fi
15924    if test "x$new_path" = x; then
15925      # It's still not found. Now this is an unrecoverable error.
15926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15928      has_space=`$ECHO "$complete" | $GREP " "`
15929      if test "x$has_space" != x; then
15930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15932      fi
15933      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15934    fi
15935  fi
15936
15937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15940  # "foo.exe" is OK but "foo" is an error.
15941  #
15942  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15943  # It is also a way to make sure we got the proper file name for the real test later on.
15944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15945  if test "x$test_shortpath" = x; then
15946    # Short path failed, file does not exist as specified.
15947    # Try adding .exe or .cmd
15948    if test -f "${new_path}.exe"; then
15949      input_to_shortpath="${new_path}.exe"
15950    elif test -f "${new_path}.cmd"; then
15951      input_to_shortpath="${new_path}.cmd"
15952    else
15953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15954$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15957      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15958    fi
15959  else
15960    input_to_shortpath="$new_path"
15961  fi
15962
15963  # Call helper function which possibly converts this using DOS-style short mode.
15964  # If so, the updated path is stored in $new_path.
15965  new_path="$input_to_shortpath"
15966
15967  input_path="$input_to_shortpath"
15968  # Check if we need to convert this using DOS-style short mode. If the path
15969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15970  # take no chances and rewrite it.
15971  # Note: m4 eats our [], so we need to use [ and ] instead.
15972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15973  if test "x$has_forbidden_chars" != x; then
15974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15978      # Going to short mode and back again did indeed matter. Since short mode is
15979      # case insensitive, let's make it lowercase to improve readability.
15980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15981      # Now convert it back to Unix-stile (cygpath)
15982      input_path=`$CYGPATH -u "$shortmode_path"`
15983      new_path="$input_path"
15984    fi
15985  fi
15986
15987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15988  if test "x$test_cygdrive_prefix" = x; then
15989    # As a simple fix, exclude /usr/bin since it's not a real path.
15990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15992      # a path prefixed by /cygdrive for fixpath to work.
15993      new_path="$CYGWIN_ROOT_PATH$input_path"
15994    fi
15995  fi
15996
15997  # remove trailing .exe if any
15998  new_path="${new_path/%.exe/}"
15999
16000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16001
16002  # First separate the path from the arguments. This will split at the first
16003  # space.
16004  complete="$FOUND_MAKE"
16005  path="${complete%% *}"
16006  tmp="$complete EOL"
16007  arguments="${tmp#* }"
16008
16009  # Input might be given as Windows format, start by converting to
16010  # unix format.
16011  new_path="$path"
16012
16013  windows_path="$new_path"
16014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16015    unix_path=`$CYGPATH -u "$windows_path"`
16016    new_path="$unix_path"
16017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16019    new_path="$unix_path"
16020  fi
16021
16022
16023  # Now try to locate executable using which
16024  new_path=`$WHICH "$new_path" 2> /dev/null`
16025
16026  if test "x$new_path" = x; then
16027    # Oops. Which didn't find the executable.
16028    # The splitting of arguments from the executable at a space might have been incorrect,
16029    # since paths with space are more likely in Windows. Give it another try with the whole
16030    # argument.
16031    path="$complete"
16032    arguments="EOL"
16033    new_path="$path"
16034
16035  windows_path="$new_path"
16036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16037    unix_path=`$CYGPATH -u "$windows_path"`
16038    new_path="$unix_path"
16039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16041    new_path="$unix_path"
16042  fi
16043
16044
16045    new_path=`$WHICH "$new_path" 2> /dev/null`
16046    # bat and cmd files are not always considered executable in MSYS causing which
16047    # to not find them
16048    if test "x$new_path" = x \
16049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16051      new_path="$path"
16052
16053  windows_path="$new_path"
16054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16055    unix_path=`$CYGPATH -u "$windows_path"`
16056    new_path="$unix_path"
16057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16059    new_path="$unix_path"
16060  fi
16061
16062    fi
16063
16064    if test "x$new_path" = x; then
16065      # It's still not found. Now this is an unrecoverable error.
16066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16068      has_space=`$ECHO "$complete" | $GREP " "`
16069      if test "x$has_space" != x; then
16070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16072      fi
16073      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16074    fi
16075  fi
16076
16077  # Now new_path has a complete unix path to the binary
16078  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16079    # Keep paths in /bin as-is, but remove trailing .exe if any
16080    new_path="${new_path/%.exe/}"
16081    # Do not save /bin paths to all_fixpath_prefixes!
16082  else
16083    # Not in mixed or Windows style, start by that.
16084    new_path=`cmd //c echo $new_path`
16085
16086  input_path="$new_path"
16087  # Check if we need to convert this using DOS-style short mode. If the path
16088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16089  # take no chances and rewrite it.
16090  # Note: m4 eats our [], so we need to use [ and ] instead.
16091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16092  if test "x$has_forbidden_chars" != x; then
16093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16095  fi
16096
16097    # Output is in $new_path
16098
16099  windows_path="$new_path"
16100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16101    unix_path=`$CYGPATH -u "$windows_path"`
16102    new_path="$unix_path"
16103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16105    new_path="$unix_path"
16106  fi
16107
16108    # remove trailing .exe if any
16109    new_path="${new_path/%.exe/}"
16110
16111    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16112    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16113  fi
16114
16115  else
16116    # We're on a unix platform. Hooray! :)
16117    # First separate the path from the arguments. This will split at the first
16118    # space.
16119    complete="$FOUND_MAKE"
16120    path="${complete%% *}"
16121    tmp="$complete EOL"
16122    arguments="${tmp#* }"
16123
16124    # Cannot rely on the command "which" here since it doesn't always work.
16125    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16126    if test -z "$is_absolute_path"; then
16127      # Path to executable is not absolute. Find it.
16128      IFS_save="$IFS"
16129      IFS=:
16130      for p in $PATH; do
16131        if test -f "$p/$path" && test -x "$p/$path"; then
16132          new_path="$p/$path"
16133          break
16134        fi
16135      done
16136      IFS="$IFS_save"
16137    else
16138      # This is an absolute path, we can use it without further modifications.
16139      new_path="$path"
16140    fi
16141
16142    if test "x$new_path" = x; then
16143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16145      has_space=`$ECHO "$complete" | $GREP " "`
16146      if test "x$has_space" != x; then
16147        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16148$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16149      fi
16150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16151    fi
16152  fi
16153
16154  # Now join together the path and the arguments once again
16155  if test "x$arguments" != xEOL; then
16156    new_complete="$new_path ${arguments% *}"
16157  else
16158    new_complete="$new_path"
16159  fi
16160
16161  if test "x$complete" != "x$new_complete"; then
16162    FOUND_MAKE="$new_complete"
16163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16164$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16165  fi
16166
16167        fi
16168      fi
16169    fi
16170  fi
16171
16172
16173    if test "x$FOUND_MAKE" = x; then
16174      for ac_prog in make
16175do
16176  # Extract the first word of "$ac_prog", so it can be a program name with args.
16177set dummy $ac_prog; ac_word=$2
16178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16179$as_echo_n "checking for $ac_word... " >&6; }
16180if ${ac_cv_path_CHECK_MAKE+:} false; then :
16181  $as_echo_n "(cached) " >&6
16182else
16183  case $CHECK_MAKE in
16184  [\\/]* | ?:[\\/]*)
16185  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16186  ;;
16187  *)
16188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16189for as_dir in $PATH
16190do
16191  IFS=$as_save_IFS
16192  test -z "$as_dir" && as_dir=.
16193    for ac_exec_ext in '' $ac_executable_extensions; do
16194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16195    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16197    break 2
16198  fi
16199done
16200  done
16201IFS=$as_save_IFS
16202
16203  ;;
16204esac
16205fi
16206CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16207if test -n "$CHECK_MAKE"; then
16208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16209$as_echo "$CHECK_MAKE" >&6; }
16210else
16211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16212$as_echo "no" >&6; }
16213fi
16214
16215
16216  test -n "$CHECK_MAKE" && break
16217done
16218
16219
16220  MAKE_CANDIDATE=""$CHECK_MAKE""
16221  DESCRIPTION="make in PATH"
16222  if test "x$MAKE_CANDIDATE" != x; then
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16224$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16225    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16226    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16227    if test "x$IS_GNU_MAKE" = x; then
16228      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16229$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16230    else
16231      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16232      if test "x$IS_MODERN_MAKE" = x; then
16233        { $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
16234$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;}
16235      else
16236        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16237          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16238            MAKE_EXPECTED_ENV='cygwin'
16239          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16240            MAKE_EXPECTED_ENV='msys'
16241          else
16242            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16243          fi
16244          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16245          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16246        else
16247          # Not relevant for non-Windows
16248          IS_MAKE_CORRECT_ENV=true
16249        fi
16250        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16251          { $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
16252$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;}
16253        else
16254          FOUND_MAKE=$MAKE_CANDIDATE
16255
16256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257
16258  # First separate the path from the arguments. This will split at the first
16259  # space.
16260  complete="$FOUND_MAKE"
16261  path="${complete%% *}"
16262  tmp="$complete EOL"
16263  arguments="${tmp#* }"
16264
16265  # Input might be given as Windows format, start by converting to
16266  # unix format.
16267  new_path=`$CYGPATH -u "$path"`
16268
16269  # Now try to locate executable using which
16270  new_path=`$WHICH "$new_path" 2> /dev/null`
16271  # bat and cmd files are not always considered executable in cygwin causing which
16272  # to not find them
16273  if test "x$new_path" = x \
16274      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16275      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16276    new_path=`$CYGPATH -u "$path"`
16277  fi
16278  if test "x$new_path" = x; then
16279    # Oops. Which didn't find the executable.
16280    # The splitting of arguments from the executable at a space might have been incorrect,
16281    # since paths with space are more likely in Windows. Give it another try with the whole
16282    # argument.
16283    path="$complete"
16284    arguments="EOL"
16285    new_path=`$CYGPATH -u "$path"`
16286    new_path=`$WHICH "$new_path" 2> /dev/null`
16287    # bat and cmd files are not always considered executable in cygwin causing which
16288    # to not find them
16289    if test "x$new_path" = x \
16290        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16291        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16292      new_path=`$CYGPATH -u "$path"`
16293    fi
16294    if test "x$new_path" = x; then
16295      # It's still not found. Now this is an unrecoverable error.
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16297$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16298      has_space=`$ECHO "$complete" | $GREP " "`
16299      if test "x$has_space" != x; then
16300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16302      fi
16303      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16304    fi
16305  fi
16306
16307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16310  # "foo.exe" is OK but "foo" is an error.
16311  #
16312  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16313  # It is also a way to make sure we got the proper file name for the real test later on.
16314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16315  if test "x$test_shortpath" = x; then
16316    # Short path failed, file does not exist as specified.
16317    # Try adding .exe or .cmd
16318    if test -f "${new_path}.exe"; then
16319      input_to_shortpath="${new_path}.exe"
16320    elif test -f "${new_path}.cmd"; then
16321      input_to_shortpath="${new_path}.cmd"
16322    else
16323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16324$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16325      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16326$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16327      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16328    fi
16329  else
16330    input_to_shortpath="$new_path"
16331  fi
16332
16333  # Call helper function which possibly converts this using DOS-style short mode.
16334  # If so, the updated path is stored in $new_path.
16335  new_path="$input_to_shortpath"
16336
16337  input_path="$input_to_shortpath"
16338  # Check if we need to convert this using DOS-style short mode. If the path
16339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16340  # take no chances and rewrite it.
16341  # Note: m4 eats our [], so we need to use [ and ] instead.
16342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16343  if test "x$has_forbidden_chars" != x; then
16344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16348      # Going to short mode and back again did indeed matter. Since short mode is
16349      # case insensitive, let's make it lowercase to improve readability.
16350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16351      # Now convert it back to Unix-stile (cygpath)
16352      input_path=`$CYGPATH -u "$shortmode_path"`
16353      new_path="$input_path"
16354    fi
16355  fi
16356
16357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16358  if test "x$test_cygdrive_prefix" = x; then
16359    # As a simple fix, exclude /usr/bin since it's not a real path.
16360    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16362      # a path prefixed by /cygdrive for fixpath to work.
16363      new_path="$CYGWIN_ROOT_PATH$input_path"
16364    fi
16365  fi
16366
16367  # remove trailing .exe if any
16368  new_path="${new_path/%.exe/}"
16369
16370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16371
16372  # First separate the path from the arguments. This will split at the first
16373  # space.
16374  complete="$FOUND_MAKE"
16375  path="${complete%% *}"
16376  tmp="$complete EOL"
16377  arguments="${tmp#* }"
16378
16379  # Input might be given as Windows format, start by converting to
16380  # unix format.
16381  new_path="$path"
16382
16383  windows_path="$new_path"
16384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385    unix_path=`$CYGPATH -u "$windows_path"`
16386    new_path="$unix_path"
16387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16389    new_path="$unix_path"
16390  fi
16391
16392
16393  # Now try to locate executable using which
16394  new_path=`$WHICH "$new_path" 2> /dev/null`
16395
16396  if test "x$new_path" = x; then
16397    # Oops. Which didn't find the executable.
16398    # The splitting of arguments from the executable at a space might have been incorrect,
16399    # since paths with space are more likely in Windows. Give it another try with the whole
16400    # argument.
16401    path="$complete"
16402    arguments="EOL"
16403    new_path="$path"
16404
16405  windows_path="$new_path"
16406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16407    unix_path=`$CYGPATH -u "$windows_path"`
16408    new_path="$unix_path"
16409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16411    new_path="$unix_path"
16412  fi
16413
16414
16415    new_path=`$WHICH "$new_path" 2> /dev/null`
16416    # bat and cmd files are not always considered executable in MSYS causing which
16417    # to not find them
16418    if test "x$new_path" = x \
16419        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16420        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16421      new_path="$path"
16422
16423  windows_path="$new_path"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    new_path="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    new_path="$unix_path"
16430  fi
16431
16432    fi
16433
16434    if test "x$new_path" = x; then
16435      # It's still not found. Now this is an unrecoverable error.
16436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16438      has_space=`$ECHO "$complete" | $GREP " "`
16439      if test "x$has_space" != x; then
16440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16442      fi
16443      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16444    fi
16445  fi
16446
16447  # Now new_path has a complete unix path to the binary
16448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16449    # Keep paths in /bin as-is, but remove trailing .exe if any
16450    new_path="${new_path/%.exe/}"
16451    # Do not save /bin paths to all_fixpath_prefixes!
16452  else
16453    # Not in mixed or Windows style, start by that.
16454    new_path=`cmd //c echo $new_path`
16455
16456  input_path="$new_path"
16457  # Check if we need to convert this using DOS-style short mode. If the path
16458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16459  # take no chances and rewrite it.
16460  # Note: m4 eats our [], so we need to use [ and ] instead.
16461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16462  if test "x$has_forbidden_chars" != x; then
16463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16465  fi
16466
16467    # Output is in $new_path
16468
16469  windows_path="$new_path"
16470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16471    unix_path=`$CYGPATH -u "$windows_path"`
16472    new_path="$unix_path"
16473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16475    new_path="$unix_path"
16476  fi
16477
16478    # remove trailing .exe if any
16479    new_path="${new_path/%.exe/}"
16480
16481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16483  fi
16484
16485  else
16486    # We're on a unix platform. Hooray! :)
16487    # First separate the path from the arguments. This will split at the first
16488    # space.
16489    complete="$FOUND_MAKE"
16490    path="${complete%% *}"
16491    tmp="$complete EOL"
16492    arguments="${tmp#* }"
16493
16494    # Cannot rely on the command "which" here since it doesn't always work.
16495    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16496    if test -z "$is_absolute_path"; then
16497      # Path to executable is not absolute. Find it.
16498      IFS_save="$IFS"
16499      IFS=:
16500      for p in $PATH; do
16501        if test -f "$p/$path" && test -x "$p/$path"; then
16502          new_path="$p/$path"
16503          break
16504        fi
16505      done
16506      IFS="$IFS_save"
16507    else
16508      # This is an absolute path, we can use it without further modifications.
16509      new_path="$path"
16510    fi
16511
16512    if test "x$new_path" = x; then
16513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16515      has_space=`$ECHO "$complete" | $GREP " "`
16516      if test "x$has_space" != x; then
16517        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16519      fi
16520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16521    fi
16522  fi
16523
16524  # Now join together the path and the arguments once again
16525  if test "x$arguments" != xEOL; then
16526    new_complete="$new_path ${arguments% *}"
16527  else
16528    new_complete="$new_path"
16529  fi
16530
16531  if test "x$complete" != "x$new_complete"; then
16532    FOUND_MAKE="$new_complete"
16533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16534$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16535  fi
16536
16537        fi
16538      fi
16539    fi
16540  fi
16541
16542    fi
16543
16544    if test "x$FOUND_MAKE" = x; then
16545      if test "x$TOOLCHAIN_PATH" != x; then
16546        # We have a toolchain path, check that as well before giving up.
16547        OLD_PATH=$PATH
16548        PATH=$TOOLCHAIN_PATH:$PATH
16549        for ac_prog in gmake
16550do
16551  # Extract the first word of "$ac_prog", so it can be a program name with args.
16552set dummy $ac_prog; ac_word=$2
16553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16554$as_echo_n "checking for $ac_word... " >&6; }
16555if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16556  $as_echo_n "(cached) " >&6
16557else
16558  case $CHECK_TOOLSDIR_GMAKE in
16559  [\\/]* | ?:[\\/]*)
16560  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16561  ;;
16562  *)
16563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16564for as_dir in $PATH
16565do
16566  IFS=$as_save_IFS
16567  test -z "$as_dir" && as_dir=.
16568    for ac_exec_ext in '' $ac_executable_extensions; do
16569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16570    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16572    break 2
16573  fi
16574done
16575  done
16576IFS=$as_save_IFS
16577
16578  ;;
16579esac
16580fi
16581CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16582if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16584$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16585else
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16587$as_echo "no" >&6; }
16588fi
16589
16590
16591  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16592done
16593
16594
16595  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16596  DESCRIPTION="gmake in tools-dir"
16597  if test "x$MAKE_CANDIDATE" != x; then
16598    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16599$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16600    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16601    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16602    if test "x$IS_GNU_MAKE" = x; then
16603      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16604$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16605    else
16606      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16607      if test "x$IS_MODERN_MAKE" = x; then
16608        { $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
16609$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;}
16610      else
16611        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16612          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16613            MAKE_EXPECTED_ENV='cygwin'
16614          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16615            MAKE_EXPECTED_ENV='msys'
16616          else
16617            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16618          fi
16619          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16620          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16621        else
16622          # Not relevant for non-Windows
16623          IS_MAKE_CORRECT_ENV=true
16624        fi
16625        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16626          { $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
16627$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;}
16628        else
16629          FOUND_MAKE=$MAKE_CANDIDATE
16630
16631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16632
16633  # First separate the path from the arguments. This will split at the first
16634  # space.
16635  complete="$FOUND_MAKE"
16636  path="${complete%% *}"
16637  tmp="$complete EOL"
16638  arguments="${tmp#* }"
16639
16640  # Input might be given as Windows format, start by converting to
16641  # unix format.
16642  new_path=`$CYGPATH -u "$path"`
16643
16644  # Now try to locate executable using which
16645  new_path=`$WHICH "$new_path" 2> /dev/null`
16646  # bat and cmd files are not always considered executable in cygwin causing which
16647  # to not find them
16648  if test "x$new_path" = x \
16649      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16650      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16651    new_path=`$CYGPATH -u "$path"`
16652  fi
16653  if test "x$new_path" = x; then
16654    # Oops. Which didn't find the executable.
16655    # The splitting of arguments from the executable at a space might have been incorrect,
16656    # since paths with space are more likely in Windows. Give it another try with the whole
16657    # argument.
16658    path="$complete"
16659    arguments="EOL"
16660    new_path=`$CYGPATH -u "$path"`
16661    new_path=`$WHICH "$new_path" 2> /dev/null`
16662    # bat and cmd files are not always considered executable in cygwin causing which
16663    # to not find them
16664    if test "x$new_path" = x \
16665        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16666        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16667      new_path=`$CYGPATH -u "$path"`
16668    fi
16669    if test "x$new_path" = x; then
16670      # It's still not found. Now this is an unrecoverable error.
16671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16673      has_space=`$ECHO "$complete" | $GREP " "`
16674      if test "x$has_space" != x; then
16675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16677      fi
16678      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16679    fi
16680  fi
16681
16682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16685  # "foo.exe" is OK but "foo" is an error.
16686  #
16687  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16688  # It is also a way to make sure we got the proper file name for the real test later on.
16689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16690  if test "x$test_shortpath" = x; then
16691    # Short path failed, file does not exist as specified.
16692    # Try adding .exe or .cmd
16693    if test -f "${new_path}.exe"; then
16694      input_to_shortpath="${new_path}.exe"
16695    elif test -f "${new_path}.cmd"; then
16696      input_to_shortpath="${new_path}.cmd"
16697    else
16698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16702      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16703    fi
16704  else
16705    input_to_shortpath="$new_path"
16706  fi
16707
16708  # Call helper function which possibly converts this using DOS-style short mode.
16709  # If so, the updated path is stored in $new_path.
16710  new_path="$input_to_shortpath"
16711
16712  input_path="$input_to_shortpath"
16713  # Check if we need to convert this using DOS-style short mode. If the path
16714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16715  # take no chances and rewrite it.
16716  # Note: m4 eats our [], so we need to use [ and ] instead.
16717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16718  if test "x$has_forbidden_chars" != x; then
16719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16723      # Going to short mode and back again did indeed matter. Since short mode is
16724      # case insensitive, let's make it lowercase to improve readability.
16725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16726      # Now convert it back to Unix-stile (cygpath)
16727      input_path=`$CYGPATH -u "$shortmode_path"`
16728      new_path="$input_path"
16729    fi
16730  fi
16731
16732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16733  if test "x$test_cygdrive_prefix" = x; then
16734    # As a simple fix, exclude /usr/bin since it's not a real path.
16735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16737      # a path prefixed by /cygdrive for fixpath to work.
16738      new_path="$CYGWIN_ROOT_PATH$input_path"
16739    fi
16740  fi
16741
16742  # remove trailing .exe if any
16743  new_path="${new_path/%.exe/}"
16744
16745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16746
16747  # First separate the path from the arguments. This will split at the first
16748  # space.
16749  complete="$FOUND_MAKE"
16750  path="${complete%% *}"
16751  tmp="$complete EOL"
16752  arguments="${tmp#* }"
16753
16754  # Input might be given as Windows format, start by converting to
16755  # unix format.
16756  new_path="$path"
16757
16758  windows_path="$new_path"
16759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16760    unix_path=`$CYGPATH -u "$windows_path"`
16761    new_path="$unix_path"
16762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16764    new_path="$unix_path"
16765  fi
16766
16767
16768  # Now try to locate executable using which
16769  new_path=`$WHICH "$new_path" 2> /dev/null`
16770
16771  if test "x$new_path" = x; then
16772    # Oops. Which didn't find the executable.
16773    # The splitting of arguments from the executable at a space might have been incorrect,
16774    # since paths with space are more likely in Windows. Give it another try with the whole
16775    # argument.
16776    path="$complete"
16777    arguments="EOL"
16778    new_path="$path"
16779
16780  windows_path="$new_path"
16781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16782    unix_path=`$CYGPATH -u "$windows_path"`
16783    new_path="$unix_path"
16784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16786    new_path="$unix_path"
16787  fi
16788
16789
16790    new_path=`$WHICH "$new_path" 2> /dev/null`
16791    # bat and cmd files are not always considered executable in MSYS causing which
16792    # to not find them
16793    if test "x$new_path" = x \
16794        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16795        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16796      new_path="$path"
16797
16798  windows_path="$new_path"
16799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16800    unix_path=`$CYGPATH -u "$windows_path"`
16801    new_path="$unix_path"
16802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16804    new_path="$unix_path"
16805  fi
16806
16807    fi
16808
16809    if test "x$new_path" = x; then
16810      # It's still not found. Now this is an unrecoverable error.
16811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16812$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16813      has_space=`$ECHO "$complete" | $GREP " "`
16814      if test "x$has_space" != x; then
16815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16817      fi
16818      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16819    fi
16820  fi
16821
16822  # Now new_path has a complete unix path to the binary
16823  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16824    # Keep paths in /bin as-is, but remove trailing .exe if any
16825    new_path="${new_path/%.exe/}"
16826    # Do not save /bin paths to all_fixpath_prefixes!
16827  else
16828    # Not in mixed or Windows style, start by that.
16829    new_path=`cmd //c echo $new_path`
16830
16831  input_path="$new_path"
16832  # Check if we need to convert this using DOS-style short mode. If the path
16833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16834  # take no chances and rewrite it.
16835  # Note: m4 eats our [], so we need to use [ and ] instead.
16836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16837  if test "x$has_forbidden_chars" != x; then
16838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16840  fi
16841
16842    # Output is in $new_path
16843
16844  windows_path="$new_path"
16845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846    unix_path=`$CYGPATH -u "$windows_path"`
16847    new_path="$unix_path"
16848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16850    new_path="$unix_path"
16851  fi
16852
16853    # remove trailing .exe if any
16854    new_path="${new_path/%.exe/}"
16855
16856    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16857    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16858  fi
16859
16860  else
16861    # We're on a unix platform. Hooray! :)
16862    # First separate the path from the arguments. This will split at the first
16863    # space.
16864    complete="$FOUND_MAKE"
16865    path="${complete%% *}"
16866    tmp="$complete EOL"
16867    arguments="${tmp#* }"
16868
16869    # Cannot rely on the command "which" here since it doesn't always work.
16870    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16871    if test -z "$is_absolute_path"; then
16872      # Path to executable is not absolute. Find it.
16873      IFS_save="$IFS"
16874      IFS=:
16875      for p in $PATH; do
16876        if test -f "$p/$path" && test -x "$p/$path"; then
16877          new_path="$p/$path"
16878          break
16879        fi
16880      done
16881      IFS="$IFS_save"
16882    else
16883      # This is an absolute path, we can use it without further modifications.
16884      new_path="$path"
16885    fi
16886
16887    if test "x$new_path" = x; then
16888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16890      has_space=`$ECHO "$complete" | $GREP " "`
16891      if test "x$has_space" != x; then
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16893$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16894      fi
16895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16896    fi
16897  fi
16898
16899  # Now join together the path and the arguments once again
16900  if test "x$arguments" != xEOL; then
16901    new_complete="$new_path ${arguments% *}"
16902  else
16903    new_complete="$new_path"
16904  fi
16905
16906  if test "x$complete" != "x$new_complete"; then
16907    FOUND_MAKE="$new_complete"
16908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16909$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16910  fi
16911
16912        fi
16913      fi
16914    fi
16915  fi
16916
16917        if test "x$FOUND_MAKE" = x; then
16918          for ac_prog in make
16919do
16920  # Extract the first word of "$ac_prog", so it can be a program name with args.
16921set dummy $ac_prog; ac_word=$2
16922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16923$as_echo_n "checking for $ac_word... " >&6; }
16924if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16925  $as_echo_n "(cached) " >&6
16926else
16927  case $CHECK_TOOLSDIR_MAKE in
16928  [\\/]* | ?:[\\/]*)
16929  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16930  ;;
16931  *)
16932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16933for as_dir in $PATH
16934do
16935  IFS=$as_save_IFS
16936  test -z "$as_dir" && as_dir=.
16937    for ac_exec_ext in '' $ac_executable_extensions; do
16938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16939    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16941    break 2
16942  fi
16943done
16944  done
16945IFS=$as_save_IFS
16946
16947  ;;
16948esac
16949fi
16950CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16951if test -n "$CHECK_TOOLSDIR_MAKE"; then
16952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16953$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16954else
16955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16956$as_echo "no" >&6; }
16957fi
16958
16959
16960  test -n "$CHECK_TOOLSDIR_MAKE" && break
16961done
16962
16963
16964  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16965  DESCRIPTION="make in tools-dir"
16966  if test "x$MAKE_CANDIDATE" != x; then
16967    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16968$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16969    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16970    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16971    if test "x$IS_GNU_MAKE" = x; then
16972      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16973$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16974    else
16975      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16976      if test "x$IS_MODERN_MAKE" = x; then
16977        { $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
16978$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;}
16979      else
16980        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16981          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16982            MAKE_EXPECTED_ENV='cygwin'
16983          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16984            MAKE_EXPECTED_ENV='msys'
16985          else
16986            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16987          fi
16988          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16989          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16990        else
16991          # Not relevant for non-Windows
16992          IS_MAKE_CORRECT_ENV=true
16993        fi
16994        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16995          { $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
16996$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;}
16997        else
16998          FOUND_MAKE=$MAKE_CANDIDATE
16999
17000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17001
17002  # First separate the path from the arguments. This will split at the first
17003  # space.
17004  complete="$FOUND_MAKE"
17005  path="${complete%% *}"
17006  tmp="$complete EOL"
17007  arguments="${tmp#* }"
17008
17009  # Input might be given as Windows format, start by converting to
17010  # unix format.
17011  new_path=`$CYGPATH -u "$path"`
17012
17013  # Now try to locate executable using which
17014  new_path=`$WHICH "$new_path" 2> /dev/null`
17015  # bat and cmd files are not always considered executable in cygwin causing which
17016  # to not find them
17017  if test "x$new_path" = x \
17018      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17019      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17020    new_path=`$CYGPATH -u "$path"`
17021  fi
17022  if test "x$new_path" = x; then
17023    # Oops. Which didn't find the executable.
17024    # The splitting of arguments from the executable at a space might have been incorrect,
17025    # since paths with space are more likely in Windows. Give it another try with the whole
17026    # argument.
17027    path="$complete"
17028    arguments="EOL"
17029    new_path=`$CYGPATH -u "$path"`
17030    new_path=`$WHICH "$new_path" 2> /dev/null`
17031    # bat and cmd files are not always considered executable in cygwin causing which
17032    # to not find them
17033    if test "x$new_path" = x \
17034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17036      new_path=`$CYGPATH -u "$path"`
17037    fi
17038    if test "x$new_path" = x; then
17039      # It's still not found. Now this is an unrecoverable error.
17040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17041$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17042      has_space=`$ECHO "$complete" | $GREP " "`
17043      if test "x$has_space" != x; then
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17046      fi
17047      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17048    fi
17049  fi
17050
17051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17054  # "foo.exe" is OK but "foo" is an error.
17055  #
17056  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17057  # It is also a way to make sure we got the proper file name for the real test later on.
17058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17059  if test "x$test_shortpath" = x; then
17060    # Short path failed, file does not exist as specified.
17061    # Try adding .exe or .cmd
17062    if test -f "${new_path}.exe"; then
17063      input_to_shortpath="${new_path}.exe"
17064    elif test -f "${new_path}.cmd"; then
17065      input_to_shortpath="${new_path}.cmd"
17066    else
17067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17068$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17071      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17072    fi
17073  else
17074    input_to_shortpath="$new_path"
17075  fi
17076
17077  # Call helper function which possibly converts this using DOS-style short mode.
17078  # If so, the updated path is stored in $new_path.
17079  new_path="$input_to_shortpath"
17080
17081  input_path="$input_to_shortpath"
17082  # Check if we need to convert this using DOS-style short mode. If the path
17083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17084  # take no chances and rewrite it.
17085  # Note: m4 eats our [], so we need to use [ and ] instead.
17086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17087  if test "x$has_forbidden_chars" != x; then
17088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17092      # Going to short mode and back again did indeed matter. Since short mode is
17093      # case insensitive, let's make it lowercase to improve readability.
17094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17095      # Now convert it back to Unix-stile (cygpath)
17096      input_path=`$CYGPATH -u "$shortmode_path"`
17097      new_path="$input_path"
17098    fi
17099  fi
17100
17101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17102  if test "x$test_cygdrive_prefix" = x; then
17103    # As a simple fix, exclude /usr/bin since it's not a real path.
17104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17106      # a path prefixed by /cygdrive for fixpath to work.
17107      new_path="$CYGWIN_ROOT_PATH$input_path"
17108    fi
17109  fi
17110
17111  # remove trailing .exe if any
17112  new_path="${new_path/%.exe/}"
17113
17114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17115
17116  # First separate the path from the arguments. This will split at the first
17117  # space.
17118  complete="$FOUND_MAKE"
17119  path="${complete%% *}"
17120  tmp="$complete EOL"
17121  arguments="${tmp#* }"
17122
17123  # Input might be given as Windows format, start by converting to
17124  # unix format.
17125  new_path="$path"
17126
17127  windows_path="$new_path"
17128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17129    unix_path=`$CYGPATH -u "$windows_path"`
17130    new_path="$unix_path"
17131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17133    new_path="$unix_path"
17134  fi
17135
17136
17137  # Now try to locate executable using which
17138  new_path=`$WHICH "$new_path" 2> /dev/null`
17139
17140  if test "x$new_path" = x; then
17141    # Oops. Which didn't find the executable.
17142    # The splitting of arguments from the executable at a space might have been incorrect,
17143    # since paths with space are more likely in Windows. Give it another try with the whole
17144    # argument.
17145    path="$complete"
17146    arguments="EOL"
17147    new_path="$path"
17148
17149  windows_path="$new_path"
17150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17151    unix_path=`$CYGPATH -u "$windows_path"`
17152    new_path="$unix_path"
17153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17155    new_path="$unix_path"
17156  fi
17157
17158
17159    new_path=`$WHICH "$new_path" 2> /dev/null`
17160    # bat and cmd files are not always considered executable in MSYS causing which
17161    # to not find them
17162    if test "x$new_path" = x \
17163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17165      new_path="$path"
17166
17167  windows_path="$new_path"
17168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17169    unix_path=`$CYGPATH -u "$windows_path"`
17170    new_path="$unix_path"
17171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17173    new_path="$unix_path"
17174  fi
17175
17176    fi
17177
17178    if test "x$new_path" = x; then
17179      # It's still not found. Now this is an unrecoverable error.
17180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17181$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17182      has_space=`$ECHO "$complete" | $GREP " "`
17183      if test "x$has_space" != x; then
17184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17186      fi
17187      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17188    fi
17189  fi
17190
17191  # Now new_path has a complete unix path to the binary
17192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17193    # Keep paths in /bin as-is, but remove trailing .exe if any
17194    new_path="${new_path/%.exe/}"
17195    # Do not save /bin paths to all_fixpath_prefixes!
17196  else
17197    # Not in mixed or Windows style, start by that.
17198    new_path=`cmd //c echo $new_path`
17199
17200  input_path="$new_path"
17201  # Check if we need to convert this using DOS-style short mode. If the path
17202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17203  # take no chances and rewrite it.
17204  # Note: m4 eats our [], so we need to use [ and ] instead.
17205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17206  if test "x$has_forbidden_chars" != x; then
17207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17209  fi
17210
17211    # Output is in $new_path
17212
17213  windows_path="$new_path"
17214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17215    unix_path=`$CYGPATH -u "$windows_path"`
17216    new_path="$unix_path"
17217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17219    new_path="$unix_path"
17220  fi
17221
17222    # remove trailing .exe if any
17223    new_path="${new_path/%.exe/}"
17224
17225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17227  fi
17228
17229  else
17230    # We're on a unix platform. Hooray! :)
17231    # First separate the path from the arguments. This will split at the first
17232    # space.
17233    complete="$FOUND_MAKE"
17234    path="${complete%% *}"
17235    tmp="$complete EOL"
17236    arguments="${tmp#* }"
17237
17238    # Cannot rely on the command "which" here since it doesn't always work.
17239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17240    if test -z "$is_absolute_path"; then
17241      # Path to executable is not absolute. Find it.
17242      IFS_save="$IFS"
17243      IFS=:
17244      for p in $PATH; do
17245        if test -f "$p/$path" && test -x "$p/$path"; then
17246          new_path="$p/$path"
17247          break
17248        fi
17249      done
17250      IFS="$IFS_save"
17251    else
17252      # This is an absolute path, we can use it without further modifications.
17253      new_path="$path"
17254    fi
17255
17256    if test "x$new_path" = x; then
17257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17259      has_space=`$ECHO "$complete" | $GREP " "`
17260      if test "x$has_space" != x; then
17261        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17263      fi
17264      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17265    fi
17266  fi
17267
17268  # Now join together the path and the arguments once again
17269  if test "x$arguments" != xEOL; then
17270    new_complete="$new_path ${arguments% *}"
17271  else
17272    new_complete="$new_path"
17273  fi
17274
17275  if test "x$complete" != "x$new_complete"; then
17276    FOUND_MAKE="$new_complete"
17277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17278$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17279  fi
17280
17281        fi
17282      fi
17283    fi
17284  fi
17285
17286        fi
17287        PATH=$OLD_PATH
17288      fi
17289    fi
17290
17291    if test "x$FOUND_MAKE" = x; then
17292      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
17293    fi
17294  fi
17295
17296  MAKE=$FOUND_MAKE
17297
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17299$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17300
17301
17302  # Check if make supports the output sync option and if so, setup using it.
17303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17304$as_echo_n "checking if make --output-sync is supported... " >&6; }
17305  if $MAKE --version -O > /dev/null 2>&1; then
17306    OUTPUT_SYNC_SUPPORTED=true
17307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17308$as_echo "yes" >&6; }
17309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17310$as_echo_n "checking for output-sync value... " >&6; }
17311
17312# Check whether --with-output-sync was given.
17313if test "${with_output_sync+set}" = set; then :
17314  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17315fi
17316
17317    if test "x$OUTPUT_SYNC" = "x"; then
17318      OUTPUT_SYNC=none
17319    fi
17320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17321$as_echo "$OUTPUT_SYNC" >&6; }
17322    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17323      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17324    fi
17325  else
17326    OUTPUT_SYNC_SUPPORTED=false
17327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17328$as_echo "no" >&6; }
17329  fi
17330
17331
17332
17333
17334
17335
17336  # Test if find supports -delete
17337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17338$as_echo_n "checking if find supports -delete... " >&6; }
17339  FIND_DELETE="-delete"
17340
17341  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17342
17343  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17344
17345  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17346  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17347    # No, it does not.
17348    rm $DELETEDIR/TestIfFindSupportsDelete
17349    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17350      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17351      FIND_DELETE="-print | xargs rm"
17352    else
17353      FIND_DELETE="-exec rm \{\} \+"
17354    fi
17355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17356$as_echo "no" >&6; }
17357  else
17358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17359$as_echo "yes" >&6; }
17360  fi
17361  rmdir $DELETEDIR
17362
17363
17364
17365  # These tools might not be installed by default,
17366  # need hint on how to install them.
17367
17368
17369
17370  # Publish this variable in the help.
17371
17372
17373  if test "x$UNZIP" = x; then
17374    # The variable is not set by user, try to locate tool using the code snippet
17375    for ac_prog in unzip
17376do
17377  # Extract the first word of "$ac_prog", so it can be a program name with args.
17378set dummy $ac_prog; ac_word=$2
17379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17380$as_echo_n "checking for $ac_word... " >&6; }
17381if ${ac_cv_path_UNZIP+:} false; then :
17382  $as_echo_n "(cached) " >&6
17383else
17384  case $UNZIP in
17385  [\\/]* | ?:[\\/]*)
17386  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17387  ;;
17388  *)
17389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17390for as_dir in $PATH
17391do
17392  IFS=$as_save_IFS
17393  test -z "$as_dir" && as_dir=.
17394    for ac_exec_ext in '' $ac_executable_extensions; do
17395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17396    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17398    break 2
17399  fi
17400done
17401  done
17402IFS=$as_save_IFS
17403
17404  ;;
17405esac
17406fi
17407UNZIP=$ac_cv_path_UNZIP
17408if test -n "$UNZIP"; then
17409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17410$as_echo "$UNZIP" >&6; }
17411else
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17413$as_echo "no" >&6; }
17414fi
17415
17416
17417  test -n "$UNZIP" && break
17418done
17419
17420  else
17421    # The variable is set, but is it from the command line or the environment?
17422
17423    # Try to remove the string !UNZIP! from our list.
17424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17426      # If it failed, the variable was not from the command line. Ignore it,
17427      # but warn the user (except for BASH, which is always set by the calling BASH).
17428      if test "xUNZIP" != xBASH; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17430$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17431      fi
17432      # Try to locate tool using the code snippet
17433      for ac_prog in unzip
17434do
17435  # Extract the first word of "$ac_prog", so it can be a program name with args.
17436set dummy $ac_prog; ac_word=$2
17437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17438$as_echo_n "checking for $ac_word... " >&6; }
17439if ${ac_cv_path_UNZIP+:} false; then :
17440  $as_echo_n "(cached) " >&6
17441else
17442  case $UNZIP in
17443  [\\/]* | ?:[\\/]*)
17444  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17445  ;;
17446  *)
17447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448for as_dir in $PATH
17449do
17450  IFS=$as_save_IFS
17451  test -z "$as_dir" && as_dir=.
17452    for ac_exec_ext in '' $ac_executable_extensions; do
17453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17454    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456    break 2
17457  fi
17458done
17459  done
17460IFS=$as_save_IFS
17461
17462  ;;
17463esac
17464fi
17465UNZIP=$ac_cv_path_UNZIP
17466if test -n "$UNZIP"; then
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17468$as_echo "$UNZIP" >&6; }
17469else
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17471$as_echo "no" >&6; }
17472fi
17473
17474
17475  test -n "$UNZIP" && break
17476done
17477
17478    else
17479      # If it succeeded, then it was overridden by the user. We will use it
17480      # for the tool.
17481
17482      # First remove it from the list of overridden variables, so we can test
17483      # for unknown variables in the end.
17484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17485
17486      # Check if the provided tool contains a complete path.
17487      tool_specified="$UNZIP"
17488      tool_basename="${tool_specified##*/}"
17489      if test "x$tool_basename" = "x$tool_specified"; then
17490        # A command without a complete path is provided, search $PATH.
17491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17492$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17493        # Extract the first word of "$tool_basename", so it can be a program name with args.
17494set dummy $tool_basename; ac_word=$2
17495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17496$as_echo_n "checking for $ac_word... " >&6; }
17497if ${ac_cv_path_UNZIP+:} false; then :
17498  $as_echo_n "(cached) " >&6
17499else
17500  case $UNZIP in
17501  [\\/]* | ?:[\\/]*)
17502  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17503  ;;
17504  *)
17505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17506for as_dir in $PATH
17507do
17508  IFS=$as_save_IFS
17509  test -z "$as_dir" && as_dir=.
17510    for ac_exec_ext in '' $ac_executable_extensions; do
17511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17512    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17514    break 2
17515  fi
17516done
17517  done
17518IFS=$as_save_IFS
17519
17520  ;;
17521esac
17522fi
17523UNZIP=$ac_cv_path_UNZIP
17524if test -n "$UNZIP"; then
17525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17526$as_echo "$UNZIP" >&6; }
17527else
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17529$as_echo "no" >&6; }
17530fi
17531
17532
17533        if test "x$UNZIP" = x; then
17534          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17535        fi
17536      else
17537        # Otherwise we believe it is a complete path. Use it as it is.
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17539$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17541$as_echo_n "checking for UNZIP... " >&6; }
17542        if test ! -x "$tool_specified"; then
17543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17544$as_echo "not found" >&6; }
17545          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17546        fi
17547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17548$as_echo "$tool_specified" >&6; }
17549      fi
17550    fi
17551  fi
17552
17553
17554
17555  if test "x$UNZIP" = x; then
17556    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17557  fi
17558
17559
17560
17561
17562
17563  # Publish this variable in the help.
17564
17565
17566  if test "x$ZIP" = x; then
17567    # The variable is not set by user, try to locate tool using the code snippet
17568    for ac_prog in zip
17569do
17570  # Extract the first word of "$ac_prog", so it can be a program name with args.
17571set dummy $ac_prog; ac_word=$2
17572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17573$as_echo_n "checking for $ac_word... " >&6; }
17574if ${ac_cv_path_ZIP+:} false; then :
17575  $as_echo_n "(cached) " >&6
17576else
17577  case $ZIP in
17578  [\\/]* | ?:[\\/]*)
17579  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17580  ;;
17581  *)
17582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17583for as_dir in $PATH
17584do
17585  IFS=$as_save_IFS
17586  test -z "$as_dir" && as_dir=.
17587    for ac_exec_ext in '' $ac_executable_extensions; do
17588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17589    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17591    break 2
17592  fi
17593done
17594  done
17595IFS=$as_save_IFS
17596
17597  ;;
17598esac
17599fi
17600ZIP=$ac_cv_path_ZIP
17601if test -n "$ZIP"; then
17602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17603$as_echo "$ZIP" >&6; }
17604else
17605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17606$as_echo "no" >&6; }
17607fi
17608
17609
17610  test -n "$ZIP" && break
17611done
17612
17613  else
17614    # The variable is set, but is it from the command line or the environment?
17615
17616    # Try to remove the string !ZIP! from our list.
17617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17619      # If it failed, the variable was not from the command line. Ignore it,
17620      # but warn the user (except for BASH, which is always set by the calling BASH).
17621      if test "xZIP" != xBASH; then
17622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17623$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17624      fi
17625      # Try to locate tool using the code snippet
17626      for ac_prog in zip
17627do
17628  # Extract the first word of "$ac_prog", so it can be a program name with args.
17629set dummy $ac_prog; ac_word=$2
17630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17631$as_echo_n "checking for $ac_word... " >&6; }
17632if ${ac_cv_path_ZIP+:} false; then :
17633  $as_echo_n "(cached) " >&6
17634else
17635  case $ZIP in
17636  [\\/]* | ?:[\\/]*)
17637  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17638  ;;
17639  *)
17640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17641for as_dir in $PATH
17642do
17643  IFS=$as_save_IFS
17644  test -z "$as_dir" && as_dir=.
17645    for ac_exec_ext in '' $ac_executable_extensions; do
17646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17647    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17649    break 2
17650  fi
17651done
17652  done
17653IFS=$as_save_IFS
17654
17655  ;;
17656esac
17657fi
17658ZIP=$ac_cv_path_ZIP
17659if test -n "$ZIP"; then
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17661$as_echo "$ZIP" >&6; }
17662else
17663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17664$as_echo "no" >&6; }
17665fi
17666
17667
17668  test -n "$ZIP" && break
17669done
17670
17671    else
17672      # If it succeeded, then it was overridden by the user. We will use it
17673      # for the tool.
17674
17675      # First remove it from the list of overridden variables, so we can test
17676      # for unknown variables in the end.
17677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17678
17679      # Check if the provided tool contains a complete path.
17680      tool_specified="$ZIP"
17681      tool_basename="${tool_specified##*/}"
17682      if test "x$tool_basename" = "x$tool_specified"; then
17683        # A command without a complete path is provided, search $PATH.
17684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17685$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17686        # Extract the first word of "$tool_basename", so it can be a program name with args.
17687set dummy $tool_basename; ac_word=$2
17688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17689$as_echo_n "checking for $ac_word... " >&6; }
17690if ${ac_cv_path_ZIP+:} false; then :
17691  $as_echo_n "(cached) " >&6
17692else
17693  case $ZIP in
17694  [\\/]* | ?:[\\/]*)
17695  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17696  ;;
17697  *)
17698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17699for as_dir in $PATH
17700do
17701  IFS=$as_save_IFS
17702  test -z "$as_dir" && as_dir=.
17703    for ac_exec_ext in '' $ac_executable_extensions; do
17704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17705    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17707    break 2
17708  fi
17709done
17710  done
17711IFS=$as_save_IFS
17712
17713  ;;
17714esac
17715fi
17716ZIP=$ac_cv_path_ZIP
17717if test -n "$ZIP"; then
17718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17719$as_echo "$ZIP" >&6; }
17720else
17721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17722$as_echo "no" >&6; }
17723fi
17724
17725
17726        if test "x$ZIP" = x; then
17727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17728        fi
17729      else
17730        # Otherwise we believe it is a complete path. Use it as it is.
17731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17732$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17734$as_echo_n "checking for ZIP... " >&6; }
17735        if test ! -x "$tool_specified"; then
17736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17737$as_echo "not found" >&6; }
17738          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17739        fi
17740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17741$as_echo "$tool_specified" >&6; }
17742      fi
17743    fi
17744  fi
17745
17746
17747
17748  if test "x$ZIP" = x; then
17749    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17750  fi
17751
17752
17753
17754  # Non-required basic tools
17755
17756
17757
17758  # Publish this variable in the help.
17759
17760
17761  if test "x$LDD" = x; then
17762    # The variable is not set by user, try to locate tool using the code snippet
17763    for ac_prog in ldd
17764do
17765  # Extract the first word of "$ac_prog", so it can be a program name with args.
17766set dummy $ac_prog; ac_word=$2
17767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17768$as_echo_n "checking for $ac_word... " >&6; }
17769if ${ac_cv_path_LDD+:} false; then :
17770  $as_echo_n "(cached) " >&6
17771else
17772  case $LDD in
17773  [\\/]* | ?:[\\/]*)
17774  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17775  ;;
17776  *)
17777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17778for as_dir in $PATH
17779do
17780  IFS=$as_save_IFS
17781  test -z "$as_dir" && as_dir=.
17782    for ac_exec_ext in '' $ac_executable_extensions; do
17783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17784    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17786    break 2
17787  fi
17788done
17789  done
17790IFS=$as_save_IFS
17791
17792  ;;
17793esac
17794fi
17795LDD=$ac_cv_path_LDD
17796if test -n "$LDD"; then
17797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17798$as_echo "$LDD" >&6; }
17799else
17800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17801$as_echo "no" >&6; }
17802fi
17803
17804
17805  test -n "$LDD" && break
17806done
17807
17808  else
17809    # The variable is set, but is it from the command line or the environment?
17810
17811    # Try to remove the string !LDD! from our list.
17812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17814      # If it failed, the variable was not from the command line. Ignore it,
17815      # but warn the user (except for BASH, which is always set by the calling BASH).
17816      if test "xLDD" != xBASH; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17818$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17819      fi
17820      # Try to locate tool using the code snippet
17821      for ac_prog in ldd
17822do
17823  # Extract the first word of "$ac_prog", so it can be a program name with args.
17824set dummy $ac_prog; ac_word=$2
17825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17826$as_echo_n "checking for $ac_word... " >&6; }
17827if ${ac_cv_path_LDD+:} false; then :
17828  $as_echo_n "(cached) " >&6
17829else
17830  case $LDD in
17831  [\\/]* | ?:[\\/]*)
17832  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17833  ;;
17834  *)
17835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17836for as_dir in $PATH
17837do
17838  IFS=$as_save_IFS
17839  test -z "$as_dir" && as_dir=.
17840    for ac_exec_ext in '' $ac_executable_extensions; do
17841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17842    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17844    break 2
17845  fi
17846done
17847  done
17848IFS=$as_save_IFS
17849
17850  ;;
17851esac
17852fi
17853LDD=$ac_cv_path_LDD
17854if test -n "$LDD"; then
17855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17856$as_echo "$LDD" >&6; }
17857else
17858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17859$as_echo "no" >&6; }
17860fi
17861
17862
17863  test -n "$LDD" && break
17864done
17865
17866    else
17867      # If it succeeded, then it was overridden by the user. We will use it
17868      # for the tool.
17869
17870      # First remove it from the list of overridden variables, so we can test
17871      # for unknown variables in the end.
17872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17873
17874      # Check if the provided tool contains a complete path.
17875      tool_specified="$LDD"
17876      tool_basename="${tool_specified##*/}"
17877      if test "x$tool_basename" = "x$tool_specified"; then
17878        # A command without a complete path is provided, search $PATH.
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17880$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17881        # Extract the first word of "$tool_basename", so it can be a program name with args.
17882set dummy $tool_basename; ac_word=$2
17883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17884$as_echo_n "checking for $ac_word... " >&6; }
17885if ${ac_cv_path_LDD+:} false; then :
17886  $as_echo_n "(cached) " >&6
17887else
17888  case $LDD in
17889  [\\/]* | ?:[\\/]*)
17890  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17891  ;;
17892  *)
17893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17894for as_dir in $PATH
17895do
17896  IFS=$as_save_IFS
17897  test -z "$as_dir" && as_dir=.
17898    for ac_exec_ext in '' $ac_executable_extensions; do
17899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17900    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17902    break 2
17903  fi
17904done
17905  done
17906IFS=$as_save_IFS
17907
17908  ;;
17909esac
17910fi
17911LDD=$ac_cv_path_LDD
17912if test -n "$LDD"; then
17913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17914$as_echo "$LDD" >&6; }
17915else
17916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17917$as_echo "no" >&6; }
17918fi
17919
17920
17921        if test "x$LDD" = x; then
17922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17923        fi
17924      else
17925        # Otherwise we believe it is a complete path. Use it as it is.
17926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17927$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17929$as_echo_n "checking for LDD... " >&6; }
17930        if test ! -x "$tool_specified"; then
17931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17932$as_echo "not found" >&6; }
17933          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17934        fi
17935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17936$as_echo "$tool_specified" >&6; }
17937      fi
17938    fi
17939  fi
17940
17941
17942  if test "x$LDD" = "x"; then
17943    # List shared lib dependencies is used for
17944    # debug output and checking for forbidden dependencies.
17945    # We can build without it.
17946    LDD="true"
17947  fi
17948
17949
17950  # Publish this variable in the help.
17951
17952
17953  if test "x$OTOOL" = x; then
17954    # The variable is not set by user, try to locate tool using the code snippet
17955    for ac_prog in otool
17956do
17957  # Extract the first word of "$ac_prog", so it can be a program name with args.
17958set dummy $ac_prog; ac_word=$2
17959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17960$as_echo_n "checking for $ac_word... " >&6; }
17961if ${ac_cv_path_OTOOL+:} false; then :
17962  $as_echo_n "(cached) " >&6
17963else
17964  case $OTOOL in
17965  [\\/]* | ?:[\\/]*)
17966  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17967  ;;
17968  *)
17969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17970for as_dir in $PATH
17971do
17972  IFS=$as_save_IFS
17973  test -z "$as_dir" && as_dir=.
17974    for ac_exec_ext in '' $ac_executable_extensions; do
17975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17976    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17978    break 2
17979  fi
17980done
17981  done
17982IFS=$as_save_IFS
17983
17984  ;;
17985esac
17986fi
17987OTOOL=$ac_cv_path_OTOOL
17988if test -n "$OTOOL"; then
17989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17990$as_echo "$OTOOL" >&6; }
17991else
17992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17993$as_echo "no" >&6; }
17994fi
17995
17996
17997  test -n "$OTOOL" && break
17998done
17999
18000  else
18001    # The variable is set, but is it from the command line or the environment?
18002
18003    # Try to remove the string !OTOOL! from our list.
18004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18006      # If it failed, the variable was not from the command line. Ignore it,
18007      # but warn the user (except for BASH, which is always set by the calling BASH).
18008      if test "xOTOOL" != xBASH; then
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18010$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18011      fi
18012      # Try to locate tool using the code snippet
18013      for ac_prog in otool
18014do
18015  # Extract the first word of "$ac_prog", so it can be a program name with args.
18016set dummy $ac_prog; ac_word=$2
18017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18018$as_echo_n "checking for $ac_word... " >&6; }
18019if ${ac_cv_path_OTOOL+:} false; then :
18020  $as_echo_n "(cached) " >&6
18021else
18022  case $OTOOL in
18023  [\\/]* | ?:[\\/]*)
18024  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18025  ;;
18026  *)
18027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18028for as_dir in $PATH
18029do
18030  IFS=$as_save_IFS
18031  test -z "$as_dir" && as_dir=.
18032    for ac_exec_ext in '' $ac_executable_extensions; do
18033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18034    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18036    break 2
18037  fi
18038done
18039  done
18040IFS=$as_save_IFS
18041
18042  ;;
18043esac
18044fi
18045OTOOL=$ac_cv_path_OTOOL
18046if test -n "$OTOOL"; then
18047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18048$as_echo "$OTOOL" >&6; }
18049else
18050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18051$as_echo "no" >&6; }
18052fi
18053
18054
18055  test -n "$OTOOL" && break
18056done
18057
18058    else
18059      # If it succeeded, then it was overridden by the user. We will use it
18060      # for the tool.
18061
18062      # First remove it from the list of overridden variables, so we can test
18063      # for unknown variables in the end.
18064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18065
18066      # Check if the provided tool contains a complete path.
18067      tool_specified="$OTOOL"
18068      tool_basename="${tool_specified##*/}"
18069      if test "x$tool_basename" = "x$tool_specified"; then
18070        # A command without a complete path is provided, search $PATH.
18071        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18072$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18073        # Extract the first word of "$tool_basename", so it can be a program name with args.
18074set dummy $tool_basename; ac_word=$2
18075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18076$as_echo_n "checking for $ac_word... " >&6; }
18077if ${ac_cv_path_OTOOL+:} false; then :
18078  $as_echo_n "(cached) " >&6
18079else
18080  case $OTOOL in
18081  [\\/]* | ?:[\\/]*)
18082  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18083  ;;
18084  *)
18085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18086for as_dir in $PATH
18087do
18088  IFS=$as_save_IFS
18089  test -z "$as_dir" && as_dir=.
18090    for ac_exec_ext in '' $ac_executable_extensions; do
18091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18092    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18094    break 2
18095  fi
18096done
18097  done
18098IFS=$as_save_IFS
18099
18100  ;;
18101esac
18102fi
18103OTOOL=$ac_cv_path_OTOOL
18104if test -n "$OTOOL"; then
18105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18106$as_echo "$OTOOL" >&6; }
18107else
18108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18109$as_echo "no" >&6; }
18110fi
18111
18112
18113        if test "x$OTOOL" = x; then
18114          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18115        fi
18116      else
18117        # Otherwise we believe it is a complete path. Use it as it is.
18118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18119$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18121$as_echo_n "checking for OTOOL... " >&6; }
18122        if test ! -x "$tool_specified"; then
18123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18124$as_echo "not found" >&6; }
18125          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18126        fi
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18128$as_echo "$tool_specified" >&6; }
18129      fi
18130    fi
18131  fi
18132
18133
18134  if test "x$OTOOL" = "x"; then
18135    OTOOL="true"
18136  fi
18137
18138
18139  # Publish this variable in the help.
18140
18141
18142  if test "x$READELF" = x; then
18143    # The variable is not set by user, try to locate tool using the code snippet
18144    for ac_prog in greadelf readelf
18145do
18146  # Extract the first word of "$ac_prog", so it can be a program name with args.
18147set dummy $ac_prog; ac_word=$2
18148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18149$as_echo_n "checking for $ac_word... " >&6; }
18150if ${ac_cv_path_READELF+:} false; then :
18151  $as_echo_n "(cached) " >&6
18152else
18153  case $READELF in
18154  [\\/]* | ?:[\\/]*)
18155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18156  ;;
18157  *)
18158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18159for as_dir in $PATH
18160do
18161  IFS=$as_save_IFS
18162  test -z "$as_dir" && as_dir=.
18163    for ac_exec_ext in '' $ac_executable_extensions; do
18164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18167    break 2
18168  fi
18169done
18170  done
18171IFS=$as_save_IFS
18172
18173  ;;
18174esac
18175fi
18176READELF=$ac_cv_path_READELF
18177if test -n "$READELF"; then
18178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18179$as_echo "$READELF" >&6; }
18180else
18181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18182$as_echo "no" >&6; }
18183fi
18184
18185
18186  test -n "$READELF" && break
18187done
18188
18189  else
18190    # The variable is set, but is it from the command line or the environment?
18191
18192    # Try to remove the string !READELF! from our list.
18193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18195      # If it failed, the variable was not from the command line. Ignore it,
18196      # but warn the user (except for BASH, which is always set by the calling BASH).
18197      if test "xREADELF" != xBASH; then
18198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18199$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18200      fi
18201      # Try to locate tool using the code snippet
18202      for ac_prog in greadelf readelf
18203do
18204  # Extract the first word of "$ac_prog", so it can be a program name with args.
18205set dummy $ac_prog; ac_word=$2
18206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18207$as_echo_n "checking for $ac_word... " >&6; }
18208if ${ac_cv_path_READELF+:} false; then :
18209  $as_echo_n "(cached) " >&6
18210else
18211  case $READELF in
18212  [\\/]* | ?:[\\/]*)
18213  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18214  ;;
18215  *)
18216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18217for as_dir in $PATH
18218do
18219  IFS=$as_save_IFS
18220  test -z "$as_dir" && as_dir=.
18221    for ac_exec_ext in '' $ac_executable_extensions; do
18222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18223    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18225    break 2
18226  fi
18227done
18228  done
18229IFS=$as_save_IFS
18230
18231  ;;
18232esac
18233fi
18234READELF=$ac_cv_path_READELF
18235if test -n "$READELF"; then
18236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18237$as_echo "$READELF" >&6; }
18238else
18239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18240$as_echo "no" >&6; }
18241fi
18242
18243
18244  test -n "$READELF" && break
18245done
18246
18247    else
18248      # If it succeeded, then it was overridden by the user. We will use it
18249      # for the tool.
18250
18251      # First remove it from the list of overridden variables, so we can test
18252      # for unknown variables in the end.
18253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18254
18255      # Check if the provided tool contains a complete path.
18256      tool_specified="$READELF"
18257      tool_basename="${tool_specified##*/}"
18258      if test "x$tool_basename" = "x$tool_specified"; then
18259        # A command without a complete path is provided, search $PATH.
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18261$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18262        # Extract the first word of "$tool_basename", so it can be a program name with args.
18263set dummy $tool_basename; ac_word=$2
18264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18265$as_echo_n "checking for $ac_word... " >&6; }
18266if ${ac_cv_path_READELF+:} false; then :
18267  $as_echo_n "(cached) " >&6
18268else
18269  case $READELF in
18270  [\\/]* | ?:[\\/]*)
18271  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18272  ;;
18273  *)
18274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18275for as_dir in $PATH
18276do
18277  IFS=$as_save_IFS
18278  test -z "$as_dir" && as_dir=.
18279    for ac_exec_ext in '' $ac_executable_extensions; do
18280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18281    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18283    break 2
18284  fi
18285done
18286  done
18287IFS=$as_save_IFS
18288
18289  ;;
18290esac
18291fi
18292READELF=$ac_cv_path_READELF
18293if test -n "$READELF"; then
18294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18295$as_echo "$READELF" >&6; }
18296else
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18298$as_echo "no" >&6; }
18299fi
18300
18301
18302        if test "x$READELF" = x; then
18303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18304        fi
18305      else
18306        # Otherwise we believe it is a complete path. Use it as it is.
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18308$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18310$as_echo_n "checking for READELF... " >&6; }
18311        if test ! -x "$tool_specified"; then
18312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18313$as_echo "not found" >&6; }
18314          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18315        fi
18316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18317$as_echo "$tool_specified" >&6; }
18318      fi
18319    fi
18320  fi
18321
18322
18323
18324
18325  # Publish this variable in the help.
18326
18327
18328  if test "x$HG" = x; then
18329    # The variable is not set by user, try to locate tool using the code snippet
18330    for ac_prog in hg
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_HG+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $HG in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362HG=$ac_cv_path_HG
18363if test -n "$HG"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18365$as_echo "$HG" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$HG" && break
18373done
18374
18375  else
18376    # The variable is set, but is it from the command line or the environment?
18377
18378    # Try to remove the string !HG! from our list.
18379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18381      # If it failed, the variable was not from the command line. Ignore it,
18382      # but warn the user (except for BASH, which is always set by the calling BASH).
18383      if test "xHG" != xBASH; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18385$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18386      fi
18387      # Try to locate tool using the code snippet
18388      for ac_prog in hg
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_HG+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $HG in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420HG=$ac_cv_path_HG
18421if test -n "$HG"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18423$as_echo "$HG" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$HG" && break
18431done
18432
18433    else
18434      # If it succeeded, then it was overridden by the user. We will use it
18435      # for the tool.
18436
18437      # First remove it from the list of overridden variables, so we can test
18438      # for unknown variables in the end.
18439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18440
18441      # Check if the provided tool contains a complete path.
18442      tool_specified="$HG"
18443      tool_basename="${tool_specified##*/}"
18444      if test "x$tool_basename" = "x$tool_specified"; then
18445        # A command without a complete path is provided, search $PATH.
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18447$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18448        # Extract the first word of "$tool_basename", so it can be a program name with args.
18449set dummy $tool_basename; ac_word=$2
18450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18451$as_echo_n "checking for $ac_word... " >&6; }
18452if ${ac_cv_path_HG+:} false; then :
18453  $as_echo_n "(cached) " >&6
18454else
18455  case $HG in
18456  [\\/]* | ?:[\\/]*)
18457  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18458  ;;
18459  *)
18460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18461for as_dir in $PATH
18462do
18463  IFS=$as_save_IFS
18464  test -z "$as_dir" && as_dir=.
18465    for ac_exec_ext in '' $ac_executable_extensions; do
18466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18467    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18469    break 2
18470  fi
18471done
18472  done
18473IFS=$as_save_IFS
18474
18475  ;;
18476esac
18477fi
18478HG=$ac_cv_path_HG
18479if test -n "$HG"; then
18480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18481$as_echo "$HG" >&6; }
18482else
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18484$as_echo "no" >&6; }
18485fi
18486
18487
18488        if test "x$HG" = x; then
18489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18490        fi
18491      else
18492        # Otherwise we believe it is a complete path. Use it as it is.
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18494$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18496$as_echo_n "checking for HG... " >&6; }
18497        if test ! -x "$tool_specified"; then
18498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18499$as_echo "not found" >&6; }
18500          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18501        fi
18502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18503$as_echo "$tool_specified" >&6; }
18504      fi
18505    fi
18506  fi
18507
18508
18509
18510
18511  # Publish this variable in the help.
18512
18513
18514  if test "x$STAT" = x; then
18515    # The variable is not set by user, try to locate tool using the code snippet
18516    for ac_prog in stat
18517do
18518  # Extract the first word of "$ac_prog", so it can be a program name with args.
18519set dummy $ac_prog; ac_word=$2
18520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18521$as_echo_n "checking for $ac_word... " >&6; }
18522if ${ac_cv_path_STAT+:} false; then :
18523  $as_echo_n "(cached) " >&6
18524else
18525  case $STAT in
18526  [\\/]* | ?:[\\/]*)
18527  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18528  ;;
18529  *)
18530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18531for as_dir in $PATH
18532do
18533  IFS=$as_save_IFS
18534  test -z "$as_dir" && as_dir=.
18535    for ac_exec_ext in '' $ac_executable_extensions; do
18536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18537    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18539    break 2
18540  fi
18541done
18542  done
18543IFS=$as_save_IFS
18544
18545  ;;
18546esac
18547fi
18548STAT=$ac_cv_path_STAT
18549if test -n "$STAT"; then
18550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18551$as_echo "$STAT" >&6; }
18552else
18553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18554$as_echo "no" >&6; }
18555fi
18556
18557
18558  test -n "$STAT" && break
18559done
18560
18561  else
18562    # The variable is set, but is it from the command line or the environment?
18563
18564    # Try to remove the string !STAT! from our list.
18565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18567      # If it failed, the variable was not from the command line. Ignore it,
18568      # but warn the user (except for BASH, which is always set by the calling BASH).
18569      if test "xSTAT" != xBASH; then
18570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18571$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18572      fi
18573      # Try to locate tool using the code snippet
18574      for ac_prog in stat
18575do
18576  # Extract the first word of "$ac_prog", so it can be a program name with args.
18577set dummy $ac_prog; ac_word=$2
18578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18579$as_echo_n "checking for $ac_word... " >&6; }
18580if ${ac_cv_path_STAT+:} false; then :
18581  $as_echo_n "(cached) " >&6
18582else
18583  case $STAT in
18584  [\\/]* | ?:[\\/]*)
18585  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18586  ;;
18587  *)
18588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18589for as_dir in $PATH
18590do
18591  IFS=$as_save_IFS
18592  test -z "$as_dir" && as_dir=.
18593    for ac_exec_ext in '' $ac_executable_extensions; do
18594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18595    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18597    break 2
18598  fi
18599done
18600  done
18601IFS=$as_save_IFS
18602
18603  ;;
18604esac
18605fi
18606STAT=$ac_cv_path_STAT
18607if test -n "$STAT"; then
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18609$as_echo "$STAT" >&6; }
18610else
18611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18612$as_echo "no" >&6; }
18613fi
18614
18615
18616  test -n "$STAT" && break
18617done
18618
18619    else
18620      # If it succeeded, then it was overridden by the user. We will use it
18621      # for the tool.
18622
18623      # First remove it from the list of overridden variables, so we can test
18624      # for unknown variables in the end.
18625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18626
18627      # Check if the provided tool contains a complete path.
18628      tool_specified="$STAT"
18629      tool_basename="${tool_specified##*/}"
18630      if test "x$tool_basename" = "x$tool_specified"; then
18631        # A command without a complete path is provided, search $PATH.
18632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18633$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18634        # Extract the first word of "$tool_basename", so it can be a program name with args.
18635set dummy $tool_basename; ac_word=$2
18636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18637$as_echo_n "checking for $ac_word... " >&6; }
18638if ${ac_cv_path_STAT+:} false; then :
18639  $as_echo_n "(cached) " >&6
18640else
18641  case $STAT in
18642  [\\/]* | ?:[\\/]*)
18643  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18644  ;;
18645  *)
18646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18647for as_dir in $PATH
18648do
18649  IFS=$as_save_IFS
18650  test -z "$as_dir" && as_dir=.
18651    for ac_exec_ext in '' $ac_executable_extensions; do
18652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18653    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18655    break 2
18656  fi
18657done
18658  done
18659IFS=$as_save_IFS
18660
18661  ;;
18662esac
18663fi
18664STAT=$ac_cv_path_STAT
18665if test -n "$STAT"; then
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18667$as_echo "$STAT" >&6; }
18668else
18669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18670$as_echo "no" >&6; }
18671fi
18672
18673
18674        if test "x$STAT" = x; then
18675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18676        fi
18677      else
18678        # Otherwise we believe it is a complete path. Use it as it is.
18679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18680$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18682$as_echo_n "checking for STAT... " >&6; }
18683        if test ! -x "$tool_specified"; then
18684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18685$as_echo "not found" >&6; }
18686          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18687        fi
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18689$as_echo "$tool_specified" >&6; }
18690      fi
18691    fi
18692  fi
18693
18694
18695
18696
18697  # Publish this variable in the help.
18698
18699
18700  if test "x$TIME" = x; then
18701    # The variable is not set by user, try to locate tool using the code snippet
18702    for ac_prog in time
18703do
18704  # Extract the first word of "$ac_prog", so it can be a program name with args.
18705set dummy $ac_prog; ac_word=$2
18706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18707$as_echo_n "checking for $ac_word... " >&6; }
18708if ${ac_cv_path_TIME+:} false; then :
18709  $as_echo_n "(cached) " >&6
18710else
18711  case $TIME in
18712  [\\/]* | ?:[\\/]*)
18713  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18714  ;;
18715  *)
18716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18717for as_dir in $PATH
18718do
18719  IFS=$as_save_IFS
18720  test -z "$as_dir" && as_dir=.
18721    for ac_exec_ext in '' $ac_executable_extensions; do
18722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18723    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18725    break 2
18726  fi
18727done
18728  done
18729IFS=$as_save_IFS
18730
18731  ;;
18732esac
18733fi
18734TIME=$ac_cv_path_TIME
18735if test -n "$TIME"; then
18736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18737$as_echo "$TIME" >&6; }
18738else
18739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18740$as_echo "no" >&6; }
18741fi
18742
18743
18744  test -n "$TIME" && break
18745done
18746
18747  else
18748    # The variable is set, but is it from the command line or the environment?
18749
18750    # Try to remove the string !TIME! from our list.
18751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18753      # If it failed, the variable was not from the command line. Ignore it,
18754      # but warn the user (except for BASH, which is always set by the calling BASH).
18755      if test "xTIME" != xBASH; then
18756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18757$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18758      fi
18759      # Try to locate tool using the code snippet
18760      for ac_prog in time
18761do
18762  # Extract the first word of "$ac_prog", so it can be a program name with args.
18763set dummy $ac_prog; ac_word=$2
18764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18765$as_echo_n "checking for $ac_word... " >&6; }
18766if ${ac_cv_path_TIME+:} false; then :
18767  $as_echo_n "(cached) " >&6
18768else
18769  case $TIME in
18770  [\\/]* | ?:[\\/]*)
18771  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18772  ;;
18773  *)
18774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18775for as_dir in $PATH
18776do
18777  IFS=$as_save_IFS
18778  test -z "$as_dir" && as_dir=.
18779    for ac_exec_ext in '' $ac_executable_extensions; do
18780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18781    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18783    break 2
18784  fi
18785done
18786  done
18787IFS=$as_save_IFS
18788
18789  ;;
18790esac
18791fi
18792TIME=$ac_cv_path_TIME
18793if test -n "$TIME"; then
18794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18795$as_echo "$TIME" >&6; }
18796else
18797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18798$as_echo "no" >&6; }
18799fi
18800
18801
18802  test -n "$TIME" && break
18803done
18804
18805    else
18806      # If it succeeded, then it was overridden by the user. We will use it
18807      # for the tool.
18808
18809      # First remove it from the list of overridden variables, so we can test
18810      # for unknown variables in the end.
18811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18812
18813      # Check if the provided tool contains a complete path.
18814      tool_specified="$TIME"
18815      tool_basename="${tool_specified##*/}"
18816      if test "x$tool_basename" = "x$tool_specified"; then
18817        # A command without a complete path is provided, search $PATH.
18818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18819$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18820        # Extract the first word of "$tool_basename", so it can be a program name with args.
18821set dummy $tool_basename; ac_word=$2
18822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18823$as_echo_n "checking for $ac_word... " >&6; }
18824if ${ac_cv_path_TIME+:} false; then :
18825  $as_echo_n "(cached) " >&6
18826else
18827  case $TIME in
18828  [\\/]* | ?:[\\/]*)
18829  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18830  ;;
18831  *)
18832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18833for as_dir in $PATH
18834do
18835  IFS=$as_save_IFS
18836  test -z "$as_dir" && as_dir=.
18837    for ac_exec_ext in '' $ac_executable_extensions; do
18838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18839    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18841    break 2
18842  fi
18843done
18844  done
18845IFS=$as_save_IFS
18846
18847  ;;
18848esac
18849fi
18850TIME=$ac_cv_path_TIME
18851if test -n "$TIME"; then
18852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18853$as_echo "$TIME" >&6; }
18854else
18855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18856$as_echo "no" >&6; }
18857fi
18858
18859
18860        if test "x$TIME" = x; then
18861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18862        fi
18863      else
18864        # Otherwise we believe it is a complete path. Use it as it is.
18865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18866$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18868$as_echo_n "checking for TIME... " >&6; }
18869        if test ! -x "$tool_specified"; then
18870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18871$as_echo "not found" >&6; }
18872          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18873        fi
18874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18875$as_echo "$tool_specified" >&6; }
18876      fi
18877    fi
18878  fi
18879
18880
18881  # Check if it's GNU time
18882  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18883  if test "x$IS_GNU_TIME" != x; then
18884    IS_GNU_TIME=yes
18885  else
18886    IS_GNU_TIME=no
18887  fi
18888
18889
18890  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18891
18892
18893
18894  # Publish this variable in the help.
18895
18896
18897  if test "x$DSYMUTIL" = x; then
18898    # The variable is not set by user, try to locate tool using the code snippet
18899    for ac_prog in dsymutil
18900do
18901  # Extract the first word of "$ac_prog", so it can be a program name with args.
18902set dummy $ac_prog; ac_word=$2
18903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18904$as_echo_n "checking for $ac_word... " >&6; }
18905if ${ac_cv_path_DSYMUTIL+:} false; then :
18906  $as_echo_n "(cached) " >&6
18907else
18908  case $DSYMUTIL in
18909  [\\/]* | ?:[\\/]*)
18910  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18911  ;;
18912  *)
18913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18914for as_dir in $PATH
18915do
18916  IFS=$as_save_IFS
18917  test -z "$as_dir" && as_dir=.
18918    for ac_exec_ext in '' $ac_executable_extensions; do
18919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18920    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18922    break 2
18923  fi
18924done
18925  done
18926IFS=$as_save_IFS
18927
18928  ;;
18929esac
18930fi
18931DSYMUTIL=$ac_cv_path_DSYMUTIL
18932if test -n "$DSYMUTIL"; then
18933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18934$as_echo "$DSYMUTIL" >&6; }
18935else
18936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18937$as_echo "no" >&6; }
18938fi
18939
18940
18941  test -n "$DSYMUTIL" && break
18942done
18943
18944  else
18945    # The variable is set, but is it from the command line or the environment?
18946
18947    # Try to remove the string !DSYMUTIL! from our list.
18948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18950      # If it failed, the variable was not from the command line. Ignore it,
18951      # but warn the user (except for BASH, which is always set by the calling BASH).
18952      if test "xDSYMUTIL" != xBASH; then
18953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18954$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18955      fi
18956      # Try to locate tool using the code snippet
18957      for ac_prog in dsymutil
18958do
18959  # Extract the first word of "$ac_prog", so it can be a program name with args.
18960set dummy $ac_prog; ac_word=$2
18961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18962$as_echo_n "checking for $ac_word... " >&6; }
18963if ${ac_cv_path_DSYMUTIL+:} false; then :
18964  $as_echo_n "(cached) " >&6
18965else
18966  case $DSYMUTIL in
18967  [\\/]* | ?:[\\/]*)
18968  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18969  ;;
18970  *)
18971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18972for as_dir in $PATH
18973do
18974  IFS=$as_save_IFS
18975  test -z "$as_dir" && as_dir=.
18976    for ac_exec_ext in '' $ac_executable_extensions; do
18977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18978    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18980    break 2
18981  fi
18982done
18983  done
18984IFS=$as_save_IFS
18985
18986  ;;
18987esac
18988fi
18989DSYMUTIL=$ac_cv_path_DSYMUTIL
18990if test -n "$DSYMUTIL"; then
18991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18992$as_echo "$DSYMUTIL" >&6; }
18993else
18994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18995$as_echo "no" >&6; }
18996fi
18997
18998
18999  test -n "$DSYMUTIL" && break
19000done
19001
19002    else
19003      # If it succeeded, then it was overridden by the user. We will use it
19004      # for the tool.
19005
19006      # First remove it from the list of overridden variables, so we can test
19007      # for unknown variables in the end.
19008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19009
19010      # Check if the provided tool contains a complete path.
19011      tool_specified="$DSYMUTIL"
19012      tool_basename="${tool_specified##*/}"
19013      if test "x$tool_basename" = "x$tool_specified"; then
19014        # A command without a complete path is provided, search $PATH.
19015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19016$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19017        # Extract the first word of "$tool_basename", so it can be a program name with args.
19018set dummy $tool_basename; ac_word=$2
19019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19020$as_echo_n "checking for $ac_word... " >&6; }
19021if ${ac_cv_path_DSYMUTIL+:} false; then :
19022  $as_echo_n "(cached) " >&6
19023else
19024  case $DSYMUTIL in
19025  [\\/]* | ?:[\\/]*)
19026  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19027  ;;
19028  *)
19029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19030for as_dir in $PATH
19031do
19032  IFS=$as_save_IFS
19033  test -z "$as_dir" && as_dir=.
19034    for ac_exec_ext in '' $ac_executable_extensions; do
19035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19036    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19038    break 2
19039  fi
19040done
19041  done
19042IFS=$as_save_IFS
19043
19044  ;;
19045esac
19046fi
19047DSYMUTIL=$ac_cv_path_DSYMUTIL
19048if test -n "$DSYMUTIL"; then
19049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19050$as_echo "$DSYMUTIL" >&6; }
19051else
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19053$as_echo "no" >&6; }
19054fi
19055
19056
19057        if test "x$DSYMUTIL" = x; then
19058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19059        fi
19060      else
19061        # Otherwise we believe it is a complete path. Use it as it is.
19062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19063$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19065$as_echo_n "checking for DSYMUTIL... " >&6; }
19066        if test ! -x "$tool_specified"; then
19067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19068$as_echo "not found" >&6; }
19069          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19070        fi
19071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19072$as_echo "$tool_specified" >&6; }
19073      fi
19074    fi
19075  fi
19076
19077
19078
19079  if test "x$DSYMUTIL" = x; then
19080    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19081  fi
19082
19083
19084
19085
19086
19087  # Publish this variable in the help.
19088
19089
19090  if test "x$XATTR" = x; then
19091    # The variable is not set by user, try to locate tool using the code snippet
19092    for ac_prog in xattr
19093do
19094  # Extract the first word of "$ac_prog", so it can be a program name with args.
19095set dummy $ac_prog; ac_word=$2
19096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19097$as_echo_n "checking for $ac_word... " >&6; }
19098if ${ac_cv_path_XATTR+:} false; then :
19099  $as_echo_n "(cached) " >&6
19100else
19101  case $XATTR in
19102  [\\/]* | ?:[\\/]*)
19103  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19104  ;;
19105  *)
19106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19107for as_dir in $PATH
19108do
19109  IFS=$as_save_IFS
19110  test -z "$as_dir" && as_dir=.
19111    for ac_exec_ext in '' $ac_executable_extensions; do
19112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19113    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19115    break 2
19116  fi
19117done
19118  done
19119IFS=$as_save_IFS
19120
19121  ;;
19122esac
19123fi
19124XATTR=$ac_cv_path_XATTR
19125if test -n "$XATTR"; then
19126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19127$as_echo "$XATTR" >&6; }
19128else
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19130$as_echo "no" >&6; }
19131fi
19132
19133
19134  test -n "$XATTR" && break
19135done
19136
19137  else
19138    # The variable is set, but is it from the command line or the environment?
19139
19140    # Try to remove the string !XATTR! from our list.
19141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19143      # If it failed, the variable was not from the command line. Ignore it,
19144      # but warn the user (except for BASH, which is always set by the calling BASH).
19145      if test "xXATTR" != xBASH; then
19146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19147$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19148      fi
19149      # Try to locate tool using the code snippet
19150      for ac_prog in xattr
19151do
19152  # Extract the first word of "$ac_prog", so it can be a program name with args.
19153set dummy $ac_prog; ac_word=$2
19154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19155$as_echo_n "checking for $ac_word... " >&6; }
19156if ${ac_cv_path_XATTR+:} false; then :
19157  $as_echo_n "(cached) " >&6
19158else
19159  case $XATTR in
19160  [\\/]* | ?:[\\/]*)
19161  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19162  ;;
19163  *)
19164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165for as_dir in $PATH
19166do
19167  IFS=$as_save_IFS
19168  test -z "$as_dir" && as_dir=.
19169    for ac_exec_ext in '' $ac_executable_extensions; do
19170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19171    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173    break 2
19174  fi
19175done
19176  done
19177IFS=$as_save_IFS
19178
19179  ;;
19180esac
19181fi
19182XATTR=$ac_cv_path_XATTR
19183if test -n "$XATTR"; then
19184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19185$as_echo "$XATTR" >&6; }
19186else
19187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19188$as_echo "no" >&6; }
19189fi
19190
19191
19192  test -n "$XATTR" && break
19193done
19194
19195    else
19196      # If it succeeded, then it was overridden by the user. We will use it
19197      # for the tool.
19198
19199      # First remove it from the list of overridden variables, so we can test
19200      # for unknown variables in the end.
19201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19202
19203      # Check if the provided tool contains a complete path.
19204      tool_specified="$XATTR"
19205      tool_basename="${tool_specified##*/}"
19206      if test "x$tool_basename" = "x$tool_specified"; then
19207        # A command without a complete path is provided, search $PATH.
19208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19209$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19210        # Extract the first word of "$tool_basename", so it can be a program name with args.
19211set dummy $tool_basename; ac_word=$2
19212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19213$as_echo_n "checking for $ac_word... " >&6; }
19214if ${ac_cv_path_XATTR+:} false; then :
19215  $as_echo_n "(cached) " >&6
19216else
19217  case $XATTR in
19218  [\\/]* | ?:[\\/]*)
19219  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19220  ;;
19221  *)
19222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19223for as_dir in $PATH
19224do
19225  IFS=$as_save_IFS
19226  test -z "$as_dir" && as_dir=.
19227    for ac_exec_ext in '' $ac_executable_extensions; do
19228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19229    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19231    break 2
19232  fi
19233done
19234  done
19235IFS=$as_save_IFS
19236
19237  ;;
19238esac
19239fi
19240XATTR=$ac_cv_path_XATTR
19241if test -n "$XATTR"; then
19242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19243$as_echo "$XATTR" >&6; }
19244else
19245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19246$as_echo "no" >&6; }
19247fi
19248
19249
19250        if test "x$XATTR" = x; then
19251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19252        fi
19253      else
19254        # Otherwise we believe it is a complete path. Use it as it is.
19255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19256$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19258$as_echo_n "checking for XATTR... " >&6; }
19259        if test ! -x "$tool_specified"; then
19260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19261$as_echo "not found" >&6; }
19262          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19263        fi
19264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19265$as_echo "$tool_specified" >&6; }
19266      fi
19267    fi
19268  fi
19269
19270
19271
19272  if test "x$XATTR" = x; then
19273    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19274  fi
19275
19276
19277
19278
19279  # Publish this variable in the help.
19280
19281
19282  if test "x$CODESIGN" = x; then
19283    # The variable is not set by user, try to locate tool using the code snippet
19284    for ac_prog in codesign
19285do
19286  # Extract the first word of "$ac_prog", so it can be a program name with args.
19287set dummy $ac_prog; ac_word=$2
19288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19289$as_echo_n "checking for $ac_word... " >&6; }
19290if ${ac_cv_path_CODESIGN+:} false; then :
19291  $as_echo_n "(cached) " >&6
19292else
19293  case $CODESIGN in
19294  [\\/]* | ?:[\\/]*)
19295  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19296  ;;
19297  *)
19298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299for as_dir in $PATH
19300do
19301  IFS=$as_save_IFS
19302  test -z "$as_dir" && as_dir=.
19303    for ac_exec_ext in '' $ac_executable_extensions; do
19304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19305    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19307    break 2
19308  fi
19309done
19310  done
19311IFS=$as_save_IFS
19312
19313  ;;
19314esac
19315fi
19316CODESIGN=$ac_cv_path_CODESIGN
19317if test -n "$CODESIGN"; then
19318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19319$as_echo "$CODESIGN" >&6; }
19320else
19321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19322$as_echo "no" >&6; }
19323fi
19324
19325
19326  test -n "$CODESIGN" && break
19327done
19328
19329  else
19330    # The variable is set, but is it from the command line or the environment?
19331
19332    # Try to remove the string !CODESIGN! from our list.
19333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19335      # If it failed, the variable was not from the command line. Ignore it,
19336      # but warn the user (except for BASH, which is always set by the calling BASH).
19337      if test "xCODESIGN" != xBASH; then
19338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19339$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19340      fi
19341      # Try to locate tool using the code snippet
19342      for ac_prog in codesign
19343do
19344  # Extract the first word of "$ac_prog", so it can be a program name with args.
19345set dummy $ac_prog; ac_word=$2
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19347$as_echo_n "checking for $ac_word... " >&6; }
19348if ${ac_cv_path_CODESIGN+:} false; then :
19349  $as_echo_n "(cached) " >&6
19350else
19351  case $CODESIGN in
19352  [\\/]* | ?:[\\/]*)
19353  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19354  ;;
19355  *)
19356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19357for as_dir in $PATH
19358do
19359  IFS=$as_save_IFS
19360  test -z "$as_dir" && as_dir=.
19361    for ac_exec_ext in '' $ac_executable_extensions; do
19362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19363    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19365    break 2
19366  fi
19367done
19368  done
19369IFS=$as_save_IFS
19370
19371  ;;
19372esac
19373fi
19374CODESIGN=$ac_cv_path_CODESIGN
19375if test -n "$CODESIGN"; then
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19377$as_echo "$CODESIGN" >&6; }
19378else
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19380$as_echo "no" >&6; }
19381fi
19382
19383
19384  test -n "$CODESIGN" && break
19385done
19386
19387    else
19388      # If it succeeded, then it was overridden by the user. We will use it
19389      # for the tool.
19390
19391      # First remove it from the list of overridden variables, so we can test
19392      # for unknown variables in the end.
19393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19394
19395      # Check if the provided tool contains a complete path.
19396      tool_specified="$CODESIGN"
19397      tool_basename="${tool_specified##*/}"
19398      if test "x$tool_basename" = "x$tool_specified"; then
19399        # A command without a complete path is provided, search $PATH.
19400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19401$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19402        # Extract the first word of "$tool_basename", so it can be a program name with args.
19403set dummy $tool_basename; ac_word=$2
19404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19405$as_echo_n "checking for $ac_word... " >&6; }
19406if ${ac_cv_path_CODESIGN+:} false; then :
19407  $as_echo_n "(cached) " >&6
19408else
19409  case $CODESIGN in
19410  [\\/]* | ?:[\\/]*)
19411  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19412  ;;
19413  *)
19414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19415for as_dir in $PATH
19416do
19417  IFS=$as_save_IFS
19418  test -z "$as_dir" && as_dir=.
19419    for ac_exec_ext in '' $ac_executable_extensions; do
19420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19421    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19423    break 2
19424  fi
19425done
19426  done
19427IFS=$as_save_IFS
19428
19429  ;;
19430esac
19431fi
19432CODESIGN=$ac_cv_path_CODESIGN
19433if test -n "$CODESIGN"; then
19434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19435$as_echo "$CODESIGN" >&6; }
19436else
19437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19438$as_echo "no" >&6; }
19439fi
19440
19441
19442        if test "x$CODESIGN" = x; then
19443          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19444        fi
19445      else
19446        # Otherwise we believe it is a complete path. Use it as it is.
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19448$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19450$as_echo_n "checking for CODESIGN... " >&6; }
19451        if test ! -x "$tool_specified"; then
19452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19453$as_echo "not found" >&6; }
19454          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19455        fi
19456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19457$as_echo "$tool_specified" >&6; }
19458      fi
19459    fi
19460  fi
19461
19462
19463    if test "x$CODESIGN" != "x"; then
19464      # Verify that the openjdk_codesign certificate is present
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19466$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19467      rm -f codesign-testfile
19468      touch codesign-testfile
19469      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19470      rm -f codesign-testfile
19471      if test "x$CODESIGN" = x; then
19472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19473$as_echo "no" >&6; }
19474      else
19475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19476$as_echo "yes" >&6; }
19477      fi
19478    fi
19479  fi
19480
19481
19482  # Test if bash supports pipefail.
19483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19484$as_echo_n "checking if bash supports pipefail... " >&6; }
19485  if ${BASH} -c 'set -o pipefail'; then
19486    BASH_ARGS="$BASH_ARGS -o pipefail"
19487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19488$as_echo "yes" >&6; }
19489  else
19490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19491$as_echo "no" >&6; }
19492  fi
19493
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19495$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19496  if ${BASH} -e -c 'true'; then
19497    BASH_ARGS="$BASH_ARGS -e"
19498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19499$as_echo "yes" >&6; }
19500  else
19501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19502$as_echo "no" >&6; }
19503  fi
19504
19505
19506
19507
19508# Check if pkg-config is available.
19509
19510
19511if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19512	if test -n "$ac_tool_prefix"; then
19513  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19514set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19516$as_echo_n "checking for $ac_word... " >&6; }
19517if ${ac_cv_path_PKG_CONFIG+:} false; then :
19518  $as_echo_n "(cached) " >&6
19519else
19520  case $PKG_CONFIG in
19521  [\\/]* | ?:[\\/]*)
19522  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19523  ;;
19524  *)
19525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19526for as_dir in $PATH
19527do
19528  IFS=$as_save_IFS
19529  test -z "$as_dir" && as_dir=.
19530    for ac_exec_ext in '' $ac_executable_extensions; do
19531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19532    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19534    break 2
19535  fi
19536done
19537  done
19538IFS=$as_save_IFS
19539
19540  ;;
19541esac
19542fi
19543PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19544if test -n "$PKG_CONFIG"; then
19545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19546$as_echo "$PKG_CONFIG" >&6; }
19547else
19548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19549$as_echo "no" >&6; }
19550fi
19551
19552
19553fi
19554if test -z "$ac_cv_path_PKG_CONFIG"; then
19555  ac_pt_PKG_CONFIG=$PKG_CONFIG
19556  # Extract the first word of "pkg-config", so it can be a program name with args.
19557set dummy pkg-config; ac_word=$2
19558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19559$as_echo_n "checking for $ac_word... " >&6; }
19560if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19561  $as_echo_n "(cached) " >&6
19562else
19563  case $ac_pt_PKG_CONFIG in
19564  [\\/]* | ?:[\\/]*)
19565  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19566  ;;
19567  *)
19568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19569for as_dir in $PATH
19570do
19571  IFS=$as_save_IFS
19572  test -z "$as_dir" && as_dir=.
19573    for ac_exec_ext in '' $ac_executable_extensions; do
19574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19575    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19577    break 2
19578  fi
19579done
19580  done
19581IFS=$as_save_IFS
19582
19583  ;;
19584esac
19585fi
19586ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19587if test -n "$ac_pt_PKG_CONFIG"; then
19588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19589$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19590else
19591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19592$as_echo "no" >&6; }
19593fi
19594
19595  if test "x$ac_pt_PKG_CONFIG" = x; then
19596    PKG_CONFIG=""
19597  else
19598    case $cross_compiling:$ac_tool_warned in
19599yes:)
19600{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19601$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19602ac_tool_warned=yes ;;
19603esac
19604    PKG_CONFIG=$ac_pt_PKG_CONFIG
19605  fi
19606else
19607  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19608fi
19609
19610fi
19611if test -n "$PKG_CONFIG"; then
19612	_pkg_min_version=0.9.0
19613	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19614$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19615	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19616		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19617$as_echo "yes" >&6; }
19618	else
19619		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19620$as_echo "no" >&6; }
19621		PKG_CONFIG=""
19622	fi
19623
19624fi
19625
19626# After basic tools have been setup, we can check build os specific details.
19627
19628  ###############################################################################
19629
19630  # Note that this is the build platform OS version!
19631
19632  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19633  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19634  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19635  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19636
19637
19638
19639
19640
19641# Setup builddeps, for automatic downloading of tools we need.
19642# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19643# boot-jdk setup, but we need to have basic tools setup first.
19644
19645
19646# Check whether --with-builddeps-conf was given.
19647if test "${with_builddeps_conf+set}" = set; then :
19648  withval=$with_builddeps_conf;
19649fi
19650
19651
19652
19653# Check whether --with-builddeps-server was given.
19654if test "${with_builddeps_server+set}" = set; then :
19655  withval=$with_builddeps_server;
19656fi
19657
19658
19659
19660# Check whether --with-builddeps-dir was given.
19661if test "${with_builddeps_dir+set}" = set; then :
19662  withval=$with_builddeps_dir;
19663else
19664  with_builddeps_dir=/localhome/builddeps
19665fi
19666
19667
19668
19669# Check whether --with-builddeps-group was given.
19670if test "${with_builddeps_group+set}" = set; then :
19671  withval=$with_builddeps_group;
19672fi
19673
19674
19675
19676
19677  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19678    if test "x$with_builddeps_conf" != x; then
19679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19680$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19681      builddepsfile=$with_builddeps_conf
19682      if test -s $builddepsfile; then
19683        . $builddepsfile
19684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19685$as_echo "loaded!" >&6; }
19686      else
19687        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19688      fi
19689    else
19690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19691$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19692      builddepsfile=`mktemp`
19693      touch $builddepsfile
19694      # Put all found confs into a single file.
19695      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19696      # Source the file to acquire the variables
19697      if test -s $builddepsfile; then
19698        . $builddepsfile
19699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19700$as_echo "found at least one!" >&6; }
19701      else
19702        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19703      fi
19704    fi
19705    # Create build and target names that use _ instead of "-" and ".".
19706    # This is necessary to use them in variable names.
19707    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19708    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19709    # Extract rewrite information for build and target
19710    eval rewritten_build=\${REWRITE_${build_var}}
19711    if test "x$rewritten_build" = x; then
19712      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19713      echo Build stays the same $rewritten_build
19714    else
19715      echo Rewriting build for builddeps into $rewritten_build
19716    fi
19717    eval rewritten_target=\${REWRITE_${target_var}}
19718    if test "x$rewritten_target" = x; then
19719      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19720      echo Target stays the same $rewritten_target
19721    else
19722      echo Rewriting target for builddeps into $rewritten_target
19723    fi
19724    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19725    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19726  fi
19727  for ac_prog in 7z unzip
19728do
19729  # Extract the first word of "$ac_prog", so it can be a program name with args.
19730set dummy $ac_prog; ac_word=$2
19731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19732$as_echo_n "checking for $ac_word... " >&6; }
19733if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19734  $as_echo_n "(cached) " >&6
19735else
19736  if test -n "$BDEPS_UNZIP"; then
19737  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19738else
19739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19740for as_dir in $PATH
19741do
19742  IFS=$as_save_IFS
19743  test -z "$as_dir" && as_dir=.
19744    for ac_exec_ext in '' $ac_executable_extensions; do
19745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19746    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19748    break 2
19749  fi
19750done
19751  done
19752IFS=$as_save_IFS
19753
19754fi
19755fi
19756BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19757if test -n "$BDEPS_UNZIP"; then
19758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19759$as_echo "$BDEPS_UNZIP" >&6; }
19760else
19761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19762$as_echo "no" >&6; }
19763fi
19764
19765
19766  test -n "$BDEPS_UNZIP" && break
19767done
19768
19769  if test "x$BDEPS_UNZIP" = x7z; then
19770    BDEPS_UNZIP="7z x"
19771  fi
19772
19773  for ac_prog in wget lftp ftp
19774do
19775  # Extract the first word of "$ac_prog", so it can be a program name with args.
19776set dummy $ac_prog; ac_word=$2
19777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19778$as_echo_n "checking for $ac_word... " >&6; }
19779if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19780  $as_echo_n "(cached) " >&6
19781else
19782  if test -n "$BDEPS_FTP"; then
19783  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19784else
19785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19786for as_dir in $PATH
19787do
19788  IFS=$as_save_IFS
19789  test -z "$as_dir" && as_dir=.
19790    for ac_exec_ext in '' $ac_executable_extensions; do
19791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19792    ac_cv_prog_BDEPS_FTP="$ac_prog"
19793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19794    break 2
19795  fi
19796done
19797  done
19798IFS=$as_save_IFS
19799
19800fi
19801fi
19802BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19803if test -n "$BDEPS_FTP"; then
19804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19805$as_echo "$BDEPS_FTP" >&6; }
19806else
19807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19808$as_echo "no" >&6; }
19809fi
19810
19811
19812  test -n "$BDEPS_FTP" && break
19813done
19814
19815
19816
19817###############################################################################
19818#
19819# Determine OpenJDK variants, options and version numbers.
19820#
19821###############################################################################
19822
19823# We need build & target for this.
19824
19825
19826  ###############################################################################
19827  #
19828  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19829  # We always build headless support.
19830  #
19831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19832$as_echo_n "checking headful support... " >&6; }
19833  # Check whether --enable-headful was given.
19834if test "${enable_headful+set}" = set; then :
19835  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19836else
19837  SUPPORT_HEADFUL=yes
19838fi
19839
19840
19841  SUPPORT_HEADLESS=yes
19842  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19843
19844  if test "x$SUPPORT_HEADFUL" = xyes; then
19845    # We are building both headful and headless.
19846    headful_msg="include support for both headful and headless"
19847  fi
19848
19849  if test "x$SUPPORT_HEADFUL" = xno; then
19850    # Thus we are building headless only.
19851    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19852    headful_msg="headless only"
19853  fi
19854
19855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19856$as_echo "$headful_msg" >&6; }
19857
19858
19859
19860
19861
19862  # Control wether Hotspot runs Queens test after build.
19863  # Check whether --enable-hotspot-test-in-build was given.
19864if test "${enable_hotspot_test_in_build+set}" = set; then :
19865  enableval=$enable_hotspot_test_in_build;
19866else
19867  enable_hotspot_test_in_build=no
19868fi
19869
19870  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19871    TEST_IN_BUILD=true
19872  else
19873    TEST_IN_BUILD=false
19874  fi
19875
19876
19877  ###############################################################################
19878  #
19879  # Choose cacerts source file
19880  #
19881
19882# Check whether --with-cacerts-file was given.
19883if test "${with_cacerts_file+set}" = set; then :
19884  withval=$with_cacerts_file;
19885fi
19886
19887  if test "x$with_cacerts_file" != x; then
19888    CACERTS_FILE=$with_cacerts_file
19889  fi
19890
19891
19892  ###############################################################################
19893  #
19894  # Enable or disable unlimited crypto
19895  #
19896  # Check whether --enable-unlimited-crypto was given.
19897if test "${enable_unlimited_crypto+set}" = set; then :
19898  enableval=$enable_unlimited_crypto;
19899else
19900  enable_unlimited_crypto=no
19901fi
19902
19903  if test "x$enable_unlimited_crypto" = "xyes"; then
19904    UNLIMITED_CRYPTO=true
19905  else
19906    UNLIMITED_CRYPTO=false
19907  fi
19908
19909
19910  ###############################################################################
19911  #
19912  # Enable or disable the elliptic curve crypto implementation
19913  #
19914
19915
19916  ###############################################################################
19917  #
19918  # --enable-rmiconnector-iiop
19919  #
19920  # Check whether --enable-rmiconnector-iiop was given.
19921if test "${enable_rmiconnector_iiop+set}" = set; then :
19922  enableval=$enable_rmiconnector_iiop;
19923fi
19924
19925  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19926    RMICONNECTOR_IIOP=true
19927  else
19928    RMICONNECTOR_IIOP=false
19929  fi
19930
19931
19932  ###############################################################################
19933  #
19934  # Compress jars
19935  #
19936  COMPRESS_JARS=false
19937
19938
19939
19940
19941  # Source the version numbers
19942  . $AUTOCONF_DIR/version-numbers
19943
19944  # Get the settings from parameters
19945
19946# Check whether --with-milestone was given.
19947if test "${with_milestone+set}" = set; then :
19948  withval=$with_milestone;
19949fi
19950
19951  if test "x$with_milestone" = xyes; then
19952    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19953  elif test "x$with_milestone" != x; then
19954    MILESTONE="$with_milestone"
19955  fi
19956  if test "x$MILESTONE" = x; then
19957    MILESTONE=internal
19958  fi
19959
19960
19961# Check whether --with-update-version was given.
19962if test "${with_update_version+set}" = set; then :
19963  withval=$with_update_version;
19964fi
19965
19966  if test "x$with_update_version" = xyes; then
19967    as_fn_error $? "Update version must have a value" "$LINENO" 5
19968  elif test "x$with_update_version" != x; then
19969    JDK_UPDATE_VERSION="$with_update_version"
19970    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19971    # to a bug in expr (which reduces it to just X). To work around this, we
19972    # always add a 0 to one digit update versions.
19973    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19974      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19975    fi
19976  fi
19977
19978
19979# Check whether --with-user-release-suffix was given.
19980if test "${with_user_release_suffix+set}" = set; then :
19981  withval=$with_user_release_suffix;
19982fi
19983
19984  if test "x$with_user_release_suffix" = xyes; then
19985    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19986  elif test "x$with_user_release_suffix" != x; then
19987    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19988  fi
19989
19990
19991# Check whether --with-build-number was given.
19992if test "${with_build_number+set}" = set; then :
19993  withval=$with_build_number;
19994fi
19995
19996  if test "x$with_build_number" = xyes; then
19997    as_fn_error $? "Build number must have a value" "$LINENO" 5
19998  elif test "x$with_build_number" != x; then
19999    JDK_BUILD_NUMBER="$with_build_number"
20000  fi
20001  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20002  if test "x$JDK_BUILD_NUMBER" = x; then
20003    JDK_BUILD_NUMBER=b00
20004    if test "x$USER_RELEASE_SUFFIX" = x; then
20005      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20006      # Avoid [:alnum:] since it depends on the locale.
20007      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20008      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20009    fi
20010  fi
20011
20012  # Now set the JDK version, milestone, build number etc.
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029# Check whether --with-copyright-year was given.
20030if test "${with_copyright_year+set}" = set; then :
20031  withval=$with_copyright_year;
20032fi
20033
20034  if test "x$with_copyright_year" = xyes; then
20035    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20036  elif test "x$with_copyright_year" != x; then
20037    COPYRIGHT_YEAR="$with_copyright_year"
20038  else
20039    COPYRIGHT_YEAR=`date +'%Y'`
20040  fi
20041
20042
20043  if test "x$JDK_UPDATE_VERSION" != x; then
20044    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20045  else
20046    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20047  fi
20048
20049
20050  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20051
20052
20053
20054###############################################################################
20055#
20056# Setup BootJDK, used to bootstrap the build.
20057#
20058###############################################################################
20059
20060
20061  BOOT_JDK_FOUND=no
20062
20063# Check whether --with-boot-jdk was given.
20064if test "${with_boot_jdk+set}" = set; then :
20065  withval=$with_boot_jdk;
20066fi
20067
20068
20069  # We look for the Boot JDK through various means, going from more certain to
20070  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20071  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20072  # must check if this is indeed valid; otherwise we'll continue looking.
20073
20074  # Test: Is bootjdk explicitely set by command line arguments?
20075
20076  if test "x$BOOT_JDK_FOUND" = xno; then
20077    # Now execute the test
20078
20079  if test "x$with_boot_jdk" != x; then
20080    BOOT_JDK=$with_boot_jdk
20081    BOOT_JDK_FOUND=maybe
20082    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20083$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20084  fi
20085
20086
20087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20089      # Do we have a bin/java?
20090      if test ! -x "$BOOT_JDK/bin/java"; then
20091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20093        BOOT_JDK_FOUND=no
20094      else
20095        # Do we have a bin/javac?
20096        if test ! -x "$BOOT_JDK/bin/javac"; then
20097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20101          BOOT_JDK_FOUND=no
20102        else
20103          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20104          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20105
20106          # Extra M4 quote needed to protect [] in grep expression.
20107          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20108          if test "x$FOUND_CORRECT_VERSION" = x; then
20109            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20111            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20113            BOOT_JDK_FOUND=no
20114          else
20115            # We're done! :-)
20116            BOOT_JDK_FOUND=yes
20117
20118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20119
20120  # Input might be given as Windows format, start by converting to
20121  # unix format.
20122  path="$BOOT_JDK"
20123  new_path=`$CYGPATH -u "$path"`
20124
20125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20128  # "foo.exe" is OK but "foo" is an error.
20129  #
20130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20131  # It is also a way to make sure we got the proper file name for the real test later on.
20132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20133  if test "x$test_shortpath" = x; then
20134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20137  fi
20138
20139  # Call helper function which possibly converts this using DOS-style short mode.
20140  # If so, the updated path is stored in $new_path.
20141
20142  input_path="$new_path"
20143  # Check if we need to convert this using DOS-style short mode. If the path
20144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20145  # take no chances and rewrite it.
20146  # Note: m4 eats our [], so we need to use [ and ] instead.
20147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20148  if test "x$has_forbidden_chars" != x; then
20149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20153      # Going to short mode and back again did indeed matter. Since short mode is
20154      # case insensitive, let's make it lowercase to improve readability.
20155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20156      # Now convert it back to Unix-stile (cygpath)
20157      input_path=`$CYGPATH -u "$shortmode_path"`
20158      new_path="$input_path"
20159    fi
20160  fi
20161
20162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20163  if test "x$test_cygdrive_prefix" = x; then
20164    # As a simple fix, exclude /usr/bin since it's not a real path.
20165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20167      # a path prefixed by /cygdrive for fixpath to work.
20168      new_path="$CYGWIN_ROOT_PATH$input_path"
20169    fi
20170  fi
20171
20172
20173  if test "x$path" != "x$new_path"; then
20174    BOOT_JDK="$new_path"
20175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20177  fi
20178
20179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20180
20181  path="$BOOT_JDK"
20182  has_colon=`$ECHO $path | $GREP ^.:`
20183  new_path="$path"
20184  if test "x$has_colon" = x; then
20185    # Not in mixed or Windows style, start by that.
20186    new_path=`cmd //c echo $path`
20187  fi
20188
20189
20190  input_path="$new_path"
20191  # Check if we need to convert this using DOS-style short mode. If the path
20192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20193  # take no chances and rewrite it.
20194  # Note: m4 eats our [], so we need to use [ and ] instead.
20195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20196  if test "x$has_forbidden_chars" != x; then
20197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20199  fi
20200
20201
20202  windows_path="$new_path"
20203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20204    unix_path=`$CYGPATH -u "$windows_path"`
20205    new_path="$unix_path"
20206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20208    new_path="$unix_path"
20209  fi
20210
20211  if test "x$path" != "x$new_path"; then
20212    BOOT_JDK="$new_path"
20213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20215  fi
20216
20217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20219
20220  else
20221    # We're on a unix platform. Hooray! :)
20222    path="$BOOT_JDK"
20223    has_space=`$ECHO "$path" | $GREP " "`
20224    if test "x$has_space" != x; then
20225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20228    fi
20229
20230    # Use eval to expand a potential ~
20231    eval path="$path"
20232    if test ! -f "$path" && test ! -d "$path"; then
20233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20234    fi
20235
20236    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20237  fi
20238
20239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20240$as_echo_n "checking for Boot JDK... " >&6; }
20241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20242$as_echo "$BOOT_JDK" >&6; }
20243            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20244$as_echo_n "checking Boot JDK version... " >&6; }
20245            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20247$as_echo "$BOOT_JDK_VERSION" >&6; }
20248          fi # end check jdk version
20249        fi # end check javac
20250      fi # end check java
20251    fi # end check boot jdk found
20252  fi
20253
20254  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20255    # Having specified an argument which is incorrect will produce an instant failure;
20256    # we should not go on looking
20257    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20258  fi
20259
20260  # Test: Is bootjdk available from builddeps?
20261
20262  if test "x$BOOT_JDK_FOUND" = xno; then
20263    # Now execute the test
20264
20265
20266
20267  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20268    # Source the builddeps file again, to make sure it uses the latest variables!
20269    . $builddepsfile
20270    # Look for a target and build machine specific resource!
20271    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20272    if test "x$resource" = x; then
20273      # Ok, lets instead look for a target specific resource
20274      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20275    fi
20276    if test "x$resource" = x; then
20277      # Ok, lets instead look for a build specific resource
20278      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20279    fi
20280    if test "x$resource" = x; then
20281      # Ok, lets instead look for a generic resource
20282      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20283      resource=${builddep_bootjdk}
20284    fi
20285    if test "x$resource" != x; then
20286      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20287$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20288      # If the resource in the builddeps.conf file is an existing directory,
20289      # for example /java/linux/cups
20290      if test -d ${resource}; then
20291        depdir=${resource}
20292      else
20293
20294  # bootjdk is for example mymodule
20295  # $resource is for example libs/general/libmymod_1_2_3.zip
20296  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20297  # $with_builddeps_dir is for example /localhome/builddeps
20298  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20299  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20300  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20301  filename=`basename $resource`
20302  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20303  filebase=${filename%%.*}
20304  extension=${filename#*.}
20305  installdir=$with_builddeps_dir/$filebase
20306  if test ! -f $installdir/$filename.unpacked; then
20307    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20308$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20309    if test ! -d $installdir; then
20310      mkdir -p $installdir
20311    fi
20312    if test ! -d $installdir; then
20313      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20314    fi
20315    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20316    touch $tmpfile
20317    if test ! -f $tmpfile; then
20318      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20319    fi
20320
20321  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20322  # $tmpfile is the local file name for the downloaded file.
20323  VALID_TOOL=no
20324  if test "x$BDEPS_FTP" = xwget; then
20325    VALID_TOOL=yes
20326    wget -O $tmpfile $with_builddeps_server/$resource
20327  fi
20328  if test "x$BDEPS_FTP" = xlftp; then
20329    VALID_TOOL=yes
20330    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20331  fi
20332  if test "x$BDEPS_FTP" = xftp; then
20333    VALID_TOOL=yes
20334    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20335    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20336    FTPUSERPWD=${FTPSERVER%%@*}
20337    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20338      FTPUSER=${userpwd%%:*}
20339      FTPPWD=${userpwd#*@}
20340      FTPSERVER=${FTPSERVER#*@}
20341    else
20342      FTPUSER=ftp
20343      FTPPWD=ftp
20344    fi
20345    # the "pass" command does not work on some
20346    # ftp clients (read ftp.exe) but if it works,
20347    # passive mode is better!
20348    ( \
20349        echo "user $FTPUSER $FTPPWD"        ; \
20350        echo "pass"                         ; \
20351        echo "bin"                          ; \
20352        echo "get $FTPPATH $tmpfile"              ; \
20353    ) | ftp -in $FTPSERVER
20354  fi
20355  if test "x$VALID_TOOL" != xyes; then
20356    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20357  fi
20358
20359    mv $tmpfile $installdir/$filename
20360    if test ! -s $installdir/$filename; then
20361      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20362    fi
20363    case "$extension" in
20364      zip)  echo "Unzipping $installdir/$filename..."
20365        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20366        ;;
20367      tar.gz) echo "Untaring $installdir/$filename..."
20368        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20369        ;;
20370      tgz) echo "Untaring $installdir/$filename..."
20371        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20372        ;;
20373      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20374        ;;
20375    esac
20376  fi
20377  if test -f $installdir/$filename.unpacked; then
20378    depdir=$installdir
20379  fi
20380
20381      fi
20382      # Source the builddeps file again, because in the previous command, the depdir
20383      # was updated to point at the current build dependency install directory.
20384      . $builddepsfile
20385      # Now extract variables from the builddeps.conf files.
20386      theroot=${builddep_bootjdk_ROOT}
20387      thecflags=${builddep_bootjdk_CFLAGS}
20388      thelibs=${builddep_bootjdk_LIBS}
20389      if test "x$depdir" = x; then
20390        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20391      fi
20392      BOOT_JDK=$depdir
20393      if test "x$theroot" != x; then
20394        BOOT_JDK="$theroot"
20395      fi
20396      if test "x$thecflags" != x; then
20397        BOOT_JDK_CFLAGS="$thecflags"
20398      fi
20399      if test "x$thelibs" != x; then
20400        BOOT_JDK_LIBS="$thelibs"
20401      fi
20402      BOOT_JDK_FOUND=maybe
20403      else BOOT_JDK_FOUND=no
20404
20405    fi
20406    else BOOT_JDK_FOUND=no
20407
20408  fi
20409
20410
20411
20412    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20413    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20414      # Do we have a bin/java?
20415      if test ! -x "$BOOT_JDK/bin/java"; then
20416        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20418        BOOT_JDK_FOUND=no
20419      else
20420        # Do we have a bin/javac?
20421        if test ! -x "$BOOT_JDK/bin/javac"; then
20422          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20424          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20425$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20426          BOOT_JDK_FOUND=no
20427        else
20428          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20429          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20430
20431          # Extra M4 quote needed to protect [] in grep expression.
20432          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20433          if test "x$FOUND_CORRECT_VERSION" = x; then
20434            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20436            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20437$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20438            BOOT_JDK_FOUND=no
20439          else
20440            # We're done! :-)
20441            BOOT_JDK_FOUND=yes
20442
20443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20444
20445  # Input might be given as Windows format, start by converting to
20446  # unix format.
20447  path="$BOOT_JDK"
20448  new_path=`$CYGPATH -u "$path"`
20449
20450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20453  # "foo.exe" is OK but "foo" is an error.
20454  #
20455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20456  # It is also a way to make sure we got the proper file name for the real test later on.
20457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20458  if test "x$test_shortpath" = x; then
20459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20461    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20462  fi
20463
20464  # Call helper function which possibly converts this using DOS-style short mode.
20465  # If so, the updated path is stored in $new_path.
20466
20467  input_path="$new_path"
20468  # Check if we need to convert this using DOS-style short mode. If the path
20469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20470  # take no chances and rewrite it.
20471  # Note: m4 eats our [], so we need to use [ and ] instead.
20472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20473  if test "x$has_forbidden_chars" != x; then
20474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20478      # Going to short mode and back again did indeed matter. Since short mode is
20479      # case insensitive, let's make it lowercase to improve readability.
20480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20481      # Now convert it back to Unix-stile (cygpath)
20482      input_path=`$CYGPATH -u "$shortmode_path"`
20483      new_path="$input_path"
20484    fi
20485  fi
20486
20487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20488  if test "x$test_cygdrive_prefix" = x; then
20489    # As a simple fix, exclude /usr/bin since it's not a real path.
20490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20492      # a path prefixed by /cygdrive for fixpath to work.
20493      new_path="$CYGWIN_ROOT_PATH$input_path"
20494    fi
20495  fi
20496
20497
20498  if test "x$path" != "x$new_path"; then
20499    BOOT_JDK="$new_path"
20500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20502  fi
20503
20504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505
20506  path="$BOOT_JDK"
20507  has_colon=`$ECHO $path | $GREP ^.:`
20508  new_path="$path"
20509  if test "x$has_colon" = x; then
20510    # Not in mixed or Windows style, start by that.
20511    new_path=`cmd //c echo $path`
20512  fi
20513
20514
20515  input_path="$new_path"
20516  # Check if we need to convert this using DOS-style short mode. If the path
20517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20518  # take no chances and rewrite it.
20519  # Note: m4 eats our [], so we need to use [ and ] instead.
20520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20521  if test "x$has_forbidden_chars" != x; then
20522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20524  fi
20525
20526
20527  windows_path="$new_path"
20528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20529    unix_path=`$CYGPATH -u "$windows_path"`
20530    new_path="$unix_path"
20531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20533    new_path="$unix_path"
20534  fi
20535
20536  if test "x$path" != "x$new_path"; then
20537    BOOT_JDK="$new_path"
20538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20540  fi
20541
20542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20544
20545  else
20546    # We're on a unix platform. Hooray! :)
20547    path="$BOOT_JDK"
20548    has_space=`$ECHO "$path" | $GREP " "`
20549    if test "x$has_space" != x; then
20550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20552      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20553    fi
20554
20555    # Use eval to expand a potential ~
20556    eval path="$path"
20557    if test ! -f "$path" && test ! -d "$path"; then
20558      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20559    fi
20560
20561    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20562  fi
20563
20564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20565$as_echo_n "checking for Boot JDK... " >&6; }
20566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20567$as_echo "$BOOT_JDK" >&6; }
20568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20569$as_echo_n "checking Boot JDK version... " >&6; }
20570            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20572$as_echo "$BOOT_JDK_VERSION" >&6; }
20573          fi # end check jdk version
20574        fi # end check javac
20575      fi # end check java
20576    fi # end check boot jdk found
20577  fi
20578
20579
20580  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20581
20582  if test "x$BOOT_JDK_FOUND" = xno; then
20583    # Now execute the test
20584
20585  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20586    # First check at user selected default
20587
20588  if test "x$BOOT_JDK_FOUND" = xno; then
20589    # Now execute the test
20590
20591  if test -x /usr/libexec/java_home; then
20592    BOOT_JDK=`/usr/libexec/java_home `
20593    BOOT_JDK_FOUND=maybe
20594    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20595$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20596  fi
20597
20598
20599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20601      # Do we have a bin/java?
20602      if test ! -x "$BOOT_JDK/bin/java"; then
20603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20605        BOOT_JDK_FOUND=no
20606      else
20607        # Do we have a bin/javac?
20608        if test ! -x "$BOOT_JDK/bin/javac"; then
20609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20613          BOOT_JDK_FOUND=no
20614        else
20615          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20616          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20617
20618          # Extra M4 quote needed to protect [] in grep expression.
20619          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20620          if test "x$FOUND_CORRECT_VERSION" = x; then
20621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20623            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20624$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20625            BOOT_JDK_FOUND=no
20626          else
20627            # We're done! :-)
20628            BOOT_JDK_FOUND=yes
20629
20630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20631
20632  # Input might be given as Windows format, start by converting to
20633  # unix format.
20634  path="$BOOT_JDK"
20635  new_path=`$CYGPATH -u "$path"`
20636
20637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20640  # "foo.exe" is OK but "foo" is an error.
20641  #
20642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20643  # It is also a way to make sure we got the proper file name for the real test later on.
20644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20645  if test "x$test_shortpath" = x; then
20646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20648    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20649  fi
20650
20651  # Call helper function which possibly converts this using DOS-style short mode.
20652  # If so, the updated path is stored in $new_path.
20653
20654  input_path="$new_path"
20655  # Check if we need to convert this using DOS-style short mode. If the path
20656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20657  # take no chances and rewrite it.
20658  # Note: m4 eats our [], so we need to use [ and ] instead.
20659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20660  if test "x$has_forbidden_chars" != x; then
20661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20665      # Going to short mode and back again did indeed matter. Since short mode is
20666      # case insensitive, let's make it lowercase to improve readability.
20667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20668      # Now convert it back to Unix-stile (cygpath)
20669      input_path=`$CYGPATH -u "$shortmode_path"`
20670      new_path="$input_path"
20671    fi
20672  fi
20673
20674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20675  if test "x$test_cygdrive_prefix" = x; then
20676    # As a simple fix, exclude /usr/bin since it's not a real path.
20677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20679      # a path prefixed by /cygdrive for fixpath to work.
20680      new_path="$CYGWIN_ROOT_PATH$input_path"
20681    fi
20682  fi
20683
20684
20685  if test "x$path" != "x$new_path"; then
20686    BOOT_JDK="$new_path"
20687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20689  fi
20690
20691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20692
20693  path="$BOOT_JDK"
20694  has_colon=`$ECHO $path | $GREP ^.:`
20695  new_path="$path"
20696  if test "x$has_colon" = x; then
20697    # Not in mixed or Windows style, start by that.
20698    new_path=`cmd //c echo $path`
20699  fi
20700
20701
20702  input_path="$new_path"
20703  # Check if we need to convert this using DOS-style short mode. If the path
20704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20705  # take no chances and rewrite it.
20706  # Note: m4 eats our [], so we need to use [ and ] instead.
20707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20708  if test "x$has_forbidden_chars" != x; then
20709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20711  fi
20712
20713
20714  windows_path="$new_path"
20715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20716    unix_path=`$CYGPATH -u "$windows_path"`
20717    new_path="$unix_path"
20718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20720    new_path="$unix_path"
20721  fi
20722
20723  if test "x$path" != "x$new_path"; then
20724    BOOT_JDK="$new_path"
20725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20727  fi
20728
20729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20731
20732  else
20733    # We're on a unix platform. Hooray! :)
20734    path="$BOOT_JDK"
20735    has_space=`$ECHO "$path" | $GREP " "`
20736    if test "x$has_space" != x; then
20737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20739      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20740    fi
20741
20742    # Use eval to expand a potential ~
20743    eval path="$path"
20744    if test ! -f "$path" && test ! -d "$path"; then
20745      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20746    fi
20747
20748    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20749  fi
20750
20751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20752$as_echo_n "checking for Boot JDK... " >&6; }
20753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20754$as_echo "$BOOT_JDK" >&6; }
20755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20756$as_echo_n "checking Boot JDK version... " >&6; }
20757            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20759$as_echo "$BOOT_JDK_VERSION" >&6; }
20760          fi # end check jdk version
20761        fi # end check javac
20762      fi # end check java
20763    fi # end check boot jdk found
20764  fi
20765
20766    # If that did not work out (e.g. too old), try explicit versions instead
20767
20768  if test "x$BOOT_JDK_FOUND" = xno; then
20769    # Now execute the test
20770
20771  if test -x /usr/libexec/java_home; then
20772    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20773    BOOT_JDK_FOUND=maybe
20774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20775$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20776  fi
20777
20778
20779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20781      # Do we have a bin/java?
20782      if test ! -x "$BOOT_JDK/bin/java"; then
20783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20785        BOOT_JDK_FOUND=no
20786      else
20787        # Do we have a bin/javac?
20788        if test ! -x "$BOOT_JDK/bin/javac"; then
20789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20793          BOOT_JDK_FOUND=no
20794        else
20795          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20796          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20797
20798          # Extra M4 quote needed to protect [] in grep expression.
20799          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20800          if test "x$FOUND_CORRECT_VERSION" = x; then
20801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20803            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20804$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20805            BOOT_JDK_FOUND=no
20806          else
20807            # We're done! :-)
20808            BOOT_JDK_FOUND=yes
20809
20810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20811
20812  # Input might be given as Windows format, start by converting to
20813  # unix format.
20814  path="$BOOT_JDK"
20815  new_path=`$CYGPATH -u "$path"`
20816
20817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20820  # "foo.exe" is OK but "foo" is an error.
20821  #
20822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20823  # It is also a way to make sure we got the proper file name for the real test later on.
20824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20825  if test "x$test_shortpath" = x; then
20826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20828    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20829  fi
20830
20831  # Call helper function which possibly converts this using DOS-style short mode.
20832  # If so, the updated path is stored in $new_path.
20833
20834  input_path="$new_path"
20835  # Check if we need to convert this using DOS-style short mode. If the path
20836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20837  # take no chances and rewrite it.
20838  # Note: m4 eats our [], so we need to use [ and ] instead.
20839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20840  if test "x$has_forbidden_chars" != x; then
20841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20845      # Going to short mode and back again did indeed matter. Since short mode is
20846      # case insensitive, let's make it lowercase to improve readability.
20847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20848      # Now convert it back to Unix-stile (cygpath)
20849      input_path=`$CYGPATH -u "$shortmode_path"`
20850      new_path="$input_path"
20851    fi
20852  fi
20853
20854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20855  if test "x$test_cygdrive_prefix" = x; then
20856    # As a simple fix, exclude /usr/bin since it's not a real path.
20857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20859      # a path prefixed by /cygdrive for fixpath to work.
20860      new_path="$CYGWIN_ROOT_PATH$input_path"
20861    fi
20862  fi
20863
20864
20865  if test "x$path" != "x$new_path"; then
20866    BOOT_JDK="$new_path"
20867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20869  fi
20870
20871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20872
20873  path="$BOOT_JDK"
20874  has_colon=`$ECHO $path | $GREP ^.:`
20875  new_path="$path"
20876  if test "x$has_colon" = x; then
20877    # Not in mixed or Windows style, start by that.
20878    new_path=`cmd //c echo $path`
20879  fi
20880
20881
20882  input_path="$new_path"
20883  # Check if we need to convert this using DOS-style short mode. If the path
20884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20885  # take no chances and rewrite it.
20886  # Note: m4 eats our [], so we need to use [ and ] instead.
20887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20888  if test "x$has_forbidden_chars" != x; then
20889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20891  fi
20892
20893
20894  windows_path="$new_path"
20895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20896    unix_path=`$CYGPATH -u "$windows_path"`
20897    new_path="$unix_path"
20898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20900    new_path="$unix_path"
20901  fi
20902
20903  if test "x$path" != "x$new_path"; then
20904    BOOT_JDK="$new_path"
20905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20907  fi
20908
20909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20911
20912  else
20913    # We're on a unix platform. Hooray! :)
20914    path="$BOOT_JDK"
20915    has_space=`$ECHO "$path" | $GREP " "`
20916    if test "x$has_space" != x; then
20917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20919      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20920    fi
20921
20922    # Use eval to expand a potential ~
20923    eval path="$path"
20924    if test ! -f "$path" && test ! -d "$path"; then
20925      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20926    fi
20927
20928    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20929  fi
20930
20931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20932$as_echo_n "checking for Boot JDK... " >&6; }
20933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20934$as_echo "$BOOT_JDK" >&6; }
20935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20936$as_echo_n "checking Boot JDK version... " >&6; }
20937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20939$as_echo "$BOOT_JDK_VERSION" >&6; }
20940          fi # end check jdk version
20941        fi # end check javac
20942      fi # end check java
20943    fi # end check boot jdk found
20944  fi
20945
20946
20947  if test "x$BOOT_JDK_FOUND" = xno; then
20948    # Now execute the test
20949
20950  if test -x /usr/libexec/java_home; then
20951    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20952    BOOT_JDK_FOUND=maybe
20953    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20954$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20955  fi
20956
20957
20958    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20959    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20960      # Do we have a bin/java?
20961      if test ! -x "$BOOT_JDK/bin/java"; then
20962        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20964        BOOT_JDK_FOUND=no
20965      else
20966        # Do we have a bin/javac?
20967        if test ! -x "$BOOT_JDK/bin/javac"; then
20968          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20970          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20971$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20972          BOOT_JDK_FOUND=no
20973        else
20974          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20975          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20976
20977          # Extra M4 quote needed to protect [] in grep expression.
20978          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20979          if test "x$FOUND_CORRECT_VERSION" = x; then
20980            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20982            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20983$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20984            BOOT_JDK_FOUND=no
20985          else
20986            # We're done! :-)
20987            BOOT_JDK_FOUND=yes
20988
20989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990
20991  # Input might be given as Windows format, start by converting to
20992  # unix format.
20993  path="$BOOT_JDK"
20994  new_path=`$CYGPATH -u "$path"`
20995
20996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20999  # "foo.exe" is OK but "foo" is an error.
21000  #
21001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21002  # It is also a way to make sure we got the proper file name for the real test later on.
21003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21004  if test "x$test_shortpath" = x; then
21005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21007    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21008  fi
21009
21010  # Call helper function which possibly converts this using DOS-style short mode.
21011  # If so, the updated path is stored in $new_path.
21012
21013  input_path="$new_path"
21014  # Check if we need to convert this using DOS-style short mode. If the path
21015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21016  # take no chances and rewrite it.
21017  # Note: m4 eats our [], so we need to use [ and ] instead.
21018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21019  if test "x$has_forbidden_chars" != x; then
21020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21024      # Going to short mode and back again did indeed matter. Since short mode is
21025      # case insensitive, let's make it lowercase to improve readability.
21026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21027      # Now convert it back to Unix-stile (cygpath)
21028      input_path=`$CYGPATH -u "$shortmode_path"`
21029      new_path="$input_path"
21030    fi
21031  fi
21032
21033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21034  if test "x$test_cygdrive_prefix" = x; then
21035    # As a simple fix, exclude /usr/bin since it's not a real path.
21036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21038      # a path prefixed by /cygdrive for fixpath to work.
21039      new_path="$CYGWIN_ROOT_PATH$input_path"
21040    fi
21041  fi
21042
21043
21044  if test "x$path" != "x$new_path"; then
21045    BOOT_JDK="$new_path"
21046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21047$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21048  fi
21049
21050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21051
21052  path="$BOOT_JDK"
21053  has_colon=`$ECHO $path | $GREP ^.:`
21054  new_path="$path"
21055  if test "x$has_colon" = x; then
21056    # Not in mixed or Windows style, start by that.
21057    new_path=`cmd //c echo $path`
21058  fi
21059
21060
21061  input_path="$new_path"
21062  # Check if we need to convert this using DOS-style short mode. If the path
21063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21064  # take no chances and rewrite it.
21065  # Note: m4 eats our [], so we need to use [ and ] instead.
21066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21067  if test "x$has_forbidden_chars" != x; then
21068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21070  fi
21071
21072
21073  windows_path="$new_path"
21074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21075    unix_path=`$CYGPATH -u "$windows_path"`
21076    new_path="$unix_path"
21077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21079    new_path="$unix_path"
21080  fi
21081
21082  if test "x$path" != "x$new_path"; then
21083    BOOT_JDK="$new_path"
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21086  fi
21087
21088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21090
21091  else
21092    # We're on a unix platform. Hooray! :)
21093    path="$BOOT_JDK"
21094    has_space=`$ECHO "$path" | $GREP " "`
21095    if test "x$has_space" != x; then
21096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21099    fi
21100
21101    # Use eval to expand a potential ~
21102    eval path="$path"
21103    if test ! -f "$path" && test ! -d "$path"; then
21104      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21105    fi
21106
21107    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21108  fi
21109
21110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21111$as_echo_n "checking for Boot JDK... " >&6; }
21112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21113$as_echo "$BOOT_JDK" >&6; }
21114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21115$as_echo_n "checking Boot JDK version... " >&6; }
21116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21118$as_echo "$BOOT_JDK_VERSION" >&6; }
21119          fi # end check jdk version
21120        fi # end check javac
21121      fi # end check java
21122    fi # end check boot jdk found
21123  fi
21124
21125
21126  if test "x$BOOT_JDK_FOUND" = xno; then
21127    # Now execute the test
21128
21129  if test -x /usr/libexec/java_home; then
21130    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21131    BOOT_JDK_FOUND=maybe
21132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21133$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21134  fi
21135
21136
21137    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21138    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21139      # Do we have a bin/java?
21140      if test ! -x "$BOOT_JDK/bin/java"; then
21141        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21143        BOOT_JDK_FOUND=no
21144      else
21145        # Do we have a bin/javac?
21146        if test ! -x "$BOOT_JDK/bin/javac"; then
21147          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21149          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21150$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21151          BOOT_JDK_FOUND=no
21152        else
21153          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21154          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21155
21156          # Extra M4 quote needed to protect [] in grep expression.
21157          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21158          if test "x$FOUND_CORRECT_VERSION" = x; then
21159            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21161            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21162$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21163            BOOT_JDK_FOUND=no
21164          else
21165            # We're done! :-)
21166            BOOT_JDK_FOUND=yes
21167
21168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21169
21170  # Input might be given as Windows format, start by converting to
21171  # unix format.
21172  path="$BOOT_JDK"
21173  new_path=`$CYGPATH -u "$path"`
21174
21175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21178  # "foo.exe" is OK but "foo" is an error.
21179  #
21180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21181  # It is also a way to make sure we got the proper file name for the real test later on.
21182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21183  if test "x$test_shortpath" = x; then
21184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21187  fi
21188
21189  # Call helper function which possibly converts this using DOS-style short mode.
21190  # If so, the updated path is stored in $new_path.
21191
21192  input_path="$new_path"
21193  # Check if we need to convert this using DOS-style short mode. If the path
21194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21195  # take no chances and rewrite it.
21196  # Note: m4 eats our [], so we need to use [ and ] instead.
21197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21198  if test "x$has_forbidden_chars" != x; then
21199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21203      # Going to short mode and back again did indeed matter. Since short mode is
21204      # case insensitive, let's make it lowercase to improve readability.
21205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21206      # Now convert it back to Unix-stile (cygpath)
21207      input_path=`$CYGPATH -u "$shortmode_path"`
21208      new_path="$input_path"
21209    fi
21210  fi
21211
21212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21213  if test "x$test_cygdrive_prefix" = x; then
21214    # As a simple fix, exclude /usr/bin since it's not a real path.
21215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21217      # a path prefixed by /cygdrive for fixpath to work.
21218      new_path="$CYGWIN_ROOT_PATH$input_path"
21219    fi
21220  fi
21221
21222
21223  if test "x$path" != "x$new_path"; then
21224    BOOT_JDK="$new_path"
21225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21227  fi
21228
21229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21230
21231  path="$BOOT_JDK"
21232  has_colon=`$ECHO $path | $GREP ^.:`
21233  new_path="$path"
21234  if test "x$has_colon" = x; then
21235    # Not in mixed or Windows style, start by that.
21236    new_path=`cmd //c echo $path`
21237  fi
21238
21239
21240  input_path="$new_path"
21241  # Check if we need to convert this using DOS-style short mode. If the path
21242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21243  # take no chances and rewrite it.
21244  # Note: m4 eats our [], so we need to use [ and ] instead.
21245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21246  if test "x$has_forbidden_chars" != x; then
21247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21249  fi
21250
21251
21252  windows_path="$new_path"
21253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21254    unix_path=`$CYGPATH -u "$windows_path"`
21255    new_path="$unix_path"
21256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21258    new_path="$unix_path"
21259  fi
21260
21261  if test "x$path" != "x$new_path"; then
21262    BOOT_JDK="$new_path"
21263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21265  fi
21266
21267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21269
21270  else
21271    # We're on a unix platform. Hooray! :)
21272    path="$BOOT_JDK"
21273    has_space=`$ECHO "$path" | $GREP " "`
21274    if test "x$has_space" != x; then
21275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21277      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21278    fi
21279
21280    # Use eval to expand a potential ~
21281    eval path="$path"
21282    if test ! -f "$path" && test ! -d "$path"; then
21283      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21284    fi
21285
21286    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21287  fi
21288
21289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21290$as_echo_n "checking for Boot JDK... " >&6; }
21291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21292$as_echo "$BOOT_JDK" >&6; }
21293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21294$as_echo_n "checking Boot JDK version... " >&6; }
21295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21297$as_echo "$BOOT_JDK_VERSION" >&6; }
21298          fi # end check jdk version
21299        fi # end check javac
21300      fi # end check java
21301    fi # end check boot jdk found
21302  fi
21303
21304  fi
21305
21306
21307    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21308    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21309      # Do we have a bin/java?
21310      if test ! -x "$BOOT_JDK/bin/java"; then
21311        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21313        BOOT_JDK_FOUND=no
21314      else
21315        # Do we have a bin/javac?
21316        if test ! -x "$BOOT_JDK/bin/javac"; then
21317          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21319          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21320$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21321          BOOT_JDK_FOUND=no
21322        else
21323          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21324          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21325
21326          # Extra M4 quote needed to protect [] in grep expression.
21327          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21328          if test "x$FOUND_CORRECT_VERSION" = x; then
21329            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21331            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21332$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21333            BOOT_JDK_FOUND=no
21334          else
21335            # We're done! :-)
21336            BOOT_JDK_FOUND=yes
21337
21338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21339
21340  # Input might be given as Windows format, start by converting to
21341  # unix format.
21342  path="$BOOT_JDK"
21343  new_path=`$CYGPATH -u "$path"`
21344
21345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21348  # "foo.exe" is OK but "foo" is an error.
21349  #
21350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21351  # It is also a way to make sure we got the proper file name for the real test later on.
21352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21353  if test "x$test_shortpath" = x; then
21354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21357  fi
21358
21359  # Call helper function which possibly converts this using DOS-style short mode.
21360  # If so, the updated path is stored in $new_path.
21361
21362  input_path="$new_path"
21363  # Check if we need to convert this using DOS-style short mode. If the path
21364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21365  # take no chances and rewrite it.
21366  # Note: m4 eats our [], so we need to use [ and ] instead.
21367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21368  if test "x$has_forbidden_chars" != x; then
21369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21373      # Going to short mode and back again did indeed matter. Since short mode is
21374      # case insensitive, let's make it lowercase to improve readability.
21375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21376      # Now convert it back to Unix-stile (cygpath)
21377      input_path=`$CYGPATH -u "$shortmode_path"`
21378      new_path="$input_path"
21379    fi
21380  fi
21381
21382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21383  if test "x$test_cygdrive_prefix" = x; then
21384    # As a simple fix, exclude /usr/bin since it's not a real path.
21385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21387      # a path prefixed by /cygdrive for fixpath to work.
21388      new_path="$CYGWIN_ROOT_PATH$input_path"
21389    fi
21390  fi
21391
21392
21393  if test "x$path" != "x$new_path"; then
21394    BOOT_JDK="$new_path"
21395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21397  fi
21398
21399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21400
21401  path="$BOOT_JDK"
21402  has_colon=`$ECHO $path | $GREP ^.:`
21403  new_path="$path"
21404  if test "x$has_colon" = x; then
21405    # Not in mixed or Windows style, start by that.
21406    new_path=`cmd //c echo $path`
21407  fi
21408
21409
21410  input_path="$new_path"
21411  # Check if we need to convert this using DOS-style short mode. If the path
21412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21413  # take no chances and rewrite it.
21414  # Note: m4 eats our [], so we need to use [ and ] instead.
21415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21416  if test "x$has_forbidden_chars" != x; then
21417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21419  fi
21420
21421
21422  windows_path="$new_path"
21423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21424    unix_path=`$CYGPATH -u "$windows_path"`
21425    new_path="$unix_path"
21426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21428    new_path="$unix_path"
21429  fi
21430
21431  if test "x$path" != "x$new_path"; then
21432    BOOT_JDK="$new_path"
21433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21435  fi
21436
21437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21439
21440  else
21441    # We're on a unix platform. Hooray! :)
21442    path="$BOOT_JDK"
21443    has_space=`$ECHO "$path" | $GREP " "`
21444    if test "x$has_space" != x; then
21445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21447      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21448    fi
21449
21450    # Use eval to expand a potential ~
21451    eval path="$path"
21452    if test ! -f "$path" && test ! -d "$path"; then
21453      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21454    fi
21455
21456    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21457  fi
21458
21459            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21460$as_echo_n "checking for Boot JDK... " >&6; }
21461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21462$as_echo "$BOOT_JDK" >&6; }
21463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21464$as_echo_n "checking Boot JDK version... " >&6; }
21465            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21467$as_echo "$BOOT_JDK_VERSION" >&6; }
21468          fi # end check jdk version
21469        fi # end check javac
21470      fi # end check java
21471    fi # end check boot jdk found
21472  fi
21473
21474
21475  # Test: Is $JAVA_HOME set?
21476
21477  if test "x$BOOT_JDK_FOUND" = xno; then
21478    # Now execute the test
21479
21480  if test "x$JAVA_HOME" != x; then
21481    JAVA_HOME_PROCESSED="$JAVA_HOME"
21482
21483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21484
21485  # Input might be given as Windows format, start by converting to
21486  # unix format.
21487  path="$JAVA_HOME_PROCESSED"
21488  new_path=`$CYGPATH -u "$path"`
21489
21490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21493  # "foo.exe" is OK but "foo" is an error.
21494  #
21495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21496  # It is also a way to make sure we got the proper file name for the real test later on.
21497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21498  if test "x$test_shortpath" = x; then
21499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21500$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21501    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21502  fi
21503
21504  # Call helper function which possibly converts this using DOS-style short mode.
21505  # If so, the updated path is stored in $new_path.
21506
21507  input_path="$new_path"
21508  # Check if we need to convert this using DOS-style short mode. If the path
21509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21510  # take no chances and rewrite it.
21511  # Note: m4 eats our [], so we need to use [ and ] instead.
21512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21513  if test "x$has_forbidden_chars" != x; then
21514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21518      # Going to short mode and back again did indeed matter. Since short mode is
21519      # case insensitive, let's make it lowercase to improve readability.
21520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21521      # Now convert it back to Unix-stile (cygpath)
21522      input_path=`$CYGPATH -u "$shortmode_path"`
21523      new_path="$input_path"
21524    fi
21525  fi
21526
21527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21528  if test "x$test_cygdrive_prefix" = x; then
21529    # As a simple fix, exclude /usr/bin since it's not a real path.
21530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21532      # a path prefixed by /cygdrive for fixpath to work.
21533      new_path="$CYGWIN_ROOT_PATH$input_path"
21534    fi
21535  fi
21536
21537
21538  if test "x$path" != "x$new_path"; then
21539    JAVA_HOME_PROCESSED="$new_path"
21540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21541$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21542  fi
21543
21544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21545
21546  path="$JAVA_HOME_PROCESSED"
21547  has_colon=`$ECHO $path | $GREP ^.:`
21548  new_path="$path"
21549  if test "x$has_colon" = x; then
21550    # Not in mixed or Windows style, start by that.
21551    new_path=`cmd //c echo $path`
21552  fi
21553
21554
21555  input_path="$new_path"
21556  # Check if we need to convert this using DOS-style short mode. If the path
21557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21558  # take no chances and rewrite it.
21559  # Note: m4 eats our [], so we need to use [ and ] instead.
21560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21561  if test "x$has_forbidden_chars" != x; then
21562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21564  fi
21565
21566
21567  windows_path="$new_path"
21568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21569    unix_path=`$CYGPATH -u "$windows_path"`
21570    new_path="$unix_path"
21571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21573    new_path="$unix_path"
21574  fi
21575
21576  if test "x$path" != "x$new_path"; then
21577    JAVA_HOME_PROCESSED="$new_path"
21578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21579$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21580  fi
21581
21582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21584
21585  else
21586    # We're on a unix platform. Hooray! :)
21587    path="$JAVA_HOME_PROCESSED"
21588    has_space=`$ECHO "$path" | $GREP " "`
21589    if test "x$has_space" != x; then
21590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21591$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21592      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21593    fi
21594
21595    # Use eval to expand a potential ~
21596    eval path="$path"
21597    if test ! -f "$path" && test ! -d "$path"; then
21598      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21599    fi
21600
21601    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21602  fi
21603
21604    if test ! -d "$JAVA_HOME_PROCESSED"; then
21605      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21606$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21607    else
21608      # Aha, the user has set a JAVA_HOME
21609      # let us use that as the Boot JDK.
21610      BOOT_JDK="$JAVA_HOME_PROCESSED"
21611      BOOT_JDK_FOUND=maybe
21612      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21613$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21614    fi
21615  fi
21616
21617
21618    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21619    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21620      # Do we have a bin/java?
21621      if test ! -x "$BOOT_JDK/bin/java"; then
21622        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21624        BOOT_JDK_FOUND=no
21625      else
21626        # Do we have a bin/javac?
21627        if test ! -x "$BOOT_JDK/bin/javac"; then
21628          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21630          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21631$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21632          BOOT_JDK_FOUND=no
21633        else
21634          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21635          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21636
21637          # Extra M4 quote needed to protect [] in grep expression.
21638          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21639          if test "x$FOUND_CORRECT_VERSION" = x; then
21640            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21642            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21643$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21644            BOOT_JDK_FOUND=no
21645          else
21646            # We're done! :-)
21647            BOOT_JDK_FOUND=yes
21648
21649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21650
21651  # Input might be given as Windows format, start by converting to
21652  # unix format.
21653  path="$BOOT_JDK"
21654  new_path=`$CYGPATH -u "$path"`
21655
21656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21659  # "foo.exe" is OK but "foo" is an error.
21660  #
21661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21662  # It is also a way to make sure we got the proper file name for the real test later on.
21663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21664  if test "x$test_shortpath" = x; then
21665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21668  fi
21669
21670  # Call helper function which possibly converts this using DOS-style short mode.
21671  # If so, the updated path is stored in $new_path.
21672
21673  input_path="$new_path"
21674  # Check if we need to convert this using DOS-style short mode. If the path
21675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21676  # take no chances and rewrite it.
21677  # Note: m4 eats our [], so we need to use [ and ] instead.
21678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21679  if test "x$has_forbidden_chars" != x; then
21680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21684      # Going to short mode and back again did indeed matter. Since short mode is
21685      # case insensitive, let's make it lowercase to improve readability.
21686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21687      # Now convert it back to Unix-stile (cygpath)
21688      input_path=`$CYGPATH -u "$shortmode_path"`
21689      new_path="$input_path"
21690    fi
21691  fi
21692
21693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21694  if test "x$test_cygdrive_prefix" = x; then
21695    # As a simple fix, exclude /usr/bin since it's not a real path.
21696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21698      # a path prefixed by /cygdrive for fixpath to work.
21699      new_path="$CYGWIN_ROOT_PATH$input_path"
21700    fi
21701  fi
21702
21703
21704  if test "x$path" != "x$new_path"; then
21705    BOOT_JDK="$new_path"
21706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21708  fi
21709
21710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21711
21712  path="$BOOT_JDK"
21713  has_colon=`$ECHO $path | $GREP ^.:`
21714  new_path="$path"
21715  if test "x$has_colon" = x; then
21716    # Not in mixed or Windows style, start by that.
21717    new_path=`cmd //c echo $path`
21718  fi
21719
21720
21721  input_path="$new_path"
21722  # Check if we need to convert this using DOS-style short mode. If the path
21723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21724  # take no chances and rewrite it.
21725  # Note: m4 eats our [], so we need to use [ and ] instead.
21726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21727  if test "x$has_forbidden_chars" != x; then
21728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21730  fi
21731
21732
21733  windows_path="$new_path"
21734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21735    unix_path=`$CYGPATH -u "$windows_path"`
21736    new_path="$unix_path"
21737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21739    new_path="$unix_path"
21740  fi
21741
21742  if test "x$path" != "x$new_path"; then
21743    BOOT_JDK="$new_path"
21744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21746  fi
21747
21748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21750
21751  else
21752    # We're on a unix platform. Hooray! :)
21753    path="$BOOT_JDK"
21754    has_space=`$ECHO "$path" | $GREP " "`
21755    if test "x$has_space" != x; then
21756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21758      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21759    fi
21760
21761    # Use eval to expand a potential ~
21762    eval path="$path"
21763    if test ! -f "$path" && test ! -d "$path"; then
21764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21765    fi
21766
21767    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21768  fi
21769
21770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21771$as_echo_n "checking for Boot JDK... " >&6; }
21772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21773$as_echo "$BOOT_JDK" >&6; }
21774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21775$as_echo_n "checking Boot JDK version... " >&6; }
21776            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21778$as_echo "$BOOT_JDK_VERSION" >&6; }
21779          fi # end check jdk version
21780        fi # end check javac
21781      fi # end check java
21782    fi # end check boot jdk found
21783  fi
21784
21785
21786  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21787
21788  if test "x$BOOT_JDK_FOUND" = xno; then
21789    # Now execute the test
21790
21791  # Extract the first word of "javac", so it can be a program name with args.
21792set dummy javac; ac_word=$2
21793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21794$as_echo_n "checking for $ac_word... " >&6; }
21795if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21796  $as_echo_n "(cached) " >&6
21797else
21798  case $JAVAC_CHECK in
21799  [\\/]* | ?:[\\/]*)
21800  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21801  ;;
21802  *)
21803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21804for as_dir in $PATH
21805do
21806  IFS=$as_save_IFS
21807  test -z "$as_dir" && as_dir=.
21808    for ac_exec_ext in '' $ac_executable_extensions; do
21809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21810    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21812    break 2
21813  fi
21814done
21815  done
21816IFS=$as_save_IFS
21817
21818  ;;
21819esac
21820fi
21821JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21822if test -n "$JAVAC_CHECK"; then
21823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21824$as_echo "$JAVAC_CHECK" >&6; }
21825else
21826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21827$as_echo "no" >&6; }
21828fi
21829
21830
21831  # Extract the first word of "java", so it can be a program name with args.
21832set dummy java; ac_word=$2
21833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21834$as_echo_n "checking for $ac_word... " >&6; }
21835if ${ac_cv_path_JAVA_CHECK+:} false; then :
21836  $as_echo_n "(cached) " >&6
21837else
21838  case $JAVA_CHECK in
21839  [\\/]* | ?:[\\/]*)
21840  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21841  ;;
21842  *)
21843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21844for as_dir in $PATH
21845do
21846  IFS=$as_save_IFS
21847  test -z "$as_dir" && as_dir=.
21848    for ac_exec_ext in '' $ac_executable_extensions; do
21849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21850    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21852    break 2
21853  fi
21854done
21855  done
21856IFS=$as_save_IFS
21857
21858  ;;
21859esac
21860fi
21861JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21862if test -n "$JAVA_CHECK"; then
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21864$as_echo "$JAVA_CHECK" >&6; }
21865else
21866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21867$as_echo "no" >&6; }
21868fi
21869
21870
21871  BINARY="$JAVAC_CHECK"
21872  if test "x$JAVAC_CHECK" = x; then
21873    BINARY="$JAVA_CHECK"
21874  fi
21875  if test "x$BINARY" != x; then
21876    # So there is a java(c) binary, it might be part of a JDK.
21877    # Lets find the JDK/JRE directory by following symbolic links.
21878    # Linux/GNU systems often have links from /usr/bin/java to
21879    # /etc/alternatives/java to the real JDK binary.
21880
21881  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21882    # Follow a chain of symbolic links. Use readlink
21883    # where it exists, else fall back to horribly
21884    # complicated shell code.
21885    if test "x$READLINK_TESTED" != yes; then
21886      # On MacOSX there is a readlink tool with a different
21887      # purpose than the GNU readlink tool. Check the found readlink.
21888      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21889      if test "x$ISGNU" = x; then
21890        # A readlink that we do not know how to use.
21891        # Are there other non-GNU readlinks out there?
21892        READLINK_TESTED=yes
21893        READLINK=
21894      fi
21895    fi
21896
21897    if test "x$READLINK" != x; then
21898      BINARY=`$READLINK -f $BINARY`
21899    else
21900      # Save the current directory for restoring afterwards
21901      STARTDIR=$PWD
21902      COUNTER=0
21903      sym_link_dir=`$DIRNAME $BINARY`
21904      sym_link_file=`$BASENAME $BINARY`
21905      cd $sym_link_dir
21906      # Use -P flag to resolve symlinks in directories.
21907      cd `$THEPWDCMD -P`
21908      sym_link_dir=`$THEPWDCMD -P`
21909      # Resolve file symlinks
21910      while test $COUNTER -lt 20; do
21911        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21912        if test "x$ISLINK" == x; then
21913          # This is not a symbolic link! We are done!
21914          break
21915        fi
21916        # Again resolve directory symlinks since the target of the just found
21917        # link could be in a different directory
21918        cd `$DIRNAME $ISLINK`
21919        sym_link_dir=`$THEPWDCMD -P`
21920        sym_link_file=`$BASENAME $ISLINK`
21921        let COUNTER=COUNTER+1
21922      done
21923      cd $STARTDIR
21924      BINARY=$sym_link_dir/$sym_link_file
21925    fi
21926  fi
21927
21928    BOOT_JDK=`dirname "$BINARY"`
21929    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21930    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21931      # Looks like we found ourselves an JDK
21932      BOOT_JDK_FOUND=maybe
21933      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21934$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21935    fi
21936  fi
21937
21938
21939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21941      # Do we have a bin/java?
21942      if test ! -x "$BOOT_JDK/bin/java"; then
21943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21945        BOOT_JDK_FOUND=no
21946      else
21947        # Do we have a bin/javac?
21948        if test ! -x "$BOOT_JDK/bin/javac"; then
21949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21953          BOOT_JDK_FOUND=no
21954        else
21955          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21956          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21957
21958          # Extra M4 quote needed to protect [] in grep expression.
21959          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21960          if test "x$FOUND_CORRECT_VERSION" = x; then
21961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21963            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21964$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21965            BOOT_JDK_FOUND=no
21966          else
21967            # We're done! :-)
21968            BOOT_JDK_FOUND=yes
21969
21970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21971
21972  # Input might be given as Windows format, start by converting to
21973  # unix format.
21974  path="$BOOT_JDK"
21975  new_path=`$CYGPATH -u "$path"`
21976
21977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21980  # "foo.exe" is OK but "foo" is an error.
21981  #
21982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21983  # It is also a way to make sure we got the proper file name for the real test later on.
21984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21985  if test "x$test_shortpath" = x; then
21986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21988    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21989  fi
21990
21991  # Call helper function which possibly converts this using DOS-style short mode.
21992  # If so, the updated path is stored in $new_path.
21993
21994  input_path="$new_path"
21995  # Check if we need to convert this using DOS-style short mode. If the path
21996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21997  # take no chances and rewrite it.
21998  # Note: m4 eats our [], so we need to use [ and ] instead.
21999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22000  if test "x$has_forbidden_chars" != x; then
22001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22005      # Going to short mode and back again did indeed matter. Since short mode is
22006      # case insensitive, let's make it lowercase to improve readability.
22007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22008      # Now convert it back to Unix-stile (cygpath)
22009      input_path=`$CYGPATH -u "$shortmode_path"`
22010      new_path="$input_path"
22011    fi
22012  fi
22013
22014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22015  if test "x$test_cygdrive_prefix" = x; then
22016    # As a simple fix, exclude /usr/bin since it's not a real path.
22017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22019      # a path prefixed by /cygdrive for fixpath to work.
22020      new_path="$CYGWIN_ROOT_PATH$input_path"
22021    fi
22022  fi
22023
22024
22025  if test "x$path" != "x$new_path"; then
22026    BOOT_JDK="$new_path"
22027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22029  fi
22030
22031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22032
22033  path="$BOOT_JDK"
22034  has_colon=`$ECHO $path | $GREP ^.:`
22035  new_path="$path"
22036  if test "x$has_colon" = x; then
22037    # Not in mixed or Windows style, start by that.
22038    new_path=`cmd //c echo $path`
22039  fi
22040
22041
22042  input_path="$new_path"
22043  # Check if we need to convert this using DOS-style short mode. If the path
22044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22045  # take no chances and rewrite it.
22046  # Note: m4 eats our [], so we need to use [ and ] instead.
22047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22048  if test "x$has_forbidden_chars" != x; then
22049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22051  fi
22052
22053
22054  windows_path="$new_path"
22055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22056    unix_path=`$CYGPATH -u "$windows_path"`
22057    new_path="$unix_path"
22058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22060    new_path="$unix_path"
22061  fi
22062
22063  if test "x$path" != "x$new_path"; then
22064    BOOT_JDK="$new_path"
22065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22067  fi
22068
22069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22071
22072  else
22073    # We're on a unix platform. Hooray! :)
22074    path="$BOOT_JDK"
22075    has_space=`$ECHO "$path" | $GREP " "`
22076    if test "x$has_space" != x; then
22077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22079      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22080    fi
22081
22082    # Use eval to expand a potential ~
22083    eval path="$path"
22084    if test ! -f "$path" && test ! -d "$path"; then
22085      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22086    fi
22087
22088    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22089  fi
22090
22091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22092$as_echo_n "checking for Boot JDK... " >&6; }
22093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22094$as_echo "$BOOT_JDK" >&6; }
22095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22096$as_echo_n "checking Boot JDK version... " >&6; }
22097            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22099$as_echo "$BOOT_JDK_VERSION" >&6; }
22100          fi # end check jdk version
22101        fi # end check javac
22102      fi # end check java
22103    fi # end check boot jdk found
22104  fi
22105
22106
22107  # Test: Is there a JDK installed in default, well-known locations?
22108
22109  if test "x$BOOT_JDK_FOUND" = xno; then
22110    # Now execute the test
22111
22112  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22113
22114  if test "x$BOOT_JDK_FOUND" = xno; then
22115    # Now execute the test
22116
22117  if test "x$ProgramW6432" != x; then
22118    VIRTUAL_DIR="$ProgramW6432/Java"
22119
22120  windows_path="$VIRTUAL_DIR"
22121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22122    unix_path=`$CYGPATH -u "$windows_path"`
22123    VIRTUAL_DIR="$unix_path"
22124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22126    VIRTUAL_DIR="$unix_path"
22127  fi
22128
22129
22130  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22131  BOOT_JDK_SUFFIX=""
22132  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22133  if test "x$ALL_JDKS_FOUND" != x; then
22134    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22135
22136  if test "x$BOOT_JDK_FOUND" = xno; then
22137    # Now execute the test
22138
22139        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22140        if test -d "$BOOT_JDK"; then
22141          BOOT_JDK_FOUND=maybe
22142          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22143$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22144        fi
22145
22146
22147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22149      # Do we have a bin/java?
22150      if test ! -x "$BOOT_JDK/bin/java"; then
22151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22153        BOOT_JDK_FOUND=no
22154      else
22155        # Do we have a bin/javac?
22156        if test ! -x "$BOOT_JDK/bin/javac"; then
22157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22161          BOOT_JDK_FOUND=no
22162        else
22163          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22164          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22165
22166          # Extra M4 quote needed to protect [] in grep expression.
22167          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22168          if test "x$FOUND_CORRECT_VERSION" = x; then
22169            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22171            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22172$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22173            BOOT_JDK_FOUND=no
22174          else
22175            # We're done! :-)
22176            BOOT_JDK_FOUND=yes
22177
22178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22179
22180  # Input might be given as Windows format, start by converting to
22181  # unix format.
22182  path="$BOOT_JDK"
22183  new_path=`$CYGPATH -u "$path"`
22184
22185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22188  # "foo.exe" is OK but "foo" is an error.
22189  #
22190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22191  # It is also a way to make sure we got the proper file name for the real test later on.
22192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22193  if test "x$test_shortpath" = x; then
22194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22196    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22197  fi
22198
22199  # Call helper function which possibly converts this using DOS-style short mode.
22200  # If so, the updated path is stored in $new_path.
22201
22202  input_path="$new_path"
22203  # Check if we need to convert this using DOS-style short mode. If the path
22204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22205  # take no chances and rewrite it.
22206  # Note: m4 eats our [], so we need to use [ and ] instead.
22207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22208  if test "x$has_forbidden_chars" != x; then
22209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22213      # Going to short mode and back again did indeed matter. Since short mode is
22214      # case insensitive, let's make it lowercase to improve readability.
22215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22216      # Now convert it back to Unix-stile (cygpath)
22217      input_path=`$CYGPATH -u "$shortmode_path"`
22218      new_path="$input_path"
22219    fi
22220  fi
22221
22222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22223  if test "x$test_cygdrive_prefix" = x; then
22224    # As a simple fix, exclude /usr/bin since it's not a real path.
22225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22227      # a path prefixed by /cygdrive for fixpath to work.
22228      new_path="$CYGWIN_ROOT_PATH$input_path"
22229    fi
22230  fi
22231
22232
22233  if test "x$path" != "x$new_path"; then
22234    BOOT_JDK="$new_path"
22235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22237  fi
22238
22239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22240
22241  path="$BOOT_JDK"
22242  has_colon=`$ECHO $path | $GREP ^.:`
22243  new_path="$path"
22244  if test "x$has_colon" = x; then
22245    # Not in mixed or Windows style, start by that.
22246    new_path=`cmd //c echo $path`
22247  fi
22248
22249
22250  input_path="$new_path"
22251  # Check if we need to convert this using DOS-style short mode. If the path
22252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22253  # take no chances and rewrite it.
22254  # Note: m4 eats our [], so we need to use [ and ] instead.
22255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22256  if test "x$has_forbidden_chars" != x; then
22257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22259  fi
22260
22261
22262  windows_path="$new_path"
22263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22264    unix_path=`$CYGPATH -u "$windows_path"`
22265    new_path="$unix_path"
22266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22268    new_path="$unix_path"
22269  fi
22270
22271  if test "x$path" != "x$new_path"; then
22272    BOOT_JDK="$new_path"
22273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22275  fi
22276
22277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22279
22280  else
22281    # We're on a unix platform. Hooray! :)
22282    path="$BOOT_JDK"
22283    has_space=`$ECHO "$path" | $GREP " "`
22284    if test "x$has_space" != x; then
22285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22288    fi
22289
22290    # Use eval to expand a potential ~
22291    eval path="$path"
22292    if test ! -f "$path" && test ! -d "$path"; then
22293      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22294    fi
22295
22296    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22297  fi
22298
22299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22300$as_echo_n "checking for Boot JDK... " >&6; }
22301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22302$as_echo "$BOOT_JDK" >&6; }
22303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22304$as_echo_n "checking Boot JDK version... " >&6; }
22305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22307$as_echo "$BOOT_JDK_VERSION" >&6; }
22308          fi # end check jdk version
22309        fi # end check javac
22310      fi # end check java
22311    fi # end check boot jdk found
22312  fi
22313
22314    done
22315  fi
22316
22317  fi
22318
22319
22320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22322      # Do we have a bin/java?
22323      if test ! -x "$BOOT_JDK/bin/java"; then
22324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22326        BOOT_JDK_FOUND=no
22327      else
22328        # Do we have a bin/javac?
22329        if test ! -x "$BOOT_JDK/bin/javac"; then
22330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22334          BOOT_JDK_FOUND=no
22335        else
22336          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22337          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22338
22339          # Extra M4 quote needed to protect [] in grep expression.
22340          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22341          if test "x$FOUND_CORRECT_VERSION" = x; then
22342            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22344            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22345$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22346            BOOT_JDK_FOUND=no
22347          else
22348            # We're done! :-)
22349            BOOT_JDK_FOUND=yes
22350
22351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22352
22353  # Input might be given as Windows format, start by converting to
22354  # unix format.
22355  path="$BOOT_JDK"
22356  new_path=`$CYGPATH -u "$path"`
22357
22358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22361  # "foo.exe" is OK but "foo" is an error.
22362  #
22363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22364  # It is also a way to make sure we got the proper file name for the real test later on.
22365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22366  if test "x$test_shortpath" = x; then
22367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22370  fi
22371
22372  # Call helper function which possibly converts this using DOS-style short mode.
22373  # If so, the updated path is stored in $new_path.
22374
22375  input_path="$new_path"
22376  # Check if we need to convert this using DOS-style short mode. If the path
22377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22378  # take no chances and rewrite it.
22379  # Note: m4 eats our [], so we need to use [ and ] instead.
22380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22381  if test "x$has_forbidden_chars" != x; then
22382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22386      # Going to short mode and back again did indeed matter. Since short mode is
22387      # case insensitive, let's make it lowercase to improve readability.
22388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22389      # Now convert it back to Unix-stile (cygpath)
22390      input_path=`$CYGPATH -u "$shortmode_path"`
22391      new_path="$input_path"
22392    fi
22393  fi
22394
22395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22396  if test "x$test_cygdrive_prefix" = x; then
22397    # As a simple fix, exclude /usr/bin since it's not a real path.
22398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22400      # a path prefixed by /cygdrive for fixpath to work.
22401      new_path="$CYGWIN_ROOT_PATH$input_path"
22402    fi
22403  fi
22404
22405
22406  if test "x$path" != "x$new_path"; then
22407    BOOT_JDK="$new_path"
22408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22410  fi
22411
22412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22413
22414  path="$BOOT_JDK"
22415  has_colon=`$ECHO $path | $GREP ^.:`
22416  new_path="$path"
22417  if test "x$has_colon" = x; then
22418    # Not in mixed or Windows style, start by that.
22419    new_path=`cmd //c echo $path`
22420  fi
22421
22422
22423  input_path="$new_path"
22424  # Check if we need to convert this using DOS-style short mode. If the path
22425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22426  # take no chances and rewrite it.
22427  # Note: m4 eats our [], so we need to use [ and ] instead.
22428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22429  if test "x$has_forbidden_chars" != x; then
22430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22432  fi
22433
22434
22435  windows_path="$new_path"
22436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22437    unix_path=`$CYGPATH -u "$windows_path"`
22438    new_path="$unix_path"
22439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22441    new_path="$unix_path"
22442  fi
22443
22444  if test "x$path" != "x$new_path"; then
22445    BOOT_JDK="$new_path"
22446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22448  fi
22449
22450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22452
22453  else
22454    # We're on a unix platform. Hooray! :)
22455    path="$BOOT_JDK"
22456    has_space=`$ECHO "$path" | $GREP " "`
22457    if test "x$has_space" != x; then
22458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22460      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22461    fi
22462
22463    # Use eval to expand a potential ~
22464    eval path="$path"
22465    if test ! -f "$path" && test ! -d "$path"; then
22466      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22467    fi
22468
22469    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22470  fi
22471
22472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22473$as_echo_n "checking for Boot JDK... " >&6; }
22474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22475$as_echo "$BOOT_JDK" >&6; }
22476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22477$as_echo_n "checking Boot JDK version... " >&6; }
22478            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22480$as_echo "$BOOT_JDK_VERSION" >&6; }
22481          fi # end check jdk version
22482        fi # end check javac
22483      fi # end check java
22484    fi # end check boot jdk found
22485  fi
22486
22487
22488  if test "x$BOOT_JDK_FOUND" = xno; then
22489    # Now execute the test
22490
22491  if test "x$PROGRAMW6432" != x; then
22492    VIRTUAL_DIR="$PROGRAMW6432/Java"
22493
22494  windows_path="$VIRTUAL_DIR"
22495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22496    unix_path=`$CYGPATH -u "$windows_path"`
22497    VIRTUAL_DIR="$unix_path"
22498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22500    VIRTUAL_DIR="$unix_path"
22501  fi
22502
22503
22504  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22505  BOOT_JDK_SUFFIX=""
22506  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22507  if test "x$ALL_JDKS_FOUND" != x; then
22508    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22509
22510  if test "x$BOOT_JDK_FOUND" = xno; then
22511    # Now execute the test
22512
22513        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22514        if test -d "$BOOT_JDK"; then
22515          BOOT_JDK_FOUND=maybe
22516          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22517$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22518        fi
22519
22520
22521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22523      # Do we have a bin/java?
22524      if test ! -x "$BOOT_JDK/bin/java"; then
22525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22527        BOOT_JDK_FOUND=no
22528      else
22529        # Do we have a bin/javac?
22530        if test ! -x "$BOOT_JDK/bin/javac"; then
22531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22535          BOOT_JDK_FOUND=no
22536        else
22537          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22538          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22539
22540          # Extra M4 quote needed to protect [] in grep expression.
22541          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22542          if test "x$FOUND_CORRECT_VERSION" = x; then
22543            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22545            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22546$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22547            BOOT_JDK_FOUND=no
22548          else
22549            # We're done! :-)
22550            BOOT_JDK_FOUND=yes
22551
22552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22553
22554  # Input might be given as Windows format, start by converting to
22555  # unix format.
22556  path="$BOOT_JDK"
22557  new_path=`$CYGPATH -u "$path"`
22558
22559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22562  # "foo.exe" is OK but "foo" is an error.
22563  #
22564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22565  # It is also a way to make sure we got the proper file name for the real test later on.
22566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22567  if test "x$test_shortpath" = x; then
22568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22570    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22571  fi
22572
22573  # Call helper function which possibly converts this using DOS-style short mode.
22574  # If so, the updated path is stored in $new_path.
22575
22576  input_path="$new_path"
22577  # Check if we need to convert this using DOS-style short mode. If the path
22578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22579  # take no chances and rewrite it.
22580  # Note: m4 eats our [], so we need to use [ and ] instead.
22581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22582  if test "x$has_forbidden_chars" != x; then
22583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22587      # Going to short mode and back again did indeed matter. Since short mode is
22588      # case insensitive, let's make it lowercase to improve readability.
22589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22590      # Now convert it back to Unix-stile (cygpath)
22591      input_path=`$CYGPATH -u "$shortmode_path"`
22592      new_path="$input_path"
22593    fi
22594  fi
22595
22596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22597  if test "x$test_cygdrive_prefix" = x; then
22598    # As a simple fix, exclude /usr/bin since it's not a real path.
22599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22601      # a path prefixed by /cygdrive for fixpath to work.
22602      new_path="$CYGWIN_ROOT_PATH$input_path"
22603    fi
22604  fi
22605
22606
22607  if test "x$path" != "x$new_path"; then
22608    BOOT_JDK="$new_path"
22609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22611  fi
22612
22613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22614
22615  path="$BOOT_JDK"
22616  has_colon=`$ECHO $path | $GREP ^.:`
22617  new_path="$path"
22618  if test "x$has_colon" = x; then
22619    # Not in mixed or Windows style, start by that.
22620    new_path=`cmd //c echo $path`
22621  fi
22622
22623
22624  input_path="$new_path"
22625  # Check if we need to convert this using DOS-style short mode. If the path
22626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22627  # take no chances and rewrite it.
22628  # Note: m4 eats our [], so we need to use [ and ] instead.
22629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22630  if test "x$has_forbidden_chars" != x; then
22631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22633  fi
22634
22635
22636  windows_path="$new_path"
22637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22638    unix_path=`$CYGPATH -u "$windows_path"`
22639    new_path="$unix_path"
22640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22642    new_path="$unix_path"
22643  fi
22644
22645  if test "x$path" != "x$new_path"; then
22646    BOOT_JDK="$new_path"
22647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22649  fi
22650
22651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22653
22654  else
22655    # We're on a unix platform. Hooray! :)
22656    path="$BOOT_JDK"
22657    has_space=`$ECHO "$path" | $GREP " "`
22658    if test "x$has_space" != x; then
22659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22661      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22662    fi
22663
22664    # Use eval to expand a potential ~
22665    eval path="$path"
22666    if test ! -f "$path" && test ! -d "$path"; then
22667      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22668    fi
22669
22670    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22671  fi
22672
22673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22674$as_echo_n "checking for Boot JDK... " >&6; }
22675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22676$as_echo "$BOOT_JDK" >&6; }
22677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22678$as_echo_n "checking Boot JDK version... " >&6; }
22679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22681$as_echo "$BOOT_JDK_VERSION" >&6; }
22682          fi # end check jdk version
22683        fi # end check javac
22684      fi # end check java
22685    fi # end check boot jdk found
22686  fi
22687
22688    done
22689  fi
22690
22691  fi
22692
22693
22694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22696      # Do we have a bin/java?
22697      if test ! -x "$BOOT_JDK/bin/java"; then
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22700        BOOT_JDK_FOUND=no
22701      else
22702        # Do we have a bin/javac?
22703        if test ! -x "$BOOT_JDK/bin/javac"; then
22704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22708          BOOT_JDK_FOUND=no
22709        else
22710          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22711          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22712
22713          # Extra M4 quote needed to protect [] in grep expression.
22714          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22715          if test "x$FOUND_CORRECT_VERSION" = x; then
22716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22718            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22719$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22720            BOOT_JDK_FOUND=no
22721          else
22722            # We're done! :-)
22723            BOOT_JDK_FOUND=yes
22724
22725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22726
22727  # Input might be given as Windows format, start by converting to
22728  # unix format.
22729  path="$BOOT_JDK"
22730  new_path=`$CYGPATH -u "$path"`
22731
22732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22735  # "foo.exe" is OK but "foo" is an error.
22736  #
22737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22738  # It is also a way to make sure we got the proper file name for the real test later on.
22739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22740  if test "x$test_shortpath" = x; then
22741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22742$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22743    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22744  fi
22745
22746  # Call helper function which possibly converts this using DOS-style short mode.
22747  # If so, the updated path is stored in $new_path.
22748
22749  input_path="$new_path"
22750  # Check if we need to convert this using DOS-style short mode. If the path
22751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22752  # take no chances and rewrite it.
22753  # Note: m4 eats our [], so we need to use [ and ] instead.
22754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22755  if test "x$has_forbidden_chars" != x; then
22756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22760      # Going to short mode and back again did indeed matter. Since short mode is
22761      # case insensitive, let's make it lowercase to improve readability.
22762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22763      # Now convert it back to Unix-stile (cygpath)
22764      input_path=`$CYGPATH -u "$shortmode_path"`
22765      new_path="$input_path"
22766    fi
22767  fi
22768
22769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22770  if test "x$test_cygdrive_prefix" = x; then
22771    # As a simple fix, exclude /usr/bin since it's not a real path.
22772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22774      # a path prefixed by /cygdrive for fixpath to work.
22775      new_path="$CYGWIN_ROOT_PATH$input_path"
22776    fi
22777  fi
22778
22779
22780  if test "x$path" != "x$new_path"; then
22781    BOOT_JDK="$new_path"
22782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22784  fi
22785
22786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22787
22788  path="$BOOT_JDK"
22789  has_colon=`$ECHO $path | $GREP ^.:`
22790  new_path="$path"
22791  if test "x$has_colon" = x; then
22792    # Not in mixed or Windows style, start by that.
22793    new_path=`cmd //c echo $path`
22794  fi
22795
22796
22797  input_path="$new_path"
22798  # Check if we need to convert this using DOS-style short mode. If the path
22799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22800  # take no chances and rewrite it.
22801  # Note: m4 eats our [], so we need to use [ and ] instead.
22802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22803  if test "x$has_forbidden_chars" != x; then
22804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22806  fi
22807
22808
22809  windows_path="$new_path"
22810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22811    unix_path=`$CYGPATH -u "$windows_path"`
22812    new_path="$unix_path"
22813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22815    new_path="$unix_path"
22816  fi
22817
22818  if test "x$path" != "x$new_path"; then
22819    BOOT_JDK="$new_path"
22820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22822  fi
22823
22824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22826
22827  else
22828    # We're on a unix platform. Hooray! :)
22829    path="$BOOT_JDK"
22830    has_space=`$ECHO "$path" | $GREP " "`
22831    if test "x$has_space" != x; then
22832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22833$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22834      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22835    fi
22836
22837    # Use eval to expand a potential ~
22838    eval path="$path"
22839    if test ! -f "$path" && test ! -d "$path"; then
22840      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22841    fi
22842
22843    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22844  fi
22845
22846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22847$as_echo_n "checking for Boot JDK... " >&6; }
22848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22849$as_echo "$BOOT_JDK" >&6; }
22850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22851$as_echo_n "checking Boot JDK version... " >&6; }
22852            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22854$as_echo "$BOOT_JDK_VERSION" >&6; }
22855          fi # end check jdk version
22856        fi # end check javac
22857      fi # end check java
22858    fi # end check boot jdk found
22859  fi
22860
22861
22862  if test "x$BOOT_JDK_FOUND" = xno; then
22863    # Now execute the test
22864
22865  if test "x$PROGRAMFILES" != x; then
22866    VIRTUAL_DIR="$PROGRAMFILES/Java"
22867
22868  windows_path="$VIRTUAL_DIR"
22869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22870    unix_path=`$CYGPATH -u "$windows_path"`
22871    VIRTUAL_DIR="$unix_path"
22872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22874    VIRTUAL_DIR="$unix_path"
22875  fi
22876
22877
22878  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22879  BOOT_JDK_SUFFIX=""
22880  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22881  if test "x$ALL_JDKS_FOUND" != x; then
22882    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22883
22884  if test "x$BOOT_JDK_FOUND" = xno; then
22885    # Now execute the test
22886
22887        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22888        if test -d "$BOOT_JDK"; then
22889          BOOT_JDK_FOUND=maybe
22890          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22891$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22892        fi
22893
22894
22895    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22896    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22897      # Do we have a bin/java?
22898      if test ! -x "$BOOT_JDK/bin/java"; then
22899        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22901        BOOT_JDK_FOUND=no
22902      else
22903        # Do we have a bin/javac?
22904        if test ! -x "$BOOT_JDK/bin/javac"; then
22905          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22907          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22908$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22909          BOOT_JDK_FOUND=no
22910        else
22911          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22912          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22913
22914          # Extra M4 quote needed to protect [] in grep expression.
22915          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22916          if test "x$FOUND_CORRECT_VERSION" = x; then
22917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22919            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22920$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22921            BOOT_JDK_FOUND=no
22922          else
22923            # We're done! :-)
22924            BOOT_JDK_FOUND=yes
22925
22926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22927
22928  # Input might be given as Windows format, start by converting to
22929  # unix format.
22930  path="$BOOT_JDK"
22931  new_path=`$CYGPATH -u "$path"`
22932
22933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22936  # "foo.exe" is OK but "foo" is an error.
22937  #
22938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22939  # It is also a way to make sure we got the proper file name for the real test later on.
22940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22941  if test "x$test_shortpath" = x; then
22942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22944    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22945  fi
22946
22947  # Call helper function which possibly converts this using DOS-style short mode.
22948  # If so, the updated path is stored in $new_path.
22949
22950  input_path="$new_path"
22951  # Check if we need to convert this using DOS-style short mode. If the path
22952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22953  # take no chances and rewrite it.
22954  # Note: m4 eats our [], so we need to use [ and ] instead.
22955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22956  if test "x$has_forbidden_chars" != x; then
22957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22961      # Going to short mode and back again did indeed matter. Since short mode is
22962      # case insensitive, let's make it lowercase to improve readability.
22963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22964      # Now convert it back to Unix-stile (cygpath)
22965      input_path=`$CYGPATH -u "$shortmode_path"`
22966      new_path="$input_path"
22967    fi
22968  fi
22969
22970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22971  if test "x$test_cygdrive_prefix" = x; then
22972    # As a simple fix, exclude /usr/bin since it's not a real path.
22973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22975      # a path prefixed by /cygdrive for fixpath to work.
22976      new_path="$CYGWIN_ROOT_PATH$input_path"
22977    fi
22978  fi
22979
22980
22981  if test "x$path" != "x$new_path"; then
22982    BOOT_JDK="$new_path"
22983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22985  fi
22986
22987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22988
22989  path="$BOOT_JDK"
22990  has_colon=`$ECHO $path | $GREP ^.:`
22991  new_path="$path"
22992  if test "x$has_colon" = x; then
22993    # Not in mixed or Windows style, start by that.
22994    new_path=`cmd //c echo $path`
22995  fi
22996
22997
22998  input_path="$new_path"
22999  # Check if we need to convert this using DOS-style short mode. If the path
23000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23001  # take no chances and rewrite it.
23002  # Note: m4 eats our [], so we need to use [ and ] instead.
23003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23004  if test "x$has_forbidden_chars" != x; then
23005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23007  fi
23008
23009
23010  windows_path="$new_path"
23011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23012    unix_path=`$CYGPATH -u "$windows_path"`
23013    new_path="$unix_path"
23014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23016    new_path="$unix_path"
23017  fi
23018
23019  if test "x$path" != "x$new_path"; then
23020    BOOT_JDK="$new_path"
23021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23023  fi
23024
23025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23027
23028  else
23029    # We're on a unix platform. Hooray! :)
23030    path="$BOOT_JDK"
23031    has_space=`$ECHO "$path" | $GREP " "`
23032    if test "x$has_space" != x; then
23033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23035      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23036    fi
23037
23038    # Use eval to expand a potential ~
23039    eval path="$path"
23040    if test ! -f "$path" && test ! -d "$path"; then
23041      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23042    fi
23043
23044    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23045  fi
23046
23047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23048$as_echo_n "checking for Boot JDK... " >&6; }
23049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23050$as_echo "$BOOT_JDK" >&6; }
23051            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23052$as_echo_n "checking Boot JDK version... " >&6; }
23053            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23055$as_echo "$BOOT_JDK_VERSION" >&6; }
23056          fi # end check jdk version
23057        fi # end check javac
23058      fi # end check java
23059    fi # end check boot jdk found
23060  fi
23061
23062    done
23063  fi
23064
23065  fi
23066
23067
23068    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23069    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23070      # Do we have a bin/java?
23071      if test ! -x "$BOOT_JDK/bin/java"; then
23072        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23074        BOOT_JDK_FOUND=no
23075      else
23076        # Do we have a bin/javac?
23077        if test ! -x "$BOOT_JDK/bin/javac"; then
23078          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23080          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23081$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23082          BOOT_JDK_FOUND=no
23083        else
23084          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23085          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23086
23087          # Extra M4 quote needed to protect [] in grep expression.
23088          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23089          if test "x$FOUND_CORRECT_VERSION" = x; then
23090            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23092            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23093$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23094            BOOT_JDK_FOUND=no
23095          else
23096            # We're done! :-)
23097            BOOT_JDK_FOUND=yes
23098
23099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23100
23101  # Input might be given as Windows format, start by converting to
23102  # unix format.
23103  path="$BOOT_JDK"
23104  new_path=`$CYGPATH -u "$path"`
23105
23106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23109  # "foo.exe" is OK but "foo" is an error.
23110  #
23111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23112  # It is also a way to make sure we got the proper file name for the real test later on.
23113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23114  if test "x$test_shortpath" = x; then
23115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23117    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23118  fi
23119
23120  # Call helper function which possibly converts this using DOS-style short mode.
23121  # If so, the updated path is stored in $new_path.
23122
23123  input_path="$new_path"
23124  # Check if we need to convert this using DOS-style short mode. If the path
23125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23126  # take no chances and rewrite it.
23127  # Note: m4 eats our [], so we need to use [ and ] instead.
23128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23129  if test "x$has_forbidden_chars" != x; then
23130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23134      # Going to short mode and back again did indeed matter. Since short mode is
23135      # case insensitive, let's make it lowercase to improve readability.
23136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23137      # Now convert it back to Unix-stile (cygpath)
23138      input_path=`$CYGPATH -u "$shortmode_path"`
23139      new_path="$input_path"
23140    fi
23141  fi
23142
23143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23144  if test "x$test_cygdrive_prefix" = x; then
23145    # As a simple fix, exclude /usr/bin since it's not a real path.
23146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23148      # a path prefixed by /cygdrive for fixpath to work.
23149      new_path="$CYGWIN_ROOT_PATH$input_path"
23150    fi
23151  fi
23152
23153
23154  if test "x$path" != "x$new_path"; then
23155    BOOT_JDK="$new_path"
23156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23158  fi
23159
23160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23161
23162  path="$BOOT_JDK"
23163  has_colon=`$ECHO $path | $GREP ^.:`
23164  new_path="$path"
23165  if test "x$has_colon" = x; then
23166    # Not in mixed or Windows style, start by that.
23167    new_path=`cmd //c echo $path`
23168  fi
23169
23170
23171  input_path="$new_path"
23172  # Check if we need to convert this using DOS-style short mode. If the path
23173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23174  # take no chances and rewrite it.
23175  # Note: m4 eats our [], so we need to use [ and ] instead.
23176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23177  if test "x$has_forbidden_chars" != x; then
23178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23180  fi
23181
23182
23183  windows_path="$new_path"
23184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23185    unix_path=`$CYGPATH -u "$windows_path"`
23186    new_path="$unix_path"
23187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23189    new_path="$unix_path"
23190  fi
23191
23192  if test "x$path" != "x$new_path"; then
23193    BOOT_JDK="$new_path"
23194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23196  fi
23197
23198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23200
23201  else
23202    # We're on a unix platform. Hooray! :)
23203    path="$BOOT_JDK"
23204    has_space=`$ECHO "$path" | $GREP " "`
23205    if test "x$has_space" != x; then
23206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23208      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23209    fi
23210
23211    # Use eval to expand a potential ~
23212    eval path="$path"
23213    if test ! -f "$path" && test ! -d "$path"; then
23214      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23215    fi
23216
23217    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23218  fi
23219
23220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23221$as_echo_n "checking for Boot JDK... " >&6; }
23222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23223$as_echo "$BOOT_JDK" >&6; }
23224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23225$as_echo_n "checking Boot JDK version... " >&6; }
23226            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23228$as_echo "$BOOT_JDK_VERSION" >&6; }
23229          fi # end check jdk version
23230        fi # end check javac
23231      fi # end check java
23232    fi # end check boot jdk found
23233  fi
23234
23235
23236  if test "x$BOOT_JDK_FOUND" = xno; then
23237    # Now execute the test
23238
23239  if test "x$ProgramFiles" != x; then
23240    VIRTUAL_DIR="$ProgramFiles/Java"
23241
23242  windows_path="$VIRTUAL_DIR"
23243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23244    unix_path=`$CYGPATH -u "$windows_path"`
23245    VIRTUAL_DIR="$unix_path"
23246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23248    VIRTUAL_DIR="$unix_path"
23249  fi
23250
23251
23252  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23253  BOOT_JDK_SUFFIX=""
23254  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23255  if test "x$ALL_JDKS_FOUND" != x; then
23256    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23257
23258  if test "x$BOOT_JDK_FOUND" = xno; then
23259    # Now execute the test
23260
23261        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23262        if test -d "$BOOT_JDK"; then
23263          BOOT_JDK_FOUND=maybe
23264          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23265$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23266        fi
23267
23268
23269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23271      # Do we have a bin/java?
23272      if test ! -x "$BOOT_JDK/bin/java"; then
23273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23275        BOOT_JDK_FOUND=no
23276      else
23277        # Do we have a bin/javac?
23278        if test ! -x "$BOOT_JDK/bin/javac"; then
23279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23283          BOOT_JDK_FOUND=no
23284        else
23285          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23286          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23287
23288          # Extra M4 quote needed to protect [] in grep expression.
23289          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23290          if test "x$FOUND_CORRECT_VERSION" = x; then
23291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23293            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23295            BOOT_JDK_FOUND=no
23296          else
23297            # We're done! :-)
23298            BOOT_JDK_FOUND=yes
23299
23300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23301
23302  # Input might be given as Windows format, start by converting to
23303  # unix format.
23304  path="$BOOT_JDK"
23305  new_path=`$CYGPATH -u "$path"`
23306
23307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23310  # "foo.exe" is OK but "foo" is an error.
23311  #
23312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23313  # It is also a way to make sure we got the proper file name for the real test later on.
23314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23315  if test "x$test_shortpath" = x; then
23316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23319  fi
23320
23321  # Call helper function which possibly converts this using DOS-style short mode.
23322  # If so, the updated path is stored in $new_path.
23323
23324  input_path="$new_path"
23325  # Check if we need to convert this using DOS-style short mode. If the path
23326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23327  # take no chances and rewrite it.
23328  # Note: m4 eats our [], so we need to use [ and ] instead.
23329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23330  if test "x$has_forbidden_chars" != x; then
23331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23335      # Going to short mode and back again did indeed matter. Since short mode is
23336      # case insensitive, let's make it lowercase to improve readability.
23337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23338      # Now convert it back to Unix-stile (cygpath)
23339      input_path=`$CYGPATH -u "$shortmode_path"`
23340      new_path="$input_path"
23341    fi
23342  fi
23343
23344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23345  if test "x$test_cygdrive_prefix" = x; then
23346    # As a simple fix, exclude /usr/bin since it's not a real path.
23347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23349      # a path prefixed by /cygdrive for fixpath to work.
23350      new_path="$CYGWIN_ROOT_PATH$input_path"
23351    fi
23352  fi
23353
23354
23355  if test "x$path" != "x$new_path"; then
23356    BOOT_JDK="$new_path"
23357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23359  fi
23360
23361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23362
23363  path="$BOOT_JDK"
23364  has_colon=`$ECHO $path | $GREP ^.:`
23365  new_path="$path"
23366  if test "x$has_colon" = x; then
23367    # Not in mixed or Windows style, start by that.
23368    new_path=`cmd //c echo $path`
23369  fi
23370
23371
23372  input_path="$new_path"
23373  # Check if we need to convert this using DOS-style short mode. If the path
23374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23375  # take no chances and rewrite it.
23376  # Note: m4 eats our [], so we need to use [ and ] instead.
23377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23378  if test "x$has_forbidden_chars" != x; then
23379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23381  fi
23382
23383
23384  windows_path="$new_path"
23385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23386    unix_path=`$CYGPATH -u "$windows_path"`
23387    new_path="$unix_path"
23388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23390    new_path="$unix_path"
23391  fi
23392
23393  if test "x$path" != "x$new_path"; then
23394    BOOT_JDK="$new_path"
23395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23397  fi
23398
23399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23401
23402  else
23403    # We're on a unix platform. Hooray! :)
23404    path="$BOOT_JDK"
23405    has_space=`$ECHO "$path" | $GREP " "`
23406    if test "x$has_space" != x; then
23407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23409      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23410    fi
23411
23412    # Use eval to expand a potential ~
23413    eval path="$path"
23414    if test ! -f "$path" && test ! -d "$path"; then
23415      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23416    fi
23417
23418    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23419  fi
23420
23421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23422$as_echo_n "checking for Boot JDK... " >&6; }
23423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23424$as_echo "$BOOT_JDK" >&6; }
23425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23426$as_echo_n "checking Boot JDK version... " >&6; }
23427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23429$as_echo "$BOOT_JDK_VERSION" >&6; }
23430          fi # end check jdk version
23431        fi # end check javac
23432      fi # end check java
23433    fi # end check boot jdk found
23434  fi
23435
23436    done
23437  fi
23438
23439  fi
23440
23441
23442    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23443    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23444      # Do we have a bin/java?
23445      if test ! -x "$BOOT_JDK/bin/java"; then
23446        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23448        BOOT_JDK_FOUND=no
23449      else
23450        # Do we have a bin/javac?
23451        if test ! -x "$BOOT_JDK/bin/javac"; then
23452          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23454          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23455$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23456          BOOT_JDK_FOUND=no
23457        else
23458          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23459          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23460
23461          # Extra M4 quote needed to protect [] in grep expression.
23462          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23463          if test "x$FOUND_CORRECT_VERSION" = x; then
23464            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23466            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23467$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23468            BOOT_JDK_FOUND=no
23469          else
23470            # We're done! :-)
23471            BOOT_JDK_FOUND=yes
23472
23473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23474
23475  # Input might be given as Windows format, start by converting to
23476  # unix format.
23477  path="$BOOT_JDK"
23478  new_path=`$CYGPATH -u "$path"`
23479
23480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23483  # "foo.exe" is OK but "foo" is an error.
23484  #
23485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23486  # It is also a way to make sure we got the proper file name for the real test later on.
23487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23488  if test "x$test_shortpath" = x; then
23489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23492  fi
23493
23494  # Call helper function which possibly converts this using DOS-style short mode.
23495  # If so, the updated path is stored in $new_path.
23496
23497  input_path="$new_path"
23498  # Check if we need to convert this using DOS-style short mode. If the path
23499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23500  # take no chances and rewrite it.
23501  # Note: m4 eats our [], so we need to use [ and ] instead.
23502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23503  if test "x$has_forbidden_chars" != x; then
23504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23508      # Going to short mode and back again did indeed matter. Since short mode is
23509      # case insensitive, let's make it lowercase to improve readability.
23510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23511      # Now convert it back to Unix-stile (cygpath)
23512      input_path=`$CYGPATH -u "$shortmode_path"`
23513      new_path="$input_path"
23514    fi
23515  fi
23516
23517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23518  if test "x$test_cygdrive_prefix" = x; then
23519    # As a simple fix, exclude /usr/bin since it's not a real path.
23520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23522      # a path prefixed by /cygdrive for fixpath to work.
23523      new_path="$CYGWIN_ROOT_PATH$input_path"
23524    fi
23525  fi
23526
23527
23528  if test "x$path" != "x$new_path"; then
23529    BOOT_JDK="$new_path"
23530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23532  fi
23533
23534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23535
23536  path="$BOOT_JDK"
23537  has_colon=`$ECHO $path | $GREP ^.:`
23538  new_path="$path"
23539  if test "x$has_colon" = x; then
23540    # Not in mixed or Windows style, start by that.
23541    new_path=`cmd //c echo $path`
23542  fi
23543
23544
23545  input_path="$new_path"
23546  # Check if we need to convert this using DOS-style short mode. If the path
23547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23548  # take no chances and rewrite it.
23549  # Note: m4 eats our [], so we need to use [ and ] instead.
23550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23551  if test "x$has_forbidden_chars" != x; then
23552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23554  fi
23555
23556
23557  windows_path="$new_path"
23558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23559    unix_path=`$CYGPATH -u "$windows_path"`
23560    new_path="$unix_path"
23561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23563    new_path="$unix_path"
23564  fi
23565
23566  if test "x$path" != "x$new_path"; then
23567    BOOT_JDK="$new_path"
23568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23570  fi
23571
23572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23574
23575  else
23576    # We're on a unix platform. Hooray! :)
23577    path="$BOOT_JDK"
23578    has_space=`$ECHO "$path" | $GREP " "`
23579    if test "x$has_space" != x; then
23580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23582      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23583    fi
23584
23585    # Use eval to expand a potential ~
23586    eval path="$path"
23587    if test ! -f "$path" && test ! -d "$path"; then
23588      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23589    fi
23590
23591    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23592  fi
23593
23594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23595$as_echo_n "checking for Boot JDK... " >&6; }
23596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23597$as_echo "$BOOT_JDK" >&6; }
23598            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23599$as_echo_n "checking Boot JDK version... " >&6; }
23600            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23602$as_echo "$BOOT_JDK_VERSION" >&6; }
23603          fi # end check jdk version
23604        fi # end check javac
23605      fi # end check java
23606    fi # end check boot jdk found
23607  fi
23608
23609
23610  if test "x$BOOT_JDK_FOUND" = xno; then
23611    # Now execute the test
23612
23613  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23614  BOOT_JDK_SUFFIX=""
23615  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23616  if test "x$ALL_JDKS_FOUND" != x; then
23617    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23618
23619  if test "x$BOOT_JDK_FOUND" = xno; then
23620    # Now execute the test
23621
23622        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23623        if test -d "$BOOT_JDK"; then
23624          BOOT_JDK_FOUND=maybe
23625          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23626$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23627        fi
23628
23629
23630    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23631    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23632      # Do we have a bin/java?
23633      if test ! -x "$BOOT_JDK/bin/java"; then
23634        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23636        BOOT_JDK_FOUND=no
23637      else
23638        # Do we have a bin/javac?
23639        if test ! -x "$BOOT_JDK/bin/javac"; then
23640          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23642          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23643$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23644          BOOT_JDK_FOUND=no
23645        else
23646          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23647          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23648
23649          # Extra M4 quote needed to protect [] in grep expression.
23650          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23651          if test "x$FOUND_CORRECT_VERSION" = x; then
23652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23654            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23655$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23656            BOOT_JDK_FOUND=no
23657          else
23658            # We're done! :-)
23659            BOOT_JDK_FOUND=yes
23660
23661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23662
23663  # Input might be given as Windows format, start by converting to
23664  # unix format.
23665  path="$BOOT_JDK"
23666  new_path=`$CYGPATH -u "$path"`
23667
23668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23671  # "foo.exe" is OK but "foo" is an error.
23672  #
23673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23674  # It is also a way to make sure we got the proper file name for the real test later on.
23675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23676  if test "x$test_shortpath" = x; then
23677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23679    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23680  fi
23681
23682  # Call helper function which possibly converts this using DOS-style short mode.
23683  # If so, the updated path is stored in $new_path.
23684
23685  input_path="$new_path"
23686  # Check if we need to convert this using DOS-style short mode. If the path
23687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23688  # take no chances and rewrite it.
23689  # Note: m4 eats our [], so we need to use [ and ] instead.
23690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23691  if test "x$has_forbidden_chars" != x; then
23692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23696      # Going to short mode and back again did indeed matter. Since short mode is
23697      # case insensitive, let's make it lowercase to improve readability.
23698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23699      # Now convert it back to Unix-stile (cygpath)
23700      input_path=`$CYGPATH -u "$shortmode_path"`
23701      new_path="$input_path"
23702    fi
23703  fi
23704
23705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23706  if test "x$test_cygdrive_prefix" = x; then
23707    # As a simple fix, exclude /usr/bin since it's not a real path.
23708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23710      # a path prefixed by /cygdrive for fixpath to work.
23711      new_path="$CYGWIN_ROOT_PATH$input_path"
23712    fi
23713  fi
23714
23715
23716  if test "x$path" != "x$new_path"; then
23717    BOOT_JDK="$new_path"
23718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23719$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23720  fi
23721
23722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23723
23724  path="$BOOT_JDK"
23725  has_colon=`$ECHO $path | $GREP ^.:`
23726  new_path="$path"
23727  if test "x$has_colon" = x; then
23728    # Not in mixed or Windows style, start by that.
23729    new_path=`cmd //c echo $path`
23730  fi
23731
23732
23733  input_path="$new_path"
23734  # Check if we need to convert this using DOS-style short mode. If the path
23735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23736  # take no chances and rewrite it.
23737  # Note: m4 eats our [], so we need to use [ and ] instead.
23738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23739  if test "x$has_forbidden_chars" != x; then
23740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23742  fi
23743
23744
23745  windows_path="$new_path"
23746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23747    unix_path=`$CYGPATH -u "$windows_path"`
23748    new_path="$unix_path"
23749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23751    new_path="$unix_path"
23752  fi
23753
23754  if test "x$path" != "x$new_path"; then
23755    BOOT_JDK="$new_path"
23756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23758  fi
23759
23760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23762
23763  else
23764    # We're on a unix platform. Hooray! :)
23765    path="$BOOT_JDK"
23766    has_space=`$ECHO "$path" | $GREP " "`
23767    if test "x$has_space" != x; then
23768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23770      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23771    fi
23772
23773    # Use eval to expand a potential ~
23774    eval path="$path"
23775    if test ! -f "$path" && test ! -d "$path"; then
23776      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23777    fi
23778
23779    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23780  fi
23781
23782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23783$as_echo_n "checking for Boot JDK... " >&6; }
23784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23785$as_echo "$BOOT_JDK" >&6; }
23786            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23787$as_echo_n "checking Boot JDK version... " >&6; }
23788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23790$as_echo "$BOOT_JDK_VERSION" >&6; }
23791          fi # end check jdk version
23792        fi # end check javac
23793      fi # end check java
23794    fi # end check boot jdk found
23795  fi
23796
23797    done
23798  fi
23799
23800
23801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23803      # Do we have a bin/java?
23804      if test ! -x "$BOOT_JDK/bin/java"; then
23805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23807        BOOT_JDK_FOUND=no
23808      else
23809        # Do we have a bin/javac?
23810        if test ! -x "$BOOT_JDK/bin/javac"; then
23811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23815          BOOT_JDK_FOUND=no
23816        else
23817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23819
23820          # Extra M4 quote needed to protect [] in grep expression.
23821          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23822          if test "x$FOUND_CORRECT_VERSION" = x; then
23823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23827            BOOT_JDK_FOUND=no
23828          else
23829            # We're done! :-)
23830            BOOT_JDK_FOUND=yes
23831
23832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23833
23834  # Input might be given as Windows format, start by converting to
23835  # unix format.
23836  path="$BOOT_JDK"
23837  new_path=`$CYGPATH -u "$path"`
23838
23839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23842  # "foo.exe" is OK but "foo" is an error.
23843  #
23844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23845  # It is also a way to make sure we got the proper file name for the real test later on.
23846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23847  if test "x$test_shortpath" = x; then
23848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23851  fi
23852
23853  # Call helper function which possibly converts this using DOS-style short mode.
23854  # If so, the updated path is stored in $new_path.
23855
23856  input_path="$new_path"
23857  # Check if we need to convert this using DOS-style short mode. If the path
23858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23859  # take no chances and rewrite it.
23860  # Note: m4 eats our [], so we need to use [ and ] instead.
23861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23862  if test "x$has_forbidden_chars" != x; then
23863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23867      # Going to short mode and back again did indeed matter. Since short mode is
23868      # case insensitive, let's make it lowercase to improve readability.
23869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23870      # Now convert it back to Unix-stile (cygpath)
23871      input_path=`$CYGPATH -u "$shortmode_path"`
23872      new_path="$input_path"
23873    fi
23874  fi
23875
23876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23877  if test "x$test_cygdrive_prefix" = x; then
23878    # As a simple fix, exclude /usr/bin since it's not a real path.
23879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23881      # a path prefixed by /cygdrive for fixpath to work.
23882      new_path="$CYGWIN_ROOT_PATH$input_path"
23883    fi
23884  fi
23885
23886
23887  if test "x$path" != "x$new_path"; then
23888    BOOT_JDK="$new_path"
23889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23891  fi
23892
23893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23894
23895  path="$BOOT_JDK"
23896  has_colon=`$ECHO $path | $GREP ^.:`
23897  new_path="$path"
23898  if test "x$has_colon" = x; then
23899    # Not in mixed or Windows style, start by that.
23900    new_path=`cmd //c echo $path`
23901  fi
23902
23903
23904  input_path="$new_path"
23905  # Check if we need to convert this using DOS-style short mode. If the path
23906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23907  # take no chances and rewrite it.
23908  # Note: m4 eats our [], so we need to use [ and ] instead.
23909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23910  if test "x$has_forbidden_chars" != x; then
23911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23913  fi
23914
23915
23916  windows_path="$new_path"
23917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23918    unix_path=`$CYGPATH -u "$windows_path"`
23919    new_path="$unix_path"
23920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23922    new_path="$unix_path"
23923  fi
23924
23925  if test "x$path" != "x$new_path"; then
23926    BOOT_JDK="$new_path"
23927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23929  fi
23930
23931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23933
23934  else
23935    # We're on a unix platform. Hooray! :)
23936    path="$BOOT_JDK"
23937    has_space=`$ECHO "$path" | $GREP " "`
23938    if test "x$has_space" != x; then
23939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23941      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23942    fi
23943
23944    # Use eval to expand a potential ~
23945    eval path="$path"
23946    if test ! -f "$path" && test ! -d "$path"; then
23947      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23948    fi
23949
23950    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23951  fi
23952
23953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23954$as_echo_n "checking for Boot JDK... " >&6; }
23955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23956$as_echo "$BOOT_JDK" >&6; }
23957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23958$as_echo_n "checking Boot JDK version... " >&6; }
23959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23961$as_echo "$BOOT_JDK_VERSION" >&6; }
23962          fi # end check jdk version
23963        fi # end check javac
23964      fi # end check java
23965    fi # end check boot jdk found
23966  fi
23967
23968  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23969
23970  if test "x$BOOT_JDK_FOUND" = xno; then
23971    # Now execute the test
23972
23973  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23974  BOOT_JDK_SUFFIX="/Contents/Home"
23975  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23976  if test "x$ALL_JDKS_FOUND" != x; then
23977    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23978
23979  if test "x$BOOT_JDK_FOUND" = xno; then
23980    # Now execute the test
23981
23982        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23983        if test -d "$BOOT_JDK"; then
23984          BOOT_JDK_FOUND=maybe
23985          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23986$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23987        fi
23988
23989
23990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23992      # Do we have a bin/java?
23993      if test ! -x "$BOOT_JDK/bin/java"; then
23994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23996        BOOT_JDK_FOUND=no
23997      else
23998        # Do we have a bin/javac?
23999        if test ! -x "$BOOT_JDK/bin/javac"; then
24000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24004          BOOT_JDK_FOUND=no
24005        else
24006          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24007          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24008
24009          # Extra M4 quote needed to protect [] in grep expression.
24010          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24011          if test "x$FOUND_CORRECT_VERSION" = x; then
24012            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24014            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24015$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24016            BOOT_JDK_FOUND=no
24017          else
24018            # We're done! :-)
24019            BOOT_JDK_FOUND=yes
24020
24021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24022
24023  # Input might be given as Windows format, start by converting to
24024  # unix format.
24025  path="$BOOT_JDK"
24026  new_path=`$CYGPATH -u "$path"`
24027
24028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24031  # "foo.exe" is OK but "foo" is an error.
24032  #
24033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24034  # It is also a way to make sure we got the proper file name for the real test later on.
24035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24036  if test "x$test_shortpath" = x; then
24037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24040  fi
24041
24042  # Call helper function which possibly converts this using DOS-style short mode.
24043  # If so, the updated path is stored in $new_path.
24044
24045  input_path="$new_path"
24046  # Check if we need to convert this using DOS-style short mode. If the path
24047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24048  # take no chances and rewrite it.
24049  # Note: m4 eats our [], so we need to use [ and ] instead.
24050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24051  if test "x$has_forbidden_chars" != x; then
24052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24056      # Going to short mode and back again did indeed matter. Since short mode is
24057      # case insensitive, let's make it lowercase to improve readability.
24058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24059      # Now convert it back to Unix-stile (cygpath)
24060      input_path=`$CYGPATH -u "$shortmode_path"`
24061      new_path="$input_path"
24062    fi
24063  fi
24064
24065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24066  if test "x$test_cygdrive_prefix" = x; then
24067    # As a simple fix, exclude /usr/bin since it's not a real path.
24068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24070      # a path prefixed by /cygdrive for fixpath to work.
24071      new_path="$CYGWIN_ROOT_PATH$input_path"
24072    fi
24073  fi
24074
24075
24076  if test "x$path" != "x$new_path"; then
24077    BOOT_JDK="$new_path"
24078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24080  fi
24081
24082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24083
24084  path="$BOOT_JDK"
24085  has_colon=`$ECHO $path | $GREP ^.:`
24086  new_path="$path"
24087  if test "x$has_colon" = x; then
24088    # Not in mixed or Windows style, start by that.
24089    new_path=`cmd //c echo $path`
24090  fi
24091
24092
24093  input_path="$new_path"
24094  # Check if we need to convert this using DOS-style short mode. If the path
24095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24096  # take no chances and rewrite it.
24097  # Note: m4 eats our [], so we need to use [ and ] instead.
24098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24099  if test "x$has_forbidden_chars" != x; then
24100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24102  fi
24103
24104
24105  windows_path="$new_path"
24106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24107    unix_path=`$CYGPATH -u "$windows_path"`
24108    new_path="$unix_path"
24109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24111    new_path="$unix_path"
24112  fi
24113
24114  if test "x$path" != "x$new_path"; then
24115    BOOT_JDK="$new_path"
24116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24118  fi
24119
24120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24122
24123  else
24124    # We're on a unix platform. Hooray! :)
24125    path="$BOOT_JDK"
24126    has_space=`$ECHO "$path" | $GREP " "`
24127    if test "x$has_space" != x; then
24128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24130      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24131    fi
24132
24133    # Use eval to expand a potential ~
24134    eval path="$path"
24135    if test ! -f "$path" && test ! -d "$path"; then
24136      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24137    fi
24138
24139    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24140  fi
24141
24142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24143$as_echo_n "checking for Boot JDK... " >&6; }
24144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24145$as_echo "$BOOT_JDK" >&6; }
24146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24147$as_echo_n "checking Boot JDK version... " >&6; }
24148            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24150$as_echo "$BOOT_JDK_VERSION" >&6; }
24151          fi # end check jdk version
24152        fi # end check javac
24153      fi # end check java
24154    fi # end check boot jdk found
24155  fi
24156
24157    done
24158  fi
24159
24160
24161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24163      # Do we have a bin/java?
24164      if test ! -x "$BOOT_JDK/bin/java"; then
24165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24167        BOOT_JDK_FOUND=no
24168      else
24169        # Do we have a bin/javac?
24170        if test ! -x "$BOOT_JDK/bin/javac"; then
24171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24175          BOOT_JDK_FOUND=no
24176        else
24177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24179
24180          # Extra M4 quote needed to protect [] in grep expression.
24181          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24182          if test "x$FOUND_CORRECT_VERSION" = x; then
24183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24187            BOOT_JDK_FOUND=no
24188          else
24189            # We're done! :-)
24190            BOOT_JDK_FOUND=yes
24191
24192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24193
24194  # Input might be given as Windows format, start by converting to
24195  # unix format.
24196  path="$BOOT_JDK"
24197  new_path=`$CYGPATH -u "$path"`
24198
24199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24202  # "foo.exe" is OK but "foo" is an error.
24203  #
24204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24205  # It is also a way to make sure we got the proper file name for the real test later on.
24206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24207  if test "x$test_shortpath" = x; then
24208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24210    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24211  fi
24212
24213  # Call helper function which possibly converts this using DOS-style short mode.
24214  # If so, the updated path is stored in $new_path.
24215
24216  input_path="$new_path"
24217  # Check if we need to convert this using DOS-style short mode. If the path
24218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24219  # take no chances and rewrite it.
24220  # Note: m4 eats our [], so we need to use [ and ] instead.
24221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24222  if test "x$has_forbidden_chars" != x; then
24223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24227      # Going to short mode and back again did indeed matter. Since short mode is
24228      # case insensitive, let's make it lowercase to improve readability.
24229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24230      # Now convert it back to Unix-stile (cygpath)
24231      input_path=`$CYGPATH -u "$shortmode_path"`
24232      new_path="$input_path"
24233    fi
24234  fi
24235
24236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24237  if test "x$test_cygdrive_prefix" = x; then
24238    # As a simple fix, exclude /usr/bin since it's not a real path.
24239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24241      # a path prefixed by /cygdrive for fixpath to work.
24242      new_path="$CYGWIN_ROOT_PATH$input_path"
24243    fi
24244  fi
24245
24246
24247  if test "x$path" != "x$new_path"; then
24248    BOOT_JDK="$new_path"
24249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24251  fi
24252
24253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24254
24255  path="$BOOT_JDK"
24256  has_colon=`$ECHO $path | $GREP ^.:`
24257  new_path="$path"
24258  if test "x$has_colon" = x; then
24259    # Not in mixed or Windows style, start by that.
24260    new_path=`cmd //c echo $path`
24261  fi
24262
24263
24264  input_path="$new_path"
24265  # Check if we need to convert this using DOS-style short mode. If the path
24266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24267  # take no chances and rewrite it.
24268  # Note: m4 eats our [], so we need to use [ and ] instead.
24269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24270  if test "x$has_forbidden_chars" != x; then
24271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24273  fi
24274
24275
24276  windows_path="$new_path"
24277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24278    unix_path=`$CYGPATH -u "$windows_path"`
24279    new_path="$unix_path"
24280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24282    new_path="$unix_path"
24283  fi
24284
24285  if test "x$path" != "x$new_path"; then
24286    BOOT_JDK="$new_path"
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24289  fi
24290
24291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24293
24294  else
24295    # We're on a unix platform. Hooray! :)
24296    path="$BOOT_JDK"
24297    has_space=`$ECHO "$path" | $GREP " "`
24298    if test "x$has_space" != x; then
24299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24301      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24302    fi
24303
24304    # Use eval to expand a potential ~
24305    eval path="$path"
24306    if test ! -f "$path" && test ! -d "$path"; then
24307      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24308    fi
24309
24310    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24311  fi
24312
24313            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24314$as_echo_n "checking for Boot JDK... " >&6; }
24315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24316$as_echo "$BOOT_JDK" >&6; }
24317            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24318$as_echo_n "checking Boot JDK version... " >&6; }
24319            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24321$as_echo "$BOOT_JDK_VERSION" >&6; }
24322          fi # end check jdk version
24323        fi # end check javac
24324      fi # end check java
24325    fi # end check boot jdk found
24326  fi
24327
24328
24329  if test "x$BOOT_JDK_FOUND" = xno; then
24330    # Now execute the test
24331
24332  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24333  BOOT_JDK_SUFFIX="/Contents/Home"
24334  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24335  if test "x$ALL_JDKS_FOUND" != x; then
24336    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24337
24338  if test "x$BOOT_JDK_FOUND" = xno; then
24339    # Now execute the test
24340
24341        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24342        if test -d "$BOOT_JDK"; then
24343          BOOT_JDK_FOUND=maybe
24344          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24345$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24346        fi
24347
24348
24349    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24350    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24351      # Do we have a bin/java?
24352      if test ! -x "$BOOT_JDK/bin/java"; then
24353        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24355        BOOT_JDK_FOUND=no
24356      else
24357        # Do we have a bin/javac?
24358        if test ! -x "$BOOT_JDK/bin/javac"; then
24359          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24361          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24362$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24363          BOOT_JDK_FOUND=no
24364        else
24365          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24366          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24367
24368          # Extra M4 quote needed to protect [] in grep expression.
24369          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24370          if test "x$FOUND_CORRECT_VERSION" = x; then
24371            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24373            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24374$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24375            BOOT_JDK_FOUND=no
24376          else
24377            # We're done! :-)
24378            BOOT_JDK_FOUND=yes
24379
24380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24381
24382  # Input might be given as Windows format, start by converting to
24383  # unix format.
24384  path="$BOOT_JDK"
24385  new_path=`$CYGPATH -u "$path"`
24386
24387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24390  # "foo.exe" is OK but "foo" is an error.
24391  #
24392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24393  # It is also a way to make sure we got the proper file name for the real test later on.
24394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24395  if test "x$test_shortpath" = x; then
24396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24397$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24398    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24399  fi
24400
24401  # Call helper function which possibly converts this using DOS-style short mode.
24402  # If so, the updated path is stored in $new_path.
24403
24404  input_path="$new_path"
24405  # Check if we need to convert this using DOS-style short mode. If the path
24406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24407  # take no chances and rewrite it.
24408  # Note: m4 eats our [], so we need to use [ and ] instead.
24409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24410  if test "x$has_forbidden_chars" != x; then
24411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24415      # Going to short mode and back again did indeed matter. Since short mode is
24416      # case insensitive, let's make it lowercase to improve readability.
24417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24418      # Now convert it back to Unix-stile (cygpath)
24419      input_path=`$CYGPATH -u "$shortmode_path"`
24420      new_path="$input_path"
24421    fi
24422  fi
24423
24424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24425  if test "x$test_cygdrive_prefix" = x; then
24426    # As a simple fix, exclude /usr/bin since it's not a real path.
24427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24429      # a path prefixed by /cygdrive for fixpath to work.
24430      new_path="$CYGWIN_ROOT_PATH$input_path"
24431    fi
24432  fi
24433
24434
24435  if test "x$path" != "x$new_path"; then
24436    BOOT_JDK="$new_path"
24437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24439  fi
24440
24441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24442
24443  path="$BOOT_JDK"
24444  has_colon=`$ECHO $path | $GREP ^.:`
24445  new_path="$path"
24446  if test "x$has_colon" = x; then
24447    # Not in mixed or Windows style, start by that.
24448    new_path=`cmd //c echo $path`
24449  fi
24450
24451
24452  input_path="$new_path"
24453  # Check if we need to convert this using DOS-style short mode. If the path
24454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24455  # take no chances and rewrite it.
24456  # Note: m4 eats our [], so we need to use [ and ] instead.
24457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24458  if test "x$has_forbidden_chars" != x; then
24459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24461  fi
24462
24463
24464  windows_path="$new_path"
24465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24466    unix_path=`$CYGPATH -u "$windows_path"`
24467    new_path="$unix_path"
24468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24470    new_path="$unix_path"
24471  fi
24472
24473  if test "x$path" != "x$new_path"; then
24474    BOOT_JDK="$new_path"
24475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24476$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24477  fi
24478
24479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24481
24482  else
24483    # We're on a unix platform. Hooray! :)
24484    path="$BOOT_JDK"
24485    has_space=`$ECHO "$path" | $GREP " "`
24486    if test "x$has_space" != x; then
24487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24489      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24490    fi
24491
24492    # Use eval to expand a potential ~
24493    eval path="$path"
24494    if test ! -f "$path" && test ! -d "$path"; then
24495      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24496    fi
24497
24498    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24499  fi
24500
24501            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24502$as_echo_n "checking for Boot JDK... " >&6; }
24503            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24504$as_echo "$BOOT_JDK" >&6; }
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24506$as_echo_n "checking Boot JDK version... " >&6; }
24507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24509$as_echo "$BOOT_JDK_VERSION" >&6; }
24510          fi # end check jdk version
24511        fi # end check javac
24512      fi # end check java
24513    fi # end check boot jdk found
24514  fi
24515
24516    done
24517  fi
24518
24519
24520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24522      # Do we have a bin/java?
24523      if test ! -x "$BOOT_JDK/bin/java"; then
24524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24526        BOOT_JDK_FOUND=no
24527      else
24528        # Do we have a bin/javac?
24529        if test ! -x "$BOOT_JDK/bin/javac"; then
24530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24534          BOOT_JDK_FOUND=no
24535        else
24536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24538
24539          # Extra M4 quote needed to protect [] in grep expression.
24540          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24541          if test "x$FOUND_CORRECT_VERSION" = x; then
24542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24546            BOOT_JDK_FOUND=no
24547          else
24548            # We're done! :-)
24549            BOOT_JDK_FOUND=yes
24550
24551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24552
24553  # Input might be given as Windows format, start by converting to
24554  # unix format.
24555  path="$BOOT_JDK"
24556  new_path=`$CYGPATH -u "$path"`
24557
24558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24561  # "foo.exe" is OK but "foo" is an error.
24562  #
24563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24564  # It is also a way to make sure we got the proper file name for the real test later on.
24565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24566  if test "x$test_shortpath" = x; then
24567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24570  fi
24571
24572  # Call helper function which possibly converts this using DOS-style short mode.
24573  # If so, the updated path is stored in $new_path.
24574
24575  input_path="$new_path"
24576  # Check if we need to convert this using DOS-style short mode. If the path
24577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24578  # take no chances and rewrite it.
24579  # Note: m4 eats our [], so we need to use [ and ] instead.
24580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24581  if test "x$has_forbidden_chars" != x; then
24582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24586      # Going to short mode and back again did indeed matter. Since short mode is
24587      # case insensitive, let's make it lowercase to improve readability.
24588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24589      # Now convert it back to Unix-stile (cygpath)
24590      input_path=`$CYGPATH -u "$shortmode_path"`
24591      new_path="$input_path"
24592    fi
24593  fi
24594
24595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24596  if test "x$test_cygdrive_prefix" = x; then
24597    # As a simple fix, exclude /usr/bin since it's not a real path.
24598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24600      # a path prefixed by /cygdrive for fixpath to work.
24601      new_path="$CYGWIN_ROOT_PATH$input_path"
24602    fi
24603  fi
24604
24605
24606  if test "x$path" != "x$new_path"; then
24607    BOOT_JDK="$new_path"
24608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24610  fi
24611
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613
24614  path="$BOOT_JDK"
24615  has_colon=`$ECHO $path | $GREP ^.:`
24616  new_path="$path"
24617  if test "x$has_colon" = x; then
24618    # Not in mixed or Windows style, start by that.
24619    new_path=`cmd //c echo $path`
24620  fi
24621
24622
24623  input_path="$new_path"
24624  # Check if we need to convert this using DOS-style short mode. If the path
24625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24626  # take no chances and rewrite it.
24627  # Note: m4 eats our [], so we need to use [ and ] instead.
24628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24629  if test "x$has_forbidden_chars" != x; then
24630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24632  fi
24633
24634
24635  windows_path="$new_path"
24636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24637    unix_path=`$CYGPATH -u "$windows_path"`
24638    new_path="$unix_path"
24639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24641    new_path="$unix_path"
24642  fi
24643
24644  if test "x$path" != "x$new_path"; then
24645    BOOT_JDK="$new_path"
24646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24648  fi
24649
24650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24652
24653  else
24654    # We're on a unix platform. Hooray! :)
24655    path="$BOOT_JDK"
24656    has_space=`$ECHO "$path" | $GREP " "`
24657    if test "x$has_space" != x; then
24658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24660      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24661    fi
24662
24663    # Use eval to expand a potential ~
24664    eval path="$path"
24665    if test ! -f "$path" && test ! -d "$path"; then
24666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24667    fi
24668
24669    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24670  fi
24671
24672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24673$as_echo_n "checking for Boot JDK... " >&6; }
24674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24675$as_echo "$BOOT_JDK" >&6; }
24676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24677$as_echo_n "checking Boot JDK version... " >&6; }
24678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24680$as_echo "$BOOT_JDK_VERSION" >&6; }
24681          fi # end check jdk version
24682        fi # end check javac
24683      fi # end check java
24684    fi # end check boot jdk found
24685  fi
24686
24687  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24688
24689  if test "x$BOOT_JDK_FOUND" = xno; then
24690    # Now execute the test
24691
24692  BOOT_JDK_PREFIX="/usr/lib/jvm"
24693  BOOT_JDK_SUFFIX=""
24694  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24695  if test "x$ALL_JDKS_FOUND" != x; then
24696    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24697
24698  if test "x$BOOT_JDK_FOUND" = xno; then
24699    # Now execute the test
24700
24701        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24702        if test -d "$BOOT_JDK"; then
24703          BOOT_JDK_FOUND=maybe
24704          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24705$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24706        fi
24707
24708
24709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24711      # Do we have a bin/java?
24712      if test ! -x "$BOOT_JDK/bin/java"; then
24713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24715        BOOT_JDK_FOUND=no
24716      else
24717        # Do we have a bin/javac?
24718        if test ! -x "$BOOT_JDK/bin/javac"; then
24719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24723          BOOT_JDK_FOUND=no
24724        else
24725          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24726          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24727
24728          # Extra M4 quote needed to protect [] in grep expression.
24729          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24730          if test "x$FOUND_CORRECT_VERSION" = x; then
24731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24733            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24734$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24735            BOOT_JDK_FOUND=no
24736          else
24737            # We're done! :-)
24738            BOOT_JDK_FOUND=yes
24739
24740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24741
24742  # Input might be given as Windows format, start by converting to
24743  # unix format.
24744  path="$BOOT_JDK"
24745  new_path=`$CYGPATH -u "$path"`
24746
24747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24750  # "foo.exe" is OK but "foo" is an error.
24751  #
24752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24753  # It is also a way to make sure we got the proper file name for the real test later on.
24754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24755  if test "x$test_shortpath" = x; then
24756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24759  fi
24760
24761  # Call helper function which possibly converts this using DOS-style short mode.
24762  # If so, the updated path is stored in $new_path.
24763
24764  input_path="$new_path"
24765  # Check if we need to convert this using DOS-style short mode. If the path
24766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24767  # take no chances and rewrite it.
24768  # Note: m4 eats our [], so we need to use [ and ] instead.
24769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24770  if test "x$has_forbidden_chars" != x; then
24771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24775      # Going to short mode and back again did indeed matter. Since short mode is
24776      # case insensitive, let's make it lowercase to improve readability.
24777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24778      # Now convert it back to Unix-stile (cygpath)
24779      input_path=`$CYGPATH -u "$shortmode_path"`
24780      new_path="$input_path"
24781    fi
24782  fi
24783
24784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24785  if test "x$test_cygdrive_prefix" = x; then
24786    # As a simple fix, exclude /usr/bin since it's not a real path.
24787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24789      # a path prefixed by /cygdrive for fixpath to work.
24790      new_path="$CYGWIN_ROOT_PATH$input_path"
24791    fi
24792  fi
24793
24794
24795  if test "x$path" != "x$new_path"; then
24796    BOOT_JDK="$new_path"
24797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24799  fi
24800
24801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24802
24803  path="$BOOT_JDK"
24804  has_colon=`$ECHO $path | $GREP ^.:`
24805  new_path="$path"
24806  if test "x$has_colon" = x; then
24807    # Not in mixed or Windows style, start by that.
24808    new_path=`cmd //c echo $path`
24809  fi
24810
24811
24812  input_path="$new_path"
24813  # Check if we need to convert this using DOS-style short mode. If the path
24814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24815  # take no chances and rewrite it.
24816  # Note: m4 eats our [], so we need to use [ and ] instead.
24817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24818  if test "x$has_forbidden_chars" != x; then
24819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24821  fi
24822
24823
24824  windows_path="$new_path"
24825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24826    unix_path=`$CYGPATH -u "$windows_path"`
24827    new_path="$unix_path"
24828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24830    new_path="$unix_path"
24831  fi
24832
24833  if test "x$path" != "x$new_path"; then
24834    BOOT_JDK="$new_path"
24835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24837  fi
24838
24839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24841
24842  else
24843    # We're on a unix platform. Hooray! :)
24844    path="$BOOT_JDK"
24845    has_space=`$ECHO "$path" | $GREP " "`
24846    if test "x$has_space" != x; then
24847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24849      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24850    fi
24851
24852    # Use eval to expand a potential ~
24853    eval path="$path"
24854    if test ! -f "$path" && test ! -d "$path"; then
24855      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24856    fi
24857
24858    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24859  fi
24860
24861            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24862$as_echo_n "checking for Boot JDK... " >&6; }
24863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24864$as_echo "$BOOT_JDK" >&6; }
24865            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24866$as_echo_n "checking Boot JDK version... " >&6; }
24867            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24869$as_echo "$BOOT_JDK_VERSION" >&6; }
24870          fi # end check jdk version
24871        fi # end check javac
24872      fi # end check java
24873    fi # end check boot jdk found
24874  fi
24875
24876    done
24877  fi
24878
24879
24880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24882      # Do we have a bin/java?
24883      if test ! -x "$BOOT_JDK/bin/java"; then
24884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24886        BOOT_JDK_FOUND=no
24887      else
24888        # Do we have a bin/javac?
24889        if test ! -x "$BOOT_JDK/bin/javac"; then
24890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24894          BOOT_JDK_FOUND=no
24895        else
24896          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24897          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24898
24899          # Extra M4 quote needed to protect [] in grep expression.
24900          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24901          if test "x$FOUND_CORRECT_VERSION" = x; then
24902            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24904            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24906            BOOT_JDK_FOUND=no
24907          else
24908            # We're done! :-)
24909            BOOT_JDK_FOUND=yes
24910
24911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912
24913  # Input might be given as Windows format, start by converting to
24914  # unix format.
24915  path="$BOOT_JDK"
24916  new_path=`$CYGPATH -u "$path"`
24917
24918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24921  # "foo.exe" is OK but "foo" is an error.
24922  #
24923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24924  # It is also a way to make sure we got the proper file name for the real test later on.
24925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24926  if test "x$test_shortpath" = x; then
24927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24930  fi
24931
24932  # Call helper function which possibly converts this using DOS-style short mode.
24933  # If so, the updated path is stored in $new_path.
24934
24935  input_path="$new_path"
24936  # Check if we need to convert this using DOS-style short mode. If the path
24937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24938  # take no chances and rewrite it.
24939  # Note: m4 eats our [], so we need to use [ and ] instead.
24940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24941  if test "x$has_forbidden_chars" != x; then
24942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24946      # Going to short mode and back again did indeed matter. Since short mode is
24947      # case insensitive, let's make it lowercase to improve readability.
24948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24949      # Now convert it back to Unix-stile (cygpath)
24950      input_path=`$CYGPATH -u "$shortmode_path"`
24951      new_path="$input_path"
24952    fi
24953  fi
24954
24955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24956  if test "x$test_cygdrive_prefix" = x; then
24957    # As a simple fix, exclude /usr/bin since it's not a real path.
24958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24960      # a path prefixed by /cygdrive for fixpath to work.
24961      new_path="$CYGWIN_ROOT_PATH$input_path"
24962    fi
24963  fi
24964
24965
24966  if test "x$path" != "x$new_path"; then
24967    BOOT_JDK="$new_path"
24968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24970  fi
24971
24972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24973
24974  path="$BOOT_JDK"
24975  has_colon=`$ECHO $path | $GREP ^.:`
24976  new_path="$path"
24977  if test "x$has_colon" = x; then
24978    # Not in mixed or Windows style, start by that.
24979    new_path=`cmd //c echo $path`
24980  fi
24981
24982
24983  input_path="$new_path"
24984  # Check if we need to convert this using DOS-style short mode. If the path
24985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24986  # take no chances and rewrite it.
24987  # Note: m4 eats our [], so we need to use [ and ] instead.
24988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24989  if test "x$has_forbidden_chars" != x; then
24990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24992  fi
24993
24994
24995  windows_path="$new_path"
24996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24997    unix_path=`$CYGPATH -u "$windows_path"`
24998    new_path="$unix_path"
24999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25001    new_path="$unix_path"
25002  fi
25003
25004  if test "x$path" != "x$new_path"; then
25005    BOOT_JDK="$new_path"
25006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25008  fi
25009
25010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25012
25013  else
25014    # We're on a unix platform. Hooray! :)
25015    path="$BOOT_JDK"
25016    has_space=`$ECHO "$path" | $GREP " "`
25017    if test "x$has_space" != x; then
25018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25021    fi
25022
25023    # Use eval to expand a potential ~
25024    eval path="$path"
25025    if test ! -f "$path" && test ! -d "$path"; then
25026      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25027    fi
25028
25029    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25030  fi
25031
25032            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25033$as_echo_n "checking for Boot JDK... " >&6; }
25034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25035$as_echo "$BOOT_JDK" >&6; }
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25037$as_echo_n "checking Boot JDK version... " >&6; }
25038            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25040$as_echo "$BOOT_JDK_VERSION" >&6; }
25041          fi # end check jdk version
25042        fi # end check javac
25043      fi # end check java
25044    fi # end check boot jdk found
25045  fi
25046
25047  fi
25048
25049
25050    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25051    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25052      # Do we have a bin/java?
25053      if test ! -x "$BOOT_JDK/bin/java"; then
25054        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25056        BOOT_JDK_FOUND=no
25057      else
25058        # Do we have a bin/javac?
25059        if test ! -x "$BOOT_JDK/bin/javac"; then
25060          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25062          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25063$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25064          BOOT_JDK_FOUND=no
25065        else
25066          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25067          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25068
25069          # Extra M4 quote needed to protect [] in grep expression.
25070          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25071          if test "x$FOUND_CORRECT_VERSION" = x; then
25072            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25074            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25075$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25076            BOOT_JDK_FOUND=no
25077          else
25078            # We're done! :-)
25079            BOOT_JDK_FOUND=yes
25080
25081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25082
25083  # Input might be given as Windows format, start by converting to
25084  # unix format.
25085  path="$BOOT_JDK"
25086  new_path=`$CYGPATH -u "$path"`
25087
25088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25091  # "foo.exe" is OK but "foo" is an error.
25092  #
25093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25094  # It is also a way to make sure we got the proper file name for the real test later on.
25095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25096  if test "x$test_shortpath" = x; then
25097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25099    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25100  fi
25101
25102  # Call helper function which possibly converts this using DOS-style short mode.
25103  # If so, the updated path is stored in $new_path.
25104
25105  input_path="$new_path"
25106  # Check if we need to convert this using DOS-style short mode. If the path
25107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25108  # take no chances and rewrite it.
25109  # Note: m4 eats our [], so we need to use [ and ] instead.
25110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25111  if test "x$has_forbidden_chars" != x; then
25112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25116      # Going to short mode and back again did indeed matter. Since short mode is
25117      # case insensitive, let's make it lowercase to improve readability.
25118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25119      # Now convert it back to Unix-stile (cygpath)
25120      input_path=`$CYGPATH -u "$shortmode_path"`
25121      new_path="$input_path"
25122    fi
25123  fi
25124
25125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25126  if test "x$test_cygdrive_prefix" = x; then
25127    # As a simple fix, exclude /usr/bin since it's not a real path.
25128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25130      # a path prefixed by /cygdrive for fixpath to work.
25131      new_path="$CYGWIN_ROOT_PATH$input_path"
25132    fi
25133  fi
25134
25135
25136  if test "x$path" != "x$new_path"; then
25137    BOOT_JDK="$new_path"
25138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25140  fi
25141
25142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25143
25144  path="$BOOT_JDK"
25145  has_colon=`$ECHO $path | $GREP ^.:`
25146  new_path="$path"
25147  if test "x$has_colon" = x; then
25148    # Not in mixed or Windows style, start by that.
25149    new_path=`cmd //c echo $path`
25150  fi
25151
25152
25153  input_path="$new_path"
25154  # Check if we need to convert this using DOS-style short mode. If the path
25155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25156  # take no chances and rewrite it.
25157  # Note: m4 eats our [], so we need to use [ and ] instead.
25158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25159  if test "x$has_forbidden_chars" != x; then
25160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25162  fi
25163
25164
25165  windows_path="$new_path"
25166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25167    unix_path=`$CYGPATH -u "$windows_path"`
25168    new_path="$unix_path"
25169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25171    new_path="$unix_path"
25172  fi
25173
25174  if test "x$path" != "x$new_path"; then
25175    BOOT_JDK="$new_path"
25176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25178  fi
25179
25180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25182
25183  else
25184    # We're on a unix platform. Hooray! :)
25185    path="$BOOT_JDK"
25186    has_space=`$ECHO "$path" | $GREP " "`
25187    if test "x$has_space" != x; then
25188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25191    fi
25192
25193    # Use eval to expand a potential ~
25194    eval path="$path"
25195    if test ! -f "$path" && test ! -d "$path"; then
25196      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25197    fi
25198
25199    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25200  fi
25201
25202            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25203$as_echo_n "checking for Boot JDK... " >&6; }
25204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25205$as_echo "$BOOT_JDK" >&6; }
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25207$as_echo_n "checking Boot JDK version... " >&6; }
25208            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25210$as_echo "$BOOT_JDK_VERSION" >&6; }
25211          fi # end check jdk version
25212        fi # end check javac
25213      fi # end check java
25214    fi # end check boot jdk found
25215  fi
25216
25217
25218  # If we haven't found anything yet, we've truly lost. Give up.
25219  if test "x$BOOT_JDK_FOUND" = xno; then
25220
25221  # Print a helpful message on how to acquire the necessary build dependency.
25222  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25223  MISSING_DEPENDENCY=openjdk
25224
25225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25226    cygwin_help $MISSING_DEPENDENCY
25227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25228    msys_help $MISSING_DEPENDENCY
25229  else
25230    PKGHANDLER_COMMAND=
25231
25232    case $PKGHANDLER in
25233      apt-get)
25234        apt_help     $MISSING_DEPENDENCY ;;
25235      yum)
25236        yum_help     $MISSING_DEPENDENCY ;;
25237      port)
25238        port_help    $MISSING_DEPENDENCY ;;
25239      pkgutil)
25240        pkgutil_help $MISSING_DEPENDENCY ;;
25241      pkgadd)
25242        pkgadd_help  $MISSING_DEPENDENCY ;;
25243    esac
25244
25245    if test "x$PKGHANDLER_COMMAND" != x; then
25246      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25247    fi
25248  fi
25249
25250    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25251$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25252    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25253$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25254    as_fn_error $? "Cannot continue" "$LINENO" 5
25255  fi
25256
25257
25258
25259  # Setup tools from the Boot JDK.
25260
25261  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25262
25263  # Publish this variable in the help.
25264
25265
25266  if test "x$JAVA" = x; then
25267    # The variable is not set by user, try to locate tool using the code snippet
25268
25269      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25270$as_echo_n "checking for java in Boot JDK... " >&6; }
25271      JAVA=$BOOT_JDK/bin/java
25272      if test ! -x $JAVA; then
25273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25274$as_echo "not found" >&6; }
25275        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25276$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25277        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25278      fi
25279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25280$as_echo "ok" >&6; }
25281
25282
25283  else
25284    # The variable is set, but is it from the command line or the environment?
25285
25286    # Try to remove the string !JAVA! from our list.
25287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25289      # If it failed, the variable was not from the command line. Ignore it,
25290      # but warn the user (except for BASH, which is always set by the calling BASH).
25291      if test "xJAVA" != xBASH; then
25292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25293$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25294      fi
25295      # Try to locate tool using the code snippet
25296
25297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25298$as_echo_n "checking for java in Boot JDK... " >&6; }
25299      JAVA=$BOOT_JDK/bin/java
25300      if test ! -x $JAVA; then
25301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25302$as_echo "not found" >&6; }
25303        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25304$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25305        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25306      fi
25307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25308$as_echo "ok" >&6; }
25309
25310
25311    else
25312      # If it succeeded, then it was overridden by the user. We will use it
25313      # for the tool.
25314
25315      # First remove it from the list of overridden variables, so we can test
25316      # for unknown variables in the end.
25317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25318
25319      # Check if the provided tool contains a complete path.
25320      tool_specified="$JAVA"
25321      tool_basename="${tool_specified##*/}"
25322      if test "x$tool_basename" = "x$tool_specified"; then
25323        # A command without a complete path is provided, search $PATH.
25324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25325$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25326        # Extract the first word of "$tool_basename", so it can be a program name with args.
25327set dummy $tool_basename; ac_word=$2
25328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25329$as_echo_n "checking for $ac_word... " >&6; }
25330if ${ac_cv_path_JAVA+:} false; then :
25331  $as_echo_n "(cached) " >&6
25332else
25333  case $JAVA in
25334  [\\/]* | ?:[\\/]*)
25335  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25336  ;;
25337  *)
25338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25339for as_dir in $PATH
25340do
25341  IFS=$as_save_IFS
25342  test -z "$as_dir" && as_dir=.
25343    for ac_exec_ext in '' $ac_executable_extensions; do
25344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25345    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25347    break 2
25348  fi
25349done
25350  done
25351IFS=$as_save_IFS
25352
25353  ;;
25354esac
25355fi
25356JAVA=$ac_cv_path_JAVA
25357if test -n "$JAVA"; then
25358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25359$as_echo "$JAVA" >&6; }
25360else
25361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25362$as_echo "no" >&6; }
25363fi
25364
25365
25366        if test "x$JAVA" = x; then
25367          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25368        fi
25369      else
25370        # Otherwise we believe it is a complete path. Use it as it is.
25371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25372$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25374$as_echo_n "checking for JAVA... " >&6; }
25375        if test ! -x "$tool_specified"; then
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25377$as_echo "not found" >&6; }
25378          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25379        fi
25380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25381$as_echo "$tool_specified" >&6; }
25382      fi
25383    fi
25384  fi
25385
25386
25387
25388  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25389
25390  # Publish this variable in the help.
25391
25392
25393  if test "x$JAVAC" = x; then
25394    # The variable is not set by user, try to locate tool using the code snippet
25395
25396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25397$as_echo_n "checking for javac in Boot JDK... " >&6; }
25398      JAVAC=$BOOT_JDK/bin/javac
25399      if test ! -x $JAVAC; then
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25401$as_echo "not found" >&6; }
25402        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25403$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25404        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25405      fi
25406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25407$as_echo "ok" >&6; }
25408
25409
25410  else
25411    # The variable is set, but is it from the command line or the environment?
25412
25413    # Try to remove the string !JAVAC! from our list.
25414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25416      # If it failed, the variable was not from the command line. Ignore it,
25417      # but warn the user (except for BASH, which is always set by the calling BASH).
25418      if test "xJAVAC" != xBASH; then
25419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25420$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25421      fi
25422      # Try to locate tool using the code snippet
25423
25424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25425$as_echo_n "checking for javac in Boot JDK... " >&6; }
25426      JAVAC=$BOOT_JDK/bin/javac
25427      if test ! -x $JAVAC; then
25428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25429$as_echo "not found" >&6; }
25430        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25431$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25432        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25433      fi
25434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25435$as_echo "ok" >&6; }
25436
25437
25438    else
25439      # If it succeeded, then it was overridden by the user. We will use it
25440      # for the tool.
25441
25442      # First remove it from the list of overridden variables, so we can test
25443      # for unknown variables in the end.
25444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25445
25446      # Check if the provided tool contains a complete path.
25447      tool_specified="$JAVAC"
25448      tool_basename="${tool_specified##*/}"
25449      if test "x$tool_basename" = "x$tool_specified"; then
25450        # A command without a complete path is provided, search $PATH.
25451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25452$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25453        # Extract the first word of "$tool_basename", so it can be a program name with args.
25454set dummy $tool_basename; ac_word=$2
25455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25456$as_echo_n "checking for $ac_word... " >&6; }
25457if ${ac_cv_path_JAVAC+:} false; then :
25458  $as_echo_n "(cached) " >&6
25459else
25460  case $JAVAC in
25461  [\\/]* | ?:[\\/]*)
25462  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25463  ;;
25464  *)
25465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25466for as_dir in $PATH
25467do
25468  IFS=$as_save_IFS
25469  test -z "$as_dir" && as_dir=.
25470    for ac_exec_ext in '' $ac_executable_extensions; do
25471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25472    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25474    break 2
25475  fi
25476done
25477  done
25478IFS=$as_save_IFS
25479
25480  ;;
25481esac
25482fi
25483JAVAC=$ac_cv_path_JAVAC
25484if test -n "$JAVAC"; then
25485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25486$as_echo "$JAVAC" >&6; }
25487else
25488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25489$as_echo "no" >&6; }
25490fi
25491
25492
25493        if test "x$JAVAC" = x; then
25494          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25495        fi
25496      else
25497        # Otherwise we believe it is a complete path. Use it as it is.
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25499$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25501$as_echo_n "checking for JAVAC... " >&6; }
25502        if test ! -x "$tool_specified"; then
25503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25504$as_echo "not found" >&6; }
25505          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25506        fi
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25508$as_echo "$tool_specified" >&6; }
25509      fi
25510    fi
25511  fi
25512
25513
25514
25515  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25516
25517  # Publish this variable in the help.
25518
25519
25520  if test "x$JAVAH" = x; then
25521    # The variable is not set by user, try to locate tool using the code snippet
25522
25523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25524$as_echo_n "checking for javah in Boot JDK... " >&6; }
25525      JAVAH=$BOOT_JDK/bin/javah
25526      if test ! -x $JAVAH; then
25527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25528$as_echo "not found" >&6; }
25529        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25530$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25531        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25532      fi
25533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25534$as_echo "ok" >&6; }
25535
25536
25537  else
25538    # The variable is set, but is it from the command line or the environment?
25539
25540    # Try to remove the string !JAVAH! from our list.
25541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25543      # If it failed, the variable was not from the command line. Ignore it,
25544      # but warn the user (except for BASH, which is always set by the calling BASH).
25545      if test "xJAVAH" != xBASH; then
25546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25547$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25548      fi
25549      # Try to locate tool using the code snippet
25550
25551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25552$as_echo_n "checking for javah in Boot JDK... " >&6; }
25553      JAVAH=$BOOT_JDK/bin/javah
25554      if test ! -x $JAVAH; then
25555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25556$as_echo "not found" >&6; }
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25558$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25559        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25560      fi
25561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25562$as_echo "ok" >&6; }
25563
25564
25565    else
25566      # If it succeeded, then it was overridden by the user. We will use it
25567      # for the tool.
25568
25569      # First remove it from the list of overridden variables, so we can test
25570      # for unknown variables in the end.
25571      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25572
25573      # Check if the provided tool contains a complete path.
25574      tool_specified="$JAVAH"
25575      tool_basename="${tool_specified##*/}"
25576      if test "x$tool_basename" = "x$tool_specified"; then
25577        # A command without a complete path is provided, search $PATH.
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25579$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25580        # Extract the first word of "$tool_basename", so it can be a program name with args.
25581set dummy $tool_basename; ac_word=$2
25582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25583$as_echo_n "checking for $ac_word... " >&6; }
25584if ${ac_cv_path_JAVAH+:} false; then :
25585  $as_echo_n "(cached) " >&6
25586else
25587  case $JAVAH in
25588  [\\/]* | ?:[\\/]*)
25589  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25590  ;;
25591  *)
25592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25593for as_dir in $PATH
25594do
25595  IFS=$as_save_IFS
25596  test -z "$as_dir" && as_dir=.
25597    for ac_exec_ext in '' $ac_executable_extensions; do
25598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25599    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25601    break 2
25602  fi
25603done
25604  done
25605IFS=$as_save_IFS
25606
25607  ;;
25608esac
25609fi
25610JAVAH=$ac_cv_path_JAVAH
25611if test -n "$JAVAH"; then
25612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25613$as_echo "$JAVAH" >&6; }
25614else
25615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25616$as_echo "no" >&6; }
25617fi
25618
25619
25620        if test "x$JAVAH" = x; then
25621          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25622        fi
25623      else
25624        # Otherwise we believe it is a complete path. Use it as it is.
25625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25626$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25627        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25628$as_echo_n "checking for JAVAH... " >&6; }
25629        if test ! -x "$tool_specified"; then
25630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25631$as_echo "not found" >&6; }
25632          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25633        fi
25634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25635$as_echo "$tool_specified" >&6; }
25636      fi
25637    fi
25638  fi
25639
25640
25641
25642  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25643
25644  # Publish this variable in the help.
25645
25646
25647  if test "x$JAR" = x; then
25648    # The variable is not set by user, try to locate tool using the code snippet
25649
25650      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25651$as_echo_n "checking for jar in Boot JDK... " >&6; }
25652      JAR=$BOOT_JDK/bin/jar
25653      if test ! -x $JAR; then
25654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25655$as_echo "not found" >&6; }
25656        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25657$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25658        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25659      fi
25660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25661$as_echo "ok" >&6; }
25662
25663
25664  else
25665    # The variable is set, but is it from the command line or the environment?
25666
25667    # Try to remove the string !JAR! from our list.
25668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25670      # If it failed, the variable was not from the command line. Ignore it,
25671      # but warn the user (except for BASH, which is always set by the calling BASH).
25672      if test "xJAR" != xBASH; then
25673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25674$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25675      fi
25676      # Try to locate tool using the code snippet
25677
25678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25679$as_echo_n "checking for jar in Boot JDK... " >&6; }
25680      JAR=$BOOT_JDK/bin/jar
25681      if test ! -x $JAR; then
25682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25683$as_echo "not found" >&6; }
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25685$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25686        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25687      fi
25688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25689$as_echo "ok" >&6; }
25690
25691
25692    else
25693      # If it succeeded, then it was overridden by the user. We will use it
25694      # for the tool.
25695
25696      # First remove it from the list of overridden variables, so we can test
25697      # for unknown variables in the end.
25698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25699
25700      # Check if the provided tool contains a complete path.
25701      tool_specified="$JAR"
25702      tool_basename="${tool_specified##*/}"
25703      if test "x$tool_basename" = "x$tool_specified"; then
25704        # A command without a complete path is provided, search $PATH.
25705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25706$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25707        # Extract the first word of "$tool_basename", so it can be a program name with args.
25708set dummy $tool_basename; ac_word=$2
25709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25710$as_echo_n "checking for $ac_word... " >&6; }
25711if ${ac_cv_path_JAR+:} false; then :
25712  $as_echo_n "(cached) " >&6
25713else
25714  case $JAR in
25715  [\\/]* | ?:[\\/]*)
25716  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25717  ;;
25718  *)
25719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25720for as_dir in $PATH
25721do
25722  IFS=$as_save_IFS
25723  test -z "$as_dir" && as_dir=.
25724    for ac_exec_ext in '' $ac_executable_extensions; do
25725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25726    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25728    break 2
25729  fi
25730done
25731  done
25732IFS=$as_save_IFS
25733
25734  ;;
25735esac
25736fi
25737JAR=$ac_cv_path_JAR
25738if test -n "$JAR"; then
25739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25740$as_echo "$JAR" >&6; }
25741else
25742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25743$as_echo "no" >&6; }
25744fi
25745
25746
25747        if test "x$JAR" = x; then
25748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25749        fi
25750      else
25751        # Otherwise we believe it is a complete path. Use it as it is.
25752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25753$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25755$as_echo_n "checking for JAR... " >&6; }
25756        if test ! -x "$tool_specified"; then
25757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25758$as_echo "not found" >&6; }
25759          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25760        fi
25761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25762$as_echo "$tool_specified" >&6; }
25763      fi
25764    fi
25765  fi
25766
25767
25768
25769  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25770
25771  # Publish this variable in the help.
25772
25773
25774  if test "x$NATIVE2ASCII" = x; then
25775    # The variable is not set by user, try to locate tool using the code snippet
25776
25777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25778$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25779      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25780      if test ! -x $NATIVE2ASCII; then
25781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25782$as_echo "not found" >&6; }
25783        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25784$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25785        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25786      fi
25787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25788$as_echo "ok" >&6; }
25789
25790
25791  else
25792    # The variable is set, but is it from the command line or the environment?
25793
25794    # Try to remove the string !NATIVE2ASCII! from our list.
25795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25797      # If it failed, the variable was not from the command line. Ignore it,
25798      # but warn the user (except for BASH, which is always set by the calling BASH).
25799      if test "xNATIVE2ASCII" != xBASH; then
25800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25801$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25802      fi
25803      # Try to locate tool using the code snippet
25804
25805      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25806$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25807      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25808      if test ! -x $NATIVE2ASCII; then
25809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25810$as_echo "not found" >&6; }
25811        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25812$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25813        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25814      fi
25815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25816$as_echo "ok" >&6; }
25817
25818
25819    else
25820      # If it succeeded, then it was overridden by the user. We will use it
25821      # for the tool.
25822
25823      # First remove it from the list of overridden variables, so we can test
25824      # for unknown variables in the end.
25825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25826
25827      # Check if the provided tool contains a complete path.
25828      tool_specified="$NATIVE2ASCII"
25829      tool_basename="${tool_specified##*/}"
25830      if test "x$tool_basename" = "x$tool_specified"; then
25831        # A command without a complete path is provided, search $PATH.
25832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25833$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25834        # Extract the first word of "$tool_basename", so it can be a program name with args.
25835set dummy $tool_basename; ac_word=$2
25836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25837$as_echo_n "checking for $ac_word... " >&6; }
25838if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25839  $as_echo_n "(cached) " >&6
25840else
25841  case $NATIVE2ASCII in
25842  [\\/]* | ?:[\\/]*)
25843  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25844  ;;
25845  *)
25846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25847for as_dir in $PATH
25848do
25849  IFS=$as_save_IFS
25850  test -z "$as_dir" && as_dir=.
25851    for ac_exec_ext in '' $ac_executable_extensions; do
25852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25853    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25855    break 2
25856  fi
25857done
25858  done
25859IFS=$as_save_IFS
25860
25861  ;;
25862esac
25863fi
25864NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25865if test -n "$NATIVE2ASCII"; then
25866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25867$as_echo "$NATIVE2ASCII" >&6; }
25868else
25869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25870$as_echo "no" >&6; }
25871fi
25872
25873
25874        if test "x$NATIVE2ASCII" = x; then
25875          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25876        fi
25877      else
25878        # Otherwise we believe it is a complete path. Use it as it is.
25879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25880$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25882$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25883        if test ! -x "$tool_specified"; then
25884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25885$as_echo "not found" >&6; }
25886          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25887        fi
25888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25889$as_echo "$tool_specified" >&6; }
25890      fi
25891    fi
25892  fi
25893
25894
25895
25896  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25897
25898  # Publish this variable in the help.
25899
25900
25901  if test "x$JARSIGNER" = x; then
25902    # The variable is not set by user, try to locate tool using the code snippet
25903
25904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25905$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25906      JARSIGNER=$BOOT_JDK/bin/jarsigner
25907      if test ! -x $JARSIGNER; then
25908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25909$as_echo "not found" >&6; }
25910        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25911$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25912        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25913      fi
25914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25915$as_echo "ok" >&6; }
25916
25917
25918  else
25919    # The variable is set, but is it from the command line or the environment?
25920
25921    # Try to remove the string !JARSIGNER! from our list.
25922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25924      # If it failed, the variable was not from the command line. Ignore it,
25925      # but warn the user (except for BASH, which is always set by the calling BASH).
25926      if test "xJARSIGNER" != xBASH; then
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25928$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25929      fi
25930      # Try to locate tool using the code snippet
25931
25932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25933$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25934      JARSIGNER=$BOOT_JDK/bin/jarsigner
25935      if test ! -x $JARSIGNER; then
25936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25937$as_echo "not found" >&6; }
25938        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25939$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25940        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25941      fi
25942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25943$as_echo "ok" >&6; }
25944
25945
25946    else
25947      # If it succeeded, then it was overridden by the user. We will use it
25948      # for the tool.
25949
25950      # First remove it from the list of overridden variables, so we can test
25951      # for unknown variables in the end.
25952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25953
25954      # Check if the provided tool contains a complete path.
25955      tool_specified="$JARSIGNER"
25956      tool_basename="${tool_specified##*/}"
25957      if test "x$tool_basename" = "x$tool_specified"; then
25958        # A command without a complete path is provided, search $PATH.
25959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25960$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25961        # Extract the first word of "$tool_basename", so it can be a program name with args.
25962set dummy $tool_basename; ac_word=$2
25963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25964$as_echo_n "checking for $ac_word... " >&6; }
25965if ${ac_cv_path_JARSIGNER+:} false; then :
25966  $as_echo_n "(cached) " >&6
25967else
25968  case $JARSIGNER in
25969  [\\/]* | ?:[\\/]*)
25970  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25971  ;;
25972  *)
25973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25974for as_dir in $PATH
25975do
25976  IFS=$as_save_IFS
25977  test -z "$as_dir" && as_dir=.
25978    for ac_exec_ext in '' $ac_executable_extensions; do
25979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25980    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25982    break 2
25983  fi
25984done
25985  done
25986IFS=$as_save_IFS
25987
25988  ;;
25989esac
25990fi
25991JARSIGNER=$ac_cv_path_JARSIGNER
25992if test -n "$JARSIGNER"; then
25993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25994$as_echo "$JARSIGNER" >&6; }
25995else
25996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25997$as_echo "no" >&6; }
25998fi
25999
26000
26001        if test "x$JARSIGNER" = x; then
26002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26003        fi
26004      else
26005        # Otherwise we believe it is a complete path. Use it as it is.
26006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26007$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26009$as_echo_n "checking for JARSIGNER... " >&6; }
26010        if test ! -x "$tool_specified"; then
26011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26012$as_echo "not found" >&6; }
26013          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26014        fi
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26016$as_echo "$tool_specified" >&6; }
26017      fi
26018    fi
26019  fi
26020
26021
26022
26023  # Finally, set some other options...
26024
26025  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26026  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26027
26028
26029
26030
26031###############################################################################
26032#
26033# Configure the sources to use. We can add or override individual directories.
26034#
26035###############################################################################
26036
26037
26038  # Where are the sources. Any of these can be overridden
26039  # using --with-override-corba and the likes.
26040  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26041  CORBA_TOPDIR="$SRC_ROOT/corba"
26042  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26043  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26044  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26045  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26046  JDK_TOPDIR="$SRC_ROOT/jdk"
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057  ###############################################################################
26058  #
26059  # Pickup additional source for a component from outside of the source root
26060  # or override source for a component.
26061  #
26062
26063# Check whether --with-add-source-root was given.
26064if test "${with_add_source_root+set}" = set; then :
26065  withval=$with_add_source_root;
26066fi
26067
26068
26069
26070# Check whether --with-override-source-root was given.
26071if test "${with_override_source_root+set}" = set; then :
26072  withval=$with_override_source_root;
26073fi
26074
26075
26076
26077# Check whether --with-adds-and-overrides was given.
26078if test "${with_adds_and_overrides+set}" = set; then :
26079  withval=$with_adds_and_overrides;
26080fi
26081
26082
26083  if test "x$with_adds_and_overrides" != x; then
26084    with_add_source_root="$with_adds_and_overrides/adds"
26085    with_override_source_root="$with_adds_and_overrides/overrides"
26086  fi
26087
26088  if test "x$with_add_source_root" != x; then
26089    if ! test -d $with_add_source_root; then
26090      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26091    fi
26092    CURDIR="$PWD"
26093    cd "$with_add_source_root"
26094    ADD_SRC_ROOT="`pwd`"
26095    cd "$CURDIR"
26096    # Verify that the addon source root does not have any root makefiles.
26097    # If it does, then it is usually an error, prevent this.
26098    if test -f $with_add_source_root/langtools/make/Makefile; then
26099      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
26100    fi
26101    if test -f $with_add_source_root/corba/make/Makefile; then
26102      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
26103    fi
26104    if test -f $with_add_source_root/jaxp/make/Makefile; then
26105      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
26106    fi
26107    if test -f $with_add_source_root/jaxws/make/Makefile; then
26108      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
26109    fi
26110    if test -f $with_add_source_root/hotspot/make/Makefile; then
26111      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
26112    fi
26113    if test -f $with_add_source_root/nashorn/make/Makefile; then
26114      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
26115    fi
26116    if test -f $with_add_source_root/jdk/make/Makefile; then
26117      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
26118    fi
26119  fi
26120
26121
26122  if test "x$with_override_source_root" != x; then
26123    if ! test -d $with_override_source_root; then
26124      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26125    fi
26126    CURDIR="$PWD"
26127    cd "$with_override_source_root"
26128    OVERRIDE_SRC_ROOT="`pwd`"
26129    cd "$CURDIR"
26130    if test -f $with_override_source_root/langtools/make/Makefile; then
26131      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
26132    fi
26133    if test -f $with_override_source_root/corba/make/Makefile; then
26134      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
26135    fi
26136    if test -f $with_override_source_root/jaxp/make/Makefile; then
26137      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
26138    fi
26139    if test -f $with_override_source_root/jaxws/make/Makefile; then
26140      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
26141    fi
26142    if test -f $with_override_source_root/hotspot/make/Makefile; then
26143      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
26144    fi
26145    if test -f $with_override_source_root/nashorn/make/Makefile; then
26146      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
26147    fi
26148    if test -f $with_override_source_root/jdk/make/Makefile; then
26149      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
26150    fi
26151  fi
26152
26153
26154  ###############################################################################
26155  #
26156  # Override a repo completely, this is used for example when you have 3 small
26157  # development sandboxes of the langtools sources and want to avoid having 3 full
26158  # OpenJDK sources checked out on disk.
26159  #
26160  # Assuming that the 3 langtools sandboxes are located here:
26161  # /home/fredrik/sandbox1/langtools
26162  # /home/fredrik/sandbox2/langtools
26163  # /home/fredrik/sandbox3/langtools
26164  #
26165  # From the source root you create build subdirs manually:
26166  #     mkdir -p build1 build2 build3
26167  # in each build directory run:
26168  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26169  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26170  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26171  #
26172
26173
26174# Check whether --with-override-langtools was given.
26175if test "${with_override_langtools+set}" = set; then :
26176  withval=$with_override_langtools;
26177fi
26178
26179
26180
26181# Check whether --with-override-corba was given.
26182if test "${with_override_corba+set}" = set; then :
26183  withval=$with_override_corba;
26184fi
26185
26186
26187
26188# Check whether --with-override-jaxp was given.
26189if test "${with_override_jaxp+set}" = set; then :
26190  withval=$with_override_jaxp;
26191fi
26192
26193
26194
26195# Check whether --with-override-jaxws was given.
26196if test "${with_override_jaxws+set}" = set; then :
26197  withval=$with_override_jaxws;
26198fi
26199
26200
26201
26202# Check whether --with-override-hotspot was given.
26203if test "${with_override_hotspot+set}" = set; then :
26204  withval=$with_override_hotspot;
26205fi
26206
26207
26208
26209# Check whether --with-override-nashorn was given.
26210if test "${with_override_nashorn+set}" = set; then :
26211  withval=$with_override_nashorn;
26212fi
26213
26214
26215
26216# Check whether --with-override-jdk was given.
26217if test "${with_override_jdk+set}" = set; then :
26218  withval=$with_override_jdk;
26219fi
26220
26221
26222  if test "x$with_override_langtools" != x; then
26223    CURDIR="$PWD"
26224    cd "$with_override_langtools"
26225    LANGTOOLS_TOPDIR="`pwd`"
26226    cd "$CURDIR"
26227    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26228      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26229    fi
26230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26231$as_echo_n "checking if langtools should be overridden... " >&6; }
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26233$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26234  fi
26235  if test "x$with_override_corba" != x; then
26236    CURDIR="$PWD"
26237    cd "$with_override_corba"
26238    CORBA_TOPDIR="`pwd`"
26239    cd "$CURDIR"
26240    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26241      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26242    fi
26243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26244$as_echo_n "checking if corba should be overridden... " >&6; }
26245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26246$as_echo "yes with $CORBA_TOPDIR" >&6; }
26247  fi
26248  if test "x$with_override_jaxp" != x; then
26249    CURDIR="$PWD"
26250    cd "$with_override_jaxp"
26251    JAXP_TOPDIR="`pwd`"
26252    cd "$CURDIR"
26253    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26254      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26255    fi
26256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26257$as_echo_n "checking if jaxp should be overridden... " >&6; }
26258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26259$as_echo "yes with $JAXP_TOPDIR" >&6; }
26260  fi
26261  if test "x$with_override_jaxws" != x; then
26262    CURDIR="$PWD"
26263    cd "$with_override_jaxws"
26264    JAXWS_TOPDIR="`pwd`"
26265    cd "$CURDIR"
26266    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26267      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26268    fi
26269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26270$as_echo_n "checking if jaxws should be overridden... " >&6; }
26271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26272$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26273  fi
26274  if test "x$with_override_hotspot" != x; then
26275    CURDIR="$PWD"
26276    cd "$with_override_hotspot"
26277    HOTSPOT_TOPDIR="`pwd`"
26278    cd "$CURDIR"
26279    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26280      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26281    fi
26282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26283$as_echo_n "checking if hotspot should be overridden... " >&6; }
26284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26285$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26286  fi
26287  if test "x$with_override_nashorn" != x; then
26288    CURDIR="$PWD"
26289    cd "$with_override_nashorn"
26290    NASHORN_TOPDIR="`pwd`"
26291    cd "$CURDIR"
26292    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26293      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26294    fi
26295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26296$as_echo_n "checking if nashorn should be overridden... " >&6; }
26297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26298$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26299  fi
26300  if test "x$with_override_jdk" != x; then
26301    CURDIR="$PWD"
26302    cd "$with_override_jdk"
26303    JDK_TOPDIR="`pwd`"
26304    cd "$CURDIR"
26305    if ! test -f $JDK_TOPDIR/make/Makefile; then
26306      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26307    fi
26308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26309$as_echo_n "checking if JDK should be overridden... " >&6; }
26310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26311$as_echo "yes with $JDK_TOPDIR" >&6; }
26312  fi
26313
26314
26315  BUILD_OUTPUT="$OUTPUT_ROOT"
26316
26317
26318  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26319  BUILD_HOTSPOT=true
26320
26321
26322
26323# Check whether --with-import-hotspot was given.
26324if test "${with_import_hotspot+set}" = set; then :
26325  withval=$with_import_hotspot;
26326fi
26327
26328  if test "x$with_import_hotspot" != x; then
26329    CURDIR="$PWD"
26330    cd "$with_import_hotspot"
26331    HOTSPOT_DIST="`pwd`"
26332    cd "$CURDIR"
26333    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26334      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26335    fi
26336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26337$as_echo_n "checking if hotspot should be imported... " >&6; }
26338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26339$as_echo "yes from $HOTSPOT_DIST" >&6; }
26340    BUILD_HOTSPOT=false
26341  fi
26342
26343  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26344
26345
26346###############################################################################
26347#
26348# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26349# native code.
26350#
26351###############################################################################
26352
26353# First determine the toolchain type (compiler family)
26354
26355
26356# Check whether --with-toolchain-type was given.
26357if test "${with_toolchain_type+set}" = set; then :
26358  withval=$with_toolchain_type;
26359fi
26360
26361
26362  # Use indirect variable referencing
26363  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26364  VALID_TOOLCHAINS=${!toolchain_var_name}
26365
26366  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26367    if test -n "$XCODEBUILD"; then
26368      # On Mac OS X, default toolchain to clang after Xcode 5
26369      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26370      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26371      if test $? -ne 0; then
26372        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26373      fi
26374      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26375          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26376          $CUT -f 1 -d .`
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26378$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26379      if test $XCODE_MAJOR_VERSION -ge 5; then
26380          DEFAULT_TOOLCHAIN="clang"
26381      else
26382          DEFAULT_TOOLCHAIN="gcc"
26383      fi
26384    else
26385      # If Xcode is not installed, but the command line tools are
26386      # then we can't run xcodebuild. On these systems we should
26387      # default to clang
26388      DEFAULT_TOOLCHAIN="clang"
26389    fi
26390  else
26391    # First toolchain type in the list is the default
26392    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26393  fi
26394
26395  if test "x$with_toolchain_type" = xlist; then
26396    # List all toolchains
26397    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26398$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26399    for toolchain in $VALID_TOOLCHAINS; do
26400      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26401      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26402      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26403    done
26404
26405    exit 0
26406  elif test "x$with_toolchain_type" != x; then
26407    # User override; check that it is valid
26408    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26409      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26410$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26411      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26412$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26413      as_fn_error $? "Cannot continue." "$LINENO" 5
26414    fi
26415    TOOLCHAIN_TYPE=$with_toolchain_type
26416  else
26417    # No flag given, use default
26418    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26419  fi
26420
26421
26422  TOOLCHAIN_CC_BINARY_clang="clang"
26423  TOOLCHAIN_CC_BINARY_gcc="gcc"
26424  TOOLCHAIN_CC_BINARY_microsoft="cl"
26425  TOOLCHAIN_CC_BINARY_solstudio="cc"
26426  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26427
26428  TOOLCHAIN_CXX_BINARY_clang="clang++"
26429  TOOLCHAIN_CXX_BINARY_gcc="g++"
26430  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26431  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26432  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26433
26434  # Use indirect variable referencing
26435  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26436  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26437  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26438  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26439  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26440  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26441
26442
26443  # Define filename patterns
26444  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26445    LIBRARY_PREFIX=
26446    SHARED_LIBRARY_SUFFIX='.dll'
26447    STATIC_LIBRARY_SUFFIX='.lib'
26448    SHARED_LIBRARY='$1.dll'
26449    STATIC_LIBRARY='$1.lib'
26450    OBJ_SUFFIX='.obj'
26451    EXE_SUFFIX='.exe'
26452  else
26453    LIBRARY_PREFIX=lib
26454    SHARED_LIBRARY_SUFFIX='.so'
26455    STATIC_LIBRARY_SUFFIX='.a'
26456    SHARED_LIBRARY='lib$1.so'
26457    STATIC_LIBRARY='lib$1.a'
26458    OBJ_SUFFIX='.o'
26459    EXE_SUFFIX=''
26460    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26461      SHARED_LIBRARY='lib$1.dylib'
26462      SHARED_LIBRARY_SUFFIX='.dylib'
26463    fi
26464  fi
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26476    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26477$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26478  else
26479    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26480$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26481  fi
26482
26483
26484# Then detect the actual binaries needed
26485
26486  # FIXME: Is this needed?
26487  ac_ext=cpp
26488ac_cpp='$CXXCPP $CPPFLAGS'
26489ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26490ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26491ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26492
26493
26494  # Store the CFLAGS etc passed to the configure script.
26495  ORG_CFLAGS="$CFLAGS"
26496  ORG_CXXFLAGS="$CXXFLAGS"
26497  ORG_OBJCFLAGS="$OBJCFLAGS"
26498
26499  # On Windows, we need to detect the visual studio installation first.
26500  # This will change the PATH, but we need to keep that new PATH even
26501  # after toolchain detection is done, since the compiler (on x86) uses
26502  # it for DLL resolution in runtime.
26503  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26504
26505  # Store path to cygwin link.exe to help excluding it when searching for
26506  # VS linker. This must be done before changing the PATH when looking for VS.
26507  # Extract the first word of "link", so it can be a program name with args.
26508set dummy link; ac_word=$2
26509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26510$as_echo_n "checking for $ac_word... " >&6; }
26511if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26512  $as_echo_n "(cached) " >&6
26513else
26514  case $CYGWIN_LINK in
26515  [\\/]* | ?:[\\/]*)
26516  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26517  ;;
26518  *)
26519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26520for as_dir in $PATH
26521do
26522  IFS=$as_save_IFS
26523  test -z "$as_dir" && as_dir=.
26524    for ac_exec_ext in '' $ac_executable_extensions; do
26525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26526    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26528    break 2
26529  fi
26530done
26531  done
26532IFS=$as_save_IFS
26533
26534  ;;
26535esac
26536fi
26537CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26538if test -n "$CYGWIN_LINK"; then
26539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26540$as_echo "$CYGWIN_LINK" >&6; }
26541else
26542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26543$as_echo "no" >&6; }
26544fi
26545
26546
26547  if test "x$CYGWIN_LINK" != x; then
26548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26549$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26550    "$CYGWIN_LINK" --version > /dev/null
26551    if test $? -eq 0 ; then
26552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26553$as_echo "yes" >&6; }
26554    else
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26556$as_echo "no" >&6; }
26557      # This might be the VS linker. Don't exclude it later on.
26558      CYGWIN_LINK=""
26559    fi
26560  fi
26561
26562  # First-hand choice is to locate and run the vsvars bat file.
26563
26564
26565# Check whether --with-toolchain-version was given.
26566if test "${with_toolchain_version+set}" = set; then :
26567  withval=$with_toolchain_version;
26568fi
26569
26570
26571  if test "x$with_toolchain_version" = xlist; then
26572    # List all toolchains
26573    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26574$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26575    for version in $VALID_VS_VERSIONS; do
26576      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26577      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26578    done
26579
26580    exit 0
26581  elif test "x$with_toolchain_version" != x; then
26582    # User override; check that it is valid
26583    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26584      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26585$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26586      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26587$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26588      as_fn_error $? "Cannot continue." "$LINENO" 5
26589    fi
26590    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26591  else
26592    # No flag given, use default
26593    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26594  fi
26595
26596  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26597
26598  VS_VERSION="$VS_VERSION"
26599  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26600  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26601  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26602  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26603
26604  # When using --with-tools-dir, assume it points to the correct and default
26605  # version of Visual Studio or that --with-toolchain-version was also set.
26606  if test "x$with_tools_dir" != x; then
26607
26608  if test "x$VS_ENV_CMD" = x; then
26609    VS_VERSION="${VS_VERSION}"
26610    VS_BASE="$with_tools_dir/../.."
26611    METHOD="--with-tools-dir"
26612
26613    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26614      VCVARSFILE="vc/bin/vcvars32.bat"
26615    else
26616      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26617    fi
26618
26619
26620  windows_path="$VS_BASE"
26621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26622    unix_path=`$CYGPATH -u "$windows_path"`
26623    VS_BASE="$unix_path"
26624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26626    VS_BASE="$unix_path"
26627  fi
26628
26629    if test -d "$VS_BASE"; then
26630      if test -f "$VS_BASE/$VCVARSFILE"; then
26631        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26632$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26633        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26634        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26635        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26636        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26637      else
26638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26639$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26640        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26641$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26642      fi
26643    fi
26644  fi
26645
26646
26647  if test "x$VS_ENV_CMD" = x; then
26648    VS_VERSION="${VS_VERSION}"
26649    VS_BASE="$with_tools_dir/../../.."
26650    METHOD="--with-tools-dir"
26651
26652    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26653      VCVARSFILE="vc/bin/vcvars32.bat"
26654    else
26655      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26656    fi
26657
26658
26659  windows_path="$VS_BASE"
26660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26661    unix_path=`$CYGPATH -u "$windows_path"`
26662    VS_BASE="$unix_path"
26663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26665    VS_BASE="$unix_path"
26666  fi
26667
26668    if test -d "$VS_BASE"; then
26669      if test -f "$VS_BASE/$VCVARSFILE"; then
26670        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26671$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26672        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26673        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26674        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26675        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26676      else
26677        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26678$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26679        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26680$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26681      fi
26682    fi
26683  fi
26684
26685    if test "x$VS_ENV_CMD" = x; then
26686      # Having specified an argument which is incorrect will produce an instant failure;
26687      # we should not go on looking
26688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26689$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26691$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26692      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26693$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26694      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26695    fi
26696  fi
26697
26698  VS_ENV_CMD=""
26699  VS_ENV_ARGS=""
26700
26701  if test "x$VS_COMNTOOLS" != x; then
26702
26703  if test "x$VS_ENV_CMD" = x; then
26704    VS_VERSION="${VS_VERSION}"
26705    VS_BASE="$VS_COMNTOOLS/../.."
26706    METHOD="$VS_COMNTOOLS_VAR variable"
26707
26708    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26709      VCVARSFILE="vc/bin/vcvars32.bat"
26710    else
26711      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26712    fi
26713
26714
26715  windows_path="$VS_BASE"
26716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26717    unix_path=`$CYGPATH -u "$windows_path"`
26718    VS_BASE="$unix_path"
26719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26721    VS_BASE="$unix_path"
26722  fi
26723
26724    if test -d "$VS_BASE"; then
26725      if test -f "$VS_BASE/$VCVARSFILE"; then
26726        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26727$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26728        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26729        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26730        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26731        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26732      else
26733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26734$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26735        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26736$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26737      fi
26738    fi
26739  fi
26740
26741  fi
26742  if test "x$PROGRAMFILES" != x; then
26743
26744  if test "x$VS_ENV_CMD" = x; then
26745    VS_VERSION="${VS_VERSION}"
26746    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26747    METHOD="well-known name"
26748
26749    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26750      VCVARSFILE="vc/bin/vcvars32.bat"
26751    else
26752      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26753    fi
26754
26755
26756  windows_path="$VS_BASE"
26757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26758    unix_path=`$CYGPATH -u "$windows_path"`
26759    VS_BASE="$unix_path"
26760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26762    VS_BASE="$unix_path"
26763  fi
26764
26765    if test -d "$VS_BASE"; then
26766      if test -f "$VS_BASE/$VCVARSFILE"; then
26767        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26768$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26769        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26770        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26771        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26772        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26773      else
26774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26775$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26777$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26778      fi
26779    fi
26780  fi
26781
26782  fi
26783  # Work around the insanely named ProgramFiles(x86) env variable
26784  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26785  if test "x$PROGRAMFILES_X86" != x; then
26786
26787  if test "x$VS_ENV_CMD" = x; then
26788    VS_VERSION="${VS_VERSION}"
26789    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26790    METHOD="well-known name"
26791
26792    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26793      VCVARSFILE="vc/bin/vcvars32.bat"
26794    else
26795      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26796    fi
26797
26798
26799  windows_path="$VS_BASE"
26800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26801    unix_path=`$CYGPATH -u "$windows_path"`
26802    VS_BASE="$unix_path"
26803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26805    VS_BASE="$unix_path"
26806  fi
26807
26808    if test -d "$VS_BASE"; then
26809      if test -f "$VS_BASE/$VCVARSFILE"; then
26810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26812        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26813        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26814        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26815        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26816      else
26817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26818$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26819        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26820$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26821      fi
26822    fi
26823  fi
26824
26825  fi
26826
26827  if test "x$VS_ENV_CMD" = x; then
26828    VS_VERSION="${VS_VERSION}"
26829    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26830    METHOD="well-known name"
26831
26832    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26833      VCVARSFILE="vc/bin/vcvars32.bat"
26834    else
26835      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26836    fi
26837
26838
26839  windows_path="$VS_BASE"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    VS_BASE="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    VS_BASE="$unix_path"
26846  fi
26847
26848    if test -d "$VS_BASE"; then
26849      if test -f "$VS_BASE/$VCVARSFILE"; then
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26851$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26852        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26853        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26854        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26855        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26856      else
26857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26858$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26860$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26861      fi
26862    fi
26863  fi
26864
26865
26866  if test "x$VS_ENV_CMD" = x; then
26867    VS_VERSION="${VS_VERSION}"
26868    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
26869    METHOD="well-known name"
26870
26871    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26872      VCVARSFILE="vc/bin/vcvars32.bat"
26873    else
26874      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26875    fi
26876
26877
26878  windows_path="$VS_BASE"
26879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26880    unix_path=`$CYGPATH -u "$windows_path"`
26881    VS_BASE="$unix_path"
26882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26884    VS_BASE="$unix_path"
26885  fi
26886
26887    if test -d "$VS_BASE"; then
26888      if test -f "$VS_BASE/$VCVARSFILE"; then
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26890$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26891        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26892        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26893        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26894        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26895      else
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26897$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26899$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26900      fi
26901    fi
26902  fi
26903
26904
26905  if test "x$SDK_INSTALL_DIR" != x; then
26906    if test "x$ProgramW6432" != x; then
26907
26908  if test "x$VS_ENV_CMD" = x; then
26909    VS_VERSION="${VS_VERSION}"
26910    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
26911    METHOD="well-known name"
26912
26913  windows_path="$WIN_SDK_BASE"
26914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26915    unix_path=`$CYGPATH -u "$windows_path"`
26916    WIN_SDK_BASE="$unix_path"
26917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26919    WIN_SDK_BASE="$unix_path"
26920  fi
26921
26922    if test -d "$WIN_SDK_BASE"; then
26923      # There have been cases of partial or broken SDK installations. A missing
26924      # lib dir is not going to work.
26925      if test ! -d "$WIN_SDK_BASE/lib"; then
26926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26927$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26929$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26930      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26932$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26933        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26934        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26935          VS_ENV_ARGS="/x86"
26936        else
26937          VS_ENV_ARGS="/x64"
26938        fi
26939        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26940        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26941        # TODO: improve detection for other versions of SDK
26942        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26943      else
26944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26947$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26948      fi
26949    fi
26950  fi
26951
26952    fi
26953    if test "x$PROGRAMW6432" != x; then
26954
26955  if test "x$VS_ENV_CMD" = x; then
26956    VS_VERSION="${VS_VERSION}"
26957    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26958    METHOD="well-known name"
26959
26960  windows_path="$WIN_SDK_BASE"
26961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26962    unix_path=`$CYGPATH -u "$windows_path"`
26963    WIN_SDK_BASE="$unix_path"
26964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26966    WIN_SDK_BASE="$unix_path"
26967  fi
26968
26969    if test -d "$WIN_SDK_BASE"; then
26970      # There have been cases of partial or broken SDK installations. A missing
26971      # lib dir is not going to work.
26972      if test ! -d "$WIN_SDK_BASE/lib"; then
26973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26974$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26976$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26977      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26979$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26980        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26981        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26982          VS_ENV_ARGS="/x86"
26983        else
26984          VS_ENV_ARGS="/x64"
26985        fi
26986        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26987        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26988        # TODO: improve detection for other versions of SDK
26989        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26990      else
26991        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26992$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26993        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26994$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26995      fi
26996    fi
26997  fi
26998
26999    fi
27000    if test "x$PROGRAMFILES" != x; then
27001
27002  if test "x$VS_ENV_CMD" = x; then
27003    VS_VERSION="${VS_VERSION}"
27004    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27005    METHOD="well-known name"
27006
27007  windows_path="$WIN_SDK_BASE"
27008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009    unix_path=`$CYGPATH -u "$windows_path"`
27010    WIN_SDK_BASE="$unix_path"
27011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27013    WIN_SDK_BASE="$unix_path"
27014  fi
27015
27016    if test -d "$WIN_SDK_BASE"; then
27017      # There have been cases of partial or broken SDK installations. A missing
27018      # lib dir is not going to work.
27019      if test ! -d "$WIN_SDK_BASE/lib"; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27021$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27022        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27023$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27024      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27026$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27027        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27028        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27029          VS_ENV_ARGS="/x86"
27030        else
27031          VS_ENV_ARGS="/x64"
27032        fi
27033        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27034        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27035        # TODO: improve detection for other versions of SDK
27036        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27037      else
27038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27039$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27040        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27041$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27042      fi
27043    fi
27044  fi
27045
27046    fi
27047
27048  if test "x$VS_ENV_CMD" = x; then
27049    VS_VERSION="${VS_VERSION}"
27050    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27051    METHOD="well-known name"
27052
27053  windows_path="$WIN_SDK_BASE"
27054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27055    unix_path=`$CYGPATH -u "$windows_path"`
27056    WIN_SDK_BASE="$unix_path"
27057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27059    WIN_SDK_BASE="$unix_path"
27060  fi
27061
27062    if test -d "$WIN_SDK_BASE"; then
27063      # There have been cases of partial or broken SDK installations. A missing
27064      # lib dir is not going to work.
27065      if test ! -d "$WIN_SDK_BASE/lib"; then
27066        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27067$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27068        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27069$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27070      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27073        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27074        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27075          VS_ENV_ARGS="/x86"
27076        else
27077          VS_ENV_ARGS="/x64"
27078        fi
27079        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27080        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27081        # TODO: improve detection for other versions of SDK
27082        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27083      else
27084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27085$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27087$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27088      fi
27089    fi
27090  fi
27091
27092
27093  if test "x$VS_ENV_CMD" = x; then
27094    VS_VERSION="${VS_VERSION}"
27095    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27096    METHOD="well-known name"
27097
27098  windows_path="$WIN_SDK_BASE"
27099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27100    unix_path=`$CYGPATH -u "$windows_path"`
27101    WIN_SDK_BASE="$unix_path"
27102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27104    WIN_SDK_BASE="$unix_path"
27105  fi
27106
27107    if test -d "$WIN_SDK_BASE"; then
27108      # There have been cases of partial or broken SDK installations. A missing
27109      # lib dir is not going to work.
27110      if test ! -d "$WIN_SDK_BASE/lib"; then
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27114$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27115      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27117$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27118        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27119        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27120          VS_ENV_ARGS="/x86"
27121        else
27122          VS_ENV_ARGS="/x64"
27123        fi
27124        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27125        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27126        # TODO: improve detection for other versions of SDK
27127        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27128      else
27129        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27130$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27131        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27132$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27133      fi
27134    fi
27135  fi
27136
27137  fi
27138
27139    if test "x$VS_ENV_CMD" != x; then
27140      TOOLCHAIN_VERSION=$VS_VERSION
27141      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27142      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27143      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27144      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27145      # The rest of the variables are already evaled while probing
27146      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27147$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27148      break
27149    fi
27150  done
27151
27152
27153  if test "x$VS_ENV_CMD" != x; then
27154    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27155
27156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27157
27158  # First separate the path from the arguments. This will split at the first
27159  # space.
27160  complete="$VS_ENV_CMD"
27161  path="${complete%% *}"
27162  tmp="$complete EOL"
27163  arguments="${tmp#* }"
27164
27165  # Input might be given as Windows format, start by converting to
27166  # unix format.
27167  new_path=`$CYGPATH -u "$path"`
27168
27169  # Now try to locate executable using which
27170  new_path=`$WHICH "$new_path" 2> /dev/null`
27171  # bat and cmd files are not always considered executable in cygwin causing which
27172  # to not find them
27173  if test "x$new_path" = x \
27174      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27175      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27176    new_path=`$CYGPATH -u "$path"`
27177  fi
27178  if test "x$new_path" = x; then
27179    # Oops. Which didn't find the executable.
27180    # The splitting of arguments from the executable at a space might have been incorrect,
27181    # since paths with space are more likely in Windows. Give it another try with the whole
27182    # argument.
27183    path="$complete"
27184    arguments="EOL"
27185    new_path=`$CYGPATH -u "$path"`
27186    new_path=`$WHICH "$new_path" 2> /dev/null`
27187    # bat and cmd files are not always considered executable in cygwin causing which
27188    # to not find them
27189    if test "x$new_path" = x \
27190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27192      new_path=`$CYGPATH -u "$path"`
27193    fi
27194    if test "x$new_path" = x; then
27195      # It's still not found. Now this is an unrecoverable error.
27196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27197$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27198      has_space=`$ECHO "$complete" | $GREP " "`
27199      if test "x$has_space" != x; then
27200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27202      fi
27203      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27204    fi
27205  fi
27206
27207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27210  # "foo.exe" is OK but "foo" is an error.
27211  #
27212  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27213  # It is also a way to make sure we got the proper file name for the real test later on.
27214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27215  if test "x$test_shortpath" = x; then
27216    # Short path failed, file does not exist as specified.
27217    # Try adding .exe or .cmd
27218    if test -f "${new_path}.exe"; then
27219      input_to_shortpath="${new_path}.exe"
27220    elif test -f "${new_path}.cmd"; then
27221      input_to_shortpath="${new_path}.cmd"
27222    else
27223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27224$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27227      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27228    fi
27229  else
27230    input_to_shortpath="$new_path"
27231  fi
27232
27233  # Call helper function which possibly converts this using DOS-style short mode.
27234  # If so, the updated path is stored in $new_path.
27235  new_path="$input_to_shortpath"
27236
27237  input_path="$input_to_shortpath"
27238  # Check if we need to convert this using DOS-style short mode. If the path
27239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27240  # take no chances and rewrite it.
27241  # Note: m4 eats our [], so we need to use [ and ] instead.
27242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27243  if test "x$has_forbidden_chars" != x; then
27244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27248      # Going to short mode and back again did indeed matter. Since short mode is
27249      # case insensitive, let's make it lowercase to improve readability.
27250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27251      # Now convert it back to Unix-stile (cygpath)
27252      input_path=`$CYGPATH -u "$shortmode_path"`
27253      new_path="$input_path"
27254    fi
27255  fi
27256
27257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27258  if test "x$test_cygdrive_prefix" = x; then
27259    # As a simple fix, exclude /usr/bin since it's not a real path.
27260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27262      # a path prefixed by /cygdrive for fixpath to work.
27263      new_path="$CYGWIN_ROOT_PATH$input_path"
27264    fi
27265  fi
27266
27267  # remove trailing .exe if any
27268  new_path="${new_path/%.exe/}"
27269
27270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27271
27272  # First separate the path from the arguments. This will split at the first
27273  # space.
27274  complete="$VS_ENV_CMD"
27275  path="${complete%% *}"
27276  tmp="$complete EOL"
27277  arguments="${tmp#* }"
27278
27279  # Input might be given as Windows format, start by converting to
27280  # unix format.
27281  new_path="$path"
27282
27283  windows_path="$new_path"
27284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27285    unix_path=`$CYGPATH -u "$windows_path"`
27286    new_path="$unix_path"
27287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27289    new_path="$unix_path"
27290  fi
27291
27292
27293  # Now try to locate executable using which
27294  new_path=`$WHICH "$new_path" 2> /dev/null`
27295
27296  if test "x$new_path" = x; then
27297    # Oops. Which didn't find the executable.
27298    # The splitting of arguments from the executable at a space might have been incorrect,
27299    # since paths with space are more likely in Windows. Give it another try with the whole
27300    # argument.
27301    path="$complete"
27302    arguments="EOL"
27303    new_path="$path"
27304
27305  windows_path="$new_path"
27306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27307    unix_path=`$CYGPATH -u "$windows_path"`
27308    new_path="$unix_path"
27309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27311    new_path="$unix_path"
27312  fi
27313
27314
27315    new_path=`$WHICH "$new_path" 2> /dev/null`
27316    # bat and cmd files are not always considered executable in MSYS causing which
27317    # to not find them
27318    if test "x$new_path" = x \
27319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27321      new_path="$path"
27322
27323  windows_path="$new_path"
27324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27325    unix_path=`$CYGPATH -u "$windows_path"`
27326    new_path="$unix_path"
27327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27329    new_path="$unix_path"
27330  fi
27331
27332    fi
27333
27334    if test "x$new_path" = x; then
27335      # It's still not found. Now this is an unrecoverable error.
27336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27337$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27338      has_space=`$ECHO "$complete" | $GREP " "`
27339      if test "x$has_space" != x; then
27340        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27341$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27342      fi
27343      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27344    fi
27345  fi
27346
27347  # Now new_path has a complete unix path to the binary
27348  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27349    # Keep paths in /bin as-is, but remove trailing .exe if any
27350    new_path="${new_path/%.exe/}"
27351    # Do not save /bin paths to all_fixpath_prefixes!
27352  else
27353    # Not in mixed or Windows style, start by that.
27354    new_path=`cmd //c echo $new_path`
27355
27356  input_path="$new_path"
27357  # Check if we need to convert this using DOS-style short mode. If the path
27358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27359  # take no chances and rewrite it.
27360  # Note: m4 eats our [], so we need to use [ and ] instead.
27361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27362  if test "x$has_forbidden_chars" != x; then
27363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27365  fi
27366
27367    # Output is in $new_path
27368
27369  windows_path="$new_path"
27370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27371    unix_path=`$CYGPATH -u "$windows_path"`
27372    new_path="$unix_path"
27373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27375    new_path="$unix_path"
27376  fi
27377
27378    # remove trailing .exe if any
27379    new_path="${new_path/%.exe/}"
27380
27381    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27382    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27383  fi
27384
27385  else
27386    # We're on a unix platform. Hooray! :)
27387    # First separate the path from the arguments. This will split at the first
27388    # space.
27389    complete="$VS_ENV_CMD"
27390    path="${complete%% *}"
27391    tmp="$complete EOL"
27392    arguments="${tmp#* }"
27393
27394    # Cannot rely on the command "which" here since it doesn't always work.
27395    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27396    if test -z "$is_absolute_path"; then
27397      # Path to executable is not absolute. Find it.
27398      IFS_save="$IFS"
27399      IFS=:
27400      for p in $PATH; do
27401        if test -f "$p/$path" && test -x "$p/$path"; then
27402          new_path="$p/$path"
27403          break
27404        fi
27405      done
27406      IFS="$IFS_save"
27407    else
27408      # This is an absolute path, we can use it without further modifications.
27409      new_path="$path"
27410    fi
27411
27412    if test "x$new_path" = x; then
27413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27414$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27415      has_space=`$ECHO "$complete" | $GREP " "`
27416      if test "x$has_space" != x; then
27417        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27418$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27419      fi
27420      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27421    fi
27422  fi
27423
27424  # Now join together the path and the arguments once again
27425  if test "x$arguments" != xEOL; then
27426    new_complete="$new_path ${arguments% *}"
27427  else
27428    new_complete="$new_path"
27429  fi
27430
27431  if test "x$complete" != "x$new_complete"; then
27432    VS_ENV_CMD="$new_complete"
27433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27434$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27435  fi
27436
27437
27438    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27439    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27440$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27441
27442    # We need to create a couple of temporary files.
27443    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27444    $MKDIR -p $VS_ENV_TMP_DIR
27445
27446    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27447    # Instead create a shell script which will set the relevant variables when run.
27448    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27449
27450  unix_path="$WINPATH_VS_ENV_CMD"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    windows_path=`$CYGPATH -m "$unix_path"`
27453    WINPATH_VS_ENV_CMD="$windows_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    windows_path=`cmd //c echo $unix_path`
27456    WINPATH_VS_ENV_CMD="$windows_path"
27457  fi
27458
27459    WINPATH_BASH="$BASH"
27460
27461  unix_path="$WINPATH_BASH"
27462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27463    windows_path=`$CYGPATH -m "$unix_path"`
27464    WINPATH_BASH="$windows_path"
27465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27466    windows_path=`cmd //c echo $unix_path`
27467    WINPATH_BASH="$windows_path"
27468  fi
27469
27470
27471    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27472    # script (executable by bash) that will setup the important variables.
27473    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27474    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27475    # This will end up something like:
27476    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27477    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27478    # These will end up something like:
27479    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27480    # The trailing space for everyone except PATH is no typo, but is needed due
27481    # to trailing \ in the Windows paths. These will be stripped later.
27482    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27483    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27484    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27485    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27486    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27487    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27488
27489    # Now execute the newly created bat file.
27490    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27491    # Change directory so we don't need to mess with Windows paths in redirects.
27492    cd $VS_ENV_TMP_DIR
27493    cmd /c extract-vs-env.bat | $CAT
27494    cd $CURDIR
27495
27496    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27497      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27498$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27499      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27500$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27501      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27502$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27503      as_fn_error $? "Cannot continue" "$LINENO" 5
27504    fi
27505
27506    # Now set all paths and other env variables. This will allow the rest of
27507    # the configure script to find and run the compiler in the proper way.
27508    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27509$as_echo "$as_me: Setting extracted environment variables" >&6;}
27510    . $VS_ENV_TMP_DIR/set-vs-env.sh
27511    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27512    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27513  else
27514    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27515    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27516$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27517  fi
27518
27519  # At this point, we should have correct variables in the environment, or we can't continue.
27520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27521$as_echo_n "checking for Visual Studio variables... " >&6; }
27522
27523  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27524    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27526$as_echo "present but broken" >&6; }
27527      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27528    else
27529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27530$as_echo "ok" >&6; }
27531      # Remove any trailing "\" ";" and " " from the variables.
27532      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27533      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27534      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27535      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27536      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27537      # Remove any paths containing # (typically F#) as that messes up make. This
27538      # is needed if visual studio was installed with F# support.
27539      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27540
27541
27542
27543
27544
27545      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27546      OLDIFS="$IFS"
27547      IFS=";"
27548      for i in $VS_INCLUDE; do
27549        ipath=$i
27550	IFS="$OLDIFS"
27551
27552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27553
27554  # Input might be given as Windows format, start by converting to
27555  # unix format.
27556  path="$ipath"
27557  new_path=`$CYGPATH -u "$path"`
27558
27559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27562  # "foo.exe" is OK but "foo" is an error.
27563  #
27564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27565  # It is also a way to make sure we got the proper file name for the real test later on.
27566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27567  if test "x$test_shortpath" = x; then
27568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27569$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27570    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27571  fi
27572
27573  # Call helper function which possibly converts this using DOS-style short mode.
27574  # If so, the updated path is stored in $new_path.
27575
27576  input_path="$new_path"
27577  # Check if we need to convert this using DOS-style short mode. If the path
27578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27579  # take no chances and rewrite it.
27580  # Note: m4 eats our [], so we need to use [ and ] instead.
27581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27582  if test "x$has_forbidden_chars" != x; then
27583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27587      # Going to short mode and back again did indeed matter. Since short mode is
27588      # case insensitive, let's make it lowercase to improve readability.
27589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27590      # Now convert it back to Unix-stile (cygpath)
27591      input_path=`$CYGPATH -u "$shortmode_path"`
27592      new_path="$input_path"
27593    fi
27594  fi
27595
27596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27597  if test "x$test_cygdrive_prefix" = x; then
27598    # As a simple fix, exclude /usr/bin since it's not a real path.
27599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27601      # a path prefixed by /cygdrive for fixpath to work.
27602      new_path="$CYGWIN_ROOT_PATH$input_path"
27603    fi
27604  fi
27605
27606
27607  if test "x$path" != "x$new_path"; then
27608    ipath="$new_path"
27609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27610$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27611  fi
27612
27613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27614
27615  path="$ipath"
27616  has_colon=`$ECHO $path | $GREP ^.:`
27617  new_path="$path"
27618  if test "x$has_colon" = x; then
27619    # Not in mixed or Windows style, start by that.
27620    new_path=`cmd //c echo $path`
27621  fi
27622
27623
27624  input_path="$new_path"
27625  # Check if we need to convert this using DOS-style short mode. If the path
27626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27627  # take no chances and rewrite it.
27628  # Note: m4 eats our [], so we need to use [ and ] instead.
27629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27630  if test "x$has_forbidden_chars" != x; then
27631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27633  fi
27634
27635
27636  windows_path="$new_path"
27637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27638    unix_path=`$CYGPATH -u "$windows_path"`
27639    new_path="$unix_path"
27640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27642    new_path="$unix_path"
27643  fi
27644
27645  if test "x$path" != "x$new_path"; then
27646    ipath="$new_path"
27647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27648$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27649  fi
27650
27651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27653
27654  else
27655    # We're on a unix platform. Hooray! :)
27656    path="$ipath"
27657    has_space=`$ECHO "$path" | $GREP " "`
27658    if test "x$has_space" != x; then
27659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27660$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27661      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27662    fi
27663
27664    # Use eval to expand a potential ~
27665    eval path="$path"
27666    if test ! -f "$path" && test ! -d "$path"; then
27667      as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27668    fi
27669
27670    ipath="`cd "$path"; $THEPWDCMD -L`"
27671  fi
27672
27673	IFS=";"
27674      	SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27675      done
27676      # Convert VS_LIB into SYSROOT_LDFLAGS
27677      for i in $VS_LIB; do
27678        libpath=$i
27679	IFS="$OLDIFS"
27680
27681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27682
27683  # Input might be given as Windows format, start by converting to
27684  # unix format.
27685  path="$libpath"
27686  new_path=`$CYGPATH -u "$path"`
27687
27688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27691  # "foo.exe" is OK but "foo" is an error.
27692  #
27693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27694  # It is also a way to make sure we got the proper file name for the real test later on.
27695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27696  if test "x$test_shortpath" = x; then
27697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27698$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27699    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27700  fi
27701
27702  # Call helper function which possibly converts this using DOS-style short mode.
27703  # If so, the updated path is stored in $new_path.
27704
27705  input_path="$new_path"
27706  # Check if we need to convert this using DOS-style short mode. If the path
27707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27708  # take no chances and rewrite it.
27709  # Note: m4 eats our [], so we need to use [ and ] instead.
27710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27711  if test "x$has_forbidden_chars" != x; then
27712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27716      # Going to short mode and back again did indeed matter. Since short mode is
27717      # case insensitive, let's make it lowercase to improve readability.
27718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27719      # Now convert it back to Unix-stile (cygpath)
27720      input_path=`$CYGPATH -u "$shortmode_path"`
27721      new_path="$input_path"
27722    fi
27723  fi
27724
27725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27726  if test "x$test_cygdrive_prefix" = x; then
27727    # As a simple fix, exclude /usr/bin since it's not a real path.
27728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27730      # a path prefixed by /cygdrive for fixpath to work.
27731      new_path="$CYGWIN_ROOT_PATH$input_path"
27732    fi
27733  fi
27734
27735
27736  if test "x$path" != "x$new_path"; then
27737    libpath="$new_path"
27738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27739$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27740  fi
27741
27742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27743
27744  path="$libpath"
27745  has_colon=`$ECHO $path | $GREP ^.:`
27746  new_path="$path"
27747  if test "x$has_colon" = x; then
27748    # Not in mixed or Windows style, start by that.
27749    new_path=`cmd //c echo $path`
27750  fi
27751
27752
27753  input_path="$new_path"
27754  # Check if we need to convert this using DOS-style short mode. If the path
27755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27756  # take no chances and rewrite it.
27757  # Note: m4 eats our [], so we need to use [ and ] instead.
27758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27759  if test "x$has_forbidden_chars" != x; then
27760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27762  fi
27763
27764
27765  windows_path="$new_path"
27766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27767    unix_path=`$CYGPATH -u "$windows_path"`
27768    new_path="$unix_path"
27769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27771    new_path="$unix_path"
27772  fi
27773
27774  if test "x$path" != "x$new_path"; then
27775    libpath="$new_path"
27776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27777$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27778  fi
27779
27780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27782
27783  else
27784    # We're on a unix platform. Hooray! :)
27785    path="$libpath"
27786    has_space=`$ECHO "$path" | $GREP " "`
27787    if test "x$has_space" != x; then
27788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27789$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27790      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27791    fi
27792
27793    # Use eval to expand a potential ~
27794    eval path="$path"
27795    if test ! -f "$path" && test ! -d "$path"; then
27796      as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
27797    fi
27798
27799    libpath="`cd "$path"; $THEPWDCMD -L`"
27800  fi
27801
27802	IFS=";"
27803      	SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
27804      done
27805      IFS="$OLDIFS"
27806    fi
27807  else
27808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27809$as_echo "not found" >&6; }
27810
27811    if test "x$VS_ENV_CMD" = x; then
27812      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27813$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27814      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27815$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27816    else
27817      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27818$as_echo "$as_me: Running the extraction script failed." >&6;}
27819    fi
27820    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27821$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27822    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27823$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27824    as_fn_error $? "Cannot continue" "$LINENO" 5
27825  fi
27826
27827    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27828    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27829    PATH="$VS_PATH"
27830    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27831    export INCLUDE="$VS_INCLUDE"
27832    export LIB="$VS_LIB"
27833  fi
27834
27835  # autoconf magic only relies on PATH, so update it if tools dir is specified
27836  OLD_PATH="$PATH"
27837
27838  # For solaris we really need solaris tools, and not the GNU equivalent.
27839  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27840  # so add that to path before starting to probe.
27841  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27842  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27843    PATH="/usr/ccs/bin:$PATH"
27844  fi
27845
27846  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27847  # override all other locations.
27848  if test "x$TOOLCHAIN_PATH" != x; then
27849    PATH=$TOOLCHAIN_PATH:$PATH
27850  fi
27851
27852
27853  #
27854  # Setup the compilers (CC and CXX)
27855  #
27856
27857  COMPILER_NAME=C
27858  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27859
27860  if test "x$CC" != x; then
27861    # User has supplied compiler name already, always let that override.
27862    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27863$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27864    if test "x`basename $CC`" = "x$CC"; then
27865      # A command without a complete path is provided, search $PATH.
27866
27867      for ac_prog in $CC
27868do
27869  # Extract the first word of "$ac_prog", so it can be a program name with args.
27870set dummy $ac_prog; ac_word=$2
27871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27872$as_echo_n "checking for $ac_word... " >&6; }
27873if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27874  $as_echo_n "(cached) " >&6
27875else
27876  case $POTENTIAL_CC in
27877  [\\/]* | ?:[\\/]*)
27878  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27879  ;;
27880  *)
27881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27882for as_dir in $PATH
27883do
27884  IFS=$as_save_IFS
27885  test -z "$as_dir" && as_dir=.
27886    for ac_exec_ext in '' $ac_executable_extensions; do
27887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27888    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27890    break 2
27891  fi
27892done
27893  done
27894IFS=$as_save_IFS
27895
27896  ;;
27897esac
27898fi
27899POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27900if test -n "$POTENTIAL_CC"; then
27901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27902$as_echo "$POTENTIAL_CC" >&6; }
27903else
27904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27905$as_echo "no" >&6; }
27906fi
27907
27908
27909  test -n "$POTENTIAL_CC" && break
27910done
27911
27912      if test "x$POTENTIAL_CC" != x; then
27913        CC=$POTENTIAL_CC
27914      else
27915        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27916      fi
27917    else
27918      # Otherwise it might already be a complete path
27919      if test ! -x "$CC"; then
27920        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27921      fi
27922    fi
27923  else
27924    # No user supplied value. Locate compiler ourselves.
27925
27926    # If we are cross compiling, assume cross compilation tools follows the
27927    # cross compilation standard where they are prefixed with the autoconf
27928    # standard name for the target. For example the binary
27929    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27930    # If we are not cross compiling, then the default compiler name will be
27931    # used.
27932
27933    CC=
27934    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27935    # before checking the rest of the PATH.
27936    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27937    # step, this should not be necessary.
27938    if test -n "$TOOLCHAIN_PATH"; then
27939      PATH_save="$PATH"
27940      PATH="$TOOLCHAIN_PATH"
27941      for ac_prog in $SEARCH_LIST
27942do
27943  # Extract the first word of "$ac_prog", so it can be a program name with args.
27944set dummy $ac_prog; ac_word=$2
27945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27946$as_echo_n "checking for $ac_word... " >&6; }
27947if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27948  $as_echo_n "(cached) " >&6
27949else
27950  case $TOOLCHAIN_PATH_CC in
27951  [\\/]* | ?:[\\/]*)
27952  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27953  ;;
27954  *)
27955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27956for as_dir in $PATH
27957do
27958  IFS=$as_save_IFS
27959  test -z "$as_dir" && as_dir=.
27960    for ac_exec_ext in '' $ac_executable_extensions; do
27961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27962    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27964    break 2
27965  fi
27966done
27967  done
27968IFS=$as_save_IFS
27969
27970  ;;
27971esac
27972fi
27973TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27974if test -n "$TOOLCHAIN_PATH_CC"; then
27975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27976$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27977else
27978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27979$as_echo "no" >&6; }
27980fi
27981
27982
27983  test -n "$TOOLCHAIN_PATH_CC" && break
27984done
27985
27986      CC=$TOOLCHAIN_PATH_CC
27987      PATH="$PATH_save"
27988    fi
27989
27990    # AC_PATH_PROGS can't be run multiple times with the same variable,
27991    # so create a new name for this run.
27992    if test "x$CC" = x; then
27993      for ac_prog in $SEARCH_LIST
27994do
27995  # Extract the first word of "$ac_prog", so it can be a program name with args.
27996set dummy $ac_prog; ac_word=$2
27997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27998$as_echo_n "checking for $ac_word... " >&6; }
27999if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28000  $as_echo_n "(cached) " >&6
28001else
28002  case $POTENTIAL_CC in
28003  [\\/]* | ?:[\\/]*)
28004  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28005  ;;
28006  *)
28007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28008for as_dir in $PATH
28009do
28010  IFS=$as_save_IFS
28011  test -z "$as_dir" && as_dir=.
28012    for ac_exec_ext in '' $ac_executable_extensions; do
28013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28014    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28016    break 2
28017  fi
28018done
28019  done
28020IFS=$as_save_IFS
28021
28022  ;;
28023esac
28024fi
28025POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28026if test -n "$POTENTIAL_CC"; then
28027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28028$as_echo "$POTENTIAL_CC" >&6; }
28029else
28030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28031$as_echo "no" >&6; }
28032fi
28033
28034
28035  test -n "$POTENTIAL_CC" && break
28036done
28037
28038      CC=$POTENTIAL_CC
28039    fi
28040
28041    if test "x$CC" = x; then
28042
28043  # Print a helpful message on how to acquire the necessary build dependency.
28044  # devkit is the help tag: freetype, cups, pulse, alsa etc
28045  MISSING_DEPENDENCY=devkit
28046
28047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28048    cygwin_help $MISSING_DEPENDENCY
28049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28050    msys_help $MISSING_DEPENDENCY
28051  else
28052    PKGHANDLER_COMMAND=
28053
28054    case $PKGHANDLER in
28055      apt-get)
28056        apt_help     $MISSING_DEPENDENCY ;;
28057      yum)
28058        yum_help     $MISSING_DEPENDENCY ;;
28059      port)
28060        port_help    $MISSING_DEPENDENCY ;;
28061      pkgutil)
28062        pkgutil_help $MISSING_DEPENDENCY ;;
28063      pkgadd)
28064        pkgadd_help  $MISSING_DEPENDENCY ;;
28065    esac
28066
28067    if test "x$PKGHANDLER_COMMAND" != x; then
28068      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28069    fi
28070  fi
28071
28072      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28073    fi
28074  fi
28075
28076  # Now we have a compiler binary in CC. Make sure it's okay.
28077
28078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28079
28080  # First separate the path from the arguments. This will split at the first
28081  # space.
28082  complete="$CC"
28083  path="${complete%% *}"
28084  tmp="$complete EOL"
28085  arguments="${tmp#* }"
28086
28087  # Input might be given as Windows format, start by converting to
28088  # unix format.
28089  new_path=`$CYGPATH -u "$path"`
28090
28091  # Now try to locate executable using which
28092  new_path=`$WHICH "$new_path" 2> /dev/null`
28093  # bat and cmd files are not always considered executable in cygwin causing which
28094  # to not find them
28095  if test "x$new_path" = x \
28096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28098    new_path=`$CYGPATH -u "$path"`
28099  fi
28100  if test "x$new_path" = x; then
28101    # Oops. Which didn't find the executable.
28102    # The splitting of arguments from the executable at a space might have been incorrect,
28103    # since paths with space are more likely in Windows. Give it another try with the whole
28104    # argument.
28105    path="$complete"
28106    arguments="EOL"
28107    new_path=`$CYGPATH -u "$path"`
28108    new_path=`$WHICH "$new_path" 2> /dev/null`
28109    # bat and cmd files are not always considered executable in cygwin causing which
28110    # to not find them
28111    if test "x$new_path" = x \
28112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28114      new_path=`$CYGPATH -u "$path"`
28115    fi
28116    if test "x$new_path" = x; then
28117      # It's still not found. Now this is an unrecoverable error.
28118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28119$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28120      has_space=`$ECHO "$complete" | $GREP " "`
28121      if test "x$has_space" != x; then
28122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28124      fi
28125      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28126    fi
28127  fi
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    # Short path failed, file does not exist as specified.
28139    # Try adding .exe or .cmd
28140    if test -f "${new_path}.exe"; then
28141      input_to_shortpath="${new_path}.exe"
28142    elif test -f "${new_path}.cmd"; then
28143      input_to_shortpath="${new_path}.cmd"
28144    else
28145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28146$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28149      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28150    fi
28151  else
28152    input_to_shortpath="$new_path"
28153  fi
28154
28155  # Call helper function which possibly converts this using DOS-style short mode.
28156  # If so, the updated path is stored in $new_path.
28157  new_path="$input_to_shortpath"
28158
28159  input_path="$input_to_shortpath"
28160  # Check if we need to convert this using DOS-style short mode. If the path
28161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28162  # take no chances and rewrite it.
28163  # Note: m4 eats our [], so we need to use [ and ] instead.
28164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28165  if test "x$has_forbidden_chars" != x; then
28166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28170      # Going to short mode and back again did indeed matter. Since short mode is
28171      # case insensitive, let's make it lowercase to improve readability.
28172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28173      # Now convert it back to Unix-stile (cygpath)
28174      input_path=`$CYGPATH -u "$shortmode_path"`
28175      new_path="$input_path"
28176    fi
28177  fi
28178
28179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28180  if test "x$test_cygdrive_prefix" = x; then
28181    # As a simple fix, exclude /usr/bin since it's not a real path.
28182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28184      # a path prefixed by /cygdrive for fixpath to work.
28185      new_path="$CYGWIN_ROOT_PATH$input_path"
28186    fi
28187  fi
28188
28189  # remove trailing .exe if any
28190  new_path="${new_path/%.exe/}"
28191
28192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193
28194  # First separate the path from the arguments. This will split at the first
28195  # space.
28196  complete="$CC"
28197  path="${complete%% *}"
28198  tmp="$complete EOL"
28199  arguments="${tmp#* }"
28200
28201  # Input might be given as Windows format, start by converting to
28202  # unix format.
28203  new_path="$path"
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214
28215  # Now try to locate executable using which
28216  new_path=`$WHICH "$new_path" 2> /dev/null`
28217
28218  if test "x$new_path" = x; then
28219    # Oops. Which didn't find the executable.
28220    # The splitting of arguments from the executable at a space might have been incorrect,
28221    # since paths with space are more likely in Windows. Give it another try with the whole
28222    # argument.
28223    path="$complete"
28224    arguments="EOL"
28225    new_path="$path"
28226
28227  windows_path="$new_path"
28228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28229    unix_path=`$CYGPATH -u "$windows_path"`
28230    new_path="$unix_path"
28231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28233    new_path="$unix_path"
28234  fi
28235
28236
28237    new_path=`$WHICH "$new_path" 2> /dev/null`
28238    # bat and cmd files are not always considered executable in MSYS causing which
28239    # to not find them
28240    if test "x$new_path" = x \
28241        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28242        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28243      new_path="$path"
28244
28245  windows_path="$new_path"
28246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28247    unix_path=`$CYGPATH -u "$windows_path"`
28248    new_path="$unix_path"
28249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28251    new_path="$unix_path"
28252  fi
28253
28254    fi
28255
28256    if test "x$new_path" = x; then
28257      # It's still not found. Now this is an unrecoverable error.
28258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28259$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28260      has_space=`$ECHO "$complete" | $GREP " "`
28261      if test "x$has_space" != x; then
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28264      fi
28265      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28266    fi
28267  fi
28268
28269  # Now new_path has a complete unix path to the binary
28270  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28271    # Keep paths in /bin as-is, but remove trailing .exe if any
28272    new_path="${new_path/%.exe/}"
28273    # Do not save /bin paths to all_fixpath_prefixes!
28274  else
28275    # Not in mixed or Windows style, start by that.
28276    new_path=`cmd //c echo $new_path`
28277
28278  input_path="$new_path"
28279  # Check if we need to convert this using DOS-style short mode. If the path
28280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28281  # take no chances and rewrite it.
28282  # Note: m4 eats our [], so we need to use [ and ] instead.
28283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28284  if test "x$has_forbidden_chars" != x; then
28285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28287  fi
28288
28289    # Output is in $new_path
28290
28291  windows_path="$new_path"
28292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28293    unix_path=`$CYGPATH -u "$windows_path"`
28294    new_path="$unix_path"
28295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28297    new_path="$unix_path"
28298  fi
28299
28300    # remove trailing .exe if any
28301    new_path="${new_path/%.exe/}"
28302
28303    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28304    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28305  fi
28306
28307  else
28308    # We're on a unix platform. Hooray! :)
28309    # First separate the path from the arguments. This will split at the first
28310    # space.
28311    complete="$CC"
28312    path="${complete%% *}"
28313    tmp="$complete EOL"
28314    arguments="${tmp#* }"
28315
28316    # Cannot rely on the command "which" here since it doesn't always work.
28317    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28318    if test -z "$is_absolute_path"; then
28319      # Path to executable is not absolute. Find it.
28320      IFS_save="$IFS"
28321      IFS=:
28322      for p in $PATH; do
28323        if test -f "$p/$path" && test -x "$p/$path"; then
28324          new_path="$p/$path"
28325          break
28326        fi
28327      done
28328      IFS="$IFS_save"
28329    else
28330      # This is an absolute path, we can use it without further modifications.
28331      new_path="$path"
28332    fi
28333
28334    if test "x$new_path" = x; then
28335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28336$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28337      has_space=`$ECHO "$complete" | $GREP " "`
28338      if test "x$has_space" != x; then
28339        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28340$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28341      fi
28342      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28343    fi
28344  fi
28345
28346  # Now join together the path and the arguments once again
28347  if test "x$arguments" != xEOL; then
28348    new_complete="$new_path ${arguments% *}"
28349  else
28350    new_complete="$new_path"
28351  fi
28352
28353  if test "x$complete" != "x$new_complete"; then
28354    CC="$new_complete"
28355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28356$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28357  fi
28358
28359  TEST_COMPILER="$CC"
28360  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28361  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28362  if test "x$OPENJDK_BUILD_OS" != xaix; then
28363    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28365$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28366
28367  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28368    # Follow a chain of symbolic links. Use readlink
28369    # where it exists, else fall back to horribly
28370    # complicated shell code.
28371    if test "x$READLINK_TESTED" != yes; then
28372      # On MacOSX there is a readlink tool with a different
28373      # purpose than the GNU readlink tool. Check the found readlink.
28374      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28375      if test "x$ISGNU" = x; then
28376        # A readlink that we do not know how to use.
28377        # Are there other non-GNU readlinks out there?
28378        READLINK_TESTED=yes
28379        READLINK=
28380      fi
28381    fi
28382
28383    if test "x$READLINK" != x; then
28384      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28385    else
28386      # Save the current directory for restoring afterwards
28387      STARTDIR=$PWD
28388      COUNTER=0
28389      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28390      sym_link_file=`$BASENAME $TEST_COMPILER`
28391      cd $sym_link_dir
28392      # Use -P flag to resolve symlinks in directories.
28393      cd `$THEPWDCMD -P`
28394      sym_link_dir=`$THEPWDCMD -P`
28395      # Resolve file symlinks
28396      while test $COUNTER -lt 20; do
28397        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28398        if test "x$ISLINK" == x; then
28399          # This is not a symbolic link! We are done!
28400          break
28401        fi
28402        # Again resolve directory symlinks since the target of the just found
28403        # link could be in a different directory
28404        cd `$DIRNAME $ISLINK`
28405        sym_link_dir=`$THEPWDCMD -P`
28406        sym_link_file=`$BASENAME $ISLINK`
28407        let COUNTER=COUNTER+1
28408      done
28409      cd $STARTDIR
28410      TEST_COMPILER=$sym_link_dir/$sym_link_file
28411    fi
28412  fi
28413
28414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28415$as_echo "$TEST_COMPILER" >&6; }
28416  fi
28417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28418$as_echo_n "checking if CC is disguised ccache... " >&6; }
28419
28420  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28421  if test "x$COMPILER_BASENAME" = "xccache"; then
28422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28423$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28424    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28425    # We want to control ccache invocation ourselves, so ignore this cc and try
28426    # searching again.
28427
28428    # Remove the path to the fake ccache cc from the PATH
28429    RETRY_COMPILER_SAVED_PATH="$PATH"
28430    COMPILER_DIRNAME=`$DIRNAME $CC`
28431    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28432
28433    # Try again looking for our compiler
28434    if test -n "$ac_tool_prefix"; then
28435  for ac_prog in $TOOLCHAIN_CC_BINARY
28436  do
28437    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28438set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28440$as_echo_n "checking for $ac_word... " >&6; }
28441if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28442  $as_echo_n "(cached) " >&6
28443else
28444  if test -n "$PROPER_COMPILER_CC"; then
28445  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28446else
28447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28448for as_dir in $PATH
28449do
28450  IFS=$as_save_IFS
28451  test -z "$as_dir" && as_dir=.
28452    for ac_exec_ext in '' $ac_executable_extensions; do
28453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28454    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28456    break 2
28457  fi
28458done
28459  done
28460IFS=$as_save_IFS
28461
28462fi
28463fi
28464PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28465if test -n "$PROPER_COMPILER_CC"; then
28466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28467$as_echo "$PROPER_COMPILER_CC" >&6; }
28468else
28469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28470$as_echo "no" >&6; }
28471fi
28472
28473
28474    test -n "$PROPER_COMPILER_CC" && break
28475  done
28476fi
28477if test -z "$PROPER_COMPILER_CC"; then
28478  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28479  for ac_prog in $TOOLCHAIN_CC_BINARY
28480do
28481  # Extract the first word of "$ac_prog", so it can be a program name with args.
28482set dummy $ac_prog; ac_word=$2
28483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28484$as_echo_n "checking for $ac_word... " >&6; }
28485if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28486  $as_echo_n "(cached) " >&6
28487else
28488  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28489  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28490else
28491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28492for as_dir in $PATH
28493do
28494  IFS=$as_save_IFS
28495  test -z "$as_dir" && as_dir=.
28496    for ac_exec_ext in '' $ac_executable_extensions; do
28497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28498    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28500    break 2
28501  fi
28502done
28503  done
28504IFS=$as_save_IFS
28505
28506fi
28507fi
28508ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28509if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28511$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28512else
28513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28514$as_echo "no" >&6; }
28515fi
28516
28517
28518  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28519done
28520
28521  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28522    PROPER_COMPILER_CC=""
28523  else
28524    case $cross_compiling:$ac_tool_warned in
28525yes:)
28526{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28528ac_tool_warned=yes ;;
28529esac
28530    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28531  fi
28532fi
28533
28534
28535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28536
28537  # First separate the path from the arguments. This will split at the first
28538  # space.
28539  complete="$PROPER_COMPILER_CC"
28540  path="${complete%% *}"
28541  tmp="$complete EOL"
28542  arguments="${tmp#* }"
28543
28544  # Input might be given as Windows format, start by converting to
28545  # unix format.
28546  new_path=`$CYGPATH -u "$path"`
28547
28548  # Now try to locate executable using which
28549  new_path=`$WHICH "$new_path" 2> /dev/null`
28550  # bat and cmd files are not always considered executable in cygwin causing which
28551  # to not find them
28552  if test "x$new_path" = x \
28553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28555    new_path=`$CYGPATH -u "$path"`
28556  fi
28557  if test "x$new_path" = x; then
28558    # Oops. Which didn't find the executable.
28559    # The splitting of arguments from the executable at a space might have been incorrect,
28560    # since paths with space are more likely in Windows. Give it another try with the whole
28561    # argument.
28562    path="$complete"
28563    arguments="EOL"
28564    new_path=`$CYGPATH -u "$path"`
28565    new_path=`$WHICH "$new_path" 2> /dev/null`
28566    # bat and cmd files are not always considered executable in cygwin causing which
28567    # to not find them
28568    if test "x$new_path" = x \
28569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28571      new_path=`$CYGPATH -u "$path"`
28572    fi
28573    if test "x$new_path" = x; then
28574      # It's still not found. Now this is an unrecoverable error.
28575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28576$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28577      has_space=`$ECHO "$complete" | $GREP " "`
28578      if test "x$has_space" != x; then
28579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28581      fi
28582      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28583    fi
28584  fi
28585
28586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28589  # "foo.exe" is OK but "foo" is an error.
28590  #
28591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28592  # It is also a way to make sure we got the proper file name for the real test later on.
28593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28594  if test "x$test_shortpath" = x; then
28595    # Short path failed, file does not exist as specified.
28596    # Try adding .exe or .cmd
28597    if test -f "${new_path}.exe"; then
28598      input_to_shortpath="${new_path}.exe"
28599    elif test -f "${new_path}.cmd"; then
28600      input_to_shortpath="${new_path}.cmd"
28601    else
28602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28603$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28606      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28607    fi
28608  else
28609    input_to_shortpath="$new_path"
28610  fi
28611
28612  # Call helper function which possibly converts this using DOS-style short mode.
28613  # If so, the updated path is stored in $new_path.
28614  new_path="$input_to_shortpath"
28615
28616  input_path="$input_to_shortpath"
28617  # Check if we need to convert this using DOS-style short mode. If the path
28618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28619  # take no chances and rewrite it.
28620  # Note: m4 eats our [], so we need to use [ and ] instead.
28621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28622  if test "x$has_forbidden_chars" != x; then
28623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28627      # Going to short mode and back again did indeed matter. Since short mode is
28628      # case insensitive, let's make it lowercase to improve readability.
28629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28630      # Now convert it back to Unix-stile (cygpath)
28631      input_path=`$CYGPATH -u "$shortmode_path"`
28632      new_path="$input_path"
28633    fi
28634  fi
28635
28636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28637  if test "x$test_cygdrive_prefix" = x; then
28638    # As a simple fix, exclude /usr/bin since it's not a real path.
28639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28641      # a path prefixed by /cygdrive for fixpath to work.
28642      new_path="$CYGWIN_ROOT_PATH$input_path"
28643    fi
28644  fi
28645
28646  # remove trailing .exe if any
28647  new_path="${new_path/%.exe/}"
28648
28649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28650
28651  # First separate the path from the arguments. This will split at the first
28652  # space.
28653  complete="$PROPER_COMPILER_CC"
28654  path="${complete%% *}"
28655  tmp="$complete EOL"
28656  arguments="${tmp#* }"
28657
28658  # Input might be given as Windows format, start by converting to
28659  # unix format.
28660  new_path="$path"
28661
28662  windows_path="$new_path"
28663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28664    unix_path=`$CYGPATH -u "$windows_path"`
28665    new_path="$unix_path"
28666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28668    new_path="$unix_path"
28669  fi
28670
28671
28672  # Now try to locate executable using which
28673  new_path=`$WHICH "$new_path" 2> /dev/null`
28674
28675  if test "x$new_path" = x; then
28676    # Oops. Which didn't find the executable.
28677    # The splitting of arguments from the executable at a space might have been incorrect,
28678    # since paths with space are more likely in Windows. Give it another try with the whole
28679    # argument.
28680    path="$complete"
28681    arguments="EOL"
28682    new_path="$path"
28683
28684  windows_path="$new_path"
28685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28686    unix_path=`$CYGPATH -u "$windows_path"`
28687    new_path="$unix_path"
28688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28690    new_path="$unix_path"
28691  fi
28692
28693
28694    new_path=`$WHICH "$new_path" 2> /dev/null`
28695    # bat and cmd files are not always considered executable in MSYS causing which
28696    # to not find them
28697    if test "x$new_path" = x \
28698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28700      new_path="$path"
28701
28702  windows_path="$new_path"
28703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28704    unix_path=`$CYGPATH -u "$windows_path"`
28705    new_path="$unix_path"
28706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28708    new_path="$unix_path"
28709  fi
28710
28711    fi
28712
28713    if test "x$new_path" = x; then
28714      # It's still not found. Now this is an unrecoverable error.
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28716$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28717      has_space=`$ECHO "$complete" | $GREP " "`
28718      if test "x$has_space" != x; then
28719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28721      fi
28722      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28723    fi
28724  fi
28725
28726  # Now new_path has a complete unix path to the binary
28727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28728    # Keep paths in /bin as-is, but remove trailing .exe if any
28729    new_path="${new_path/%.exe/}"
28730    # Do not save /bin paths to all_fixpath_prefixes!
28731  else
28732    # Not in mixed or Windows style, start by that.
28733    new_path=`cmd //c echo $new_path`
28734
28735  input_path="$new_path"
28736  # Check if we need to convert this using DOS-style short mode. If the path
28737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28738  # take no chances and rewrite it.
28739  # Note: m4 eats our [], so we need to use [ and ] instead.
28740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28741  if test "x$has_forbidden_chars" != x; then
28742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28744  fi
28745
28746    # Output is in $new_path
28747
28748  windows_path="$new_path"
28749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28750    unix_path=`$CYGPATH -u "$windows_path"`
28751    new_path="$unix_path"
28752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28754    new_path="$unix_path"
28755  fi
28756
28757    # remove trailing .exe if any
28758    new_path="${new_path/%.exe/}"
28759
28760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28762  fi
28763
28764  else
28765    # We're on a unix platform. Hooray! :)
28766    # First separate the path from the arguments. This will split at the first
28767    # space.
28768    complete="$PROPER_COMPILER_CC"
28769    path="${complete%% *}"
28770    tmp="$complete EOL"
28771    arguments="${tmp#* }"
28772
28773    # Cannot rely on the command "which" here since it doesn't always work.
28774    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28775    if test -z "$is_absolute_path"; then
28776      # Path to executable is not absolute. Find it.
28777      IFS_save="$IFS"
28778      IFS=:
28779      for p in $PATH; do
28780        if test -f "$p/$path" && test -x "$p/$path"; then
28781          new_path="$p/$path"
28782          break
28783        fi
28784      done
28785      IFS="$IFS_save"
28786    else
28787      # This is an absolute path, we can use it without further modifications.
28788      new_path="$path"
28789    fi
28790
28791    if test "x$new_path" = x; then
28792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28793$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28794      has_space=`$ECHO "$complete" | $GREP " "`
28795      if test "x$has_space" != x; then
28796        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28798      fi
28799      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28800    fi
28801  fi
28802
28803  # Now join together the path and the arguments once again
28804  if test "x$arguments" != xEOL; then
28805    new_complete="$new_path ${arguments% *}"
28806  else
28807    new_complete="$new_path"
28808  fi
28809
28810  if test "x$complete" != "x$new_complete"; then
28811    PROPER_COMPILER_CC="$new_complete"
28812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28813$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28814  fi
28815
28816    PATH="$RETRY_COMPILER_SAVED_PATH"
28817
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28819$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28820
28821  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28822    # Follow a chain of symbolic links. Use readlink
28823    # where it exists, else fall back to horribly
28824    # complicated shell code.
28825    if test "x$READLINK_TESTED" != yes; then
28826      # On MacOSX there is a readlink tool with a different
28827      # purpose than the GNU readlink tool. Check the found readlink.
28828      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28829      if test "x$ISGNU" = x; then
28830        # A readlink that we do not know how to use.
28831        # Are there other non-GNU readlinks out there?
28832        READLINK_TESTED=yes
28833        READLINK=
28834      fi
28835    fi
28836
28837    if test "x$READLINK" != x; then
28838      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28839    else
28840      # Save the current directory for restoring afterwards
28841      STARTDIR=$PWD
28842      COUNTER=0
28843      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28844      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28845      cd $sym_link_dir
28846      # Use -P flag to resolve symlinks in directories.
28847      cd `$THEPWDCMD -P`
28848      sym_link_dir=`$THEPWDCMD -P`
28849      # Resolve file symlinks
28850      while test $COUNTER -lt 20; do
28851        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28852        if test "x$ISLINK" == x; then
28853          # This is not a symbolic link! We are done!
28854          break
28855        fi
28856        # Again resolve directory symlinks since the target of the just found
28857        # link could be in a different directory
28858        cd `$DIRNAME $ISLINK`
28859        sym_link_dir=`$THEPWDCMD -P`
28860        sym_link_file=`$BASENAME $ISLINK`
28861        let COUNTER=COUNTER+1
28862      done
28863      cd $STARTDIR
28864      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28865    fi
28866  fi
28867
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28869$as_echo "$PROPER_COMPILER_CC" >&6; }
28870    CC="$PROPER_COMPILER_CC"
28871  else
28872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28873$as_echo "no, keeping CC" >&6; }
28874  fi
28875
28876
28877  COMPILER=$CC
28878  COMPILER_NAME=$COMPILER_NAME
28879
28880  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28881    # cc -V output typically looks like
28882    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28883    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28884    # Check that this is likely to be the Solaris Studio cc.
28885    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28886    if test $? -ne 0; then
28887      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28888      { $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
28889$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28890      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28891$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28892      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28893$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28894      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28895    fi
28896    # Remove usage instructions (if present), and
28897    # collapse compiler output into a single line
28898    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28899        $SED -e 's/ *[Uu]sage:.*//'`
28900    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28901        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28902  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28903    # xlc -qversion output typically looks like
28904    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28905    #     Version: 11.01.0000.0015
28906    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28907    # Check that this is likely to be the IBM XL C compiler.
28908    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28909    if test $? -ne 0; then
28910      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28911      { $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
28912$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28913      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28914$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28915      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28916$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28917      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28918    fi
28919    # Collapse compiler output into a single line
28920    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28921    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28922        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28923  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28924    # There is no specific version flag, but all output starts with a version string.
28925    # First line typically looks something like:
28926    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28927    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28928    # Check that this is likely to be Microsoft CL.EXE.
28929    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28930    if test $? -ne 0; then
28931      { $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
28932$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28933      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28934$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28935      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28936    fi
28937    # Collapse compiler output into a single line
28938    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28939    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28940        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28941  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28942    # gcc --version output typically looks like
28943    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28944    #     Copyright (C) 2013 Free Software Foundation, Inc.
28945    #     This is free software; see the source for copying conditions.  There is NO
28946    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28947    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28948    # Check that this is likely to be GCC.
28949    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28950    if test $? -ne 0; then
28951      { $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
28952$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28953      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28954$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28955      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28956    fi
28957    # Remove Copyright and legalese from version string, and
28958    # collapse into a single line
28959    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28960        $SED -e 's/ *Copyright .*//'`
28961    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28962        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28963  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28964    # clang --version output typically looks like
28965    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28966    #    clang version 3.3 (tags/RELEASE_33/final)
28967    # or
28968    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28969    #    Target: x86_64-pc-linux-gnu
28970    #    Thread model: posix
28971    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28972    # Check that this is likely to be clang
28973    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28974    if test $? -ne 0; then
28975      { $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
28976$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28977      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28978$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28979      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28980    fi
28981    # Collapse compiler output into a single line
28982    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28983    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28984        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28985  else
28986      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28987  fi
28988  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28989  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28990  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28991  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28992
28993  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28994$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28995
28996
28997  # Now that we have resolved CC ourself, let autoconf have its go at it
28998  ac_ext=c
28999ac_cpp='$CPP $CPPFLAGS'
29000ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29001ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29002ac_compiler_gnu=$ac_cv_c_compiler_gnu
29003if test -n "$ac_tool_prefix"; then
29004  for ac_prog in $CC
29005  do
29006    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29009$as_echo_n "checking for $ac_word... " >&6; }
29010if ${ac_cv_prog_CC+:} false; then :
29011  $as_echo_n "(cached) " >&6
29012else
29013  if test -n "$CC"; then
29014  ac_cv_prog_CC="$CC" # Let the user override the test.
29015else
29016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29017for as_dir in $PATH
29018do
29019  IFS=$as_save_IFS
29020  test -z "$as_dir" && as_dir=.
29021    for ac_exec_ext in '' $ac_executable_extensions; do
29022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29023    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29025    break 2
29026  fi
29027done
29028  done
29029IFS=$as_save_IFS
29030
29031fi
29032fi
29033CC=$ac_cv_prog_CC
29034if test -n "$CC"; then
29035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29036$as_echo "$CC" >&6; }
29037else
29038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29039$as_echo "no" >&6; }
29040fi
29041
29042
29043    test -n "$CC" && break
29044  done
29045fi
29046if test -z "$CC"; then
29047  ac_ct_CC=$CC
29048  for ac_prog in $CC
29049do
29050  # Extract the first word of "$ac_prog", so it can be a program name with args.
29051set dummy $ac_prog; ac_word=$2
29052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29053$as_echo_n "checking for $ac_word... " >&6; }
29054if ${ac_cv_prog_ac_ct_CC+:} false; then :
29055  $as_echo_n "(cached) " >&6
29056else
29057  if test -n "$ac_ct_CC"; then
29058  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29059else
29060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29061for as_dir in $PATH
29062do
29063  IFS=$as_save_IFS
29064  test -z "$as_dir" && as_dir=.
29065    for ac_exec_ext in '' $ac_executable_extensions; do
29066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29067    ac_cv_prog_ac_ct_CC="$ac_prog"
29068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29069    break 2
29070  fi
29071done
29072  done
29073IFS=$as_save_IFS
29074
29075fi
29076fi
29077ac_ct_CC=$ac_cv_prog_ac_ct_CC
29078if test -n "$ac_ct_CC"; then
29079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29080$as_echo "$ac_ct_CC" >&6; }
29081else
29082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29083$as_echo "no" >&6; }
29084fi
29085
29086
29087  test -n "$ac_ct_CC" && break
29088done
29089
29090  if test "x$ac_ct_CC" = x; then
29091    CC=""
29092  else
29093    case $cross_compiling:$ac_tool_warned in
29094yes:)
29095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29097ac_tool_warned=yes ;;
29098esac
29099    CC=$ac_ct_CC
29100  fi
29101fi
29102
29103
29104test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29106as_fn_error $? "no acceptable C compiler found in \$PATH
29107See \`config.log' for more details" "$LINENO" 5; }
29108
29109# Provide some information about the compiler.
29110$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29111set X $ac_compile
29112ac_compiler=$2
29113for ac_option in --version -v -V -qversion; do
29114  { { ac_try="$ac_compiler $ac_option >&5"
29115case "(($ac_try" in
29116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29117  *) ac_try_echo=$ac_try;;
29118esac
29119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29120$as_echo "$ac_try_echo"; } >&5
29121  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29122  ac_status=$?
29123  if test -s conftest.err; then
29124    sed '10a\
29125... rest of stderr output deleted ...
29126         10q' conftest.err >conftest.er1
29127    cat conftest.er1 >&5
29128  fi
29129  rm -f conftest.er1 conftest.err
29130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29131  test $ac_status = 0; }
29132done
29133
29134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29135/* end confdefs.h.  */
29136
29137int
29138main ()
29139{
29140
29141  ;
29142  return 0;
29143}
29144_ACEOF
29145ac_clean_files_save=$ac_clean_files
29146ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29147# Try to create an executable without -o first, disregard a.out.
29148# It will help us diagnose broken compilers, and finding out an intuition
29149# of exeext.
29150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29151$as_echo_n "checking whether the C compiler works... " >&6; }
29152ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29153
29154# The possible output files:
29155ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29156
29157ac_rmfiles=
29158for ac_file in $ac_files
29159do
29160  case $ac_file in
29161    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29162    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29163  esac
29164done
29165rm -f $ac_rmfiles
29166
29167if { { ac_try="$ac_link_default"
29168case "(($ac_try" in
29169  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29170  *) ac_try_echo=$ac_try;;
29171esac
29172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29173$as_echo "$ac_try_echo"; } >&5
29174  (eval "$ac_link_default") 2>&5
29175  ac_status=$?
29176  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29177  test $ac_status = 0; }; then :
29178  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29179# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29180# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29181# so that the user can short-circuit this test for compilers unknown to
29182# Autoconf.
29183for ac_file in $ac_files ''
29184do
29185  test -f "$ac_file" || continue
29186  case $ac_file in
29187    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29188	;;
29189    [ab].out )
29190	# We found the default executable, but exeext='' is most
29191	# certainly right.
29192	break;;
29193    *.* )
29194	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29195	then :; else
29196	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29197	fi
29198	# We set ac_cv_exeext here because the later test for it is not
29199	# safe: cross compilers may not add the suffix if given an `-o'
29200	# argument, so we may need to know it at that point already.
29201	# Even if this section looks crufty: it has the advantage of
29202	# actually working.
29203	break;;
29204    * )
29205	break;;
29206  esac
29207done
29208test "$ac_cv_exeext" = no && ac_cv_exeext=
29209
29210else
29211  ac_file=''
29212fi
29213if test -z "$ac_file"; then :
29214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29215$as_echo "no" >&6; }
29216$as_echo "$as_me: failed program was:" >&5
29217sed 's/^/| /' conftest.$ac_ext >&5
29218
29219{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29221as_fn_error 77 "C compiler cannot create executables
29222See \`config.log' for more details" "$LINENO" 5; }
29223else
29224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29225$as_echo "yes" >&6; }
29226fi
29227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29228$as_echo_n "checking for C compiler default output file name... " >&6; }
29229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29230$as_echo "$ac_file" >&6; }
29231ac_exeext=$ac_cv_exeext
29232
29233rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29234ac_clean_files=$ac_clean_files_save
29235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29236$as_echo_n "checking for suffix of executables... " >&6; }
29237if { { ac_try="$ac_link"
29238case "(($ac_try" in
29239  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29240  *) ac_try_echo=$ac_try;;
29241esac
29242eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29243$as_echo "$ac_try_echo"; } >&5
29244  (eval "$ac_link") 2>&5
29245  ac_status=$?
29246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29247  test $ac_status = 0; }; then :
29248  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29249# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29250# work properly (i.e., refer to `conftest.exe'), while it won't with
29251# `rm'.
29252for ac_file in conftest.exe conftest conftest.*; do
29253  test -f "$ac_file" || continue
29254  case $ac_file in
29255    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29256    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29257	  break;;
29258    * ) break;;
29259  esac
29260done
29261else
29262  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29264as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29265See \`config.log' for more details" "$LINENO" 5; }
29266fi
29267rm -f conftest conftest$ac_cv_exeext
29268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29269$as_echo "$ac_cv_exeext" >&6; }
29270
29271rm -f conftest.$ac_ext
29272EXEEXT=$ac_cv_exeext
29273ac_exeext=$EXEEXT
29274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29275/* end confdefs.h.  */
29276#include <stdio.h>
29277int
29278main ()
29279{
29280FILE *f = fopen ("conftest.out", "w");
29281 return ferror (f) || fclose (f) != 0;
29282
29283  ;
29284  return 0;
29285}
29286_ACEOF
29287ac_clean_files="$ac_clean_files conftest.out"
29288# Check that the compiler produces executables we can run.  If not, either
29289# the compiler is broken, or we cross compile.
29290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29291$as_echo_n "checking whether we are cross compiling... " >&6; }
29292if test "$cross_compiling" != yes; then
29293  { { ac_try="$ac_link"
29294case "(($ac_try" in
29295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29296  *) ac_try_echo=$ac_try;;
29297esac
29298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29299$as_echo "$ac_try_echo"; } >&5
29300  (eval "$ac_link") 2>&5
29301  ac_status=$?
29302  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29303  test $ac_status = 0; }
29304  if { ac_try='./conftest$ac_cv_exeext'
29305  { { case "(($ac_try" in
29306  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29307  *) ac_try_echo=$ac_try;;
29308esac
29309eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29310$as_echo "$ac_try_echo"; } >&5
29311  (eval "$ac_try") 2>&5
29312  ac_status=$?
29313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29314  test $ac_status = 0; }; }; then
29315    cross_compiling=no
29316  else
29317    if test "$cross_compiling" = maybe; then
29318	cross_compiling=yes
29319    else
29320	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29322as_fn_error $? "cannot run C compiled programs.
29323If you meant to cross compile, use \`--host'.
29324See \`config.log' for more details" "$LINENO" 5; }
29325    fi
29326  fi
29327fi
29328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29329$as_echo "$cross_compiling" >&6; }
29330
29331rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29332ac_clean_files=$ac_clean_files_save
29333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29334$as_echo_n "checking for suffix of object files... " >&6; }
29335if ${ac_cv_objext+:} false; then :
29336  $as_echo_n "(cached) " >&6
29337else
29338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29339/* end confdefs.h.  */
29340
29341int
29342main ()
29343{
29344
29345  ;
29346  return 0;
29347}
29348_ACEOF
29349rm -f conftest.o conftest.obj
29350if { { ac_try="$ac_compile"
29351case "(($ac_try" in
29352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29353  *) ac_try_echo=$ac_try;;
29354esac
29355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29356$as_echo "$ac_try_echo"; } >&5
29357  (eval "$ac_compile") 2>&5
29358  ac_status=$?
29359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29360  test $ac_status = 0; }; then :
29361  for ac_file in conftest.o conftest.obj conftest.*; do
29362  test -f "$ac_file" || continue;
29363  case $ac_file in
29364    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29365    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29366       break;;
29367  esac
29368done
29369else
29370  $as_echo "$as_me: failed program was:" >&5
29371sed 's/^/| /' conftest.$ac_ext >&5
29372
29373{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29375as_fn_error $? "cannot compute suffix of object files: cannot compile
29376See \`config.log' for more details" "$LINENO" 5; }
29377fi
29378rm -f conftest.$ac_cv_objext conftest.$ac_ext
29379fi
29380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29381$as_echo "$ac_cv_objext" >&6; }
29382OBJEXT=$ac_cv_objext
29383ac_objext=$OBJEXT
29384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29385$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29386if ${ac_cv_c_compiler_gnu+:} false; then :
29387  $as_echo_n "(cached) " >&6
29388else
29389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29390/* end confdefs.h.  */
29391
29392int
29393main ()
29394{
29395#ifndef __GNUC__
29396       choke me
29397#endif
29398
29399  ;
29400  return 0;
29401}
29402_ACEOF
29403if ac_fn_c_try_compile "$LINENO"; then :
29404  ac_compiler_gnu=yes
29405else
29406  ac_compiler_gnu=no
29407fi
29408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29409ac_cv_c_compiler_gnu=$ac_compiler_gnu
29410
29411fi
29412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29413$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29414if test $ac_compiler_gnu = yes; then
29415  GCC=yes
29416else
29417  GCC=
29418fi
29419ac_test_CFLAGS=${CFLAGS+set}
29420ac_save_CFLAGS=$CFLAGS
29421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29422$as_echo_n "checking whether $CC accepts -g... " >&6; }
29423if ${ac_cv_prog_cc_g+:} false; then :
29424  $as_echo_n "(cached) " >&6
29425else
29426  ac_save_c_werror_flag=$ac_c_werror_flag
29427   ac_c_werror_flag=yes
29428   ac_cv_prog_cc_g=no
29429   CFLAGS="-g"
29430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29431/* end confdefs.h.  */
29432
29433int
29434main ()
29435{
29436
29437  ;
29438  return 0;
29439}
29440_ACEOF
29441if ac_fn_c_try_compile "$LINENO"; then :
29442  ac_cv_prog_cc_g=yes
29443else
29444  CFLAGS=""
29445      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29446/* end confdefs.h.  */
29447
29448int
29449main ()
29450{
29451
29452  ;
29453  return 0;
29454}
29455_ACEOF
29456if ac_fn_c_try_compile "$LINENO"; then :
29457
29458else
29459  ac_c_werror_flag=$ac_save_c_werror_flag
29460	 CFLAGS="-g"
29461	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29462/* end confdefs.h.  */
29463
29464int
29465main ()
29466{
29467
29468  ;
29469  return 0;
29470}
29471_ACEOF
29472if ac_fn_c_try_compile "$LINENO"; then :
29473  ac_cv_prog_cc_g=yes
29474fi
29475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29476fi
29477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29478fi
29479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29480   ac_c_werror_flag=$ac_save_c_werror_flag
29481fi
29482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29483$as_echo "$ac_cv_prog_cc_g" >&6; }
29484if test "$ac_test_CFLAGS" = set; then
29485  CFLAGS=$ac_save_CFLAGS
29486elif test $ac_cv_prog_cc_g = yes; then
29487  if test "$GCC" = yes; then
29488    CFLAGS="-g -O2"
29489  else
29490    CFLAGS="-g"
29491  fi
29492else
29493  if test "$GCC" = yes; then
29494    CFLAGS="-O2"
29495  else
29496    CFLAGS=
29497  fi
29498fi
29499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29500$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29501if ${ac_cv_prog_cc_c89+:} false; then :
29502  $as_echo_n "(cached) " >&6
29503else
29504  ac_cv_prog_cc_c89=no
29505ac_save_CC=$CC
29506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29507/* end confdefs.h.  */
29508#include <stdarg.h>
29509#include <stdio.h>
29510struct stat;
29511/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29512struct buf { int x; };
29513FILE * (*rcsopen) (struct buf *, struct stat *, int);
29514static char *e (p, i)
29515     char **p;
29516     int i;
29517{
29518  return p[i];
29519}
29520static char *f (char * (*g) (char **, int), char **p, ...)
29521{
29522  char *s;
29523  va_list v;
29524  va_start (v,p);
29525  s = g (p, va_arg (v,int));
29526  va_end (v);
29527  return s;
29528}
29529
29530/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29531   function prototypes and stuff, but not '\xHH' hex character constants.
29532   These don't provoke an error unfortunately, instead are silently treated
29533   as 'x'.  The following induces an error, until -std is added to get
29534   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29535   array size at least.  It's necessary to write '\x00'==0 to get something
29536   that's true only with -std.  */
29537int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29538
29539/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29540   inside strings and character constants.  */
29541#define FOO(x) 'x'
29542int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29543
29544int test (int i, double x);
29545struct s1 {int (*f) (int a);};
29546struct s2 {int (*f) (double a);};
29547int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29548int argc;
29549char **argv;
29550int
29551main ()
29552{
29553return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29554  ;
29555  return 0;
29556}
29557_ACEOF
29558for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29559	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29560do
29561  CC="$ac_save_CC $ac_arg"
29562  if ac_fn_c_try_compile "$LINENO"; then :
29563  ac_cv_prog_cc_c89=$ac_arg
29564fi
29565rm -f core conftest.err conftest.$ac_objext
29566  test "x$ac_cv_prog_cc_c89" != "xno" && break
29567done
29568rm -f conftest.$ac_ext
29569CC=$ac_save_CC
29570
29571fi
29572# AC_CACHE_VAL
29573case "x$ac_cv_prog_cc_c89" in
29574  x)
29575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29576$as_echo "none needed" >&6; } ;;
29577  xno)
29578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29579$as_echo "unsupported" >&6; } ;;
29580  *)
29581    CC="$CC $ac_cv_prog_cc_c89"
29582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29583$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29584esac
29585if test "x$ac_cv_prog_cc_c89" != xno; then :
29586
29587fi
29588
29589ac_ext=cpp
29590ac_cpp='$CXXCPP $CPPFLAGS'
29591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29594
29595
29596
29597  COMPILER_NAME=C++
29598  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29599
29600  if test "x$CXX" != x; then
29601    # User has supplied compiler name already, always let that override.
29602    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29603$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29604    if test "x`basename $CXX`" = "x$CXX"; then
29605      # A command without a complete path is provided, search $PATH.
29606
29607      for ac_prog in $CXX
29608do
29609  # Extract the first word of "$ac_prog", so it can be a program name with args.
29610set dummy $ac_prog; ac_word=$2
29611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29612$as_echo_n "checking for $ac_word... " >&6; }
29613if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29614  $as_echo_n "(cached) " >&6
29615else
29616  case $POTENTIAL_CXX in
29617  [\\/]* | ?:[\\/]*)
29618  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29619  ;;
29620  *)
29621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29622for as_dir in $PATH
29623do
29624  IFS=$as_save_IFS
29625  test -z "$as_dir" && as_dir=.
29626    for ac_exec_ext in '' $ac_executable_extensions; do
29627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29628    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29630    break 2
29631  fi
29632done
29633  done
29634IFS=$as_save_IFS
29635
29636  ;;
29637esac
29638fi
29639POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29640if test -n "$POTENTIAL_CXX"; then
29641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29642$as_echo "$POTENTIAL_CXX" >&6; }
29643else
29644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29645$as_echo "no" >&6; }
29646fi
29647
29648
29649  test -n "$POTENTIAL_CXX" && break
29650done
29651
29652      if test "x$POTENTIAL_CXX" != x; then
29653        CXX=$POTENTIAL_CXX
29654      else
29655        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29656      fi
29657    else
29658      # Otherwise it might already be a complete path
29659      if test ! -x "$CXX"; then
29660        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29661      fi
29662    fi
29663  else
29664    # No user supplied value. Locate compiler ourselves.
29665
29666    # If we are cross compiling, assume cross compilation tools follows the
29667    # cross compilation standard where they are prefixed with the autoconf
29668    # standard name for the target. For example the binary
29669    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29670    # If we are not cross compiling, then the default compiler name will be
29671    # used.
29672
29673    CXX=
29674    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29675    # before checking the rest of the PATH.
29676    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29677    # step, this should not be necessary.
29678    if test -n "$TOOLCHAIN_PATH"; then
29679      PATH_save="$PATH"
29680      PATH="$TOOLCHAIN_PATH"
29681      for ac_prog in $SEARCH_LIST
29682do
29683  # Extract the first word of "$ac_prog", so it can be a program name with args.
29684set dummy $ac_prog; ac_word=$2
29685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29686$as_echo_n "checking for $ac_word... " >&6; }
29687if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29688  $as_echo_n "(cached) " >&6
29689else
29690  case $TOOLCHAIN_PATH_CXX in
29691  [\\/]* | ?:[\\/]*)
29692  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29693  ;;
29694  *)
29695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29696for as_dir in $PATH
29697do
29698  IFS=$as_save_IFS
29699  test -z "$as_dir" && as_dir=.
29700    for ac_exec_ext in '' $ac_executable_extensions; do
29701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29702    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29704    break 2
29705  fi
29706done
29707  done
29708IFS=$as_save_IFS
29709
29710  ;;
29711esac
29712fi
29713TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29714if test -n "$TOOLCHAIN_PATH_CXX"; then
29715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29716$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29717else
29718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29719$as_echo "no" >&6; }
29720fi
29721
29722
29723  test -n "$TOOLCHAIN_PATH_CXX" && break
29724done
29725
29726      CXX=$TOOLCHAIN_PATH_CXX
29727      PATH="$PATH_save"
29728    fi
29729
29730    # AC_PATH_PROGS can't be run multiple times with the same variable,
29731    # so create a new name for this run.
29732    if test "x$CXX" = x; then
29733      for ac_prog in $SEARCH_LIST
29734do
29735  # Extract the first word of "$ac_prog", so it can be a program name with args.
29736set dummy $ac_prog; ac_word=$2
29737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29738$as_echo_n "checking for $ac_word... " >&6; }
29739if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29740  $as_echo_n "(cached) " >&6
29741else
29742  case $POTENTIAL_CXX in
29743  [\\/]* | ?:[\\/]*)
29744  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29745  ;;
29746  *)
29747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29748for as_dir in $PATH
29749do
29750  IFS=$as_save_IFS
29751  test -z "$as_dir" && as_dir=.
29752    for ac_exec_ext in '' $ac_executable_extensions; do
29753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29754    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29756    break 2
29757  fi
29758done
29759  done
29760IFS=$as_save_IFS
29761
29762  ;;
29763esac
29764fi
29765POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29766if test -n "$POTENTIAL_CXX"; then
29767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29768$as_echo "$POTENTIAL_CXX" >&6; }
29769else
29770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29771$as_echo "no" >&6; }
29772fi
29773
29774
29775  test -n "$POTENTIAL_CXX" && break
29776done
29777
29778      CXX=$POTENTIAL_CXX
29779    fi
29780
29781    if test "x$CXX" = x; then
29782
29783  # Print a helpful message on how to acquire the necessary build dependency.
29784  # devkit is the help tag: freetype, cups, pulse, alsa etc
29785  MISSING_DEPENDENCY=devkit
29786
29787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29788    cygwin_help $MISSING_DEPENDENCY
29789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29790    msys_help $MISSING_DEPENDENCY
29791  else
29792    PKGHANDLER_COMMAND=
29793
29794    case $PKGHANDLER in
29795      apt-get)
29796        apt_help     $MISSING_DEPENDENCY ;;
29797      yum)
29798        yum_help     $MISSING_DEPENDENCY ;;
29799      port)
29800        port_help    $MISSING_DEPENDENCY ;;
29801      pkgutil)
29802        pkgutil_help $MISSING_DEPENDENCY ;;
29803      pkgadd)
29804        pkgadd_help  $MISSING_DEPENDENCY ;;
29805    esac
29806
29807    if test "x$PKGHANDLER_COMMAND" != x; then
29808      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29809    fi
29810  fi
29811
29812      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29813    fi
29814  fi
29815
29816  # Now we have a compiler binary in CXX. Make sure it's okay.
29817
29818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29819
29820  # First separate the path from the arguments. This will split at the first
29821  # space.
29822  complete="$CXX"
29823  path="${complete%% *}"
29824  tmp="$complete EOL"
29825  arguments="${tmp#* }"
29826
29827  # Input might be given as Windows format, start by converting to
29828  # unix format.
29829  new_path=`$CYGPATH -u "$path"`
29830
29831  # Now try to locate executable using which
29832  new_path=`$WHICH "$new_path" 2> /dev/null`
29833  # bat and cmd files are not always considered executable in cygwin causing which
29834  # to not find them
29835  if test "x$new_path" = x \
29836      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29837      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29838    new_path=`$CYGPATH -u "$path"`
29839  fi
29840  if test "x$new_path" = x; then
29841    # Oops. Which didn't find the executable.
29842    # The splitting of arguments from the executable at a space might have been incorrect,
29843    # since paths with space are more likely in Windows. Give it another try with the whole
29844    # argument.
29845    path="$complete"
29846    arguments="EOL"
29847    new_path=`$CYGPATH -u "$path"`
29848    new_path=`$WHICH "$new_path" 2> /dev/null`
29849    # bat and cmd files are not always considered executable in cygwin causing which
29850    # to not find them
29851    if test "x$new_path" = x \
29852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29854      new_path=`$CYGPATH -u "$path"`
29855    fi
29856    if test "x$new_path" = x; then
29857      # It's still not found. Now this is an unrecoverable error.
29858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29859$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29860      has_space=`$ECHO "$complete" | $GREP " "`
29861      if test "x$has_space" != x; then
29862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29864      fi
29865      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29866    fi
29867  fi
29868
29869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29872  # "foo.exe" is OK but "foo" is an error.
29873  #
29874  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29875  # It is also a way to make sure we got the proper file name for the real test later on.
29876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29877  if test "x$test_shortpath" = x; then
29878    # Short path failed, file does not exist as specified.
29879    # Try adding .exe or .cmd
29880    if test -f "${new_path}.exe"; then
29881      input_to_shortpath="${new_path}.exe"
29882    elif test -f "${new_path}.cmd"; then
29883      input_to_shortpath="${new_path}.cmd"
29884    else
29885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29886$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29887      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29888$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29889      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29890    fi
29891  else
29892    input_to_shortpath="$new_path"
29893  fi
29894
29895  # Call helper function which possibly converts this using DOS-style short mode.
29896  # If so, the updated path is stored in $new_path.
29897  new_path="$input_to_shortpath"
29898
29899  input_path="$input_to_shortpath"
29900  # Check if we need to convert this using DOS-style short mode. If the path
29901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29902  # take no chances and rewrite it.
29903  # Note: m4 eats our [], so we need to use [ and ] instead.
29904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29905  if test "x$has_forbidden_chars" != x; then
29906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29910      # Going to short mode and back again did indeed matter. Since short mode is
29911      # case insensitive, let's make it lowercase to improve readability.
29912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29913      # Now convert it back to Unix-stile (cygpath)
29914      input_path=`$CYGPATH -u "$shortmode_path"`
29915      new_path="$input_path"
29916    fi
29917  fi
29918
29919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29920  if test "x$test_cygdrive_prefix" = x; then
29921    # As a simple fix, exclude /usr/bin since it's not a real path.
29922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29924      # a path prefixed by /cygdrive for fixpath to work.
29925      new_path="$CYGWIN_ROOT_PATH$input_path"
29926    fi
29927  fi
29928
29929  # remove trailing .exe if any
29930  new_path="${new_path/%.exe/}"
29931
29932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29933
29934  # First separate the path from the arguments. This will split at the first
29935  # space.
29936  complete="$CXX"
29937  path="${complete%% *}"
29938  tmp="$complete EOL"
29939  arguments="${tmp#* }"
29940
29941  # Input might be given as Windows format, start by converting to
29942  # unix format.
29943  new_path="$path"
29944
29945  windows_path="$new_path"
29946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29947    unix_path=`$CYGPATH -u "$windows_path"`
29948    new_path="$unix_path"
29949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29951    new_path="$unix_path"
29952  fi
29953
29954
29955  # Now try to locate executable using which
29956  new_path=`$WHICH "$new_path" 2> /dev/null`
29957
29958  if test "x$new_path" = x; then
29959    # Oops. Which didn't find the executable.
29960    # The splitting of arguments from the executable at a space might have been incorrect,
29961    # since paths with space are more likely in Windows. Give it another try with the whole
29962    # argument.
29963    path="$complete"
29964    arguments="EOL"
29965    new_path="$path"
29966
29967  windows_path="$new_path"
29968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29969    unix_path=`$CYGPATH -u "$windows_path"`
29970    new_path="$unix_path"
29971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29973    new_path="$unix_path"
29974  fi
29975
29976
29977    new_path=`$WHICH "$new_path" 2> /dev/null`
29978    # bat and cmd files are not always considered executable in MSYS causing which
29979    # to not find them
29980    if test "x$new_path" = x \
29981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29983      new_path="$path"
29984
29985  windows_path="$new_path"
29986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29987    unix_path=`$CYGPATH -u "$windows_path"`
29988    new_path="$unix_path"
29989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29991    new_path="$unix_path"
29992  fi
29993
29994    fi
29995
29996    if test "x$new_path" = x; then
29997      # It's still not found. Now this is an unrecoverable error.
29998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29999$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30000      has_space=`$ECHO "$complete" | $GREP " "`
30001      if test "x$has_space" != x; then
30002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30004      fi
30005      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30006    fi
30007  fi
30008
30009  # Now new_path has a complete unix path to the binary
30010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30011    # Keep paths in /bin as-is, but remove trailing .exe if any
30012    new_path="${new_path/%.exe/}"
30013    # Do not save /bin paths to all_fixpath_prefixes!
30014  else
30015    # Not in mixed or Windows style, start by that.
30016    new_path=`cmd //c echo $new_path`
30017
30018  input_path="$new_path"
30019  # Check if we need to convert this using DOS-style short mode. If the path
30020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30021  # take no chances and rewrite it.
30022  # Note: m4 eats our [], so we need to use [ and ] instead.
30023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30024  if test "x$has_forbidden_chars" != x; then
30025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30027  fi
30028
30029    # Output is in $new_path
30030
30031  windows_path="$new_path"
30032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30033    unix_path=`$CYGPATH -u "$windows_path"`
30034    new_path="$unix_path"
30035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30037    new_path="$unix_path"
30038  fi
30039
30040    # remove trailing .exe if any
30041    new_path="${new_path/%.exe/}"
30042
30043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30045  fi
30046
30047  else
30048    # We're on a unix platform. Hooray! :)
30049    # First separate the path from the arguments. This will split at the first
30050    # space.
30051    complete="$CXX"
30052    path="${complete%% *}"
30053    tmp="$complete EOL"
30054    arguments="${tmp#* }"
30055
30056    # Cannot rely on the command "which" here since it doesn't always work.
30057    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30058    if test -z "$is_absolute_path"; then
30059      # Path to executable is not absolute. Find it.
30060      IFS_save="$IFS"
30061      IFS=:
30062      for p in $PATH; do
30063        if test -f "$p/$path" && test -x "$p/$path"; then
30064          new_path="$p/$path"
30065          break
30066        fi
30067      done
30068      IFS="$IFS_save"
30069    else
30070      # This is an absolute path, we can use it without further modifications.
30071      new_path="$path"
30072    fi
30073
30074    if test "x$new_path" = x; then
30075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30076$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30077      has_space=`$ECHO "$complete" | $GREP " "`
30078      if test "x$has_space" != x; then
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30081      fi
30082      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30083    fi
30084  fi
30085
30086  # Now join together the path and the arguments once again
30087  if test "x$arguments" != xEOL; then
30088    new_complete="$new_path ${arguments% *}"
30089  else
30090    new_complete="$new_path"
30091  fi
30092
30093  if test "x$complete" != "x$new_complete"; then
30094    CXX="$new_complete"
30095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30096$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30097  fi
30098
30099  TEST_COMPILER="$CXX"
30100  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30101  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30102  if test "x$OPENJDK_BUILD_OS" != xaix; then
30103    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30105$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30106
30107  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30108    # Follow a chain of symbolic links. Use readlink
30109    # where it exists, else fall back to horribly
30110    # complicated shell code.
30111    if test "x$READLINK_TESTED" != yes; then
30112      # On MacOSX there is a readlink tool with a different
30113      # purpose than the GNU readlink tool. Check the found readlink.
30114      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30115      if test "x$ISGNU" = x; then
30116        # A readlink that we do not know how to use.
30117        # Are there other non-GNU readlinks out there?
30118        READLINK_TESTED=yes
30119        READLINK=
30120      fi
30121    fi
30122
30123    if test "x$READLINK" != x; then
30124      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30125    else
30126      # Save the current directory for restoring afterwards
30127      STARTDIR=$PWD
30128      COUNTER=0
30129      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30130      sym_link_file=`$BASENAME $TEST_COMPILER`
30131      cd $sym_link_dir
30132      # Use -P flag to resolve symlinks in directories.
30133      cd `$THEPWDCMD -P`
30134      sym_link_dir=`$THEPWDCMD -P`
30135      # Resolve file symlinks
30136      while test $COUNTER -lt 20; do
30137        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30138        if test "x$ISLINK" == x; then
30139          # This is not a symbolic link! We are done!
30140          break
30141        fi
30142        # Again resolve directory symlinks since the target of the just found
30143        # link could be in a different directory
30144        cd `$DIRNAME $ISLINK`
30145        sym_link_dir=`$THEPWDCMD -P`
30146        sym_link_file=`$BASENAME $ISLINK`
30147        let COUNTER=COUNTER+1
30148      done
30149      cd $STARTDIR
30150      TEST_COMPILER=$sym_link_dir/$sym_link_file
30151    fi
30152  fi
30153
30154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30155$as_echo "$TEST_COMPILER" >&6; }
30156  fi
30157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30158$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30159
30160  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30161  if test "x$COMPILER_BASENAME" = "xccache"; then
30162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30163$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30164    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30165    # We want to control ccache invocation ourselves, so ignore this cc and try
30166    # searching again.
30167
30168    # Remove the path to the fake ccache cc from the PATH
30169    RETRY_COMPILER_SAVED_PATH="$PATH"
30170    COMPILER_DIRNAME=`$DIRNAME $CXX`
30171    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30172
30173    # Try again looking for our compiler
30174    if test -n "$ac_tool_prefix"; then
30175  for ac_prog in $TOOLCHAIN_CXX_BINARY
30176  do
30177    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30180$as_echo_n "checking for $ac_word... " >&6; }
30181if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30182  $as_echo_n "(cached) " >&6
30183else
30184  if test -n "$PROPER_COMPILER_CXX"; then
30185  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30186else
30187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30188for as_dir in $PATH
30189do
30190  IFS=$as_save_IFS
30191  test -z "$as_dir" && as_dir=.
30192    for ac_exec_ext in '' $ac_executable_extensions; do
30193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30194    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30196    break 2
30197  fi
30198done
30199  done
30200IFS=$as_save_IFS
30201
30202fi
30203fi
30204PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30205if test -n "$PROPER_COMPILER_CXX"; then
30206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30207$as_echo "$PROPER_COMPILER_CXX" >&6; }
30208else
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30210$as_echo "no" >&6; }
30211fi
30212
30213
30214    test -n "$PROPER_COMPILER_CXX" && break
30215  done
30216fi
30217if test -z "$PROPER_COMPILER_CXX"; then
30218  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30219  for ac_prog in $TOOLCHAIN_CXX_BINARY
30220do
30221  # Extract the first word of "$ac_prog", so it can be a program name with args.
30222set dummy $ac_prog; ac_word=$2
30223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30224$as_echo_n "checking for $ac_word... " >&6; }
30225if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30226  $as_echo_n "(cached) " >&6
30227else
30228  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30229  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30230else
30231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30232for as_dir in $PATH
30233do
30234  IFS=$as_save_IFS
30235  test -z "$as_dir" && as_dir=.
30236    for ac_exec_ext in '' $ac_executable_extensions; do
30237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30238    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30240    break 2
30241  fi
30242done
30243  done
30244IFS=$as_save_IFS
30245
30246fi
30247fi
30248ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30249if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30251$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30252else
30253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30254$as_echo "no" >&6; }
30255fi
30256
30257
30258  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30259done
30260
30261  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30262    PROPER_COMPILER_CXX=""
30263  else
30264    case $cross_compiling:$ac_tool_warned in
30265yes:)
30266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30268ac_tool_warned=yes ;;
30269esac
30270    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30271  fi
30272fi
30273
30274
30275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30276
30277  # First separate the path from the arguments. This will split at the first
30278  # space.
30279  complete="$PROPER_COMPILER_CXX"
30280  path="${complete%% *}"
30281  tmp="$complete EOL"
30282  arguments="${tmp#* }"
30283
30284  # Input might be given as Windows format, start by converting to
30285  # unix format.
30286  new_path=`$CYGPATH -u "$path"`
30287
30288  # Now try to locate executable using which
30289  new_path=`$WHICH "$new_path" 2> /dev/null`
30290  # bat and cmd files are not always considered executable in cygwin causing which
30291  # to not find them
30292  if test "x$new_path" = x \
30293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30295    new_path=`$CYGPATH -u "$path"`
30296  fi
30297  if test "x$new_path" = x; then
30298    # Oops. Which didn't find the executable.
30299    # The splitting of arguments from the executable at a space might have been incorrect,
30300    # since paths with space are more likely in Windows. Give it another try with the whole
30301    # argument.
30302    path="$complete"
30303    arguments="EOL"
30304    new_path=`$CYGPATH -u "$path"`
30305    new_path=`$WHICH "$new_path" 2> /dev/null`
30306    # bat and cmd files are not always considered executable in cygwin causing which
30307    # to not find them
30308    if test "x$new_path" = x \
30309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30311      new_path=`$CYGPATH -u "$path"`
30312    fi
30313    if test "x$new_path" = x; then
30314      # It's still not found. Now this is an unrecoverable error.
30315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30316$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30317      has_space=`$ECHO "$complete" | $GREP " "`
30318      if test "x$has_space" != x; then
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30321      fi
30322      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30323    fi
30324  fi
30325
30326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30329  # "foo.exe" is OK but "foo" is an error.
30330  #
30331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30332  # It is also a way to make sure we got the proper file name for the real test later on.
30333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30334  if test "x$test_shortpath" = x; then
30335    # Short path failed, file does not exist as specified.
30336    # Try adding .exe or .cmd
30337    if test -f "${new_path}.exe"; then
30338      input_to_shortpath="${new_path}.exe"
30339    elif test -f "${new_path}.cmd"; then
30340      input_to_shortpath="${new_path}.cmd"
30341    else
30342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30343$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30346      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30347    fi
30348  else
30349    input_to_shortpath="$new_path"
30350  fi
30351
30352  # Call helper function which possibly converts this using DOS-style short mode.
30353  # If so, the updated path is stored in $new_path.
30354  new_path="$input_to_shortpath"
30355
30356  input_path="$input_to_shortpath"
30357  # Check if we need to convert this using DOS-style short mode. If the path
30358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30359  # take no chances and rewrite it.
30360  # Note: m4 eats our [], so we need to use [ and ] instead.
30361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30362  if test "x$has_forbidden_chars" != x; then
30363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30367      # Going to short mode and back again did indeed matter. Since short mode is
30368      # case insensitive, let's make it lowercase to improve readability.
30369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30370      # Now convert it back to Unix-stile (cygpath)
30371      input_path=`$CYGPATH -u "$shortmode_path"`
30372      new_path="$input_path"
30373    fi
30374  fi
30375
30376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30377  if test "x$test_cygdrive_prefix" = x; then
30378    # As a simple fix, exclude /usr/bin since it's not a real path.
30379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30381      # a path prefixed by /cygdrive for fixpath to work.
30382      new_path="$CYGWIN_ROOT_PATH$input_path"
30383    fi
30384  fi
30385
30386  # remove trailing .exe if any
30387  new_path="${new_path/%.exe/}"
30388
30389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30390
30391  # First separate the path from the arguments. This will split at the first
30392  # space.
30393  complete="$PROPER_COMPILER_CXX"
30394  path="${complete%% *}"
30395  tmp="$complete EOL"
30396  arguments="${tmp#* }"
30397
30398  # Input might be given as Windows format, start by converting to
30399  # unix format.
30400  new_path="$path"
30401
30402  windows_path="$new_path"
30403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30404    unix_path=`$CYGPATH -u "$windows_path"`
30405    new_path="$unix_path"
30406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30408    new_path="$unix_path"
30409  fi
30410
30411
30412  # Now try to locate executable using which
30413  new_path=`$WHICH "$new_path" 2> /dev/null`
30414
30415  if test "x$new_path" = x; then
30416    # Oops. Which didn't find the executable.
30417    # The splitting of arguments from the executable at a space might have been incorrect,
30418    # since paths with space are more likely in Windows. Give it another try with the whole
30419    # argument.
30420    path="$complete"
30421    arguments="EOL"
30422    new_path="$path"
30423
30424  windows_path="$new_path"
30425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30426    unix_path=`$CYGPATH -u "$windows_path"`
30427    new_path="$unix_path"
30428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30430    new_path="$unix_path"
30431  fi
30432
30433
30434    new_path=`$WHICH "$new_path" 2> /dev/null`
30435    # bat and cmd files are not always considered executable in MSYS causing which
30436    # to not find them
30437    if test "x$new_path" = x \
30438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30440      new_path="$path"
30441
30442  windows_path="$new_path"
30443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30444    unix_path=`$CYGPATH -u "$windows_path"`
30445    new_path="$unix_path"
30446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30448    new_path="$unix_path"
30449  fi
30450
30451    fi
30452
30453    if test "x$new_path" = x; then
30454      # It's still not found. Now this is an unrecoverable error.
30455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30456$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30457      has_space=`$ECHO "$complete" | $GREP " "`
30458      if test "x$has_space" != x; then
30459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30461      fi
30462      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30463    fi
30464  fi
30465
30466  # Now new_path has a complete unix path to the binary
30467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30468    # Keep paths in /bin as-is, but remove trailing .exe if any
30469    new_path="${new_path/%.exe/}"
30470    # Do not save /bin paths to all_fixpath_prefixes!
30471  else
30472    # Not in mixed or Windows style, start by that.
30473    new_path=`cmd //c echo $new_path`
30474
30475  input_path="$new_path"
30476  # Check if we need to convert this using DOS-style short mode. If the path
30477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30478  # take no chances and rewrite it.
30479  # Note: m4 eats our [], so we need to use [ and ] instead.
30480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30481  if test "x$has_forbidden_chars" != x; then
30482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30484  fi
30485
30486    # Output is in $new_path
30487
30488  windows_path="$new_path"
30489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30490    unix_path=`$CYGPATH -u "$windows_path"`
30491    new_path="$unix_path"
30492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30494    new_path="$unix_path"
30495  fi
30496
30497    # remove trailing .exe if any
30498    new_path="${new_path/%.exe/}"
30499
30500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30502  fi
30503
30504  else
30505    # We're on a unix platform. Hooray! :)
30506    # First separate the path from the arguments. This will split at the first
30507    # space.
30508    complete="$PROPER_COMPILER_CXX"
30509    path="${complete%% *}"
30510    tmp="$complete EOL"
30511    arguments="${tmp#* }"
30512
30513    # Cannot rely on the command "which" here since it doesn't always work.
30514    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30515    if test -z "$is_absolute_path"; then
30516      # Path to executable is not absolute. Find it.
30517      IFS_save="$IFS"
30518      IFS=:
30519      for p in $PATH; do
30520        if test -f "$p/$path" && test -x "$p/$path"; then
30521          new_path="$p/$path"
30522          break
30523        fi
30524      done
30525      IFS="$IFS_save"
30526    else
30527      # This is an absolute path, we can use it without further modifications.
30528      new_path="$path"
30529    fi
30530
30531    if test "x$new_path" = x; then
30532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30533$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30534      has_space=`$ECHO "$complete" | $GREP " "`
30535      if test "x$has_space" != x; then
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30538      fi
30539      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30540    fi
30541  fi
30542
30543  # Now join together the path and the arguments once again
30544  if test "x$arguments" != xEOL; then
30545    new_complete="$new_path ${arguments% *}"
30546  else
30547    new_complete="$new_path"
30548  fi
30549
30550  if test "x$complete" != "x$new_complete"; then
30551    PROPER_COMPILER_CXX="$new_complete"
30552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30553$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30554  fi
30555
30556    PATH="$RETRY_COMPILER_SAVED_PATH"
30557
30558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30559$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30560
30561  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30562    # Follow a chain of symbolic links. Use readlink
30563    # where it exists, else fall back to horribly
30564    # complicated shell code.
30565    if test "x$READLINK_TESTED" != yes; then
30566      # On MacOSX there is a readlink tool with a different
30567      # purpose than the GNU readlink tool. Check the found readlink.
30568      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30569      if test "x$ISGNU" = x; then
30570        # A readlink that we do not know how to use.
30571        # Are there other non-GNU readlinks out there?
30572        READLINK_TESTED=yes
30573        READLINK=
30574      fi
30575    fi
30576
30577    if test "x$READLINK" != x; then
30578      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30579    else
30580      # Save the current directory for restoring afterwards
30581      STARTDIR=$PWD
30582      COUNTER=0
30583      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30584      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30585      cd $sym_link_dir
30586      # Use -P flag to resolve symlinks in directories.
30587      cd `$THEPWDCMD -P`
30588      sym_link_dir=`$THEPWDCMD -P`
30589      # Resolve file symlinks
30590      while test $COUNTER -lt 20; do
30591        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30592        if test "x$ISLINK" == x; then
30593          # This is not a symbolic link! We are done!
30594          break
30595        fi
30596        # Again resolve directory symlinks since the target of the just found
30597        # link could be in a different directory
30598        cd `$DIRNAME $ISLINK`
30599        sym_link_dir=`$THEPWDCMD -P`
30600        sym_link_file=`$BASENAME $ISLINK`
30601        let COUNTER=COUNTER+1
30602      done
30603      cd $STARTDIR
30604      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30605    fi
30606  fi
30607
30608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30609$as_echo "$PROPER_COMPILER_CXX" >&6; }
30610    CXX="$PROPER_COMPILER_CXX"
30611  else
30612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30613$as_echo "no, keeping CXX" >&6; }
30614  fi
30615
30616
30617  COMPILER=$CXX
30618  COMPILER_NAME=$COMPILER_NAME
30619
30620  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30621    # cc -V output typically looks like
30622    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30623    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30624    # Check that this is likely to be the Solaris Studio cc.
30625    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30626    if test $? -ne 0; then
30627      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30628      { $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
30629$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30630      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30631$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30632      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30633$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30634      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30635    fi
30636    # Remove usage instructions (if present), and
30637    # collapse compiler output into a single line
30638    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30639        $SED -e 's/ *[Uu]sage:.*//'`
30640    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30641        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30642  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30643    # xlc -qversion output typically looks like
30644    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30645    #     Version: 11.01.0000.0015
30646    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30647    # Check that this is likely to be the IBM XL C compiler.
30648    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30649    if test $? -ne 0; then
30650      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30651      { $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
30652$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30653      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30654$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30655      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30656$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30657      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30658    fi
30659    # Collapse compiler output into a single line
30660    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30661    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30662        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30663  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30664    # There is no specific version flag, but all output starts with a version string.
30665    # First line typically looks something like:
30666    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30667    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30668    # Check that this is likely to be Microsoft CL.EXE.
30669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30670    if test $? -ne 0; then
30671      { $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
30672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30674$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30675      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30676    fi
30677    # Collapse compiler output into a single line
30678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30679    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30680        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30681  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30682    # gcc --version output typically looks like
30683    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30684    #     Copyright (C) 2013 Free Software Foundation, Inc.
30685    #     This is free software; see the source for copying conditions.  There is NO
30686    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30687    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30688    # Check that this is likely to be GCC.
30689    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30690    if test $? -ne 0; then
30691      { $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
30692$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30693      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30694$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30695      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30696    fi
30697    # Remove Copyright and legalese from version string, and
30698    # collapse into a single line
30699    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30700        $SED -e 's/ *Copyright .*//'`
30701    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30702        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30703  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30704    # clang --version output typically looks like
30705    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30706    #    clang version 3.3 (tags/RELEASE_33/final)
30707    # or
30708    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30709    #    Target: x86_64-pc-linux-gnu
30710    #    Thread model: posix
30711    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30712    # Check that this is likely to be clang
30713    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30714    if test $? -ne 0; then
30715      { $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
30716$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30717      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30718$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30719      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30720    fi
30721    # Collapse compiler output into a single line
30722    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30723    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30724        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30725  else
30726      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30727  fi
30728  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30729  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30730  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30731  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30732
30733  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30734$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30735
30736
30737  # Now that we have resolved CXX ourself, let autoconf have its go at it
30738  ac_ext=cpp
30739ac_cpp='$CXXCPP $CPPFLAGS'
30740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30743if test -z "$CXX"; then
30744  if test -n "$CCC"; then
30745    CXX=$CCC
30746  else
30747    if test -n "$ac_tool_prefix"; then
30748  for ac_prog in $CXX
30749  do
30750    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30753$as_echo_n "checking for $ac_word... " >&6; }
30754if ${ac_cv_prog_CXX+:} false; then :
30755  $as_echo_n "(cached) " >&6
30756else
30757  if test -n "$CXX"; then
30758  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30759else
30760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30761for as_dir in $PATH
30762do
30763  IFS=$as_save_IFS
30764  test -z "$as_dir" && as_dir=.
30765    for ac_exec_ext in '' $ac_executable_extensions; do
30766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30767    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30769    break 2
30770  fi
30771done
30772  done
30773IFS=$as_save_IFS
30774
30775fi
30776fi
30777CXX=$ac_cv_prog_CXX
30778if test -n "$CXX"; then
30779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30780$as_echo "$CXX" >&6; }
30781else
30782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30783$as_echo "no" >&6; }
30784fi
30785
30786
30787    test -n "$CXX" && break
30788  done
30789fi
30790if test -z "$CXX"; then
30791  ac_ct_CXX=$CXX
30792  for ac_prog in $CXX
30793do
30794  # Extract the first word of "$ac_prog", so it can be a program name with args.
30795set dummy $ac_prog; ac_word=$2
30796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30797$as_echo_n "checking for $ac_word... " >&6; }
30798if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30799  $as_echo_n "(cached) " >&6
30800else
30801  if test -n "$ac_ct_CXX"; then
30802  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30803else
30804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30805for as_dir in $PATH
30806do
30807  IFS=$as_save_IFS
30808  test -z "$as_dir" && as_dir=.
30809    for ac_exec_ext in '' $ac_executable_extensions; do
30810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30811    ac_cv_prog_ac_ct_CXX="$ac_prog"
30812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30813    break 2
30814  fi
30815done
30816  done
30817IFS=$as_save_IFS
30818
30819fi
30820fi
30821ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30822if test -n "$ac_ct_CXX"; then
30823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30824$as_echo "$ac_ct_CXX" >&6; }
30825else
30826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30827$as_echo "no" >&6; }
30828fi
30829
30830
30831  test -n "$ac_ct_CXX" && break
30832done
30833
30834  if test "x$ac_ct_CXX" = x; then
30835    CXX="g++"
30836  else
30837    case $cross_compiling:$ac_tool_warned in
30838yes:)
30839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30841ac_tool_warned=yes ;;
30842esac
30843    CXX=$ac_ct_CXX
30844  fi
30845fi
30846
30847  fi
30848fi
30849# Provide some information about the compiler.
30850$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30851set X $ac_compile
30852ac_compiler=$2
30853for ac_option in --version -v -V -qversion; do
30854  { { ac_try="$ac_compiler $ac_option >&5"
30855case "(($ac_try" in
30856  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30857  *) ac_try_echo=$ac_try;;
30858esac
30859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30860$as_echo "$ac_try_echo"; } >&5
30861  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30862  ac_status=$?
30863  if test -s conftest.err; then
30864    sed '10a\
30865... rest of stderr output deleted ...
30866         10q' conftest.err >conftest.er1
30867    cat conftest.er1 >&5
30868  fi
30869  rm -f conftest.er1 conftest.err
30870  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30871  test $ac_status = 0; }
30872done
30873
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30875$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30876if ${ac_cv_cxx_compiler_gnu+:} false; then :
30877  $as_echo_n "(cached) " >&6
30878else
30879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30880/* end confdefs.h.  */
30881
30882int
30883main ()
30884{
30885#ifndef __GNUC__
30886       choke me
30887#endif
30888
30889  ;
30890  return 0;
30891}
30892_ACEOF
30893if ac_fn_cxx_try_compile "$LINENO"; then :
30894  ac_compiler_gnu=yes
30895else
30896  ac_compiler_gnu=no
30897fi
30898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30899ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30900
30901fi
30902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30903$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30904if test $ac_compiler_gnu = yes; then
30905  GXX=yes
30906else
30907  GXX=
30908fi
30909ac_test_CXXFLAGS=${CXXFLAGS+set}
30910ac_save_CXXFLAGS=$CXXFLAGS
30911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30912$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30913if ${ac_cv_prog_cxx_g+:} false; then :
30914  $as_echo_n "(cached) " >&6
30915else
30916  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30917   ac_cxx_werror_flag=yes
30918   ac_cv_prog_cxx_g=no
30919   CXXFLAGS="-g"
30920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30921/* end confdefs.h.  */
30922
30923int
30924main ()
30925{
30926
30927  ;
30928  return 0;
30929}
30930_ACEOF
30931if ac_fn_cxx_try_compile "$LINENO"; then :
30932  ac_cv_prog_cxx_g=yes
30933else
30934  CXXFLAGS=""
30935      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30936/* end confdefs.h.  */
30937
30938int
30939main ()
30940{
30941
30942  ;
30943  return 0;
30944}
30945_ACEOF
30946if ac_fn_cxx_try_compile "$LINENO"; then :
30947
30948else
30949  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30950	 CXXFLAGS="-g"
30951	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30952/* end confdefs.h.  */
30953
30954int
30955main ()
30956{
30957
30958  ;
30959  return 0;
30960}
30961_ACEOF
30962if ac_fn_cxx_try_compile "$LINENO"; then :
30963  ac_cv_prog_cxx_g=yes
30964fi
30965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30966fi
30967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30968fi
30969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30970   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30971fi
30972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30973$as_echo "$ac_cv_prog_cxx_g" >&6; }
30974if test "$ac_test_CXXFLAGS" = set; then
30975  CXXFLAGS=$ac_save_CXXFLAGS
30976elif test $ac_cv_prog_cxx_g = yes; then
30977  if test "$GXX" = yes; then
30978    CXXFLAGS="-g -O2"
30979  else
30980    CXXFLAGS="-g"
30981  fi
30982else
30983  if test "$GXX" = yes; then
30984    CXXFLAGS="-O2"
30985  else
30986    CXXFLAGS=
30987  fi
30988fi
30989ac_ext=cpp
30990ac_cpp='$CXXCPP $CPPFLAGS'
30991ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30992ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30993ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30994
30995
30996  #
30997  # Setup the preprocessor (CPP and CXXCPP)
30998  #
30999  ac_ext=c
31000ac_cpp='$CPP $CPPFLAGS'
31001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31003ac_compiler_gnu=$ac_cv_c_compiler_gnu
31004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31005$as_echo_n "checking how to run the C preprocessor... " >&6; }
31006# On Suns, sometimes $CPP names a directory.
31007if test -n "$CPP" && test -d "$CPP"; then
31008  CPP=
31009fi
31010if test -z "$CPP"; then
31011  if ${ac_cv_prog_CPP+:} false; then :
31012  $as_echo_n "(cached) " >&6
31013else
31014      # Double quotes because CPP needs to be expanded
31015    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31016    do
31017      ac_preproc_ok=false
31018for ac_c_preproc_warn_flag in '' yes
31019do
31020  # Use a header file that comes with gcc, so configuring glibc
31021  # with a fresh cross-compiler works.
31022  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31023  # <limits.h> exists even on freestanding compilers.
31024  # On the NeXT, cc -E runs the code through the compiler's parser,
31025  # not just through cpp. "Syntax error" is here to catch this case.
31026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31027/* end confdefs.h.  */
31028#ifdef __STDC__
31029# include <limits.h>
31030#else
31031# include <assert.h>
31032#endif
31033		     Syntax error
31034_ACEOF
31035if ac_fn_c_try_cpp "$LINENO"; then :
31036
31037else
31038  # Broken: fails on valid input.
31039continue
31040fi
31041rm -f conftest.err conftest.i conftest.$ac_ext
31042
31043  # OK, works on sane cases.  Now check whether nonexistent headers
31044  # can be detected and how.
31045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31046/* end confdefs.h.  */
31047#include <ac_nonexistent.h>
31048_ACEOF
31049if ac_fn_c_try_cpp "$LINENO"; then :
31050  # Broken: success on invalid input.
31051continue
31052else
31053  # Passes both tests.
31054ac_preproc_ok=:
31055break
31056fi
31057rm -f conftest.err conftest.i conftest.$ac_ext
31058
31059done
31060# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31061rm -f conftest.i conftest.err conftest.$ac_ext
31062if $ac_preproc_ok; then :
31063  break
31064fi
31065
31066    done
31067    ac_cv_prog_CPP=$CPP
31068
31069fi
31070  CPP=$ac_cv_prog_CPP
31071else
31072  ac_cv_prog_CPP=$CPP
31073fi
31074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31075$as_echo "$CPP" >&6; }
31076ac_preproc_ok=false
31077for ac_c_preproc_warn_flag in '' yes
31078do
31079  # Use a header file that comes with gcc, so configuring glibc
31080  # with a fresh cross-compiler works.
31081  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31082  # <limits.h> exists even on freestanding compilers.
31083  # On the NeXT, cc -E runs the code through the compiler's parser,
31084  # not just through cpp. "Syntax error" is here to catch this case.
31085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31086/* end confdefs.h.  */
31087#ifdef __STDC__
31088# include <limits.h>
31089#else
31090# include <assert.h>
31091#endif
31092		     Syntax error
31093_ACEOF
31094if ac_fn_c_try_cpp "$LINENO"; then :
31095
31096else
31097  # Broken: fails on valid input.
31098continue
31099fi
31100rm -f conftest.err conftest.i conftest.$ac_ext
31101
31102  # OK, works on sane cases.  Now check whether nonexistent headers
31103  # can be detected and how.
31104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31105/* end confdefs.h.  */
31106#include <ac_nonexistent.h>
31107_ACEOF
31108if ac_fn_c_try_cpp "$LINENO"; then :
31109  # Broken: success on invalid input.
31110continue
31111else
31112  # Passes both tests.
31113ac_preproc_ok=:
31114break
31115fi
31116rm -f conftest.err conftest.i conftest.$ac_ext
31117
31118done
31119# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31120rm -f conftest.i conftest.err conftest.$ac_ext
31121if $ac_preproc_ok; then :
31122
31123else
31124  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31126as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31127See \`config.log' for more details" "$LINENO" 5; }
31128fi
31129
31130ac_ext=cpp
31131ac_cpp='$CXXCPP $CPPFLAGS'
31132ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31133ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31134ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31135
31136
31137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31138
31139  # First separate the path from the arguments. This will split at the first
31140  # space.
31141  complete="$CPP"
31142  path="${complete%% *}"
31143  tmp="$complete EOL"
31144  arguments="${tmp#* }"
31145
31146  # Input might be given as Windows format, start by converting to
31147  # unix format.
31148  new_path=`$CYGPATH -u "$path"`
31149
31150  # Now try to locate executable using which
31151  new_path=`$WHICH "$new_path" 2> /dev/null`
31152  # bat and cmd files are not always considered executable in cygwin causing which
31153  # to not find them
31154  if test "x$new_path" = x \
31155      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31156      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31157    new_path=`$CYGPATH -u "$path"`
31158  fi
31159  if test "x$new_path" = x; then
31160    # Oops. Which didn't find the executable.
31161    # The splitting of arguments from the executable at a space might have been incorrect,
31162    # since paths with space are more likely in Windows. Give it another try with the whole
31163    # argument.
31164    path="$complete"
31165    arguments="EOL"
31166    new_path=`$CYGPATH -u "$path"`
31167    new_path=`$WHICH "$new_path" 2> /dev/null`
31168    # bat and cmd files are not always considered executable in cygwin causing which
31169    # to not find them
31170    if test "x$new_path" = x \
31171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31173      new_path=`$CYGPATH -u "$path"`
31174    fi
31175    if test "x$new_path" = x; then
31176      # It's still not found. Now this is an unrecoverable error.
31177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31178$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31179      has_space=`$ECHO "$complete" | $GREP " "`
31180      if test "x$has_space" != x; then
31181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31183      fi
31184      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31185    fi
31186  fi
31187
31188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31191  # "foo.exe" is OK but "foo" is an error.
31192  #
31193  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31194  # It is also a way to make sure we got the proper file name for the real test later on.
31195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31196  if test "x$test_shortpath" = x; then
31197    # Short path failed, file does not exist as specified.
31198    # Try adding .exe or .cmd
31199    if test -f "${new_path}.exe"; then
31200      input_to_shortpath="${new_path}.exe"
31201    elif test -f "${new_path}.cmd"; then
31202      input_to_shortpath="${new_path}.cmd"
31203    else
31204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31205$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31206      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31207$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31208      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31209    fi
31210  else
31211    input_to_shortpath="$new_path"
31212  fi
31213
31214  # Call helper function which possibly converts this using DOS-style short mode.
31215  # If so, the updated path is stored in $new_path.
31216  new_path="$input_to_shortpath"
31217
31218  input_path="$input_to_shortpath"
31219  # Check if we need to convert this using DOS-style short mode. If the path
31220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31221  # take no chances and rewrite it.
31222  # Note: m4 eats our [], so we need to use [ and ] instead.
31223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31224  if test "x$has_forbidden_chars" != x; then
31225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31229      # Going to short mode and back again did indeed matter. Since short mode is
31230      # case insensitive, let's make it lowercase to improve readability.
31231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31232      # Now convert it back to Unix-stile (cygpath)
31233      input_path=`$CYGPATH -u "$shortmode_path"`
31234      new_path="$input_path"
31235    fi
31236  fi
31237
31238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31239  if test "x$test_cygdrive_prefix" = x; then
31240    # As a simple fix, exclude /usr/bin since it's not a real path.
31241    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31243      # a path prefixed by /cygdrive for fixpath to work.
31244      new_path="$CYGWIN_ROOT_PATH$input_path"
31245    fi
31246  fi
31247
31248  # remove trailing .exe if any
31249  new_path="${new_path/%.exe/}"
31250
31251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31252
31253  # First separate the path from the arguments. This will split at the first
31254  # space.
31255  complete="$CPP"
31256  path="${complete%% *}"
31257  tmp="$complete EOL"
31258  arguments="${tmp#* }"
31259
31260  # Input might be given as Windows format, start by converting to
31261  # unix format.
31262  new_path="$path"
31263
31264  windows_path="$new_path"
31265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31266    unix_path=`$CYGPATH -u "$windows_path"`
31267    new_path="$unix_path"
31268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31270    new_path="$unix_path"
31271  fi
31272
31273
31274  # Now try to locate executable using which
31275  new_path=`$WHICH "$new_path" 2> /dev/null`
31276
31277  if test "x$new_path" = x; then
31278    # Oops. Which didn't find the executable.
31279    # The splitting of arguments from the executable at a space might have been incorrect,
31280    # since paths with space are more likely in Windows. Give it another try with the whole
31281    # argument.
31282    path="$complete"
31283    arguments="EOL"
31284    new_path="$path"
31285
31286  windows_path="$new_path"
31287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31288    unix_path=`$CYGPATH -u "$windows_path"`
31289    new_path="$unix_path"
31290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31292    new_path="$unix_path"
31293  fi
31294
31295
31296    new_path=`$WHICH "$new_path" 2> /dev/null`
31297    # bat and cmd files are not always considered executable in MSYS causing which
31298    # to not find them
31299    if test "x$new_path" = x \
31300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31302      new_path="$path"
31303
31304  windows_path="$new_path"
31305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31306    unix_path=`$CYGPATH -u "$windows_path"`
31307    new_path="$unix_path"
31308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31310    new_path="$unix_path"
31311  fi
31312
31313    fi
31314
31315    if test "x$new_path" = x; then
31316      # It's still not found. Now this is an unrecoverable error.
31317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31318$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31319      has_space=`$ECHO "$complete" | $GREP " "`
31320      if test "x$has_space" != x; then
31321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31323      fi
31324      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31325    fi
31326  fi
31327
31328  # Now new_path has a complete unix path to the binary
31329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31330    # Keep paths in /bin as-is, but remove trailing .exe if any
31331    new_path="${new_path/%.exe/}"
31332    # Do not save /bin paths to all_fixpath_prefixes!
31333  else
31334    # Not in mixed or Windows style, start by that.
31335    new_path=`cmd //c echo $new_path`
31336
31337  input_path="$new_path"
31338  # Check if we need to convert this using DOS-style short mode. If the path
31339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31340  # take no chances and rewrite it.
31341  # Note: m4 eats our [], so we need to use [ and ] instead.
31342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31343  if test "x$has_forbidden_chars" != x; then
31344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31346  fi
31347
31348    # Output is in $new_path
31349
31350  windows_path="$new_path"
31351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31352    unix_path=`$CYGPATH -u "$windows_path"`
31353    new_path="$unix_path"
31354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31356    new_path="$unix_path"
31357  fi
31358
31359    # remove trailing .exe if any
31360    new_path="${new_path/%.exe/}"
31361
31362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31364  fi
31365
31366  else
31367    # We're on a unix platform. Hooray! :)
31368    # First separate the path from the arguments. This will split at the first
31369    # space.
31370    complete="$CPP"
31371    path="${complete%% *}"
31372    tmp="$complete EOL"
31373    arguments="${tmp#* }"
31374
31375    # Cannot rely on the command "which" here since it doesn't always work.
31376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31377    if test -z "$is_absolute_path"; then
31378      # Path to executable is not absolute. Find it.
31379      IFS_save="$IFS"
31380      IFS=:
31381      for p in $PATH; do
31382        if test -f "$p/$path" && test -x "$p/$path"; then
31383          new_path="$p/$path"
31384          break
31385        fi
31386      done
31387      IFS="$IFS_save"
31388    else
31389      # This is an absolute path, we can use it without further modifications.
31390      new_path="$path"
31391    fi
31392
31393    if test "x$new_path" = x; then
31394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31395$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31396      has_space=`$ECHO "$complete" | $GREP " "`
31397      if test "x$has_space" != x; then
31398        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31400      fi
31401      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31402    fi
31403  fi
31404
31405  # Now join together the path and the arguments once again
31406  if test "x$arguments" != xEOL; then
31407    new_complete="$new_path ${arguments% *}"
31408  else
31409    new_complete="$new_path"
31410  fi
31411
31412  if test "x$complete" != "x$new_complete"; then
31413    CPP="$new_complete"
31414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31415$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31416  fi
31417
31418  ac_ext=cpp
31419ac_cpp='$CXXCPP $CPPFLAGS'
31420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31424$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31425if test -z "$CXXCPP"; then
31426  if ${ac_cv_prog_CXXCPP+:} false; then :
31427  $as_echo_n "(cached) " >&6
31428else
31429      # Double quotes because CXXCPP needs to be expanded
31430    for CXXCPP in "$CXX -E" "/lib/cpp"
31431    do
31432      ac_preproc_ok=false
31433for ac_cxx_preproc_warn_flag in '' yes
31434do
31435  # Use a header file that comes with gcc, so configuring glibc
31436  # with a fresh cross-compiler works.
31437  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31438  # <limits.h> exists even on freestanding compilers.
31439  # On the NeXT, cc -E runs the code through the compiler's parser,
31440  # not just through cpp. "Syntax error" is here to catch this case.
31441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31442/* end confdefs.h.  */
31443#ifdef __STDC__
31444# include <limits.h>
31445#else
31446# include <assert.h>
31447#endif
31448		     Syntax error
31449_ACEOF
31450if ac_fn_cxx_try_cpp "$LINENO"; then :
31451
31452else
31453  # Broken: fails on valid input.
31454continue
31455fi
31456rm -f conftest.err conftest.i conftest.$ac_ext
31457
31458  # OK, works on sane cases.  Now check whether nonexistent headers
31459  # can be detected and how.
31460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31461/* end confdefs.h.  */
31462#include <ac_nonexistent.h>
31463_ACEOF
31464if ac_fn_cxx_try_cpp "$LINENO"; then :
31465  # Broken: success on invalid input.
31466continue
31467else
31468  # Passes both tests.
31469ac_preproc_ok=:
31470break
31471fi
31472rm -f conftest.err conftest.i conftest.$ac_ext
31473
31474done
31475# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31476rm -f conftest.i conftest.err conftest.$ac_ext
31477if $ac_preproc_ok; then :
31478  break
31479fi
31480
31481    done
31482    ac_cv_prog_CXXCPP=$CXXCPP
31483
31484fi
31485  CXXCPP=$ac_cv_prog_CXXCPP
31486else
31487  ac_cv_prog_CXXCPP=$CXXCPP
31488fi
31489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31490$as_echo "$CXXCPP" >&6; }
31491ac_preproc_ok=false
31492for ac_cxx_preproc_warn_flag in '' yes
31493do
31494  # Use a header file that comes with gcc, so configuring glibc
31495  # with a fresh cross-compiler works.
31496  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31497  # <limits.h> exists even on freestanding compilers.
31498  # On the NeXT, cc -E runs the code through the compiler's parser,
31499  # not just through cpp. "Syntax error" is here to catch this case.
31500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31501/* end confdefs.h.  */
31502#ifdef __STDC__
31503# include <limits.h>
31504#else
31505# include <assert.h>
31506#endif
31507		     Syntax error
31508_ACEOF
31509if ac_fn_cxx_try_cpp "$LINENO"; then :
31510
31511else
31512  # Broken: fails on valid input.
31513continue
31514fi
31515rm -f conftest.err conftest.i conftest.$ac_ext
31516
31517  # OK, works on sane cases.  Now check whether nonexistent headers
31518  # can be detected and how.
31519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31520/* end confdefs.h.  */
31521#include <ac_nonexistent.h>
31522_ACEOF
31523if ac_fn_cxx_try_cpp "$LINENO"; then :
31524  # Broken: success on invalid input.
31525continue
31526else
31527  # Passes both tests.
31528ac_preproc_ok=:
31529break
31530fi
31531rm -f conftest.err conftest.i conftest.$ac_ext
31532
31533done
31534# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31535rm -f conftest.i conftest.err conftest.$ac_ext
31536if $ac_preproc_ok; then :
31537
31538else
31539  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31541as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31542See \`config.log' for more details" "$LINENO" 5; }
31543fi
31544
31545ac_ext=cpp
31546ac_cpp='$CXXCPP $CPPFLAGS'
31547ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31548ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31549ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31550
31551
31552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31553
31554  # First separate the path from the arguments. This will split at the first
31555  # space.
31556  complete="$CXXCPP"
31557  path="${complete%% *}"
31558  tmp="$complete EOL"
31559  arguments="${tmp#* }"
31560
31561  # Input might be given as Windows format, start by converting to
31562  # unix format.
31563  new_path=`$CYGPATH -u "$path"`
31564
31565  # Now try to locate executable using which
31566  new_path=`$WHICH "$new_path" 2> /dev/null`
31567  # bat and cmd files are not always considered executable in cygwin causing which
31568  # to not find them
31569  if test "x$new_path" = x \
31570      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31571      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31572    new_path=`$CYGPATH -u "$path"`
31573  fi
31574  if test "x$new_path" = x; then
31575    # Oops. Which didn't find the executable.
31576    # The splitting of arguments from the executable at a space might have been incorrect,
31577    # since paths with space are more likely in Windows. Give it another try with the whole
31578    # argument.
31579    path="$complete"
31580    arguments="EOL"
31581    new_path=`$CYGPATH -u "$path"`
31582    new_path=`$WHICH "$new_path" 2> /dev/null`
31583    # bat and cmd files are not always considered executable in cygwin causing which
31584    # to not find them
31585    if test "x$new_path" = x \
31586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31588      new_path=`$CYGPATH -u "$path"`
31589    fi
31590    if test "x$new_path" = x; then
31591      # It's still not found. Now this is an unrecoverable error.
31592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31593$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31594      has_space=`$ECHO "$complete" | $GREP " "`
31595      if test "x$has_space" != x; then
31596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31598      fi
31599      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31600    fi
31601  fi
31602
31603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31606  # "foo.exe" is OK but "foo" is an error.
31607  #
31608  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31609  # It is also a way to make sure we got the proper file name for the real test later on.
31610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31611  if test "x$test_shortpath" = x; then
31612    # Short path failed, file does not exist as specified.
31613    # Try adding .exe or .cmd
31614    if test -f "${new_path}.exe"; then
31615      input_to_shortpath="${new_path}.exe"
31616    elif test -f "${new_path}.cmd"; then
31617      input_to_shortpath="${new_path}.cmd"
31618    else
31619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31620$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31623      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31624    fi
31625  else
31626    input_to_shortpath="$new_path"
31627  fi
31628
31629  # Call helper function which possibly converts this using DOS-style short mode.
31630  # If so, the updated path is stored in $new_path.
31631  new_path="$input_to_shortpath"
31632
31633  input_path="$input_to_shortpath"
31634  # Check if we need to convert this using DOS-style short mode. If the path
31635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31636  # take no chances and rewrite it.
31637  # Note: m4 eats our [], so we need to use [ and ] instead.
31638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31639  if test "x$has_forbidden_chars" != x; then
31640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31644      # Going to short mode and back again did indeed matter. Since short mode is
31645      # case insensitive, let's make it lowercase to improve readability.
31646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31647      # Now convert it back to Unix-stile (cygpath)
31648      input_path=`$CYGPATH -u "$shortmode_path"`
31649      new_path="$input_path"
31650    fi
31651  fi
31652
31653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31654  if test "x$test_cygdrive_prefix" = x; then
31655    # As a simple fix, exclude /usr/bin since it's not a real path.
31656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31658      # a path prefixed by /cygdrive for fixpath to work.
31659      new_path="$CYGWIN_ROOT_PATH$input_path"
31660    fi
31661  fi
31662
31663  # remove trailing .exe if any
31664  new_path="${new_path/%.exe/}"
31665
31666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31667
31668  # First separate the path from the arguments. This will split at the first
31669  # space.
31670  complete="$CXXCPP"
31671  path="${complete%% *}"
31672  tmp="$complete EOL"
31673  arguments="${tmp#* }"
31674
31675  # Input might be given as Windows format, start by converting to
31676  # unix format.
31677  new_path="$path"
31678
31679  windows_path="$new_path"
31680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31681    unix_path=`$CYGPATH -u "$windows_path"`
31682    new_path="$unix_path"
31683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31685    new_path="$unix_path"
31686  fi
31687
31688
31689  # Now try to locate executable using which
31690  new_path=`$WHICH "$new_path" 2> /dev/null`
31691
31692  if test "x$new_path" = x; then
31693    # Oops. Which didn't find the executable.
31694    # The splitting of arguments from the executable at a space might have been incorrect,
31695    # since paths with space are more likely in Windows. Give it another try with the whole
31696    # argument.
31697    path="$complete"
31698    arguments="EOL"
31699    new_path="$path"
31700
31701  windows_path="$new_path"
31702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31703    unix_path=`$CYGPATH -u "$windows_path"`
31704    new_path="$unix_path"
31705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31707    new_path="$unix_path"
31708  fi
31709
31710
31711    new_path=`$WHICH "$new_path" 2> /dev/null`
31712    # bat and cmd files are not always considered executable in MSYS causing which
31713    # to not find them
31714    if test "x$new_path" = x \
31715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31717      new_path="$path"
31718
31719  windows_path="$new_path"
31720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31721    unix_path=`$CYGPATH -u "$windows_path"`
31722    new_path="$unix_path"
31723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31725    new_path="$unix_path"
31726  fi
31727
31728    fi
31729
31730    if test "x$new_path" = x; then
31731      # It's still not found. Now this is an unrecoverable error.
31732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31733$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31734      has_space=`$ECHO "$complete" | $GREP " "`
31735      if test "x$has_space" != x; then
31736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31738      fi
31739      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31740    fi
31741  fi
31742
31743  # Now new_path has a complete unix path to the binary
31744  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31745    # Keep paths in /bin as-is, but remove trailing .exe if any
31746    new_path="${new_path/%.exe/}"
31747    # Do not save /bin paths to all_fixpath_prefixes!
31748  else
31749    # Not in mixed or Windows style, start by that.
31750    new_path=`cmd //c echo $new_path`
31751
31752  input_path="$new_path"
31753  # Check if we need to convert this using DOS-style short mode. If the path
31754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31755  # take no chances and rewrite it.
31756  # Note: m4 eats our [], so we need to use [ and ] instead.
31757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31758  if test "x$has_forbidden_chars" != x; then
31759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31761  fi
31762
31763    # Output is in $new_path
31764
31765  windows_path="$new_path"
31766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31767    unix_path=`$CYGPATH -u "$windows_path"`
31768    new_path="$unix_path"
31769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31771    new_path="$unix_path"
31772  fi
31773
31774    # remove trailing .exe if any
31775    new_path="${new_path/%.exe/}"
31776
31777    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31778    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31779  fi
31780
31781  else
31782    # We're on a unix platform. Hooray! :)
31783    # First separate the path from the arguments. This will split at the first
31784    # space.
31785    complete="$CXXCPP"
31786    path="${complete%% *}"
31787    tmp="$complete EOL"
31788    arguments="${tmp#* }"
31789
31790    # Cannot rely on the command "which" here since it doesn't always work.
31791    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31792    if test -z "$is_absolute_path"; then
31793      # Path to executable is not absolute. Find it.
31794      IFS_save="$IFS"
31795      IFS=:
31796      for p in $PATH; do
31797        if test -f "$p/$path" && test -x "$p/$path"; then
31798          new_path="$p/$path"
31799          break
31800        fi
31801      done
31802      IFS="$IFS_save"
31803    else
31804      # This is an absolute path, we can use it without further modifications.
31805      new_path="$path"
31806    fi
31807
31808    if test "x$new_path" = x; then
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31810$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31811      has_space=`$ECHO "$complete" | $GREP " "`
31812      if test "x$has_space" != x; then
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31814$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31815      fi
31816      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31817    fi
31818  fi
31819
31820  # Now join together the path and the arguments once again
31821  if test "x$arguments" != xEOL; then
31822    new_complete="$new_path ${arguments% *}"
31823  else
31824    new_complete="$new_path"
31825  fi
31826
31827  if test "x$complete" != "x$new_complete"; then
31828    CXXCPP="$new_complete"
31829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31830$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31831  fi
31832
31833
31834  #
31835  # Setup the linker (LD)
31836  #
31837  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31838    # In the Microsoft toolchain we have a separate LD command "link".
31839    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31840    # a cygwin program for something completely different.
31841    # Extract the first word of "link", so it can be a program name with args.
31842set dummy link; ac_word=$2
31843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31844$as_echo_n "checking for $ac_word... " >&6; }
31845if ${ac_cv_prog_LD+:} false; then :
31846  $as_echo_n "(cached) " >&6
31847else
31848  if test -n "$LD"; then
31849  ac_cv_prog_LD="$LD" # Let the user override the test.
31850else
31851  ac_prog_rejected=no
31852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31853for as_dir in $PATH
31854do
31855  IFS=$as_save_IFS
31856  test -z "$as_dir" && as_dir=.
31857    for ac_exec_ext in '' $ac_executable_extensions; do
31858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31859    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31860       ac_prog_rejected=yes
31861       continue
31862     fi
31863    ac_cv_prog_LD="link"
31864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31865    break 2
31866  fi
31867done
31868  done
31869IFS=$as_save_IFS
31870
31871if test $ac_prog_rejected = yes; then
31872  # We found a bogon in the path, so make sure we never use it.
31873  set dummy $ac_cv_prog_LD
31874  shift
31875  if test $# != 0; then
31876    # We chose a different compiler from the bogus one.
31877    # However, it has the same basename, so the bogon will be chosen
31878    # first if we set LD to just the basename; use the full file name.
31879    shift
31880    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31881  fi
31882fi
31883fi
31884fi
31885LD=$ac_cv_prog_LD
31886if test -n "$LD"; then
31887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31888$as_echo "$LD" >&6; }
31889else
31890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31891$as_echo "no" >&6; }
31892fi
31893
31894
31895
31896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31897
31898  # First separate the path from the arguments. This will split at the first
31899  # space.
31900  complete="$LD"
31901  path="${complete%% *}"
31902  tmp="$complete EOL"
31903  arguments="${tmp#* }"
31904
31905  # Input might be given as Windows format, start by converting to
31906  # unix format.
31907  new_path=`$CYGPATH -u "$path"`
31908
31909  # Now try to locate executable using which
31910  new_path=`$WHICH "$new_path" 2> /dev/null`
31911  # bat and cmd files are not always considered executable in cygwin causing which
31912  # to not find them
31913  if test "x$new_path" = x \
31914      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31915      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31916    new_path=`$CYGPATH -u "$path"`
31917  fi
31918  if test "x$new_path" = x; then
31919    # Oops. Which didn't find the executable.
31920    # The splitting of arguments from the executable at a space might have been incorrect,
31921    # since paths with space are more likely in Windows. Give it another try with the whole
31922    # argument.
31923    path="$complete"
31924    arguments="EOL"
31925    new_path=`$CYGPATH -u "$path"`
31926    new_path=`$WHICH "$new_path" 2> /dev/null`
31927    # bat and cmd files are not always considered executable in cygwin causing which
31928    # to not find them
31929    if test "x$new_path" = x \
31930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31932      new_path=`$CYGPATH -u "$path"`
31933    fi
31934    if test "x$new_path" = x; then
31935      # It's still not found. Now this is an unrecoverable error.
31936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31937$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31938      has_space=`$ECHO "$complete" | $GREP " "`
31939      if test "x$has_space" != x; then
31940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31942      fi
31943      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31944    fi
31945  fi
31946
31947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31950  # "foo.exe" is OK but "foo" is an error.
31951  #
31952  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31953  # It is also a way to make sure we got the proper file name for the real test later on.
31954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31955  if test "x$test_shortpath" = x; then
31956    # Short path failed, file does not exist as specified.
31957    # Try adding .exe or .cmd
31958    if test -f "${new_path}.exe"; then
31959      input_to_shortpath="${new_path}.exe"
31960    elif test -f "${new_path}.cmd"; then
31961      input_to_shortpath="${new_path}.cmd"
31962    else
31963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31964$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31965      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31966$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31967      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31968    fi
31969  else
31970    input_to_shortpath="$new_path"
31971  fi
31972
31973  # Call helper function which possibly converts this using DOS-style short mode.
31974  # If so, the updated path is stored in $new_path.
31975  new_path="$input_to_shortpath"
31976
31977  input_path="$input_to_shortpath"
31978  # Check if we need to convert this using DOS-style short mode. If the path
31979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31980  # take no chances and rewrite it.
31981  # Note: m4 eats our [], so we need to use [ and ] instead.
31982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31983  if test "x$has_forbidden_chars" != x; then
31984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31988      # Going to short mode and back again did indeed matter. Since short mode is
31989      # case insensitive, let's make it lowercase to improve readability.
31990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31991      # Now convert it back to Unix-stile (cygpath)
31992      input_path=`$CYGPATH -u "$shortmode_path"`
31993      new_path="$input_path"
31994    fi
31995  fi
31996
31997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31998  if test "x$test_cygdrive_prefix" = x; then
31999    # As a simple fix, exclude /usr/bin since it's not a real path.
32000    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32002      # a path prefixed by /cygdrive for fixpath to work.
32003      new_path="$CYGWIN_ROOT_PATH$input_path"
32004    fi
32005  fi
32006
32007  # remove trailing .exe if any
32008  new_path="${new_path/%.exe/}"
32009
32010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32011
32012  # First separate the path from the arguments. This will split at the first
32013  # space.
32014  complete="$LD"
32015  path="${complete%% *}"
32016  tmp="$complete EOL"
32017  arguments="${tmp#* }"
32018
32019  # Input might be given as Windows format, start by converting to
32020  # unix format.
32021  new_path="$path"
32022
32023  windows_path="$new_path"
32024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32025    unix_path=`$CYGPATH -u "$windows_path"`
32026    new_path="$unix_path"
32027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32029    new_path="$unix_path"
32030  fi
32031
32032
32033  # Now try to locate executable using which
32034  new_path=`$WHICH "$new_path" 2> /dev/null`
32035
32036  if test "x$new_path" = x; then
32037    # Oops. Which didn't find the executable.
32038    # The splitting of arguments from the executable at a space might have been incorrect,
32039    # since paths with space are more likely in Windows. Give it another try with the whole
32040    # argument.
32041    path="$complete"
32042    arguments="EOL"
32043    new_path="$path"
32044
32045  windows_path="$new_path"
32046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32047    unix_path=`$CYGPATH -u "$windows_path"`
32048    new_path="$unix_path"
32049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32051    new_path="$unix_path"
32052  fi
32053
32054
32055    new_path=`$WHICH "$new_path" 2> /dev/null`
32056    # bat and cmd files are not always considered executable in MSYS causing which
32057    # to not find them
32058    if test "x$new_path" = x \
32059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32061      new_path="$path"
32062
32063  windows_path="$new_path"
32064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32065    unix_path=`$CYGPATH -u "$windows_path"`
32066    new_path="$unix_path"
32067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32069    new_path="$unix_path"
32070  fi
32071
32072    fi
32073
32074    if test "x$new_path" = x; then
32075      # It's still not found. Now this is an unrecoverable error.
32076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32077$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32078      has_space=`$ECHO "$complete" | $GREP " "`
32079      if test "x$has_space" != x; then
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32082      fi
32083      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32084    fi
32085  fi
32086
32087  # Now new_path has a complete unix path to the binary
32088  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32089    # Keep paths in /bin as-is, but remove trailing .exe if any
32090    new_path="${new_path/%.exe/}"
32091    # Do not save /bin paths to all_fixpath_prefixes!
32092  else
32093    # Not in mixed or Windows style, start by that.
32094    new_path=`cmd //c echo $new_path`
32095
32096  input_path="$new_path"
32097  # Check if we need to convert this using DOS-style short mode. If the path
32098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32099  # take no chances and rewrite it.
32100  # Note: m4 eats our [], so we need to use [ and ] instead.
32101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32102  if test "x$has_forbidden_chars" != x; then
32103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32105  fi
32106
32107    # Output is in $new_path
32108
32109  windows_path="$new_path"
32110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32111    unix_path=`$CYGPATH -u "$windows_path"`
32112    new_path="$unix_path"
32113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32115    new_path="$unix_path"
32116  fi
32117
32118    # remove trailing .exe if any
32119    new_path="${new_path/%.exe/}"
32120
32121    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32122    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32123  fi
32124
32125  else
32126    # We're on a unix platform. Hooray! :)
32127    # First separate the path from the arguments. This will split at the first
32128    # space.
32129    complete="$LD"
32130    path="${complete%% *}"
32131    tmp="$complete EOL"
32132    arguments="${tmp#* }"
32133
32134    # Cannot rely on the command "which" here since it doesn't always work.
32135    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32136    if test -z "$is_absolute_path"; then
32137      # Path to executable is not absolute. Find it.
32138      IFS_save="$IFS"
32139      IFS=:
32140      for p in $PATH; do
32141        if test -f "$p/$path" && test -x "$p/$path"; then
32142          new_path="$p/$path"
32143          break
32144        fi
32145      done
32146      IFS="$IFS_save"
32147    else
32148      # This is an absolute path, we can use it without further modifications.
32149      new_path="$path"
32150    fi
32151
32152    if test "x$new_path" = x; then
32153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32154$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32155      has_space=`$ECHO "$complete" | $GREP " "`
32156      if test "x$has_space" != x; then
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32159      fi
32160      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32161    fi
32162  fi
32163
32164  # Now join together the path and the arguments once again
32165  if test "x$arguments" != xEOL; then
32166    new_complete="$new_path ${arguments% *}"
32167  else
32168    new_complete="$new_path"
32169  fi
32170
32171  if test "x$complete" != "x$new_complete"; then
32172    LD="$new_complete"
32173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32174$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32175  fi
32176
32177    # Verify that we indeed succeeded with this trick.
32178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32179$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32180    "$LD" --version > /dev/null
32181    if test $? -eq 0 ; then
32182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32183$as_echo "no" >&6; }
32184      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32185    else
32186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32187$as_echo "yes" >&6; }
32188    fi
32189    LDCXX="$LD"
32190  else
32191    # All other toolchains use the compiler to link.
32192    LD="$CC"
32193    LDCXX="$CXX"
32194  fi
32195
32196  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32197
32198
32199  #
32200  # Setup the assembler (AS)
32201  #
32202  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32203    # FIXME: should this really be solaris, or solstudio?
32204
32205
32206  # Publish this variable in the help.
32207
32208
32209  if test "x$AS" = x; then
32210    # The variable is not set by user, try to locate tool using the code snippet
32211    for ac_prog in as
32212do
32213  # Extract the first word of "$ac_prog", so it can be a program name with args.
32214set dummy $ac_prog; ac_word=$2
32215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32216$as_echo_n "checking for $ac_word... " >&6; }
32217if ${ac_cv_path_AS+:} false; then :
32218  $as_echo_n "(cached) " >&6
32219else
32220  case $AS in
32221  [\\/]* | ?:[\\/]*)
32222  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32223  ;;
32224  *)
32225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32226for as_dir in $PATH
32227do
32228  IFS=$as_save_IFS
32229  test -z "$as_dir" && as_dir=.
32230    for ac_exec_ext in '' $ac_executable_extensions; do
32231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32232    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32234    break 2
32235  fi
32236done
32237  done
32238IFS=$as_save_IFS
32239
32240  ;;
32241esac
32242fi
32243AS=$ac_cv_path_AS
32244if test -n "$AS"; then
32245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32246$as_echo "$AS" >&6; }
32247else
32248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32249$as_echo "no" >&6; }
32250fi
32251
32252
32253  test -n "$AS" && break
32254done
32255
32256  else
32257    # The variable is set, but is it from the command line or the environment?
32258
32259    # Try to remove the string !AS! from our list.
32260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32262      # If it failed, the variable was not from the command line. Ignore it,
32263      # but warn the user (except for BASH, which is always set by the calling BASH).
32264      if test "xAS" != xBASH; then
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32266$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32267      fi
32268      # Try to locate tool using the code snippet
32269      for ac_prog in as
32270do
32271  # Extract the first word of "$ac_prog", so it can be a program name with args.
32272set dummy $ac_prog; ac_word=$2
32273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32274$as_echo_n "checking for $ac_word... " >&6; }
32275if ${ac_cv_path_AS+:} false; then :
32276  $as_echo_n "(cached) " >&6
32277else
32278  case $AS in
32279  [\\/]* | ?:[\\/]*)
32280  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32281  ;;
32282  *)
32283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32284for as_dir in $PATH
32285do
32286  IFS=$as_save_IFS
32287  test -z "$as_dir" && as_dir=.
32288    for ac_exec_ext in '' $ac_executable_extensions; do
32289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32290    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32292    break 2
32293  fi
32294done
32295  done
32296IFS=$as_save_IFS
32297
32298  ;;
32299esac
32300fi
32301AS=$ac_cv_path_AS
32302if test -n "$AS"; then
32303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32304$as_echo "$AS" >&6; }
32305else
32306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32307$as_echo "no" >&6; }
32308fi
32309
32310
32311  test -n "$AS" && break
32312done
32313
32314    else
32315      # If it succeeded, then it was overridden by the user. We will use it
32316      # for the tool.
32317
32318      # First remove it from the list of overridden variables, so we can test
32319      # for unknown variables in the end.
32320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32321
32322      # Check if the provided tool contains a complete path.
32323      tool_specified="$AS"
32324      tool_basename="${tool_specified##*/}"
32325      if test "x$tool_basename" = "x$tool_specified"; then
32326        # A command without a complete path is provided, search $PATH.
32327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32328$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32329        # Extract the first word of "$tool_basename", so it can be a program name with args.
32330set dummy $tool_basename; ac_word=$2
32331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32332$as_echo_n "checking for $ac_word... " >&6; }
32333if ${ac_cv_path_AS+:} false; then :
32334  $as_echo_n "(cached) " >&6
32335else
32336  case $AS in
32337  [\\/]* | ?:[\\/]*)
32338  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32339  ;;
32340  *)
32341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32342for as_dir in $PATH
32343do
32344  IFS=$as_save_IFS
32345  test -z "$as_dir" && as_dir=.
32346    for ac_exec_ext in '' $ac_executable_extensions; do
32347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32348    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32350    break 2
32351  fi
32352done
32353  done
32354IFS=$as_save_IFS
32355
32356  ;;
32357esac
32358fi
32359AS=$ac_cv_path_AS
32360if test -n "$AS"; then
32361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32362$as_echo "$AS" >&6; }
32363else
32364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32365$as_echo "no" >&6; }
32366fi
32367
32368
32369        if test "x$AS" = x; then
32370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32371        fi
32372      else
32373        # Otherwise we believe it is a complete path. Use it as it is.
32374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32375$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32377$as_echo_n "checking for AS... " >&6; }
32378        if test ! -x "$tool_specified"; then
32379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32380$as_echo "not found" >&6; }
32381          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32382        fi
32383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32384$as_echo "$tool_specified" >&6; }
32385      fi
32386    fi
32387  fi
32388
32389
32390
32391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32392
32393  # First separate the path from the arguments. This will split at the first
32394  # space.
32395  complete="$AS"
32396  path="${complete%% *}"
32397  tmp="$complete EOL"
32398  arguments="${tmp#* }"
32399
32400  # Input might be given as Windows format, start by converting to
32401  # unix format.
32402  new_path=`$CYGPATH -u "$path"`
32403
32404  # Now try to locate executable using which
32405  new_path=`$WHICH "$new_path" 2> /dev/null`
32406  # bat and cmd files are not always considered executable in cygwin causing which
32407  # to not find them
32408  if test "x$new_path" = x \
32409      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32410      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32411    new_path=`$CYGPATH -u "$path"`
32412  fi
32413  if test "x$new_path" = x; then
32414    # Oops. Which didn't find the executable.
32415    # The splitting of arguments from the executable at a space might have been incorrect,
32416    # since paths with space are more likely in Windows. Give it another try with the whole
32417    # argument.
32418    path="$complete"
32419    arguments="EOL"
32420    new_path=`$CYGPATH -u "$path"`
32421    new_path=`$WHICH "$new_path" 2> /dev/null`
32422    # bat and cmd files are not always considered executable in cygwin causing which
32423    # to not find them
32424    if test "x$new_path" = x \
32425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32427      new_path=`$CYGPATH -u "$path"`
32428    fi
32429    if test "x$new_path" = x; then
32430      # It's still not found. Now this is an unrecoverable error.
32431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32432$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32433      has_space=`$ECHO "$complete" | $GREP " "`
32434      if test "x$has_space" != x; then
32435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32437      fi
32438      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32439    fi
32440  fi
32441
32442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32445  # "foo.exe" is OK but "foo" is an error.
32446  #
32447  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32448  # It is also a way to make sure we got the proper file name for the real test later on.
32449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32450  if test "x$test_shortpath" = x; then
32451    # Short path failed, file does not exist as specified.
32452    # Try adding .exe or .cmd
32453    if test -f "${new_path}.exe"; then
32454      input_to_shortpath="${new_path}.exe"
32455    elif test -f "${new_path}.cmd"; then
32456      input_to_shortpath="${new_path}.cmd"
32457    else
32458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32459$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32460      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32461$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32462      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32463    fi
32464  else
32465    input_to_shortpath="$new_path"
32466  fi
32467
32468  # Call helper function which possibly converts this using DOS-style short mode.
32469  # If so, the updated path is stored in $new_path.
32470  new_path="$input_to_shortpath"
32471
32472  input_path="$input_to_shortpath"
32473  # Check if we need to convert this using DOS-style short mode. If the path
32474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32475  # take no chances and rewrite it.
32476  # Note: m4 eats our [], so we need to use [ and ] instead.
32477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32478  if test "x$has_forbidden_chars" != x; then
32479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32483      # Going to short mode and back again did indeed matter. Since short mode is
32484      # case insensitive, let's make it lowercase to improve readability.
32485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32486      # Now convert it back to Unix-stile (cygpath)
32487      input_path=`$CYGPATH -u "$shortmode_path"`
32488      new_path="$input_path"
32489    fi
32490  fi
32491
32492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32493  if test "x$test_cygdrive_prefix" = x; then
32494    # As a simple fix, exclude /usr/bin since it's not a real path.
32495    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32497      # a path prefixed by /cygdrive for fixpath to work.
32498      new_path="$CYGWIN_ROOT_PATH$input_path"
32499    fi
32500  fi
32501
32502  # remove trailing .exe if any
32503  new_path="${new_path/%.exe/}"
32504
32505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32506
32507  # First separate the path from the arguments. This will split at the first
32508  # space.
32509  complete="$AS"
32510  path="${complete%% *}"
32511  tmp="$complete EOL"
32512  arguments="${tmp#* }"
32513
32514  # Input might be given as Windows format, start by converting to
32515  # unix format.
32516  new_path="$path"
32517
32518  windows_path="$new_path"
32519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32520    unix_path=`$CYGPATH -u "$windows_path"`
32521    new_path="$unix_path"
32522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32524    new_path="$unix_path"
32525  fi
32526
32527
32528  # Now try to locate executable using which
32529  new_path=`$WHICH "$new_path" 2> /dev/null`
32530
32531  if test "x$new_path" = x; then
32532    # Oops. Which didn't find the executable.
32533    # The splitting of arguments from the executable at a space might have been incorrect,
32534    # since paths with space are more likely in Windows. Give it another try with the whole
32535    # argument.
32536    path="$complete"
32537    arguments="EOL"
32538    new_path="$path"
32539
32540  windows_path="$new_path"
32541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32542    unix_path=`$CYGPATH -u "$windows_path"`
32543    new_path="$unix_path"
32544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32546    new_path="$unix_path"
32547  fi
32548
32549
32550    new_path=`$WHICH "$new_path" 2> /dev/null`
32551    # bat and cmd files are not always considered executable in MSYS causing which
32552    # to not find them
32553    if test "x$new_path" = x \
32554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32556      new_path="$path"
32557
32558  windows_path="$new_path"
32559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32560    unix_path=`$CYGPATH -u "$windows_path"`
32561    new_path="$unix_path"
32562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32564    new_path="$unix_path"
32565  fi
32566
32567    fi
32568
32569    if test "x$new_path" = x; then
32570      # It's still not found. Now this is an unrecoverable error.
32571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32572$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32573      has_space=`$ECHO "$complete" | $GREP " "`
32574      if test "x$has_space" != x; then
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32577      fi
32578      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32579    fi
32580  fi
32581
32582  # Now new_path has a complete unix path to the binary
32583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32584    # Keep paths in /bin as-is, but remove trailing .exe if any
32585    new_path="${new_path/%.exe/}"
32586    # Do not save /bin paths to all_fixpath_prefixes!
32587  else
32588    # Not in mixed or Windows style, start by that.
32589    new_path=`cmd //c echo $new_path`
32590
32591  input_path="$new_path"
32592  # Check if we need to convert this using DOS-style short mode. If the path
32593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32594  # take no chances and rewrite it.
32595  # Note: m4 eats our [], so we need to use [ and ] instead.
32596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32597  if test "x$has_forbidden_chars" != x; then
32598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32600  fi
32601
32602    # Output is in $new_path
32603
32604  windows_path="$new_path"
32605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32606    unix_path=`$CYGPATH -u "$windows_path"`
32607    new_path="$unix_path"
32608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32610    new_path="$unix_path"
32611  fi
32612
32613    # remove trailing .exe if any
32614    new_path="${new_path/%.exe/}"
32615
32616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32618  fi
32619
32620  else
32621    # We're on a unix platform. Hooray! :)
32622    # First separate the path from the arguments. This will split at the first
32623    # space.
32624    complete="$AS"
32625    path="${complete%% *}"
32626    tmp="$complete EOL"
32627    arguments="${tmp#* }"
32628
32629    # Cannot rely on the command "which" here since it doesn't always work.
32630    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32631    if test -z "$is_absolute_path"; then
32632      # Path to executable is not absolute. Find it.
32633      IFS_save="$IFS"
32634      IFS=:
32635      for p in $PATH; do
32636        if test -f "$p/$path" && test -x "$p/$path"; then
32637          new_path="$p/$path"
32638          break
32639        fi
32640      done
32641      IFS="$IFS_save"
32642    else
32643      # This is an absolute path, we can use it without further modifications.
32644      new_path="$path"
32645    fi
32646
32647    if test "x$new_path" = x; then
32648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32649$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32650      has_space=`$ECHO "$complete" | $GREP " "`
32651      if test "x$has_space" != x; then
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32653$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32654      fi
32655      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32656    fi
32657  fi
32658
32659  # Now join together the path and the arguments once again
32660  if test "x$arguments" != xEOL; then
32661    new_complete="$new_path ${arguments% *}"
32662  else
32663    new_complete="$new_path"
32664  fi
32665
32666  if test "x$complete" != "x$new_complete"; then
32667    AS="$new_complete"
32668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32669$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32670  fi
32671
32672  else
32673    # FIXME: is this correct for microsoft?
32674    AS="$CC -c"
32675  fi
32676
32677
32678  #
32679  # Setup the archiver (AR)
32680  #
32681  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32682    # The corresponding ar tool is lib.exe (used to create static libraries)
32683    # Extract the first word of "lib", so it can be a program name with args.
32684set dummy lib; ac_word=$2
32685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32686$as_echo_n "checking for $ac_word... " >&6; }
32687if ${ac_cv_prog_AR+:} false; then :
32688  $as_echo_n "(cached) " >&6
32689else
32690  if test -n "$AR"; then
32691  ac_cv_prog_AR="$AR" # Let the user override the test.
32692else
32693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32694for as_dir in $PATH
32695do
32696  IFS=$as_save_IFS
32697  test -z "$as_dir" && as_dir=.
32698    for ac_exec_ext in '' $ac_executable_extensions; do
32699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32700    ac_cv_prog_AR="lib"
32701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32702    break 2
32703  fi
32704done
32705  done
32706IFS=$as_save_IFS
32707
32708fi
32709fi
32710AR=$ac_cv_prog_AR
32711if test -n "$AR"; then
32712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32713$as_echo "$AR" >&6; }
32714else
32715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32716$as_echo "no" >&6; }
32717fi
32718
32719
32720  else
32721
32722
32723  # Publish this variable in the help.
32724
32725
32726  if test "x$AR" = x; then
32727    # The variable is not set by user, try to locate tool using the code snippet
32728    if test -n "$ac_tool_prefix"; then
32729  for ac_prog in ar
32730  do
32731    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32732set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32734$as_echo_n "checking for $ac_word... " >&6; }
32735if ${ac_cv_prog_AR+:} false; then :
32736  $as_echo_n "(cached) " >&6
32737else
32738  if test -n "$AR"; then
32739  ac_cv_prog_AR="$AR" # Let the user override the test.
32740else
32741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32742for as_dir in $PATH
32743do
32744  IFS=$as_save_IFS
32745  test -z "$as_dir" && as_dir=.
32746    for ac_exec_ext in '' $ac_executable_extensions; do
32747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32748    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32750    break 2
32751  fi
32752done
32753  done
32754IFS=$as_save_IFS
32755
32756fi
32757fi
32758AR=$ac_cv_prog_AR
32759if test -n "$AR"; then
32760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32761$as_echo "$AR" >&6; }
32762else
32763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32764$as_echo "no" >&6; }
32765fi
32766
32767
32768    test -n "$AR" && break
32769  done
32770fi
32771if test -z "$AR"; then
32772  ac_ct_AR=$AR
32773  for ac_prog in ar
32774do
32775  # Extract the first word of "$ac_prog", so it can be a program name with args.
32776set dummy $ac_prog; ac_word=$2
32777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32778$as_echo_n "checking for $ac_word... " >&6; }
32779if ${ac_cv_prog_ac_ct_AR+:} false; then :
32780  $as_echo_n "(cached) " >&6
32781else
32782  if test -n "$ac_ct_AR"; then
32783  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32784else
32785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32786for as_dir in $PATH
32787do
32788  IFS=$as_save_IFS
32789  test -z "$as_dir" && as_dir=.
32790    for ac_exec_ext in '' $ac_executable_extensions; do
32791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32792    ac_cv_prog_ac_ct_AR="$ac_prog"
32793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32794    break 2
32795  fi
32796done
32797  done
32798IFS=$as_save_IFS
32799
32800fi
32801fi
32802ac_ct_AR=$ac_cv_prog_ac_ct_AR
32803if test -n "$ac_ct_AR"; then
32804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32805$as_echo "$ac_ct_AR" >&6; }
32806else
32807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32808$as_echo "no" >&6; }
32809fi
32810
32811
32812  test -n "$ac_ct_AR" && break
32813done
32814
32815  if test "x$ac_ct_AR" = x; then
32816    AR=""
32817  else
32818    case $cross_compiling:$ac_tool_warned in
32819yes:)
32820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32822ac_tool_warned=yes ;;
32823esac
32824    AR=$ac_ct_AR
32825  fi
32826fi
32827
32828  else
32829    # The variable is set, but is it from the command line or the environment?
32830
32831    # Try to remove the string !AR! from our list.
32832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32834      # If it failed, the variable was not from the command line. Ignore it,
32835      # but warn the user (except for BASH, which is always set by the calling BASH).
32836      if test "xAR" != xBASH; then
32837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32838$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32839      fi
32840      # Try to locate tool using the code snippet
32841      if test -n "$ac_tool_prefix"; then
32842  for ac_prog in ar
32843  do
32844    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32847$as_echo_n "checking for $ac_word... " >&6; }
32848if ${ac_cv_prog_AR+:} false; then :
32849  $as_echo_n "(cached) " >&6
32850else
32851  if test -n "$AR"; then
32852  ac_cv_prog_AR="$AR" # Let the user override the test.
32853else
32854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32855for as_dir in $PATH
32856do
32857  IFS=$as_save_IFS
32858  test -z "$as_dir" && as_dir=.
32859    for ac_exec_ext in '' $ac_executable_extensions; do
32860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32861    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32863    break 2
32864  fi
32865done
32866  done
32867IFS=$as_save_IFS
32868
32869fi
32870fi
32871AR=$ac_cv_prog_AR
32872if test -n "$AR"; then
32873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32874$as_echo "$AR" >&6; }
32875else
32876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32877$as_echo "no" >&6; }
32878fi
32879
32880
32881    test -n "$AR" && break
32882  done
32883fi
32884if test -z "$AR"; then
32885  ac_ct_AR=$AR
32886  for ac_prog in ar
32887do
32888  # Extract the first word of "$ac_prog", so it can be a program name with args.
32889set dummy $ac_prog; ac_word=$2
32890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32891$as_echo_n "checking for $ac_word... " >&6; }
32892if ${ac_cv_prog_ac_ct_AR+:} false; then :
32893  $as_echo_n "(cached) " >&6
32894else
32895  if test -n "$ac_ct_AR"; then
32896  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32897else
32898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32899for as_dir in $PATH
32900do
32901  IFS=$as_save_IFS
32902  test -z "$as_dir" && as_dir=.
32903    for ac_exec_ext in '' $ac_executable_extensions; do
32904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32905    ac_cv_prog_ac_ct_AR="$ac_prog"
32906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32907    break 2
32908  fi
32909done
32910  done
32911IFS=$as_save_IFS
32912
32913fi
32914fi
32915ac_ct_AR=$ac_cv_prog_ac_ct_AR
32916if test -n "$ac_ct_AR"; then
32917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32918$as_echo "$ac_ct_AR" >&6; }
32919else
32920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32921$as_echo "no" >&6; }
32922fi
32923
32924
32925  test -n "$ac_ct_AR" && break
32926done
32927
32928  if test "x$ac_ct_AR" = x; then
32929    AR=""
32930  else
32931    case $cross_compiling:$ac_tool_warned in
32932yes:)
32933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32935ac_tool_warned=yes ;;
32936esac
32937    AR=$ac_ct_AR
32938  fi
32939fi
32940
32941    else
32942      # If it succeeded, then it was overridden by the user. We will use it
32943      # for the tool.
32944
32945      # First remove it from the list of overridden variables, so we can test
32946      # for unknown variables in the end.
32947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32948
32949      # Check if the provided tool contains a complete path.
32950      tool_specified="$AR"
32951      tool_basename="${tool_specified##*/}"
32952      if test "x$tool_basename" = "x$tool_specified"; then
32953        # A command without a complete path is provided, search $PATH.
32954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32955$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32956        # Extract the first word of "$tool_basename", so it can be a program name with args.
32957set dummy $tool_basename; ac_word=$2
32958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32959$as_echo_n "checking for $ac_word... " >&6; }
32960if ${ac_cv_path_AR+:} false; then :
32961  $as_echo_n "(cached) " >&6
32962else
32963  case $AR in
32964  [\\/]* | ?:[\\/]*)
32965  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32966  ;;
32967  *)
32968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32969for as_dir in $PATH
32970do
32971  IFS=$as_save_IFS
32972  test -z "$as_dir" && as_dir=.
32973    for ac_exec_ext in '' $ac_executable_extensions; do
32974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32975    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32977    break 2
32978  fi
32979done
32980  done
32981IFS=$as_save_IFS
32982
32983  ;;
32984esac
32985fi
32986AR=$ac_cv_path_AR
32987if test -n "$AR"; then
32988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32989$as_echo "$AR" >&6; }
32990else
32991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32992$as_echo "no" >&6; }
32993fi
32994
32995
32996        if test "x$AR" = x; then
32997          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32998        fi
32999      else
33000        # Otherwise we believe it is a complete path. Use it as it is.
33001        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33002$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33004$as_echo_n "checking for AR... " >&6; }
33005        if test ! -x "$tool_specified"; then
33006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33007$as_echo "not found" >&6; }
33008          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33009        fi
33010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33011$as_echo "$tool_specified" >&6; }
33012      fi
33013    fi
33014  fi
33015
33016
33017  fi
33018
33019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33020
33021  # First separate the path from the arguments. This will split at the first
33022  # space.
33023  complete="$AR"
33024  path="${complete%% *}"
33025  tmp="$complete EOL"
33026  arguments="${tmp#* }"
33027
33028  # Input might be given as Windows format, start by converting to
33029  # unix format.
33030  new_path=`$CYGPATH -u "$path"`
33031
33032  # Now try to locate executable using which
33033  new_path=`$WHICH "$new_path" 2> /dev/null`
33034  # bat and cmd files are not always considered executable in cygwin causing which
33035  # to not find them
33036  if test "x$new_path" = x \
33037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33039    new_path=`$CYGPATH -u "$path"`
33040  fi
33041  if test "x$new_path" = x; then
33042    # Oops. Which didn't find the executable.
33043    # The splitting of arguments from the executable at a space might have been incorrect,
33044    # since paths with space are more likely in Windows. Give it another try with the whole
33045    # argument.
33046    path="$complete"
33047    arguments="EOL"
33048    new_path=`$CYGPATH -u "$path"`
33049    new_path=`$WHICH "$new_path" 2> /dev/null`
33050    # bat and cmd files are not always considered executable in cygwin causing which
33051    # to not find them
33052    if test "x$new_path" = x \
33053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33055      new_path=`$CYGPATH -u "$path"`
33056    fi
33057    if test "x$new_path" = x; then
33058      # It's still not found. Now this is an unrecoverable error.
33059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33060$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33061      has_space=`$ECHO "$complete" | $GREP " "`
33062      if test "x$has_space" != x; then
33063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33065      fi
33066      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33067    fi
33068  fi
33069
33070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33073  # "foo.exe" is OK but "foo" is an error.
33074  #
33075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33076  # It is also a way to make sure we got the proper file name for the real test later on.
33077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33078  if test "x$test_shortpath" = x; then
33079    # Short path failed, file does not exist as specified.
33080    # Try adding .exe or .cmd
33081    if test -f "${new_path}.exe"; then
33082      input_to_shortpath="${new_path}.exe"
33083    elif test -f "${new_path}.cmd"; then
33084      input_to_shortpath="${new_path}.cmd"
33085    else
33086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33087$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33090      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33091    fi
33092  else
33093    input_to_shortpath="$new_path"
33094  fi
33095
33096  # Call helper function which possibly converts this using DOS-style short mode.
33097  # If so, the updated path is stored in $new_path.
33098  new_path="$input_to_shortpath"
33099
33100  input_path="$input_to_shortpath"
33101  # Check if we need to convert this using DOS-style short mode. If the path
33102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33103  # take no chances and rewrite it.
33104  # Note: m4 eats our [], so we need to use [ and ] instead.
33105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33106  if test "x$has_forbidden_chars" != x; then
33107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33111      # Going to short mode and back again did indeed matter. Since short mode is
33112      # case insensitive, let's make it lowercase to improve readability.
33113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33114      # Now convert it back to Unix-stile (cygpath)
33115      input_path=`$CYGPATH -u "$shortmode_path"`
33116      new_path="$input_path"
33117    fi
33118  fi
33119
33120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33121  if test "x$test_cygdrive_prefix" = x; then
33122    # As a simple fix, exclude /usr/bin since it's not a real path.
33123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33125      # a path prefixed by /cygdrive for fixpath to work.
33126      new_path="$CYGWIN_ROOT_PATH$input_path"
33127    fi
33128  fi
33129
33130  # remove trailing .exe if any
33131  new_path="${new_path/%.exe/}"
33132
33133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33134
33135  # First separate the path from the arguments. This will split at the first
33136  # space.
33137  complete="$AR"
33138  path="${complete%% *}"
33139  tmp="$complete EOL"
33140  arguments="${tmp#* }"
33141
33142  # Input might be given as Windows format, start by converting to
33143  # unix format.
33144  new_path="$path"
33145
33146  windows_path="$new_path"
33147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33148    unix_path=`$CYGPATH -u "$windows_path"`
33149    new_path="$unix_path"
33150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33152    new_path="$unix_path"
33153  fi
33154
33155
33156  # Now try to locate executable using which
33157  new_path=`$WHICH "$new_path" 2> /dev/null`
33158
33159  if test "x$new_path" = x; then
33160    # Oops. Which didn't find the executable.
33161    # The splitting of arguments from the executable at a space might have been incorrect,
33162    # since paths with space are more likely in Windows. Give it another try with the whole
33163    # argument.
33164    path="$complete"
33165    arguments="EOL"
33166    new_path="$path"
33167
33168  windows_path="$new_path"
33169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33170    unix_path=`$CYGPATH -u "$windows_path"`
33171    new_path="$unix_path"
33172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33174    new_path="$unix_path"
33175  fi
33176
33177
33178    new_path=`$WHICH "$new_path" 2> /dev/null`
33179    # bat and cmd files are not always considered executable in MSYS causing which
33180    # to not find them
33181    if test "x$new_path" = x \
33182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33184      new_path="$path"
33185
33186  windows_path="$new_path"
33187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33188    unix_path=`$CYGPATH -u "$windows_path"`
33189    new_path="$unix_path"
33190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33192    new_path="$unix_path"
33193  fi
33194
33195    fi
33196
33197    if test "x$new_path" = x; then
33198      # It's still not found. Now this is an unrecoverable error.
33199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33200$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33201      has_space=`$ECHO "$complete" | $GREP " "`
33202      if test "x$has_space" != x; then
33203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33205      fi
33206      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33207    fi
33208  fi
33209
33210  # Now new_path has a complete unix path to the binary
33211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33212    # Keep paths in /bin as-is, but remove trailing .exe if any
33213    new_path="${new_path/%.exe/}"
33214    # Do not save /bin paths to all_fixpath_prefixes!
33215  else
33216    # Not in mixed or Windows style, start by that.
33217    new_path=`cmd //c echo $new_path`
33218
33219  input_path="$new_path"
33220  # Check if we need to convert this using DOS-style short mode. If the path
33221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33222  # take no chances and rewrite it.
33223  # Note: m4 eats our [], so we need to use [ and ] instead.
33224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33225  if test "x$has_forbidden_chars" != x; then
33226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33228  fi
33229
33230    # Output is in $new_path
33231
33232  windows_path="$new_path"
33233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234    unix_path=`$CYGPATH -u "$windows_path"`
33235    new_path="$unix_path"
33236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33238    new_path="$unix_path"
33239  fi
33240
33241    # remove trailing .exe if any
33242    new_path="${new_path/%.exe/}"
33243
33244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33246  fi
33247
33248  else
33249    # We're on a unix platform. Hooray! :)
33250    # First separate the path from the arguments. This will split at the first
33251    # space.
33252    complete="$AR"
33253    path="${complete%% *}"
33254    tmp="$complete EOL"
33255    arguments="${tmp#* }"
33256
33257    # Cannot rely on the command "which" here since it doesn't always work.
33258    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33259    if test -z "$is_absolute_path"; then
33260      # Path to executable is not absolute. Find it.
33261      IFS_save="$IFS"
33262      IFS=:
33263      for p in $PATH; do
33264        if test -f "$p/$path" && test -x "$p/$path"; then
33265          new_path="$p/$path"
33266          break
33267        fi
33268      done
33269      IFS="$IFS_save"
33270    else
33271      # This is an absolute path, we can use it without further modifications.
33272      new_path="$path"
33273    fi
33274
33275    if test "x$new_path" = x; then
33276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33277$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33278      has_space=`$ECHO "$complete" | $GREP " "`
33279      if test "x$has_space" != x; then
33280        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33282      fi
33283      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33284    fi
33285  fi
33286
33287  # Now join together the path and the arguments once again
33288  if test "x$arguments" != xEOL; then
33289    new_complete="$new_path ${arguments% *}"
33290  else
33291    new_complete="$new_path"
33292  fi
33293
33294  if test "x$complete" != "x$new_complete"; then
33295    AR="$new_complete"
33296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33297$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33298  fi
33299
33300
33301
33302  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33303    ac_ext=m
33304ac_cpp='$OBJCPP $CPPFLAGS'
33305ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33306ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33307ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33308if test -n "$ac_tool_prefix"; then
33309  for ac_prog in gcc objcc objc cc CC
33310  do
33311    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33312set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33314$as_echo_n "checking for $ac_word... " >&6; }
33315if ${ac_cv_prog_OBJC+:} false; then :
33316  $as_echo_n "(cached) " >&6
33317else
33318  if test -n "$OBJC"; then
33319  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33320else
33321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33322for as_dir in $PATH
33323do
33324  IFS=$as_save_IFS
33325  test -z "$as_dir" && as_dir=.
33326    for ac_exec_ext in '' $ac_executable_extensions; do
33327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33328    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33330    break 2
33331  fi
33332done
33333  done
33334IFS=$as_save_IFS
33335
33336fi
33337fi
33338OBJC=$ac_cv_prog_OBJC
33339if test -n "$OBJC"; then
33340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33341$as_echo "$OBJC" >&6; }
33342else
33343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33344$as_echo "no" >&6; }
33345fi
33346
33347
33348    test -n "$OBJC" && break
33349  done
33350fi
33351if test -z "$OBJC"; then
33352  ac_ct_OBJC=$OBJC
33353  for ac_prog in gcc objcc objc cc CC
33354do
33355  # Extract the first word of "$ac_prog", so it can be a program name with args.
33356set dummy $ac_prog; ac_word=$2
33357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33358$as_echo_n "checking for $ac_word... " >&6; }
33359if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33360  $as_echo_n "(cached) " >&6
33361else
33362  if test -n "$ac_ct_OBJC"; then
33363  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33364else
33365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33366for as_dir in $PATH
33367do
33368  IFS=$as_save_IFS
33369  test -z "$as_dir" && as_dir=.
33370    for ac_exec_ext in '' $ac_executable_extensions; do
33371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33372    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33374    break 2
33375  fi
33376done
33377  done
33378IFS=$as_save_IFS
33379
33380fi
33381fi
33382ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33383if test -n "$ac_ct_OBJC"; then
33384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33385$as_echo "$ac_ct_OBJC" >&6; }
33386else
33387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33388$as_echo "no" >&6; }
33389fi
33390
33391
33392  test -n "$ac_ct_OBJC" && break
33393done
33394
33395  if test "x$ac_ct_OBJC" = x; then
33396    OBJC="gcc"
33397  else
33398    case $cross_compiling:$ac_tool_warned in
33399yes:)
33400{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33401$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33402ac_tool_warned=yes ;;
33403esac
33404    OBJC=$ac_ct_OBJC
33405  fi
33406fi
33407
33408# Provide some information about the compiler.
33409$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33410set X $ac_compile
33411ac_compiler=$2
33412for ac_option in --version -v -V -qversion; do
33413  { { ac_try="$ac_compiler $ac_option >&5"
33414case "(($ac_try" in
33415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33416  *) ac_try_echo=$ac_try;;
33417esac
33418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33419$as_echo "$ac_try_echo"; } >&5
33420  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33421  ac_status=$?
33422  if test -s conftest.err; then
33423    sed '10a\
33424... rest of stderr output deleted ...
33425         10q' conftest.err >conftest.er1
33426    cat conftest.er1 >&5
33427  fi
33428  rm -f conftest.er1 conftest.err
33429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33430  test $ac_status = 0; }
33431done
33432
33433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33434$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33435if ${ac_cv_objc_compiler_gnu+:} false; then :
33436  $as_echo_n "(cached) " >&6
33437else
33438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33439/* end confdefs.h.  */
33440
33441int
33442main ()
33443{
33444#ifndef __GNUC__
33445       choke me
33446#endif
33447
33448  ;
33449  return 0;
33450}
33451_ACEOF
33452if ac_fn_objc_try_compile "$LINENO"; then :
33453  ac_compiler_gnu=yes
33454else
33455  ac_compiler_gnu=no
33456fi
33457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33458ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33459
33460fi
33461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33462$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33463if test $ac_compiler_gnu = yes; then
33464  GOBJC=yes
33465else
33466  GOBJC=
33467fi
33468ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33469ac_save_OBJCFLAGS=$OBJCFLAGS
33470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33471$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33472if ${ac_cv_prog_objc_g+:} false; then :
33473  $as_echo_n "(cached) " >&6
33474else
33475  ac_save_objc_werror_flag=$ac_objc_werror_flag
33476   ac_objc_werror_flag=yes
33477   ac_cv_prog_objc_g=no
33478   OBJCFLAGS="-g"
33479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33480/* end confdefs.h.  */
33481
33482int
33483main ()
33484{
33485
33486  ;
33487  return 0;
33488}
33489_ACEOF
33490if ac_fn_objc_try_compile "$LINENO"; then :
33491  ac_cv_prog_objc_g=yes
33492else
33493  OBJCFLAGS=""
33494      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33495/* end confdefs.h.  */
33496
33497int
33498main ()
33499{
33500
33501  ;
33502  return 0;
33503}
33504_ACEOF
33505if ac_fn_objc_try_compile "$LINENO"; then :
33506
33507else
33508  ac_objc_werror_flag=$ac_save_objc_werror_flag
33509	 OBJCFLAGS="-g"
33510	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33511/* end confdefs.h.  */
33512
33513int
33514main ()
33515{
33516
33517  ;
33518  return 0;
33519}
33520_ACEOF
33521if ac_fn_objc_try_compile "$LINENO"; then :
33522  ac_cv_prog_objc_g=yes
33523fi
33524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33525fi
33526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33527fi
33528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33529   ac_objc_werror_flag=$ac_save_objc_werror_flag
33530fi
33531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33532$as_echo "$ac_cv_prog_objc_g" >&6; }
33533if test "$ac_test_OBJCFLAGS" = set; then
33534  OBJCFLAGS=$ac_save_OBJCFLAGS
33535elif test $ac_cv_prog_objc_g = yes; then
33536  if test "$GOBJC" = yes; then
33537    OBJCFLAGS="-g -O2"
33538  else
33539    OBJCFLAGS="-g"
33540  fi
33541else
33542  if test "$GOBJC" = yes; then
33543    OBJCFLAGS="-O2"
33544  else
33545    OBJCFLAGS=
33546  fi
33547fi
33548ac_ext=cpp
33549ac_cpp='$CXXCPP $CPPFLAGS'
33550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33553
33554
33555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33556
33557  # First separate the path from the arguments. This will split at the first
33558  # space.
33559  complete="$OBJC"
33560  path="${complete%% *}"
33561  tmp="$complete EOL"
33562  arguments="${tmp#* }"
33563
33564  # Input might be given as Windows format, start by converting to
33565  # unix format.
33566  new_path=`$CYGPATH -u "$path"`
33567
33568  # Now try to locate executable using which
33569  new_path=`$WHICH "$new_path" 2> /dev/null`
33570  # bat and cmd files are not always considered executable in cygwin causing which
33571  # to not find them
33572  if test "x$new_path" = x \
33573      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33574      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33575    new_path=`$CYGPATH -u "$path"`
33576  fi
33577  if test "x$new_path" = x; then
33578    # Oops. Which didn't find the executable.
33579    # The splitting of arguments from the executable at a space might have been incorrect,
33580    # since paths with space are more likely in Windows. Give it another try with the whole
33581    # argument.
33582    path="$complete"
33583    arguments="EOL"
33584    new_path=`$CYGPATH -u "$path"`
33585    new_path=`$WHICH "$new_path" 2> /dev/null`
33586    # bat and cmd files are not always considered executable in cygwin causing which
33587    # to not find them
33588    if test "x$new_path" = x \
33589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33591      new_path=`$CYGPATH -u "$path"`
33592    fi
33593    if test "x$new_path" = x; then
33594      # It's still not found. Now this is an unrecoverable error.
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33596$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33597      has_space=`$ECHO "$complete" | $GREP " "`
33598      if test "x$has_space" != x; then
33599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33601      fi
33602      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33603    fi
33604  fi
33605
33606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33609  # "foo.exe" is OK but "foo" is an error.
33610  #
33611  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33612  # It is also a way to make sure we got the proper file name for the real test later on.
33613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33614  if test "x$test_shortpath" = x; then
33615    # Short path failed, file does not exist as specified.
33616    # Try adding .exe or .cmd
33617    if test -f "${new_path}.exe"; then
33618      input_to_shortpath="${new_path}.exe"
33619    elif test -f "${new_path}.cmd"; then
33620      input_to_shortpath="${new_path}.cmd"
33621    else
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33623$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33625$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33626      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33627    fi
33628  else
33629    input_to_shortpath="$new_path"
33630  fi
33631
33632  # Call helper function which possibly converts this using DOS-style short mode.
33633  # If so, the updated path is stored in $new_path.
33634  new_path="$input_to_shortpath"
33635
33636  input_path="$input_to_shortpath"
33637  # Check if we need to convert this using DOS-style short mode. If the path
33638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33639  # take no chances and rewrite it.
33640  # Note: m4 eats our [], so we need to use [ and ] instead.
33641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33642  if test "x$has_forbidden_chars" != x; then
33643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33647      # Going to short mode and back again did indeed matter. Since short mode is
33648      # case insensitive, let's make it lowercase to improve readability.
33649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33650      # Now convert it back to Unix-stile (cygpath)
33651      input_path=`$CYGPATH -u "$shortmode_path"`
33652      new_path="$input_path"
33653    fi
33654  fi
33655
33656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33657  if test "x$test_cygdrive_prefix" = x; then
33658    # As a simple fix, exclude /usr/bin since it's not a real path.
33659    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33661      # a path prefixed by /cygdrive for fixpath to work.
33662      new_path="$CYGWIN_ROOT_PATH$input_path"
33663    fi
33664  fi
33665
33666  # remove trailing .exe if any
33667  new_path="${new_path/%.exe/}"
33668
33669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33670
33671  # First separate the path from the arguments. This will split at the first
33672  # space.
33673  complete="$OBJC"
33674  path="${complete%% *}"
33675  tmp="$complete EOL"
33676  arguments="${tmp#* }"
33677
33678  # Input might be given as Windows format, start by converting to
33679  # unix format.
33680  new_path="$path"
33681
33682  windows_path="$new_path"
33683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33684    unix_path=`$CYGPATH -u "$windows_path"`
33685    new_path="$unix_path"
33686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33688    new_path="$unix_path"
33689  fi
33690
33691
33692  # Now try to locate executable using which
33693  new_path=`$WHICH "$new_path" 2> /dev/null`
33694
33695  if test "x$new_path" = x; then
33696    # Oops. Which didn't find the executable.
33697    # The splitting of arguments from the executable at a space might have been incorrect,
33698    # since paths with space are more likely in Windows. Give it another try with the whole
33699    # argument.
33700    path="$complete"
33701    arguments="EOL"
33702    new_path="$path"
33703
33704  windows_path="$new_path"
33705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33706    unix_path=`$CYGPATH -u "$windows_path"`
33707    new_path="$unix_path"
33708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33710    new_path="$unix_path"
33711  fi
33712
33713
33714    new_path=`$WHICH "$new_path" 2> /dev/null`
33715    # bat and cmd files are not always considered executable in MSYS causing which
33716    # to not find them
33717    if test "x$new_path" = x \
33718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33720      new_path="$path"
33721
33722  windows_path="$new_path"
33723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33724    unix_path=`$CYGPATH -u "$windows_path"`
33725    new_path="$unix_path"
33726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33728    new_path="$unix_path"
33729  fi
33730
33731    fi
33732
33733    if test "x$new_path" = x; then
33734      # It's still not found. Now this is an unrecoverable error.
33735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33736$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33737      has_space=`$ECHO "$complete" | $GREP " "`
33738      if test "x$has_space" != x; then
33739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33741      fi
33742      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33743    fi
33744  fi
33745
33746  # Now new_path has a complete unix path to the binary
33747  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33748    # Keep paths in /bin as-is, but remove trailing .exe if any
33749    new_path="${new_path/%.exe/}"
33750    # Do not save /bin paths to all_fixpath_prefixes!
33751  else
33752    # Not in mixed or Windows style, start by that.
33753    new_path=`cmd //c echo $new_path`
33754
33755  input_path="$new_path"
33756  # Check if we need to convert this using DOS-style short mode. If the path
33757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33758  # take no chances and rewrite it.
33759  # Note: m4 eats our [], so we need to use [ and ] instead.
33760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33761  if test "x$has_forbidden_chars" != x; then
33762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33764  fi
33765
33766    # Output is in $new_path
33767
33768  windows_path="$new_path"
33769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33770    unix_path=`$CYGPATH -u "$windows_path"`
33771    new_path="$unix_path"
33772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33774    new_path="$unix_path"
33775  fi
33776
33777    # remove trailing .exe if any
33778    new_path="${new_path/%.exe/}"
33779
33780    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33781    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33782  fi
33783
33784  else
33785    # We're on a unix platform. Hooray! :)
33786    # First separate the path from the arguments. This will split at the first
33787    # space.
33788    complete="$OBJC"
33789    path="${complete%% *}"
33790    tmp="$complete EOL"
33791    arguments="${tmp#* }"
33792
33793    # Cannot rely on the command "which" here since it doesn't always work.
33794    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33795    if test -z "$is_absolute_path"; then
33796      # Path to executable is not absolute. Find it.
33797      IFS_save="$IFS"
33798      IFS=:
33799      for p in $PATH; do
33800        if test -f "$p/$path" && test -x "$p/$path"; then
33801          new_path="$p/$path"
33802          break
33803        fi
33804      done
33805      IFS="$IFS_save"
33806    else
33807      # This is an absolute path, we can use it without further modifications.
33808      new_path="$path"
33809    fi
33810
33811    if test "x$new_path" = x; then
33812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33813$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33814      has_space=`$ECHO "$complete" | $GREP " "`
33815      if test "x$has_space" != x; then
33816        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33818      fi
33819      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33820    fi
33821  fi
33822
33823  # Now join together the path and the arguments once again
33824  if test "x$arguments" != xEOL; then
33825    new_complete="$new_path ${arguments% *}"
33826  else
33827    new_complete="$new_path"
33828  fi
33829
33830  if test "x$complete" != "x$new_complete"; then
33831    OBJC="$new_complete"
33832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33833$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33834  fi
33835
33836
33837
33838  # Publish this variable in the help.
33839
33840
33841  if test "x$LIPO" = x; then
33842    # The variable is not set by user, try to locate tool using the code snippet
33843    for ac_prog in lipo
33844do
33845  # Extract the first word of "$ac_prog", so it can be a program name with args.
33846set dummy $ac_prog; ac_word=$2
33847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33848$as_echo_n "checking for $ac_word... " >&6; }
33849if ${ac_cv_path_LIPO+:} false; then :
33850  $as_echo_n "(cached) " >&6
33851else
33852  case $LIPO in
33853  [\\/]* | ?:[\\/]*)
33854  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33855  ;;
33856  *)
33857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33858for as_dir in $PATH
33859do
33860  IFS=$as_save_IFS
33861  test -z "$as_dir" && as_dir=.
33862    for ac_exec_ext in '' $ac_executable_extensions; do
33863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33864    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33866    break 2
33867  fi
33868done
33869  done
33870IFS=$as_save_IFS
33871
33872  ;;
33873esac
33874fi
33875LIPO=$ac_cv_path_LIPO
33876if test -n "$LIPO"; then
33877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33878$as_echo "$LIPO" >&6; }
33879else
33880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33881$as_echo "no" >&6; }
33882fi
33883
33884
33885  test -n "$LIPO" && break
33886done
33887
33888  else
33889    # The variable is set, but is it from the command line or the environment?
33890
33891    # Try to remove the string !LIPO! from our list.
33892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33894      # If it failed, the variable was not from the command line. Ignore it,
33895      # but warn the user (except for BASH, which is always set by the calling BASH).
33896      if test "xLIPO" != xBASH; then
33897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33898$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33899      fi
33900      # Try to locate tool using the code snippet
33901      for ac_prog in lipo
33902do
33903  # Extract the first word of "$ac_prog", so it can be a program name with args.
33904set dummy $ac_prog; ac_word=$2
33905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33906$as_echo_n "checking for $ac_word... " >&6; }
33907if ${ac_cv_path_LIPO+:} false; then :
33908  $as_echo_n "(cached) " >&6
33909else
33910  case $LIPO in
33911  [\\/]* | ?:[\\/]*)
33912  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33913  ;;
33914  *)
33915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33916for as_dir in $PATH
33917do
33918  IFS=$as_save_IFS
33919  test -z "$as_dir" && as_dir=.
33920    for ac_exec_ext in '' $ac_executable_extensions; do
33921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33922    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33924    break 2
33925  fi
33926done
33927  done
33928IFS=$as_save_IFS
33929
33930  ;;
33931esac
33932fi
33933LIPO=$ac_cv_path_LIPO
33934if test -n "$LIPO"; then
33935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33936$as_echo "$LIPO" >&6; }
33937else
33938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33939$as_echo "no" >&6; }
33940fi
33941
33942
33943  test -n "$LIPO" && break
33944done
33945
33946    else
33947      # If it succeeded, then it was overridden by the user. We will use it
33948      # for the tool.
33949
33950      # First remove it from the list of overridden variables, so we can test
33951      # for unknown variables in the end.
33952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33953
33954      # Check if the provided tool contains a complete path.
33955      tool_specified="$LIPO"
33956      tool_basename="${tool_specified##*/}"
33957      if test "x$tool_basename" = "x$tool_specified"; then
33958        # A command without a complete path is provided, search $PATH.
33959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33960$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33961        # Extract the first word of "$tool_basename", so it can be a program name with args.
33962set dummy $tool_basename; ac_word=$2
33963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33964$as_echo_n "checking for $ac_word... " >&6; }
33965if ${ac_cv_path_LIPO+:} false; then :
33966  $as_echo_n "(cached) " >&6
33967else
33968  case $LIPO in
33969  [\\/]* | ?:[\\/]*)
33970  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33971  ;;
33972  *)
33973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33974for as_dir in $PATH
33975do
33976  IFS=$as_save_IFS
33977  test -z "$as_dir" && as_dir=.
33978    for ac_exec_ext in '' $ac_executable_extensions; do
33979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33980    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33982    break 2
33983  fi
33984done
33985  done
33986IFS=$as_save_IFS
33987
33988  ;;
33989esac
33990fi
33991LIPO=$ac_cv_path_LIPO
33992if test -n "$LIPO"; then
33993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33994$as_echo "$LIPO" >&6; }
33995else
33996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33997$as_echo "no" >&6; }
33998fi
33999
34000
34001        if test "x$LIPO" = x; then
34002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34003        fi
34004      else
34005        # Otherwise we believe it is a complete path. Use it as it is.
34006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34007$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34009$as_echo_n "checking for LIPO... " >&6; }
34010        if test ! -x "$tool_specified"; then
34011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34012$as_echo "not found" >&6; }
34013          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34014        fi
34015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34016$as_echo "$tool_specified" >&6; }
34017      fi
34018    fi
34019  fi
34020
34021
34022
34023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34024
34025  # First separate the path from the arguments. This will split at the first
34026  # space.
34027  complete="$LIPO"
34028  path="${complete%% *}"
34029  tmp="$complete EOL"
34030  arguments="${tmp#* }"
34031
34032  # Input might be given as Windows format, start by converting to
34033  # unix format.
34034  new_path=`$CYGPATH -u "$path"`
34035
34036  # Now try to locate executable using which
34037  new_path=`$WHICH "$new_path" 2> /dev/null`
34038  # bat and cmd files are not always considered executable in cygwin causing which
34039  # to not find them
34040  if test "x$new_path" = x \
34041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34043    new_path=`$CYGPATH -u "$path"`
34044  fi
34045  if test "x$new_path" = x; then
34046    # Oops. Which didn't find the executable.
34047    # The splitting of arguments from the executable at a space might have been incorrect,
34048    # since paths with space are more likely in Windows. Give it another try with the whole
34049    # argument.
34050    path="$complete"
34051    arguments="EOL"
34052    new_path=`$CYGPATH -u "$path"`
34053    new_path=`$WHICH "$new_path" 2> /dev/null`
34054    # bat and cmd files are not always considered executable in cygwin causing which
34055    # to not find them
34056    if test "x$new_path" = x \
34057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34059      new_path=`$CYGPATH -u "$path"`
34060    fi
34061    if test "x$new_path" = x; then
34062      # It's still not found. Now this is an unrecoverable error.
34063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34064$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34065      has_space=`$ECHO "$complete" | $GREP " "`
34066      if test "x$has_space" != x; then
34067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34069      fi
34070      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34071    fi
34072  fi
34073
34074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34077  # "foo.exe" is OK but "foo" is an error.
34078  #
34079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34080  # It is also a way to make sure we got the proper file name for the real test later on.
34081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34082  if test "x$test_shortpath" = x; then
34083    # Short path failed, file does not exist as specified.
34084    # Try adding .exe or .cmd
34085    if test -f "${new_path}.exe"; then
34086      input_to_shortpath="${new_path}.exe"
34087    elif test -f "${new_path}.cmd"; then
34088      input_to_shortpath="${new_path}.cmd"
34089    else
34090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34091$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34094      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34095    fi
34096  else
34097    input_to_shortpath="$new_path"
34098  fi
34099
34100  # Call helper function which possibly converts this using DOS-style short mode.
34101  # If so, the updated path is stored in $new_path.
34102  new_path="$input_to_shortpath"
34103
34104  input_path="$input_to_shortpath"
34105  # Check if we need to convert this using DOS-style short mode. If the path
34106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34107  # take no chances and rewrite it.
34108  # Note: m4 eats our [], so we need to use [ and ] instead.
34109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34110  if test "x$has_forbidden_chars" != x; then
34111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34115      # Going to short mode and back again did indeed matter. Since short mode is
34116      # case insensitive, let's make it lowercase to improve readability.
34117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34118      # Now convert it back to Unix-stile (cygpath)
34119      input_path=`$CYGPATH -u "$shortmode_path"`
34120      new_path="$input_path"
34121    fi
34122  fi
34123
34124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34125  if test "x$test_cygdrive_prefix" = x; then
34126    # As a simple fix, exclude /usr/bin since it's not a real path.
34127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34129      # a path prefixed by /cygdrive for fixpath to work.
34130      new_path="$CYGWIN_ROOT_PATH$input_path"
34131    fi
34132  fi
34133
34134  # remove trailing .exe if any
34135  new_path="${new_path/%.exe/}"
34136
34137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34138
34139  # First separate the path from the arguments. This will split at the first
34140  # space.
34141  complete="$LIPO"
34142  path="${complete%% *}"
34143  tmp="$complete EOL"
34144  arguments="${tmp#* }"
34145
34146  # Input might be given as Windows format, start by converting to
34147  # unix format.
34148  new_path="$path"
34149
34150  windows_path="$new_path"
34151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34152    unix_path=`$CYGPATH -u "$windows_path"`
34153    new_path="$unix_path"
34154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34156    new_path="$unix_path"
34157  fi
34158
34159
34160  # Now try to locate executable using which
34161  new_path=`$WHICH "$new_path" 2> /dev/null`
34162
34163  if test "x$new_path" = x; then
34164    # Oops. Which didn't find the executable.
34165    # The splitting of arguments from the executable at a space might have been incorrect,
34166    # since paths with space are more likely in Windows. Give it another try with the whole
34167    # argument.
34168    path="$complete"
34169    arguments="EOL"
34170    new_path="$path"
34171
34172  windows_path="$new_path"
34173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174    unix_path=`$CYGPATH -u "$windows_path"`
34175    new_path="$unix_path"
34176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178    new_path="$unix_path"
34179  fi
34180
34181
34182    new_path=`$WHICH "$new_path" 2> /dev/null`
34183    # bat and cmd files are not always considered executable in MSYS causing which
34184    # to not find them
34185    if test "x$new_path" = x \
34186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34188      new_path="$path"
34189
34190  windows_path="$new_path"
34191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192    unix_path=`$CYGPATH -u "$windows_path"`
34193    new_path="$unix_path"
34194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196    new_path="$unix_path"
34197  fi
34198
34199    fi
34200
34201    if test "x$new_path" = x; then
34202      # It's still not found. Now this is an unrecoverable error.
34203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34204$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34205      has_space=`$ECHO "$complete" | $GREP " "`
34206      if test "x$has_space" != x; then
34207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34209      fi
34210      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34211    fi
34212  fi
34213
34214  # Now new_path has a complete unix path to the binary
34215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34216    # Keep paths in /bin as-is, but remove trailing .exe if any
34217    new_path="${new_path/%.exe/}"
34218    # Do not save /bin paths to all_fixpath_prefixes!
34219  else
34220    # Not in mixed or Windows style, start by that.
34221    new_path=`cmd //c echo $new_path`
34222
34223  input_path="$new_path"
34224  # Check if we need to convert this using DOS-style short mode. If the path
34225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34226  # take no chances and rewrite it.
34227  # Note: m4 eats our [], so we need to use [ and ] instead.
34228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34229  if test "x$has_forbidden_chars" != x; then
34230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34232  fi
34233
34234    # Output is in $new_path
34235
34236  windows_path="$new_path"
34237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34238    unix_path=`$CYGPATH -u "$windows_path"`
34239    new_path="$unix_path"
34240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34242    new_path="$unix_path"
34243  fi
34244
34245    # remove trailing .exe if any
34246    new_path="${new_path/%.exe/}"
34247
34248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34250  fi
34251
34252  else
34253    # We're on a unix platform. Hooray! :)
34254    # First separate the path from the arguments. This will split at the first
34255    # space.
34256    complete="$LIPO"
34257    path="${complete%% *}"
34258    tmp="$complete EOL"
34259    arguments="${tmp#* }"
34260
34261    # Cannot rely on the command "which" here since it doesn't always work.
34262    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34263    if test -z "$is_absolute_path"; then
34264      # Path to executable is not absolute. Find it.
34265      IFS_save="$IFS"
34266      IFS=:
34267      for p in $PATH; do
34268        if test -f "$p/$path" && test -x "$p/$path"; then
34269          new_path="$p/$path"
34270          break
34271        fi
34272      done
34273      IFS="$IFS_save"
34274    else
34275      # This is an absolute path, we can use it without further modifications.
34276      new_path="$path"
34277    fi
34278
34279    if test "x$new_path" = x; then
34280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34281$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34282      has_space=`$ECHO "$complete" | $GREP " "`
34283      if test "x$has_space" != x; then
34284        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34286      fi
34287      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34288    fi
34289  fi
34290
34291  # Now join together the path and the arguments once again
34292  if test "x$arguments" != xEOL; then
34293    new_complete="$new_path ${arguments% *}"
34294  else
34295    new_complete="$new_path"
34296  fi
34297
34298  if test "x$complete" != "x$new_complete"; then
34299    LIPO="$new_complete"
34300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34301$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34302  fi
34303
34304  else
34305    OBJC=
34306  fi
34307
34308  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34309    # Extract the first word of "mt", so it can be a program name with args.
34310set dummy mt; ac_word=$2
34311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34312$as_echo_n "checking for $ac_word... " >&6; }
34313if ${ac_cv_prog_MT+:} false; then :
34314  $as_echo_n "(cached) " >&6
34315else
34316  if test -n "$MT"; then
34317  ac_cv_prog_MT="$MT" # Let the user override the test.
34318else
34319  ac_prog_rejected=no
34320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34321for as_dir in $PATH
34322do
34323  IFS=$as_save_IFS
34324  test -z "$as_dir" && as_dir=.
34325    for ac_exec_ext in '' $ac_executable_extensions; do
34326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34327    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34328       ac_prog_rejected=yes
34329       continue
34330     fi
34331    ac_cv_prog_MT="mt"
34332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34333    break 2
34334  fi
34335done
34336  done
34337IFS=$as_save_IFS
34338
34339if test $ac_prog_rejected = yes; then
34340  # We found a bogon in the path, so make sure we never use it.
34341  set dummy $ac_cv_prog_MT
34342  shift
34343  if test $# != 0; then
34344    # We chose a different compiler from the bogus one.
34345    # However, it has the same basename, so the bogon will be chosen
34346    # first if we set MT to just the basename; use the full file name.
34347    shift
34348    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34349  fi
34350fi
34351fi
34352fi
34353MT=$ac_cv_prog_MT
34354if test -n "$MT"; then
34355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34356$as_echo "$MT" >&6; }
34357else
34358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34359$as_echo "no" >&6; }
34360fi
34361
34362
34363
34364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34365
34366  # First separate the path from the arguments. This will split at the first
34367  # space.
34368  complete="$MT"
34369  path="${complete%% *}"
34370  tmp="$complete EOL"
34371  arguments="${tmp#* }"
34372
34373  # Input might be given as Windows format, start by converting to
34374  # unix format.
34375  new_path=`$CYGPATH -u "$path"`
34376
34377  # Now try to locate executable using which
34378  new_path=`$WHICH "$new_path" 2> /dev/null`
34379  # bat and cmd files are not always considered executable in cygwin causing which
34380  # to not find them
34381  if test "x$new_path" = x \
34382      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34383      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34384    new_path=`$CYGPATH -u "$path"`
34385  fi
34386  if test "x$new_path" = x; then
34387    # Oops. Which didn't find the executable.
34388    # The splitting of arguments from the executable at a space might have been incorrect,
34389    # since paths with space are more likely in Windows. Give it another try with the whole
34390    # argument.
34391    path="$complete"
34392    arguments="EOL"
34393    new_path=`$CYGPATH -u "$path"`
34394    new_path=`$WHICH "$new_path" 2> /dev/null`
34395    # bat and cmd files are not always considered executable in cygwin causing which
34396    # to not find them
34397    if test "x$new_path" = x \
34398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34400      new_path=`$CYGPATH -u "$path"`
34401    fi
34402    if test "x$new_path" = x; then
34403      # It's still not found. Now this is an unrecoverable error.
34404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34405$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34406      has_space=`$ECHO "$complete" | $GREP " "`
34407      if test "x$has_space" != x; then
34408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34410      fi
34411      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34412    fi
34413  fi
34414
34415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34418  # "foo.exe" is OK but "foo" is an error.
34419  #
34420  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34421  # It is also a way to make sure we got the proper file name for the real test later on.
34422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34423  if test "x$test_shortpath" = x; then
34424    # Short path failed, file does not exist as specified.
34425    # Try adding .exe or .cmd
34426    if test -f "${new_path}.exe"; then
34427      input_to_shortpath="${new_path}.exe"
34428    elif test -f "${new_path}.cmd"; then
34429      input_to_shortpath="${new_path}.cmd"
34430    else
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34432$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34433      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34434$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34435      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34436    fi
34437  else
34438    input_to_shortpath="$new_path"
34439  fi
34440
34441  # Call helper function which possibly converts this using DOS-style short mode.
34442  # If so, the updated path is stored in $new_path.
34443  new_path="$input_to_shortpath"
34444
34445  input_path="$input_to_shortpath"
34446  # Check if we need to convert this using DOS-style short mode. If the path
34447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34448  # take no chances and rewrite it.
34449  # Note: m4 eats our [], so we need to use [ and ] instead.
34450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34451  if test "x$has_forbidden_chars" != x; then
34452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34456      # Going to short mode and back again did indeed matter. Since short mode is
34457      # case insensitive, let's make it lowercase to improve readability.
34458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34459      # Now convert it back to Unix-stile (cygpath)
34460      input_path=`$CYGPATH -u "$shortmode_path"`
34461      new_path="$input_path"
34462    fi
34463  fi
34464
34465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34466  if test "x$test_cygdrive_prefix" = x; then
34467    # As a simple fix, exclude /usr/bin since it's not a real path.
34468    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34470      # a path prefixed by /cygdrive for fixpath to work.
34471      new_path="$CYGWIN_ROOT_PATH$input_path"
34472    fi
34473  fi
34474
34475  # remove trailing .exe if any
34476  new_path="${new_path/%.exe/}"
34477
34478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34479
34480  # First separate the path from the arguments. This will split at the first
34481  # space.
34482  complete="$MT"
34483  path="${complete%% *}"
34484  tmp="$complete EOL"
34485  arguments="${tmp#* }"
34486
34487  # Input might be given as Windows format, start by converting to
34488  # unix format.
34489  new_path="$path"
34490
34491  windows_path="$new_path"
34492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34493    unix_path=`$CYGPATH -u "$windows_path"`
34494    new_path="$unix_path"
34495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34497    new_path="$unix_path"
34498  fi
34499
34500
34501  # Now try to locate executable using which
34502  new_path=`$WHICH "$new_path" 2> /dev/null`
34503
34504  if test "x$new_path" = x; then
34505    # Oops. Which didn't find the executable.
34506    # The splitting of arguments from the executable at a space might have been incorrect,
34507    # since paths with space are more likely in Windows. Give it another try with the whole
34508    # argument.
34509    path="$complete"
34510    arguments="EOL"
34511    new_path="$path"
34512
34513  windows_path="$new_path"
34514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34515    unix_path=`$CYGPATH -u "$windows_path"`
34516    new_path="$unix_path"
34517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34519    new_path="$unix_path"
34520  fi
34521
34522
34523    new_path=`$WHICH "$new_path" 2> /dev/null`
34524    # bat and cmd files are not always considered executable in MSYS causing which
34525    # to not find them
34526    if test "x$new_path" = x \
34527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34529      new_path="$path"
34530
34531  windows_path="$new_path"
34532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34533    unix_path=`$CYGPATH -u "$windows_path"`
34534    new_path="$unix_path"
34535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34537    new_path="$unix_path"
34538  fi
34539
34540    fi
34541
34542    if test "x$new_path" = x; then
34543      # It's still not found. Now this is an unrecoverable error.
34544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34545$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34546      has_space=`$ECHO "$complete" | $GREP " "`
34547      if test "x$has_space" != x; then
34548        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34549$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34550      fi
34551      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34552    fi
34553  fi
34554
34555  # Now new_path has a complete unix path to the binary
34556  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34557    # Keep paths in /bin as-is, but remove trailing .exe if any
34558    new_path="${new_path/%.exe/}"
34559    # Do not save /bin paths to all_fixpath_prefixes!
34560  else
34561    # Not in mixed or Windows style, start by that.
34562    new_path=`cmd //c echo $new_path`
34563
34564  input_path="$new_path"
34565  # Check if we need to convert this using DOS-style short mode. If the path
34566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34567  # take no chances and rewrite it.
34568  # Note: m4 eats our [], so we need to use [ and ] instead.
34569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34570  if test "x$has_forbidden_chars" != x; then
34571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34573  fi
34574
34575    # Output is in $new_path
34576
34577  windows_path="$new_path"
34578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34579    unix_path=`$CYGPATH -u "$windows_path"`
34580    new_path="$unix_path"
34581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34583    new_path="$unix_path"
34584  fi
34585
34586    # remove trailing .exe if any
34587    new_path="${new_path/%.exe/}"
34588
34589    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34590    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34591  fi
34592
34593  else
34594    # We're on a unix platform. Hooray! :)
34595    # First separate the path from the arguments. This will split at the first
34596    # space.
34597    complete="$MT"
34598    path="${complete%% *}"
34599    tmp="$complete EOL"
34600    arguments="${tmp#* }"
34601
34602    # Cannot rely on the command "which" here since it doesn't always work.
34603    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34604    if test -z "$is_absolute_path"; then
34605      # Path to executable is not absolute. Find it.
34606      IFS_save="$IFS"
34607      IFS=:
34608      for p in $PATH; do
34609        if test -f "$p/$path" && test -x "$p/$path"; then
34610          new_path="$p/$path"
34611          break
34612        fi
34613      done
34614      IFS="$IFS_save"
34615    else
34616      # This is an absolute path, we can use it without further modifications.
34617      new_path="$path"
34618    fi
34619
34620    if test "x$new_path" = x; then
34621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34622$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34623      has_space=`$ECHO "$complete" | $GREP " "`
34624      if test "x$has_space" != x; then
34625        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34626$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34627      fi
34628      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34629    fi
34630  fi
34631
34632  # Now join together the path and the arguments once again
34633  if test "x$arguments" != xEOL; then
34634    new_complete="$new_path ${arguments% *}"
34635  else
34636    new_complete="$new_path"
34637  fi
34638
34639  if test "x$complete" != "x$new_complete"; then
34640    MT="$new_complete"
34641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34642$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34643  fi
34644
34645    # Setup the resource compiler (RC)
34646    # Extract the first word of "rc", so it can be a program name with args.
34647set dummy rc; ac_word=$2
34648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34649$as_echo_n "checking for $ac_word... " >&6; }
34650if ${ac_cv_prog_RC+:} false; then :
34651  $as_echo_n "(cached) " >&6
34652else
34653  if test -n "$RC"; then
34654  ac_cv_prog_RC="$RC" # Let the user override the test.
34655else
34656  ac_prog_rejected=no
34657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34658for as_dir in $PATH
34659do
34660  IFS=$as_save_IFS
34661  test -z "$as_dir" && as_dir=.
34662    for ac_exec_ext in '' $ac_executable_extensions; do
34663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34664    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34665       ac_prog_rejected=yes
34666       continue
34667     fi
34668    ac_cv_prog_RC="rc"
34669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34670    break 2
34671  fi
34672done
34673  done
34674IFS=$as_save_IFS
34675
34676if test $ac_prog_rejected = yes; then
34677  # We found a bogon in the path, so make sure we never use it.
34678  set dummy $ac_cv_prog_RC
34679  shift
34680  if test $# != 0; then
34681    # We chose a different compiler from the bogus one.
34682    # However, it has the same basename, so the bogon will be chosen
34683    # first if we set RC to just the basename; use the full file name.
34684    shift
34685    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34686  fi
34687fi
34688fi
34689fi
34690RC=$ac_cv_prog_RC
34691if test -n "$RC"; then
34692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34693$as_echo "$RC" >&6; }
34694else
34695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34696$as_echo "no" >&6; }
34697fi
34698
34699
34700
34701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34702
34703  # First separate the path from the arguments. This will split at the first
34704  # space.
34705  complete="$RC"
34706  path="${complete%% *}"
34707  tmp="$complete EOL"
34708  arguments="${tmp#* }"
34709
34710  # Input might be given as Windows format, start by converting to
34711  # unix format.
34712  new_path=`$CYGPATH -u "$path"`
34713
34714  # Now try to locate executable using which
34715  new_path=`$WHICH "$new_path" 2> /dev/null`
34716  # bat and cmd files are not always considered executable in cygwin causing which
34717  # to not find them
34718  if test "x$new_path" = x \
34719      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34720      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34721    new_path=`$CYGPATH -u "$path"`
34722  fi
34723  if test "x$new_path" = x; then
34724    # Oops. Which didn't find the executable.
34725    # The splitting of arguments from the executable at a space might have been incorrect,
34726    # since paths with space are more likely in Windows. Give it another try with the whole
34727    # argument.
34728    path="$complete"
34729    arguments="EOL"
34730    new_path=`$CYGPATH -u "$path"`
34731    new_path=`$WHICH "$new_path" 2> /dev/null`
34732    # bat and cmd files are not always considered executable in cygwin causing which
34733    # to not find them
34734    if test "x$new_path" = x \
34735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34737      new_path=`$CYGPATH -u "$path"`
34738    fi
34739    if test "x$new_path" = x; then
34740      # It's still not found. Now this is an unrecoverable error.
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34742$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34743      has_space=`$ECHO "$complete" | $GREP " "`
34744      if test "x$has_space" != x; then
34745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34747      fi
34748      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34749    fi
34750  fi
34751
34752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34755  # "foo.exe" is OK but "foo" is an error.
34756  #
34757  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34758  # It is also a way to make sure we got the proper file name for the real test later on.
34759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34760  if test "x$test_shortpath" = x; then
34761    # Short path failed, file does not exist as specified.
34762    # Try adding .exe or .cmd
34763    if test -f "${new_path}.exe"; then
34764      input_to_shortpath="${new_path}.exe"
34765    elif test -f "${new_path}.cmd"; then
34766      input_to_shortpath="${new_path}.cmd"
34767    else
34768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34769$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34772      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34773    fi
34774  else
34775    input_to_shortpath="$new_path"
34776  fi
34777
34778  # Call helper function which possibly converts this using DOS-style short mode.
34779  # If so, the updated path is stored in $new_path.
34780  new_path="$input_to_shortpath"
34781
34782  input_path="$input_to_shortpath"
34783  # Check if we need to convert this using DOS-style short mode. If the path
34784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34785  # take no chances and rewrite it.
34786  # Note: m4 eats our [], so we need to use [ and ] instead.
34787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34788  if test "x$has_forbidden_chars" != x; then
34789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34793      # Going to short mode and back again did indeed matter. Since short mode is
34794      # case insensitive, let's make it lowercase to improve readability.
34795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34796      # Now convert it back to Unix-stile (cygpath)
34797      input_path=`$CYGPATH -u "$shortmode_path"`
34798      new_path="$input_path"
34799    fi
34800  fi
34801
34802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34803  if test "x$test_cygdrive_prefix" = x; then
34804    # As a simple fix, exclude /usr/bin since it's not a real path.
34805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34807      # a path prefixed by /cygdrive for fixpath to work.
34808      new_path="$CYGWIN_ROOT_PATH$input_path"
34809    fi
34810  fi
34811
34812  # remove trailing .exe if any
34813  new_path="${new_path/%.exe/}"
34814
34815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34816
34817  # First separate the path from the arguments. This will split at the first
34818  # space.
34819  complete="$RC"
34820  path="${complete%% *}"
34821  tmp="$complete EOL"
34822  arguments="${tmp#* }"
34823
34824  # Input might be given as Windows format, start by converting to
34825  # unix format.
34826  new_path="$path"
34827
34828  windows_path="$new_path"
34829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34830    unix_path=`$CYGPATH -u "$windows_path"`
34831    new_path="$unix_path"
34832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34834    new_path="$unix_path"
34835  fi
34836
34837
34838  # Now try to locate executable using which
34839  new_path=`$WHICH "$new_path" 2> /dev/null`
34840
34841  if test "x$new_path" = x; then
34842    # Oops. Which didn't find the executable.
34843    # The splitting of arguments from the executable at a space might have been incorrect,
34844    # since paths with space are more likely in Windows. Give it another try with the whole
34845    # argument.
34846    path="$complete"
34847    arguments="EOL"
34848    new_path="$path"
34849
34850  windows_path="$new_path"
34851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34852    unix_path=`$CYGPATH -u "$windows_path"`
34853    new_path="$unix_path"
34854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34856    new_path="$unix_path"
34857  fi
34858
34859
34860    new_path=`$WHICH "$new_path" 2> /dev/null`
34861    # bat and cmd files are not always considered executable in MSYS causing which
34862    # to not find them
34863    if test "x$new_path" = x \
34864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34866      new_path="$path"
34867
34868  windows_path="$new_path"
34869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34870    unix_path=`$CYGPATH -u "$windows_path"`
34871    new_path="$unix_path"
34872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34874    new_path="$unix_path"
34875  fi
34876
34877    fi
34878
34879    if test "x$new_path" = x; then
34880      # It's still not found. Now this is an unrecoverable error.
34881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34882$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34883      has_space=`$ECHO "$complete" | $GREP " "`
34884      if test "x$has_space" != x; then
34885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34887      fi
34888      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34889    fi
34890  fi
34891
34892  # Now new_path has a complete unix path to the binary
34893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34894    # Keep paths in /bin as-is, but remove trailing .exe if any
34895    new_path="${new_path/%.exe/}"
34896    # Do not save /bin paths to all_fixpath_prefixes!
34897  else
34898    # Not in mixed or Windows style, start by that.
34899    new_path=`cmd //c echo $new_path`
34900
34901  input_path="$new_path"
34902  # Check if we need to convert this using DOS-style short mode. If the path
34903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34904  # take no chances and rewrite it.
34905  # Note: m4 eats our [], so we need to use [ and ] instead.
34906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34907  if test "x$has_forbidden_chars" != x; then
34908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34910  fi
34911
34912    # Output is in $new_path
34913
34914  windows_path="$new_path"
34915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916    unix_path=`$CYGPATH -u "$windows_path"`
34917    new_path="$unix_path"
34918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34920    new_path="$unix_path"
34921  fi
34922
34923    # remove trailing .exe if any
34924    new_path="${new_path/%.exe/}"
34925
34926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34928  fi
34929
34930  else
34931    # We're on a unix platform. Hooray! :)
34932    # First separate the path from the arguments. This will split at the first
34933    # space.
34934    complete="$RC"
34935    path="${complete%% *}"
34936    tmp="$complete EOL"
34937    arguments="${tmp#* }"
34938
34939    # Cannot rely on the command "which" here since it doesn't always work.
34940    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34941    if test -z "$is_absolute_path"; then
34942      # Path to executable is not absolute. Find it.
34943      IFS_save="$IFS"
34944      IFS=:
34945      for p in $PATH; do
34946        if test -f "$p/$path" && test -x "$p/$path"; then
34947          new_path="$p/$path"
34948          break
34949        fi
34950      done
34951      IFS="$IFS_save"
34952    else
34953      # This is an absolute path, we can use it without further modifications.
34954      new_path="$path"
34955    fi
34956
34957    if test "x$new_path" = x; then
34958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34959$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34960      has_space=`$ECHO "$complete" | $GREP " "`
34961      if test "x$has_space" != x; then
34962        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34963$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34964      fi
34965      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34966    fi
34967  fi
34968
34969  # Now join together the path and the arguments once again
34970  if test "x$arguments" != xEOL; then
34971    new_complete="$new_path ${arguments% *}"
34972  else
34973    new_complete="$new_path"
34974  fi
34975
34976  if test "x$complete" != "x$new_complete"; then
34977    RC="$new_complete"
34978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34979$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34980  fi
34981
34982    # Extract the first word of "dumpbin", so it can be a program name with args.
34983set dummy dumpbin; ac_word=$2
34984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34985$as_echo_n "checking for $ac_word... " >&6; }
34986if ${ac_cv_prog_DUMPBIN+:} false; then :
34987  $as_echo_n "(cached) " >&6
34988else
34989  if test -n "$DUMPBIN"; then
34990  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34991else
34992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34993for as_dir in $PATH
34994do
34995  IFS=$as_save_IFS
34996  test -z "$as_dir" && as_dir=.
34997    for ac_exec_ext in '' $ac_executable_extensions; do
34998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34999    ac_cv_prog_DUMPBIN="dumpbin"
35000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35001    break 2
35002  fi
35003done
35004  done
35005IFS=$as_save_IFS
35006
35007fi
35008fi
35009DUMPBIN=$ac_cv_prog_DUMPBIN
35010if test -n "$DUMPBIN"; then
35011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35012$as_echo "$DUMPBIN" >&6; }
35013else
35014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35015$as_echo "no" >&6; }
35016fi
35017
35018
35019
35020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35021
35022  # First separate the path from the arguments. This will split at the first
35023  # space.
35024  complete="$DUMPBIN"
35025  path="${complete%% *}"
35026  tmp="$complete EOL"
35027  arguments="${tmp#* }"
35028
35029  # Input might be given as Windows format, start by converting to
35030  # unix format.
35031  new_path=`$CYGPATH -u "$path"`
35032
35033  # Now try to locate executable using which
35034  new_path=`$WHICH "$new_path" 2> /dev/null`
35035  # bat and cmd files are not always considered executable in cygwin causing which
35036  # to not find them
35037  if test "x$new_path" = x \
35038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35040    new_path=`$CYGPATH -u "$path"`
35041  fi
35042  if test "x$new_path" = x; then
35043    # Oops. Which didn't find the executable.
35044    # The splitting of arguments from the executable at a space might have been incorrect,
35045    # since paths with space are more likely in Windows. Give it another try with the whole
35046    # argument.
35047    path="$complete"
35048    arguments="EOL"
35049    new_path=`$CYGPATH -u "$path"`
35050    new_path=`$WHICH "$new_path" 2> /dev/null`
35051    # bat and cmd files are not always considered executable in cygwin causing which
35052    # to not find them
35053    if test "x$new_path" = x \
35054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35056      new_path=`$CYGPATH -u "$path"`
35057    fi
35058    if test "x$new_path" = x; then
35059      # It's still not found. Now this is an unrecoverable error.
35060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35061$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35062      has_space=`$ECHO "$complete" | $GREP " "`
35063      if test "x$has_space" != x; then
35064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35066      fi
35067      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35068    fi
35069  fi
35070
35071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35074  # "foo.exe" is OK but "foo" is an error.
35075  #
35076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35077  # It is also a way to make sure we got the proper file name for the real test later on.
35078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35079  if test "x$test_shortpath" = x; then
35080    # Short path failed, file does not exist as specified.
35081    # Try adding .exe or .cmd
35082    if test -f "${new_path}.exe"; then
35083      input_to_shortpath="${new_path}.exe"
35084    elif test -f "${new_path}.cmd"; then
35085      input_to_shortpath="${new_path}.cmd"
35086    else
35087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35088$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35091      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35092    fi
35093  else
35094    input_to_shortpath="$new_path"
35095  fi
35096
35097  # Call helper function which possibly converts this using DOS-style short mode.
35098  # If so, the updated path is stored in $new_path.
35099  new_path="$input_to_shortpath"
35100
35101  input_path="$input_to_shortpath"
35102  # Check if we need to convert this using DOS-style short mode. If the path
35103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35104  # take no chances and rewrite it.
35105  # Note: m4 eats our [], so we need to use [ and ] instead.
35106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35107  if test "x$has_forbidden_chars" != x; then
35108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35112      # Going to short mode and back again did indeed matter. Since short mode is
35113      # case insensitive, let's make it lowercase to improve readability.
35114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35115      # Now convert it back to Unix-stile (cygpath)
35116      input_path=`$CYGPATH -u "$shortmode_path"`
35117      new_path="$input_path"
35118    fi
35119  fi
35120
35121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35122  if test "x$test_cygdrive_prefix" = x; then
35123    # As a simple fix, exclude /usr/bin since it's not a real path.
35124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35126      # a path prefixed by /cygdrive for fixpath to work.
35127      new_path="$CYGWIN_ROOT_PATH$input_path"
35128    fi
35129  fi
35130
35131  # remove trailing .exe if any
35132  new_path="${new_path/%.exe/}"
35133
35134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35135
35136  # First separate the path from the arguments. This will split at the first
35137  # space.
35138  complete="$DUMPBIN"
35139  path="${complete%% *}"
35140  tmp="$complete EOL"
35141  arguments="${tmp#* }"
35142
35143  # Input might be given as Windows format, start by converting to
35144  # unix format.
35145  new_path="$path"
35146
35147  windows_path="$new_path"
35148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35149    unix_path=`$CYGPATH -u "$windows_path"`
35150    new_path="$unix_path"
35151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35153    new_path="$unix_path"
35154  fi
35155
35156
35157  # Now try to locate executable using which
35158  new_path=`$WHICH "$new_path" 2> /dev/null`
35159
35160  if test "x$new_path" = x; then
35161    # Oops. Which didn't find the executable.
35162    # The splitting of arguments from the executable at a space might have been incorrect,
35163    # since paths with space are more likely in Windows. Give it another try with the whole
35164    # argument.
35165    path="$complete"
35166    arguments="EOL"
35167    new_path="$path"
35168
35169  windows_path="$new_path"
35170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35171    unix_path=`$CYGPATH -u "$windows_path"`
35172    new_path="$unix_path"
35173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35175    new_path="$unix_path"
35176  fi
35177
35178
35179    new_path=`$WHICH "$new_path" 2> /dev/null`
35180    # bat and cmd files are not always considered executable in MSYS causing which
35181    # to not find them
35182    if test "x$new_path" = x \
35183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35185      new_path="$path"
35186
35187  windows_path="$new_path"
35188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35189    unix_path=`$CYGPATH -u "$windows_path"`
35190    new_path="$unix_path"
35191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35193    new_path="$unix_path"
35194  fi
35195
35196    fi
35197
35198    if test "x$new_path" = x; then
35199      # It's still not found. Now this is an unrecoverable error.
35200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35201$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35202      has_space=`$ECHO "$complete" | $GREP " "`
35203      if test "x$has_space" != x; then
35204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35206      fi
35207      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35208    fi
35209  fi
35210
35211  # Now new_path has a complete unix path to the binary
35212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35213    # Keep paths in /bin as-is, but remove trailing .exe if any
35214    new_path="${new_path/%.exe/}"
35215    # Do not save /bin paths to all_fixpath_prefixes!
35216  else
35217    # Not in mixed or Windows style, start by that.
35218    new_path=`cmd //c echo $new_path`
35219
35220  input_path="$new_path"
35221  # Check if we need to convert this using DOS-style short mode. If the path
35222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35223  # take no chances and rewrite it.
35224  # Note: m4 eats our [], so we need to use [ and ] instead.
35225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35226  if test "x$has_forbidden_chars" != x; then
35227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35229  fi
35230
35231    # Output is in $new_path
35232
35233  windows_path="$new_path"
35234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35235    unix_path=`$CYGPATH -u "$windows_path"`
35236    new_path="$unix_path"
35237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35239    new_path="$unix_path"
35240  fi
35241
35242    # remove trailing .exe if any
35243    new_path="${new_path/%.exe/}"
35244
35245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35247  fi
35248
35249  else
35250    # We're on a unix platform. Hooray! :)
35251    # First separate the path from the arguments. This will split at the first
35252    # space.
35253    complete="$DUMPBIN"
35254    path="${complete%% *}"
35255    tmp="$complete EOL"
35256    arguments="${tmp#* }"
35257
35258    # Cannot rely on the command "which" here since it doesn't always work.
35259    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35260    if test -z "$is_absolute_path"; then
35261      # Path to executable is not absolute. Find it.
35262      IFS_save="$IFS"
35263      IFS=:
35264      for p in $PATH; do
35265        if test -f "$p/$path" && test -x "$p/$path"; then
35266          new_path="$p/$path"
35267          break
35268        fi
35269      done
35270      IFS="$IFS_save"
35271    else
35272      # This is an absolute path, we can use it without further modifications.
35273      new_path="$path"
35274    fi
35275
35276    if test "x$new_path" = x; then
35277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35278$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35279      has_space=`$ECHO "$complete" | $GREP " "`
35280      if test "x$has_space" != x; then
35281        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35283      fi
35284      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35285    fi
35286  fi
35287
35288  # Now join together the path and the arguments once again
35289  if test "x$arguments" != xEOL; then
35290    new_complete="$new_path ${arguments% *}"
35291  else
35292    new_complete="$new_path"
35293  fi
35294
35295  if test "x$complete" != "x$new_complete"; then
35296    DUMPBIN="$new_complete"
35297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35298$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35299  fi
35300
35301    # We need to check for 'msbuild.exe' because at the place where we expect to
35302    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35303    # won't find the 'msbuild.exe' executable in that case (and the
35304    # 'ac_executable_extensions' is unusable due to performance reasons).
35305    # Notice that we intentionally don't fix up the path to MSBUILD because we
35306    # will call it in a DOS shell during freetype detection on Windows (see
35307    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35308    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35309set dummy msbuild.exe; ac_word=$2
35310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35311$as_echo_n "checking for $ac_word... " >&6; }
35312if ${ac_cv_prog_MSBUILD+:} false; then :
35313  $as_echo_n "(cached) " >&6
35314else
35315  if test -n "$MSBUILD"; then
35316  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35317else
35318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35319for as_dir in $PATH
35320do
35321  IFS=$as_save_IFS
35322  test -z "$as_dir" && as_dir=.
35323    for ac_exec_ext in '' $ac_executable_extensions; do
35324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35325    ac_cv_prog_MSBUILD="msbuild.exe"
35326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35327    break 2
35328  fi
35329done
35330  done
35331IFS=$as_save_IFS
35332
35333fi
35334fi
35335MSBUILD=$ac_cv_prog_MSBUILD
35336if test -n "$MSBUILD"; then
35337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35338$as_echo "$MSBUILD" >&6; }
35339else
35340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35341$as_echo "no" >&6; }
35342fi
35343
35344
35345  fi
35346
35347  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35348
35349
35350  # Publish this variable in the help.
35351
35352
35353  if test "x$STRIP" = x; then
35354    # The variable is not set by user, try to locate tool using the code snippet
35355    for ac_prog in strip
35356do
35357  # Extract the first word of "$ac_prog", so it can be a program name with args.
35358set dummy $ac_prog; ac_word=$2
35359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35360$as_echo_n "checking for $ac_word... " >&6; }
35361if ${ac_cv_path_STRIP+:} false; then :
35362  $as_echo_n "(cached) " >&6
35363else
35364  case $STRIP in
35365  [\\/]* | ?:[\\/]*)
35366  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35367  ;;
35368  *)
35369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35370for as_dir in $PATH
35371do
35372  IFS=$as_save_IFS
35373  test -z "$as_dir" && as_dir=.
35374    for ac_exec_ext in '' $ac_executable_extensions; do
35375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35376    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35378    break 2
35379  fi
35380done
35381  done
35382IFS=$as_save_IFS
35383
35384  ;;
35385esac
35386fi
35387STRIP=$ac_cv_path_STRIP
35388if test -n "$STRIP"; then
35389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35390$as_echo "$STRIP" >&6; }
35391else
35392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35393$as_echo "no" >&6; }
35394fi
35395
35396
35397  test -n "$STRIP" && break
35398done
35399
35400  else
35401    # The variable is set, but is it from the command line or the environment?
35402
35403    # Try to remove the string !STRIP! from our list.
35404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35406      # If it failed, the variable was not from the command line. Ignore it,
35407      # but warn the user (except for BASH, which is always set by the calling BASH).
35408      if test "xSTRIP" != xBASH; then
35409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35410$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35411      fi
35412      # Try to locate tool using the code snippet
35413      for ac_prog in strip
35414do
35415  # Extract the first word of "$ac_prog", so it can be a program name with args.
35416set dummy $ac_prog; ac_word=$2
35417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35418$as_echo_n "checking for $ac_word... " >&6; }
35419if ${ac_cv_path_STRIP+:} false; then :
35420  $as_echo_n "(cached) " >&6
35421else
35422  case $STRIP in
35423  [\\/]* | ?:[\\/]*)
35424  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35425  ;;
35426  *)
35427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35428for as_dir in $PATH
35429do
35430  IFS=$as_save_IFS
35431  test -z "$as_dir" && as_dir=.
35432    for ac_exec_ext in '' $ac_executable_extensions; do
35433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35434    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35436    break 2
35437  fi
35438done
35439  done
35440IFS=$as_save_IFS
35441
35442  ;;
35443esac
35444fi
35445STRIP=$ac_cv_path_STRIP
35446if test -n "$STRIP"; then
35447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35448$as_echo "$STRIP" >&6; }
35449else
35450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35451$as_echo "no" >&6; }
35452fi
35453
35454
35455  test -n "$STRIP" && break
35456done
35457
35458    else
35459      # If it succeeded, then it was overridden by the user. We will use it
35460      # for the tool.
35461
35462      # First remove it from the list of overridden variables, so we can test
35463      # for unknown variables in the end.
35464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35465
35466      # Check if the provided tool contains a complete path.
35467      tool_specified="$STRIP"
35468      tool_basename="${tool_specified##*/}"
35469      if test "x$tool_basename" = "x$tool_specified"; then
35470        # A command without a complete path is provided, search $PATH.
35471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35472$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35473        # Extract the first word of "$tool_basename", so it can be a program name with args.
35474set dummy $tool_basename; ac_word=$2
35475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35476$as_echo_n "checking for $ac_word... " >&6; }
35477if ${ac_cv_path_STRIP+:} false; then :
35478  $as_echo_n "(cached) " >&6
35479else
35480  case $STRIP in
35481  [\\/]* | ?:[\\/]*)
35482  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35483  ;;
35484  *)
35485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35486for as_dir in $PATH
35487do
35488  IFS=$as_save_IFS
35489  test -z "$as_dir" && as_dir=.
35490    for ac_exec_ext in '' $ac_executable_extensions; do
35491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35492    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35494    break 2
35495  fi
35496done
35497  done
35498IFS=$as_save_IFS
35499
35500  ;;
35501esac
35502fi
35503STRIP=$ac_cv_path_STRIP
35504if test -n "$STRIP"; then
35505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35506$as_echo "$STRIP" >&6; }
35507else
35508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35509$as_echo "no" >&6; }
35510fi
35511
35512
35513        if test "x$STRIP" = x; then
35514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35515        fi
35516      else
35517        # Otherwise we believe it is a complete path. Use it as it is.
35518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35519$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35521$as_echo_n "checking for STRIP... " >&6; }
35522        if test ! -x "$tool_specified"; then
35523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35524$as_echo "not found" >&6; }
35525          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35526        fi
35527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35528$as_echo "$tool_specified" >&6; }
35529      fi
35530    fi
35531  fi
35532
35533
35534
35535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35536
35537  # First separate the path from the arguments. This will split at the first
35538  # space.
35539  complete="$STRIP"
35540  path="${complete%% *}"
35541  tmp="$complete EOL"
35542  arguments="${tmp#* }"
35543
35544  # Input might be given as Windows format, start by converting to
35545  # unix format.
35546  new_path=`$CYGPATH -u "$path"`
35547
35548  # Now try to locate executable using which
35549  new_path=`$WHICH "$new_path" 2> /dev/null`
35550  # bat and cmd files are not always considered executable in cygwin causing which
35551  # to not find them
35552  if test "x$new_path" = x \
35553      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35554      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35555    new_path=`$CYGPATH -u "$path"`
35556  fi
35557  if test "x$new_path" = x; then
35558    # Oops. Which didn't find the executable.
35559    # The splitting of arguments from the executable at a space might have been incorrect,
35560    # since paths with space are more likely in Windows. Give it another try with the whole
35561    # argument.
35562    path="$complete"
35563    arguments="EOL"
35564    new_path=`$CYGPATH -u "$path"`
35565    new_path=`$WHICH "$new_path" 2> /dev/null`
35566    # bat and cmd files are not always considered executable in cygwin causing which
35567    # to not find them
35568    if test "x$new_path" = x \
35569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35571      new_path=`$CYGPATH -u "$path"`
35572    fi
35573    if test "x$new_path" = x; then
35574      # It's still not found. Now this is an unrecoverable error.
35575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35577      has_space=`$ECHO "$complete" | $GREP " "`
35578      if test "x$has_space" != x; then
35579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35581      fi
35582      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35583    fi
35584  fi
35585
35586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35589  # "foo.exe" is OK but "foo" is an error.
35590  #
35591  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35592  # It is also a way to make sure we got the proper file name for the real test later on.
35593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35594  if test "x$test_shortpath" = x; then
35595    # Short path failed, file does not exist as specified.
35596    # Try adding .exe or .cmd
35597    if test -f "${new_path}.exe"; then
35598      input_to_shortpath="${new_path}.exe"
35599    elif test -f "${new_path}.cmd"; then
35600      input_to_shortpath="${new_path}.cmd"
35601    else
35602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35603$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35606      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35607    fi
35608  else
35609    input_to_shortpath="$new_path"
35610  fi
35611
35612  # Call helper function which possibly converts this using DOS-style short mode.
35613  # If so, the updated path is stored in $new_path.
35614  new_path="$input_to_shortpath"
35615
35616  input_path="$input_to_shortpath"
35617  # Check if we need to convert this using DOS-style short mode. If the path
35618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35619  # take no chances and rewrite it.
35620  # Note: m4 eats our [], so we need to use [ and ] instead.
35621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35622  if test "x$has_forbidden_chars" != x; then
35623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35627      # Going to short mode and back again did indeed matter. Since short mode is
35628      # case insensitive, let's make it lowercase to improve readability.
35629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35630      # Now convert it back to Unix-stile (cygpath)
35631      input_path=`$CYGPATH -u "$shortmode_path"`
35632      new_path="$input_path"
35633    fi
35634  fi
35635
35636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35637  if test "x$test_cygdrive_prefix" = x; then
35638    # As a simple fix, exclude /usr/bin since it's not a real path.
35639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35641      # a path prefixed by /cygdrive for fixpath to work.
35642      new_path="$CYGWIN_ROOT_PATH$input_path"
35643    fi
35644  fi
35645
35646  # remove trailing .exe if any
35647  new_path="${new_path/%.exe/}"
35648
35649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35650
35651  # First separate the path from the arguments. This will split at the first
35652  # space.
35653  complete="$STRIP"
35654  path="${complete%% *}"
35655  tmp="$complete EOL"
35656  arguments="${tmp#* }"
35657
35658  # Input might be given as Windows format, start by converting to
35659  # unix format.
35660  new_path="$path"
35661
35662  windows_path="$new_path"
35663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35664    unix_path=`$CYGPATH -u "$windows_path"`
35665    new_path="$unix_path"
35666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35668    new_path="$unix_path"
35669  fi
35670
35671
35672  # Now try to locate executable using which
35673  new_path=`$WHICH "$new_path" 2> /dev/null`
35674
35675  if test "x$new_path" = x; then
35676    # Oops. Which didn't find the executable.
35677    # The splitting of arguments from the executable at a space might have been incorrect,
35678    # since paths with space are more likely in Windows. Give it another try with the whole
35679    # argument.
35680    path="$complete"
35681    arguments="EOL"
35682    new_path="$path"
35683
35684  windows_path="$new_path"
35685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35686    unix_path=`$CYGPATH -u "$windows_path"`
35687    new_path="$unix_path"
35688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35690    new_path="$unix_path"
35691  fi
35692
35693
35694    new_path=`$WHICH "$new_path" 2> /dev/null`
35695    # bat and cmd files are not always considered executable in MSYS causing which
35696    # to not find them
35697    if test "x$new_path" = x \
35698        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35699        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35700      new_path="$path"
35701
35702  windows_path="$new_path"
35703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35704    unix_path=`$CYGPATH -u "$windows_path"`
35705    new_path="$unix_path"
35706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35708    new_path="$unix_path"
35709  fi
35710
35711    fi
35712
35713    if test "x$new_path" = x; then
35714      # It's still not found. Now this is an unrecoverable error.
35715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35716$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35717      has_space=`$ECHO "$complete" | $GREP " "`
35718      if test "x$has_space" != x; then
35719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35721      fi
35722      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35723    fi
35724  fi
35725
35726  # Now new_path has a complete unix path to the binary
35727  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35728    # Keep paths in /bin as-is, but remove trailing .exe if any
35729    new_path="${new_path/%.exe/}"
35730    # Do not save /bin paths to all_fixpath_prefixes!
35731  else
35732    # Not in mixed or Windows style, start by that.
35733    new_path=`cmd //c echo $new_path`
35734
35735  input_path="$new_path"
35736  # Check if we need to convert this using DOS-style short mode. If the path
35737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35738  # take no chances and rewrite it.
35739  # Note: m4 eats our [], so we need to use [ and ] instead.
35740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35741  if test "x$has_forbidden_chars" != x; then
35742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35744  fi
35745
35746    # Output is in $new_path
35747
35748  windows_path="$new_path"
35749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35750    unix_path=`$CYGPATH -u "$windows_path"`
35751    new_path="$unix_path"
35752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35754    new_path="$unix_path"
35755  fi
35756
35757    # remove trailing .exe if any
35758    new_path="${new_path/%.exe/}"
35759
35760    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35761    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35762  fi
35763
35764  else
35765    # We're on a unix platform. Hooray! :)
35766    # First separate the path from the arguments. This will split at the first
35767    # space.
35768    complete="$STRIP"
35769    path="${complete%% *}"
35770    tmp="$complete EOL"
35771    arguments="${tmp#* }"
35772
35773    # Cannot rely on the command "which" here since it doesn't always work.
35774    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35775    if test -z "$is_absolute_path"; then
35776      # Path to executable is not absolute. Find it.
35777      IFS_save="$IFS"
35778      IFS=:
35779      for p in $PATH; do
35780        if test -f "$p/$path" && test -x "$p/$path"; then
35781          new_path="$p/$path"
35782          break
35783        fi
35784      done
35785      IFS="$IFS_save"
35786    else
35787      # This is an absolute path, we can use it without further modifications.
35788      new_path="$path"
35789    fi
35790
35791    if test "x$new_path" = x; then
35792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35793$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35794      has_space=`$ECHO "$complete" | $GREP " "`
35795      if test "x$has_space" != x; then
35796        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35798      fi
35799      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35800    fi
35801  fi
35802
35803  # Now join together the path and the arguments once again
35804  if test "x$arguments" != xEOL; then
35805    new_complete="$new_path ${arguments% *}"
35806  else
35807    new_complete="$new_path"
35808  fi
35809
35810  if test "x$complete" != "x$new_complete"; then
35811    STRIP="$new_complete"
35812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35813$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35814  fi
35815
35816
35817
35818  # Publish this variable in the help.
35819
35820
35821  if test "x$NM" = x; then
35822    # The variable is not set by user, try to locate tool using the code snippet
35823    for ac_prog in nm
35824do
35825  # Extract the first word of "$ac_prog", so it can be a program name with args.
35826set dummy $ac_prog; ac_word=$2
35827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35828$as_echo_n "checking for $ac_word... " >&6; }
35829if ${ac_cv_path_NM+:} false; then :
35830  $as_echo_n "(cached) " >&6
35831else
35832  case $NM in
35833  [\\/]* | ?:[\\/]*)
35834  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35835  ;;
35836  *)
35837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35838for as_dir in $PATH
35839do
35840  IFS=$as_save_IFS
35841  test -z "$as_dir" && as_dir=.
35842    for ac_exec_ext in '' $ac_executable_extensions; do
35843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35844    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35846    break 2
35847  fi
35848done
35849  done
35850IFS=$as_save_IFS
35851
35852  ;;
35853esac
35854fi
35855NM=$ac_cv_path_NM
35856if test -n "$NM"; then
35857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35858$as_echo "$NM" >&6; }
35859else
35860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35861$as_echo "no" >&6; }
35862fi
35863
35864
35865  test -n "$NM" && break
35866done
35867
35868  else
35869    # The variable is set, but is it from the command line or the environment?
35870
35871    # Try to remove the string !NM! from our list.
35872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35874      # If it failed, the variable was not from the command line. Ignore it,
35875      # but warn the user (except for BASH, which is always set by the calling BASH).
35876      if test "xNM" != xBASH; then
35877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35878$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35879      fi
35880      # Try to locate tool using the code snippet
35881      for ac_prog in nm
35882do
35883  # Extract the first word of "$ac_prog", so it can be a program name with args.
35884set dummy $ac_prog; ac_word=$2
35885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35886$as_echo_n "checking for $ac_word... " >&6; }
35887if ${ac_cv_path_NM+:} false; then :
35888  $as_echo_n "(cached) " >&6
35889else
35890  case $NM in
35891  [\\/]* | ?:[\\/]*)
35892  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35893  ;;
35894  *)
35895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35896for as_dir in $PATH
35897do
35898  IFS=$as_save_IFS
35899  test -z "$as_dir" && as_dir=.
35900    for ac_exec_ext in '' $ac_executable_extensions; do
35901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35902    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35904    break 2
35905  fi
35906done
35907  done
35908IFS=$as_save_IFS
35909
35910  ;;
35911esac
35912fi
35913NM=$ac_cv_path_NM
35914if test -n "$NM"; then
35915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35916$as_echo "$NM" >&6; }
35917else
35918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35919$as_echo "no" >&6; }
35920fi
35921
35922
35923  test -n "$NM" && break
35924done
35925
35926    else
35927      # If it succeeded, then it was overridden by the user. We will use it
35928      # for the tool.
35929
35930      # First remove it from the list of overridden variables, so we can test
35931      # for unknown variables in the end.
35932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35933
35934      # Check if the provided tool contains a complete path.
35935      tool_specified="$NM"
35936      tool_basename="${tool_specified##*/}"
35937      if test "x$tool_basename" = "x$tool_specified"; then
35938        # A command without a complete path is provided, search $PATH.
35939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35940$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35941        # Extract the first word of "$tool_basename", so it can be a program name with args.
35942set dummy $tool_basename; ac_word=$2
35943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35944$as_echo_n "checking for $ac_word... " >&6; }
35945if ${ac_cv_path_NM+:} false; then :
35946  $as_echo_n "(cached) " >&6
35947else
35948  case $NM in
35949  [\\/]* | ?:[\\/]*)
35950  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35951  ;;
35952  *)
35953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35954for as_dir in $PATH
35955do
35956  IFS=$as_save_IFS
35957  test -z "$as_dir" && as_dir=.
35958    for ac_exec_ext in '' $ac_executable_extensions; do
35959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35960    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35962    break 2
35963  fi
35964done
35965  done
35966IFS=$as_save_IFS
35967
35968  ;;
35969esac
35970fi
35971NM=$ac_cv_path_NM
35972if test -n "$NM"; then
35973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35974$as_echo "$NM" >&6; }
35975else
35976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35977$as_echo "no" >&6; }
35978fi
35979
35980
35981        if test "x$NM" = x; then
35982          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35983        fi
35984      else
35985        # Otherwise we believe it is a complete path. Use it as it is.
35986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35987$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35989$as_echo_n "checking for NM... " >&6; }
35990        if test ! -x "$tool_specified"; then
35991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35992$as_echo "not found" >&6; }
35993          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35994        fi
35995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35996$as_echo "$tool_specified" >&6; }
35997      fi
35998    fi
35999  fi
36000
36001
36002
36003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36004
36005  # First separate the path from the arguments. This will split at the first
36006  # space.
36007  complete="$NM"
36008  path="${complete%% *}"
36009  tmp="$complete EOL"
36010  arguments="${tmp#* }"
36011
36012  # Input might be given as Windows format, start by converting to
36013  # unix format.
36014  new_path=`$CYGPATH -u "$path"`
36015
36016  # Now try to locate executable using which
36017  new_path=`$WHICH "$new_path" 2> /dev/null`
36018  # bat and cmd files are not always considered executable in cygwin causing which
36019  # to not find them
36020  if test "x$new_path" = x \
36021      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36022      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36023    new_path=`$CYGPATH -u "$path"`
36024  fi
36025  if test "x$new_path" = x; then
36026    # Oops. Which didn't find the executable.
36027    # The splitting of arguments from the executable at a space might have been incorrect,
36028    # since paths with space are more likely in Windows. Give it another try with the whole
36029    # argument.
36030    path="$complete"
36031    arguments="EOL"
36032    new_path=`$CYGPATH -u "$path"`
36033    new_path=`$WHICH "$new_path" 2> /dev/null`
36034    # bat and cmd files are not always considered executable in cygwin causing which
36035    # to not find them
36036    if test "x$new_path" = x \
36037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36039      new_path=`$CYGPATH -u "$path"`
36040    fi
36041    if test "x$new_path" = x; then
36042      # It's still not found. Now this is an unrecoverable error.
36043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36045      has_space=`$ECHO "$complete" | $GREP " "`
36046      if test "x$has_space" != x; then
36047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36049      fi
36050      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36051    fi
36052  fi
36053
36054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36057  # "foo.exe" is OK but "foo" is an error.
36058  #
36059  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36060  # It is also a way to make sure we got the proper file name for the real test later on.
36061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36062  if test "x$test_shortpath" = x; then
36063    # Short path failed, file does not exist as specified.
36064    # Try adding .exe or .cmd
36065    if test -f "${new_path}.exe"; then
36066      input_to_shortpath="${new_path}.exe"
36067    elif test -f "${new_path}.cmd"; then
36068      input_to_shortpath="${new_path}.cmd"
36069    else
36070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36071$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36072      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36073$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36074      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36075    fi
36076  else
36077    input_to_shortpath="$new_path"
36078  fi
36079
36080  # Call helper function which possibly converts this using DOS-style short mode.
36081  # If so, the updated path is stored in $new_path.
36082  new_path="$input_to_shortpath"
36083
36084  input_path="$input_to_shortpath"
36085  # Check if we need to convert this using DOS-style short mode. If the path
36086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36087  # take no chances and rewrite it.
36088  # Note: m4 eats our [], so we need to use [ and ] instead.
36089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36090  if test "x$has_forbidden_chars" != x; then
36091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36095      # Going to short mode and back again did indeed matter. Since short mode is
36096      # case insensitive, let's make it lowercase to improve readability.
36097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36098      # Now convert it back to Unix-stile (cygpath)
36099      input_path=`$CYGPATH -u "$shortmode_path"`
36100      new_path="$input_path"
36101    fi
36102  fi
36103
36104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36105  if test "x$test_cygdrive_prefix" = x; then
36106    # As a simple fix, exclude /usr/bin since it's not a real path.
36107    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36109      # a path prefixed by /cygdrive for fixpath to work.
36110      new_path="$CYGWIN_ROOT_PATH$input_path"
36111    fi
36112  fi
36113
36114  # remove trailing .exe if any
36115  new_path="${new_path/%.exe/}"
36116
36117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36118
36119  # First separate the path from the arguments. This will split at the first
36120  # space.
36121  complete="$NM"
36122  path="${complete%% *}"
36123  tmp="$complete EOL"
36124  arguments="${tmp#* }"
36125
36126  # Input might be given as Windows format, start by converting to
36127  # unix format.
36128  new_path="$path"
36129
36130  windows_path="$new_path"
36131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36132    unix_path=`$CYGPATH -u "$windows_path"`
36133    new_path="$unix_path"
36134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36136    new_path="$unix_path"
36137  fi
36138
36139
36140  # Now try to locate executable using which
36141  new_path=`$WHICH "$new_path" 2> /dev/null`
36142
36143  if test "x$new_path" = x; then
36144    # Oops. Which didn't find the executable.
36145    # The splitting of arguments from the executable at a space might have been incorrect,
36146    # since paths with space are more likely in Windows. Give it another try with the whole
36147    # argument.
36148    path="$complete"
36149    arguments="EOL"
36150    new_path="$path"
36151
36152  windows_path="$new_path"
36153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36154    unix_path=`$CYGPATH -u "$windows_path"`
36155    new_path="$unix_path"
36156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36158    new_path="$unix_path"
36159  fi
36160
36161
36162    new_path=`$WHICH "$new_path" 2> /dev/null`
36163    # bat and cmd files are not always considered executable in MSYS causing which
36164    # to not find them
36165    if test "x$new_path" = x \
36166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36168      new_path="$path"
36169
36170  windows_path="$new_path"
36171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36172    unix_path=`$CYGPATH -u "$windows_path"`
36173    new_path="$unix_path"
36174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36176    new_path="$unix_path"
36177  fi
36178
36179    fi
36180
36181    if test "x$new_path" = x; then
36182      # It's still not found. Now this is an unrecoverable error.
36183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36184$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36185      has_space=`$ECHO "$complete" | $GREP " "`
36186      if test "x$has_space" != x; then
36187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36189      fi
36190      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36191    fi
36192  fi
36193
36194  # Now new_path has a complete unix path to the binary
36195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36196    # Keep paths in /bin as-is, but remove trailing .exe if any
36197    new_path="${new_path/%.exe/}"
36198    # Do not save /bin paths to all_fixpath_prefixes!
36199  else
36200    # Not in mixed or Windows style, start by that.
36201    new_path=`cmd //c echo $new_path`
36202
36203  input_path="$new_path"
36204  # Check if we need to convert this using DOS-style short mode. If the path
36205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36206  # take no chances and rewrite it.
36207  # Note: m4 eats our [], so we need to use [ and ] instead.
36208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36209  if test "x$has_forbidden_chars" != x; then
36210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36212  fi
36213
36214    # Output is in $new_path
36215
36216  windows_path="$new_path"
36217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36218    unix_path=`$CYGPATH -u "$windows_path"`
36219    new_path="$unix_path"
36220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36222    new_path="$unix_path"
36223  fi
36224
36225    # remove trailing .exe if any
36226    new_path="${new_path/%.exe/}"
36227
36228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36230  fi
36231
36232  else
36233    # We're on a unix platform. Hooray! :)
36234    # First separate the path from the arguments. This will split at the first
36235    # space.
36236    complete="$NM"
36237    path="${complete%% *}"
36238    tmp="$complete EOL"
36239    arguments="${tmp#* }"
36240
36241    # Cannot rely on the command "which" here since it doesn't always work.
36242    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36243    if test -z "$is_absolute_path"; then
36244      # Path to executable is not absolute. Find it.
36245      IFS_save="$IFS"
36246      IFS=:
36247      for p in $PATH; do
36248        if test -f "$p/$path" && test -x "$p/$path"; then
36249          new_path="$p/$path"
36250          break
36251        fi
36252      done
36253      IFS="$IFS_save"
36254    else
36255      # This is an absolute path, we can use it without further modifications.
36256      new_path="$path"
36257    fi
36258
36259    if test "x$new_path" = x; then
36260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36261$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36262      has_space=`$ECHO "$complete" | $GREP " "`
36263      if test "x$has_space" != x; then
36264        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36266      fi
36267      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36268    fi
36269  fi
36270
36271  # Now join together the path and the arguments once again
36272  if test "x$arguments" != xEOL; then
36273    new_complete="$new_path ${arguments% *}"
36274  else
36275    new_complete="$new_path"
36276  fi
36277
36278  if test "x$complete" != "x$new_complete"; then
36279    NM="$new_complete"
36280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36281$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36282  fi
36283
36284
36285
36286  # Publish this variable in the help.
36287
36288
36289  if test "x$GNM" = x; then
36290    # The variable is not set by user, try to locate tool using the code snippet
36291    for ac_prog in gnm
36292do
36293  # Extract the first word of "$ac_prog", so it can be a program name with args.
36294set dummy $ac_prog; ac_word=$2
36295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36296$as_echo_n "checking for $ac_word... " >&6; }
36297if ${ac_cv_path_GNM+:} false; then :
36298  $as_echo_n "(cached) " >&6
36299else
36300  case $GNM in
36301  [\\/]* | ?:[\\/]*)
36302  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36303  ;;
36304  *)
36305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36306for as_dir in $PATH
36307do
36308  IFS=$as_save_IFS
36309  test -z "$as_dir" && as_dir=.
36310    for ac_exec_ext in '' $ac_executable_extensions; do
36311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36312    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36314    break 2
36315  fi
36316done
36317  done
36318IFS=$as_save_IFS
36319
36320  ;;
36321esac
36322fi
36323GNM=$ac_cv_path_GNM
36324if test -n "$GNM"; then
36325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36326$as_echo "$GNM" >&6; }
36327else
36328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36329$as_echo "no" >&6; }
36330fi
36331
36332
36333  test -n "$GNM" && break
36334done
36335
36336  else
36337    # The variable is set, but is it from the command line or the environment?
36338
36339    # Try to remove the string !GNM! from our list.
36340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36342      # If it failed, the variable was not from the command line. Ignore it,
36343      # but warn the user (except for BASH, which is always set by the calling BASH).
36344      if test "xGNM" != xBASH; then
36345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36346$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36347      fi
36348      # Try to locate tool using the code snippet
36349      for ac_prog in gnm
36350do
36351  # Extract the first word of "$ac_prog", so it can be a program name with args.
36352set dummy $ac_prog; ac_word=$2
36353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36354$as_echo_n "checking for $ac_word... " >&6; }
36355if ${ac_cv_path_GNM+:} false; then :
36356  $as_echo_n "(cached) " >&6
36357else
36358  case $GNM in
36359  [\\/]* | ?:[\\/]*)
36360  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36361  ;;
36362  *)
36363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36364for as_dir in $PATH
36365do
36366  IFS=$as_save_IFS
36367  test -z "$as_dir" && as_dir=.
36368    for ac_exec_ext in '' $ac_executable_extensions; do
36369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36370    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36372    break 2
36373  fi
36374done
36375  done
36376IFS=$as_save_IFS
36377
36378  ;;
36379esac
36380fi
36381GNM=$ac_cv_path_GNM
36382if test -n "$GNM"; then
36383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36384$as_echo "$GNM" >&6; }
36385else
36386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36387$as_echo "no" >&6; }
36388fi
36389
36390
36391  test -n "$GNM" && break
36392done
36393
36394    else
36395      # If it succeeded, then it was overridden by the user. We will use it
36396      # for the tool.
36397
36398      # First remove it from the list of overridden variables, so we can test
36399      # for unknown variables in the end.
36400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36401
36402      # Check if the provided tool contains a complete path.
36403      tool_specified="$GNM"
36404      tool_basename="${tool_specified##*/}"
36405      if test "x$tool_basename" = "x$tool_specified"; then
36406        # A command without a complete path is provided, search $PATH.
36407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36408$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36409        # Extract the first word of "$tool_basename", so it can be a program name with args.
36410set dummy $tool_basename; ac_word=$2
36411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36412$as_echo_n "checking for $ac_word... " >&6; }
36413if ${ac_cv_path_GNM+:} false; then :
36414  $as_echo_n "(cached) " >&6
36415else
36416  case $GNM in
36417  [\\/]* | ?:[\\/]*)
36418  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36419  ;;
36420  *)
36421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36422for as_dir in $PATH
36423do
36424  IFS=$as_save_IFS
36425  test -z "$as_dir" && as_dir=.
36426    for ac_exec_ext in '' $ac_executable_extensions; do
36427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36428    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36430    break 2
36431  fi
36432done
36433  done
36434IFS=$as_save_IFS
36435
36436  ;;
36437esac
36438fi
36439GNM=$ac_cv_path_GNM
36440if test -n "$GNM"; then
36441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36442$as_echo "$GNM" >&6; }
36443else
36444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36445$as_echo "no" >&6; }
36446fi
36447
36448
36449        if test "x$GNM" = x; then
36450          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36451        fi
36452      else
36453        # Otherwise we believe it is a complete path. Use it as it is.
36454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36455$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36457$as_echo_n "checking for GNM... " >&6; }
36458        if test ! -x "$tool_specified"; then
36459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36460$as_echo "not found" >&6; }
36461          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36462        fi
36463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36464$as_echo "$tool_specified" >&6; }
36465      fi
36466    fi
36467  fi
36468
36469
36470
36471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36472
36473  # First separate the path from the arguments. This will split at the first
36474  # space.
36475  complete="$GNM"
36476  path="${complete%% *}"
36477  tmp="$complete EOL"
36478  arguments="${tmp#* }"
36479
36480  # Input might be given as Windows format, start by converting to
36481  # unix format.
36482  new_path=`$CYGPATH -u "$path"`
36483
36484  # Now try to locate executable using which
36485  new_path=`$WHICH "$new_path" 2> /dev/null`
36486  # bat and cmd files are not always considered executable in cygwin causing which
36487  # to not find them
36488  if test "x$new_path" = x \
36489      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36490      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36491    new_path=`$CYGPATH -u "$path"`
36492  fi
36493  if test "x$new_path" = x; then
36494    # Oops. Which didn't find the executable.
36495    # The splitting of arguments from the executable at a space might have been incorrect,
36496    # since paths with space are more likely in Windows. Give it another try with the whole
36497    # argument.
36498    path="$complete"
36499    arguments="EOL"
36500    new_path=`$CYGPATH -u "$path"`
36501    new_path=`$WHICH "$new_path" 2> /dev/null`
36502    # bat and cmd files are not always considered executable in cygwin causing which
36503    # to not find them
36504    if test "x$new_path" = x \
36505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36507      new_path=`$CYGPATH -u "$path"`
36508    fi
36509    if test "x$new_path" = x; then
36510      # It's still not found. Now this is an unrecoverable error.
36511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36512$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36513      has_space=`$ECHO "$complete" | $GREP " "`
36514      if test "x$has_space" != x; then
36515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36517      fi
36518      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36519    fi
36520  fi
36521
36522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36525  # "foo.exe" is OK but "foo" is an error.
36526  #
36527  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36528  # It is also a way to make sure we got the proper file name for the real test later on.
36529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36530  if test "x$test_shortpath" = x; then
36531    # Short path failed, file does not exist as specified.
36532    # Try adding .exe or .cmd
36533    if test -f "${new_path}.exe"; then
36534      input_to_shortpath="${new_path}.exe"
36535    elif test -f "${new_path}.cmd"; then
36536      input_to_shortpath="${new_path}.cmd"
36537    else
36538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36539$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36542      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36543    fi
36544  else
36545    input_to_shortpath="$new_path"
36546  fi
36547
36548  # Call helper function which possibly converts this using DOS-style short mode.
36549  # If so, the updated path is stored in $new_path.
36550  new_path="$input_to_shortpath"
36551
36552  input_path="$input_to_shortpath"
36553  # Check if we need to convert this using DOS-style short mode. If the path
36554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36555  # take no chances and rewrite it.
36556  # Note: m4 eats our [], so we need to use [ and ] instead.
36557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36558  if test "x$has_forbidden_chars" != x; then
36559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36563      # Going to short mode and back again did indeed matter. Since short mode is
36564      # case insensitive, let's make it lowercase to improve readability.
36565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36566      # Now convert it back to Unix-stile (cygpath)
36567      input_path=`$CYGPATH -u "$shortmode_path"`
36568      new_path="$input_path"
36569    fi
36570  fi
36571
36572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36573  if test "x$test_cygdrive_prefix" = x; then
36574    # As a simple fix, exclude /usr/bin since it's not a real path.
36575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36577      # a path prefixed by /cygdrive for fixpath to work.
36578      new_path="$CYGWIN_ROOT_PATH$input_path"
36579    fi
36580  fi
36581
36582  # remove trailing .exe if any
36583  new_path="${new_path/%.exe/}"
36584
36585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36586
36587  # First separate the path from the arguments. This will split at the first
36588  # space.
36589  complete="$GNM"
36590  path="${complete%% *}"
36591  tmp="$complete EOL"
36592  arguments="${tmp#* }"
36593
36594  # Input might be given as Windows format, start by converting to
36595  # unix format.
36596  new_path="$path"
36597
36598  windows_path="$new_path"
36599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36600    unix_path=`$CYGPATH -u "$windows_path"`
36601    new_path="$unix_path"
36602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36604    new_path="$unix_path"
36605  fi
36606
36607
36608  # Now try to locate executable using which
36609  new_path=`$WHICH "$new_path" 2> /dev/null`
36610
36611  if test "x$new_path" = x; then
36612    # Oops. Which didn't find the executable.
36613    # The splitting of arguments from the executable at a space might have been incorrect,
36614    # since paths with space are more likely in Windows. Give it another try with the whole
36615    # argument.
36616    path="$complete"
36617    arguments="EOL"
36618    new_path="$path"
36619
36620  windows_path="$new_path"
36621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36622    unix_path=`$CYGPATH -u "$windows_path"`
36623    new_path="$unix_path"
36624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36626    new_path="$unix_path"
36627  fi
36628
36629
36630    new_path=`$WHICH "$new_path" 2> /dev/null`
36631    # bat and cmd files are not always considered executable in MSYS causing which
36632    # to not find them
36633    if test "x$new_path" = x \
36634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36636      new_path="$path"
36637
36638  windows_path="$new_path"
36639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36640    unix_path=`$CYGPATH -u "$windows_path"`
36641    new_path="$unix_path"
36642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36644    new_path="$unix_path"
36645  fi
36646
36647    fi
36648
36649    if test "x$new_path" = x; then
36650      # It's still not found. Now this is an unrecoverable error.
36651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36652$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36653      has_space=`$ECHO "$complete" | $GREP " "`
36654      if test "x$has_space" != x; then
36655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36657      fi
36658      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36659    fi
36660  fi
36661
36662  # Now new_path has a complete unix path to the binary
36663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36664    # Keep paths in /bin as-is, but remove trailing .exe if any
36665    new_path="${new_path/%.exe/}"
36666    # Do not save /bin paths to all_fixpath_prefixes!
36667  else
36668    # Not in mixed or Windows style, start by that.
36669    new_path=`cmd //c echo $new_path`
36670
36671  input_path="$new_path"
36672  # Check if we need to convert this using DOS-style short mode. If the path
36673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36674  # take no chances and rewrite it.
36675  # Note: m4 eats our [], so we need to use [ and ] instead.
36676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36677  if test "x$has_forbidden_chars" != x; then
36678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36680  fi
36681
36682    # Output is in $new_path
36683
36684  windows_path="$new_path"
36685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36686    unix_path=`$CYGPATH -u "$windows_path"`
36687    new_path="$unix_path"
36688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36690    new_path="$unix_path"
36691  fi
36692
36693    # remove trailing .exe if any
36694    new_path="${new_path/%.exe/}"
36695
36696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36698  fi
36699
36700  else
36701    # We're on a unix platform. Hooray! :)
36702    # First separate the path from the arguments. This will split at the first
36703    # space.
36704    complete="$GNM"
36705    path="${complete%% *}"
36706    tmp="$complete EOL"
36707    arguments="${tmp#* }"
36708
36709    # Cannot rely on the command "which" here since it doesn't always work.
36710    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36711    if test -z "$is_absolute_path"; then
36712      # Path to executable is not absolute. Find it.
36713      IFS_save="$IFS"
36714      IFS=:
36715      for p in $PATH; do
36716        if test -f "$p/$path" && test -x "$p/$path"; then
36717          new_path="$p/$path"
36718          break
36719        fi
36720      done
36721      IFS="$IFS_save"
36722    else
36723      # This is an absolute path, we can use it without further modifications.
36724      new_path="$path"
36725    fi
36726
36727    if test "x$new_path" = x; then
36728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36729$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36730      has_space=`$ECHO "$complete" | $GREP " "`
36731      if test "x$has_space" != x; then
36732        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36734      fi
36735      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36736    fi
36737  fi
36738
36739  # Now join together the path and the arguments once again
36740  if test "x$arguments" != xEOL; then
36741    new_complete="$new_path ${arguments% *}"
36742  else
36743    new_complete="$new_path"
36744  fi
36745
36746  if test "x$complete" != "x$new_complete"; then
36747    GNM="$new_complete"
36748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36749$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36750  fi
36751
36752
36753
36754
36755  # Publish this variable in the help.
36756
36757
36758  if test "x$MCS" = x; then
36759    # The variable is not set by user, try to locate tool using the code snippet
36760    for ac_prog in mcs
36761do
36762  # Extract the first word of "$ac_prog", so it can be a program name with args.
36763set dummy $ac_prog; ac_word=$2
36764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36765$as_echo_n "checking for $ac_word... " >&6; }
36766if ${ac_cv_path_MCS+:} false; then :
36767  $as_echo_n "(cached) " >&6
36768else
36769  case $MCS in
36770  [\\/]* | ?:[\\/]*)
36771  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36772  ;;
36773  *)
36774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36775for as_dir in $PATH
36776do
36777  IFS=$as_save_IFS
36778  test -z "$as_dir" && as_dir=.
36779    for ac_exec_ext in '' $ac_executable_extensions; do
36780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36781    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36783    break 2
36784  fi
36785done
36786  done
36787IFS=$as_save_IFS
36788
36789  ;;
36790esac
36791fi
36792MCS=$ac_cv_path_MCS
36793if test -n "$MCS"; then
36794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36795$as_echo "$MCS" >&6; }
36796else
36797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36798$as_echo "no" >&6; }
36799fi
36800
36801
36802  test -n "$MCS" && break
36803done
36804
36805  else
36806    # The variable is set, but is it from the command line or the environment?
36807
36808    # Try to remove the string !MCS! from our list.
36809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36811      # If it failed, the variable was not from the command line. Ignore it,
36812      # but warn the user (except for BASH, which is always set by the calling BASH).
36813      if test "xMCS" != xBASH; then
36814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36815$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36816      fi
36817      # Try to locate tool using the code snippet
36818      for ac_prog in mcs
36819do
36820  # Extract the first word of "$ac_prog", so it can be a program name with args.
36821set dummy $ac_prog; ac_word=$2
36822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36823$as_echo_n "checking for $ac_word... " >&6; }
36824if ${ac_cv_path_MCS+:} false; then :
36825  $as_echo_n "(cached) " >&6
36826else
36827  case $MCS in
36828  [\\/]* | ?:[\\/]*)
36829  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36830  ;;
36831  *)
36832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36833for as_dir in $PATH
36834do
36835  IFS=$as_save_IFS
36836  test -z "$as_dir" && as_dir=.
36837    for ac_exec_ext in '' $ac_executable_extensions; do
36838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36839    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36841    break 2
36842  fi
36843done
36844  done
36845IFS=$as_save_IFS
36846
36847  ;;
36848esac
36849fi
36850MCS=$ac_cv_path_MCS
36851if test -n "$MCS"; then
36852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36853$as_echo "$MCS" >&6; }
36854else
36855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36856$as_echo "no" >&6; }
36857fi
36858
36859
36860  test -n "$MCS" && break
36861done
36862
36863    else
36864      # If it succeeded, then it was overridden by the user. We will use it
36865      # for the tool.
36866
36867      # First remove it from the list of overridden variables, so we can test
36868      # for unknown variables in the end.
36869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36870
36871      # Check if the provided tool contains a complete path.
36872      tool_specified="$MCS"
36873      tool_basename="${tool_specified##*/}"
36874      if test "x$tool_basename" = "x$tool_specified"; then
36875        # A command without a complete path is provided, search $PATH.
36876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36877$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36878        # Extract the first word of "$tool_basename", so it can be a program name with args.
36879set dummy $tool_basename; ac_word=$2
36880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36881$as_echo_n "checking for $ac_word... " >&6; }
36882if ${ac_cv_path_MCS+:} false; then :
36883  $as_echo_n "(cached) " >&6
36884else
36885  case $MCS in
36886  [\\/]* | ?:[\\/]*)
36887  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36888  ;;
36889  *)
36890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36891for as_dir in $PATH
36892do
36893  IFS=$as_save_IFS
36894  test -z "$as_dir" && as_dir=.
36895    for ac_exec_ext in '' $ac_executable_extensions; do
36896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36897    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36899    break 2
36900  fi
36901done
36902  done
36903IFS=$as_save_IFS
36904
36905  ;;
36906esac
36907fi
36908MCS=$ac_cv_path_MCS
36909if test -n "$MCS"; then
36910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36911$as_echo "$MCS" >&6; }
36912else
36913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36914$as_echo "no" >&6; }
36915fi
36916
36917
36918        if test "x$MCS" = x; then
36919          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36920        fi
36921      else
36922        # Otherwise we believe it is a complete path. Use it as it is.
36923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36924$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36926$as_echo_n "checking for MCS... " >&6; }
36927        if test ! -x "$tool_specified"; then
36928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36929$as_echo "not found" >&6; }
36930          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36931        fi
36932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36933$as_echo "$tool_specified" >&6; }
36934      fi
36935    fi
36936  fi
36937
36938
36939
36940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36941
36942  # First separate the path from the arguments. This will split at the first
36943  # space.
36944  complete="$MCS"
36945  path="${complete%% *}"
36946  tmp="$complete EOL"
36947  arguments="${tmp#* }"
36948
36949  # Input might be given as Windows format, start by converting to
36950  # unix format.
36951  new_path=`$CYGPATH -u "$path"`
36952
36953  # Now try to locate executable using which
36954  new_path=`$WHICH "$new_path" 2> /dev/null`
36955  # bat and cmd files are not always considered executable in cygwin causing which
36956  # to not find them
36957  if test "x$new_path" = x \
36958      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36959      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36960    new_path=`$CYGPATH -u "$path"`
36961  fi
36962  if test "x$new_path" = x; then
36963    # Oops. Which didn't find the executable.
36964    # The splitting of arguments from the executable at a space might have been incorrect,
36965    # since paths with space are more likely in Windows. Give it another try with the whole
36966    # argument.
36967    path="$complete"
36968    arguments="EOL"
36969    new_path=`$CYGPATH -u "$path"`
36970    new_path=`$WHICH "$new_path" 2> /dev/null`
36971    # bat and cmd files are not always considered executable in cygwin causing which
36972    # to not find them
36973    if test "x$new_path" = x \
36974        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36975        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36976      new_path=`$CYGPATH -u "$path"`
36977    fi
36978    if test "x$new_path" = x; then
36979      # It's still not found. Now this is an unrecoverable error.
36980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36981$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36982      has_space=`$ECHO "$complete" | $GREP " "`
36983      if test "x$has_space" != x; then
36984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36986      fi
36987      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36988    fi
36989  fi
36990
36991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36994  # "foo.exe" is OK but "foo" is an error.
36995  #
36996  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36997  # It is also a way to make sure we got the proper file name for the real test later on.
36998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36999  if test "x$test_shortpath" = x; then
37000    # Short path failed, file does not exist as specified.
37001    # Try adding .exe or .cmd
37002    if test -f "${new_path}.exe"; then
37003      input_to_shortpath="${new_path}.exe"
37004    elif test -f "${new_path}.cmd"; then
37005      input_to_shortpath="${new_path}.cmd"
37006    else
37007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
37008$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
37009      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37011      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37012    fi
37013  else
37014    input_to_shortpath="$new_path"
37015  fi
37016
37017  # Call helper function which possibly converts this using DOS-style short mode.
37018  # If so, the updated path is stored in $new_path.
37019  new_path="$input_to_shortpath"
37020
37021  input_path="$input_to_shortpath"
37022  # Check if we need to convert this using DOS-style short mode. If the path
37023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37024  # take no chances and rewrite it.
37025  # Note: m4 eats our [], so we need to use [ and ] instead.
37026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37027  if test "x$has_forbidden_chars" != x; then
37028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37032      # Going to short mode and back again did indeed matter. Since short mode is
37033      # case insensitive, let's make it lowercase to improve readability.
37034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37035      # Now convert it back to Unix-stile (cygpath)
37036      input_path=`$CYGPATH -u "$shortmode_path"`
37037      new_path="$input_path"
37038    fi
37039  fi
37040
37041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37042  if test "x$test_cygdrive_prefix" = x; then
37043    # As a simple fix, exclude /usr/bin since it's not a real path.
37044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37046      # a path prefixed by /cygdrive for fixpath to work.
37047      new_path="$CYGWIN_ROOT_PATH$input_path"
37048    fi
37049  fi
37050
37051  # remove trailing .exe if any
37052  new_path="${new_path/%.exe/}"
37053
37054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37055
37056  # First separate the path from the arguments. This will split at the first
37057  # space.
37058  complete="$MCS"
37059  path="${complete%% *}"
37060  tmp="$complete EOL"
37061  arguments="${tmp#* }"
37062
37063  # Input might be given as Windows format, start by converting to
37064  # unix format.
37065  new_path="$path"
37066
37067  windows_path="$new_path"
37068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37069    unix_path=`$CYGPATH -u "$windows_path"`
37070    new_path="$unix_path"
37071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37073    new_path="$unix_path"
37074  fi
37075
37076
37077  # Now try to locate executable using which
37078  new_path=`$WHICH "$new_path" 2> /dev/null`
37079
37080  if test "x$new_path" = x; then
37081    # Oops. Which didn't find the executable.
37082    # The splitting of arguments from the executable at a space might have been incorrect,
37083    # since paths with space are more likely in Windows. Give it another try with the whole
37084    # argument.
37085    path="$complete"
37086    arguments="EOL"
37087    new_path="$path"
37088
37089  windows_path="$new_path"
37090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37091    unix_path=`$CYGPATH -u "$windows_path"`
37092    new_path="$unix_path"
37093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37095    new_path="$unix_path"
37096  fi
37097
37098
37099    new_path=`$WHICH "$new_path" 2> /dev/null`
37100    # bat and cmd files are not always considered executable in MSYS causing which
37101    # to not find them
37102    if test "x$new_path" = x \
37103        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37104        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37105      new_path="$path"
37106
37107  windows_path="$new_path"
37108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37109    unix_path=`$CYGPATH -u "$windows_path"`
37110    new_path="$unix_path"
37111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37113    new_path="$unix_path"
37114  fi
37115
37116    fi
37117
37118    if test "x$new_path" = x; then
37119      # It's still not found. Now this is an unrecoverable error.
37120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37121$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37122      has_space=`$ECHO "$complete" | $GREP " "`
37123      if test "x$has_space" != x; then
37124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37126      fi
37127      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37128    fi
37129  fi
37130
37131  # Now new_path has a complete unix path to the binary
37132  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37133    # Keep paths in /bin as-is, but remove trailing .exe if any
37134    new_path="${new_path/%.exe/}"
37135    # Do not save /bin paths to all_fixpath_prefixes!
37136  else
37137    # Not in mixed or Windows style, start by that.
37138    new_path=`cmd //c echo $new_path`
37139
37140  input_path="$new_path"
37141  # Check if we need to convert this using DOS-style short mode. If the path
37142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37143  # take no chances and rewrite it.
37144  # Note: m4 eats our [], so we need to use [ and ] instead.
37145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37146  if test "x$has_forbidden_chars" != x; then
37147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37149  fi
37150
37151    # Output is in $new_path
37152
37153  windows_path="$new_path"
37154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37155    unix_path=`$CYGPATH -u "$windows_path"`
37156    new_path="$unix_path"
37157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37159    new_path="$unix_path"
37160  fi
37161
37162    # remove trailing .exe if any
37163    new_path="${new_path/%.exe/}"
37164
37165    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37166    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37167  fi
37168
37169  else
37170    # We're on a unix platform. Hooray! :)
37171    # First separate the path from the arguments. This will split at the first
37172    # space.
37173    complete="$MCS"
37174    path="${complete%% *}"
37175    tmp="$complete EOL"
37176    arguments="${tmp#* }"
37177
37178    # Cannot rely on the command "which" here since it doesn't always work.
37179    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37180    if test -z "$is_absolute_path"; then
37181      # Path to executable is not absolute. Find it.
37182      IFS_save="$IFS"
37183      IFS=:
37184      for p in $PATH; do
37185        if test -f "$p/$path" && test -x "$p/$path"; then
37186          new_path="$p/$path"
37187          break
37188        fi
37189      done
37190      IFS="$IFS_save"
37191    else
37192      # This is an absolute path, we can use it without further modifications.
37193      new_path="$path"
37194    fi
37195
37196    if test "x$new_path" = x; then
37197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37198$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37199      has_space=`$ECHO "$complete" | $GREP " "`
37200      if test "x$has_space" != x; then
37201        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37202$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37203      fi
37204      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37205    fi
37206  fi
37207
37208  # Now join together the path and the arguments once again
37209  if test "x$arguments" != xEOL; then
37210    new_complete="$new_path ${arguments% *}"
37211  else
37212    new_complete="$new_path"
37213  fi
37214
37215  if test "x$complete" != "x$new_complete"; then
37216    MCS="$new_complete"
37217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37218$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37219  fi
37220
37221  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37222    # FIXME: we should unify this with the solaris case above.
37223
37224
37225  # Publish this variable in the help.
37226
37227
37228  if test "x$STRIP" = x; then
37229    # The variable is not set by user, try to locate tool using the code snippet
37230    if test -n "$ac_tool_prefix"; then
37231  for ac_prog in strip
37232  do
37233    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37234set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37236$as_echo_n "checking for $ac_word... " >&6; }
37237if ${ac_cv_prog_STRIP+:} false; then :
37238  $as_echo_n "(cached) " >&6
37239else
37240  if test -n "$STRIP"; then
37241  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37242else
37243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37244for as_dir in $PATH
37245do
37246  IFS=$as_save_IFS
37247  test -z "$as_dir" && as_dir=.
37248    for ac_exec_ext in '' $ac_executable_extensions; do
37249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37250    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37252    break 2
37253  fi
37254done
37255  done
37256IFS=$as_save_IFS
37257
37258fi
37259fi
37260STRIP=$ac_cv_prog_STRIP
37261if test -n "$STRIP"; then
37262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37263$as_echo "$STRIP" >&6; }
37264else
37265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37266$as_echo "no" >&6; }
37267fi
37268
37269
37270    test -n "$STRIP" && break
37271  done
37272fi
37273if test -z "$STRIP"; then
37274  ac_ct_STRIP=$STRIP
37275  for ac_prog in strip
37276do
37277  # Extract the first word of "$ac_prog", so it can be a program name with args.
37278set dummy $ac_prog; ac_word=$2
37279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37280$as_echo_n "checking for $ac_word... " >&6; }
37281if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37282  $as_echo_n "(cached) " >&6
37283else
37284  if test -n "$ac_ct_STRIP"; then
37285  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37286else
37287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37288for as_dir in $PATH
37289do
37290  IFS=$as_save_IFS
37291  test -z "$as_dir" && as_dir=.
37292    for ac_exec_ext in '' $ac_executable_extensions; do
37293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37294    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37296    break 2
37297  fi
37298done
37299  done
37300IFS=$as_save_IFS
37301
37302fi
37303fi
37304ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37305if test -n "$ac_ct_STRIP"; then
37306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37307$as_echo "$ac_ct_STRIP" >&6; }
37308else
37309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37310$as_echo "no" >&6; }
37311fi
37312
37313
37314  test -n "$ac_ct_STRIP" && break
37315done
37316
37317  if test "x$ac_ct_STRIP" = x; then
37318    STRIP=""
37319  else
37320    case $cross_compiling:$ac_tool_warned in
37321yes:)
37322{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37323$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37324ac_tool_warned=yes ;;
37325esac
37326    STRIP=$ac_ct_STRIP
37327  fi
37328fi
37329
37330  else
37331    # The variable is set, but is it from the command line or the environment?
37332
37333    # Try to remove the string !STRIP! from our list.
37334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37336      # If it failed, the variable was not from the command line. Ignore it,
37337      # but warn the user (except for BASH, which is always set by the calling BASH).
37338      if test "xSTRIP" != xBASH; then
37339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37340$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37341      fi
37342      # Try to locate tool using the code snippet
37343      if test -n "$ac_tool_prefix"; then
37344  for ac_prog in strip
37345  do
37346    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37347set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37349$as_echo_n "checking for $ac_word... " >&6; }
37350if ${ac_cv_prog_STRIP+:} false; then :
37351  $as_echo_n "(cached) " >&6
37352else
37353  if test -n "$STRIP"; then
37354  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37355else
37356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37357for as_dir in $PATH
37358do
37359  IFS=$as_save_IFS
37360  test -z "$as_dir" && as_dir=.
37361    for ac_exec_ext in '' $ac_executable_extensions; do
37362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37363    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37365    break 2
37366  fi
37367done
37368  done
37369IFS=$as_save_IFS
37370
37371fi
37372fi
37373STRIP=$ac_cv_prog_STRIP
37374if test -n "$STRIP"; then
37375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37376$as_echo "$STRIP" >&6; }
37377else
37378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37379$as_echo "no" >&6; }
37380fi
37381
37382
37383    test -n "$STRIP" && break
37384  done
37385fi
37386if test -z "$STRIP"; then
37387  ac_ct_STRIP=$STRIP
37388  for ac_prog in strip
37389do
37390  # Extract the first word of "$ac_prog", so it can be a program name with args.
37391set dummy $ac_prog; ac_word=$2
37392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37393$as_echo_n "checking for $ac_word... " >&6; }
37394if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37395  $as_echo_n "(cached) " >&6
37396else
37397  if test -n "$ac_ct_STRIP"; then
37398  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37399else
37400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37401for as_dir in $PATH
37402do
37403  IFS=$as_save_IFS
37404  test -z "$as_dir" && as_dir=.
37405    for ac_exec_ext in '' $ac_executable_extensions; do
37406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37407    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37409    break 2
37410  fi
37411done
37412  done
37413IFS=$as_save_IFS
37414
37415fi
37416fi
37417ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37418if test -n "$ac_ct_STRIP"; then
37419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37420$as_echo "$ac_ct_STRIP" >&6; }
37421else
37422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37423$as_echo "no" >&6; }
37424fi
37425
37426
37427  test -n "$ac_ct_STRIP" && break
37428done
37429
37430  if test "x$ac_ct_STRIP" = x; then
37431    STRIP=""
37432  else
37433    case $cross_compiling:$ac_tool_warned in
37434yes:)
37435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37437ac_tool_warned=yes ;;
37438esac
37439    STRIP=$ac_ct_STRIP
37440  fi
37441fi
37442
37443    else
37444      # If it succeeded, then it was overridden by the user. We will use it
37445      # for the tool.
37446
37447      # First remove it from the list of overridden variables, so we can test
37448      # for unknown variables in the end.
37449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37450
37451      # Check if the provided tool contains a complete path.
37452      tool_specified="$STRIP"
37453      tool_basename="${tool_specified##*/}"
37454      if test "x$tool_basename" = "x$tool_specified"; then
37455        # A command without a complete path is provided, search $PATH.
37456        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37457$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37458        # Extract the first word of "$tool_basename", so it can be a program name with args.
37459set dummy $tool_basename; ac_word=$2
37460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37461$as_echo_n "checking for $ac_word... " >&6; }
37462if ${ac_cv_path_STRIP+:} false; then :
37463  $as_echo_n "(cached) " >&6
37464else
37465  case $STRIP in
37466  [\\/]* | ?:[\\/]*)
37467  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37468  ;;
37469  *)
37470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37471for as_dir in $PATH
37472do
37473  IFS=$as_save_IFS
37474  test -z "$as_dir" && as_dir=.
37475    for ac_exec_ext in '' $ac_executable_extensions; do
37476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37477    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37479    break 2
37480  fi
37481done
37482  done
37483IFS=$as_save_IFS
37484
37485  ;;
37486esac
37487fi
37488STRIP=$ac_cv_path_STRIP
37489if test -n "$STRIP"; then
37490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37491$as_echo "$STRIP" >&6; }
37492else
37493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37494$as_echo "no" >&6; }
37495fi
37496
37497
37498        if test "x$STRIP" = x; then
37499          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37500        fi
37501      else
37502        # Otherwise we believe it is a complete path. Use it as it is.
37503        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37504$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37506$as_echo_n "checking for STRIP... " >&6; }
37507        if test ! -x "$tool_specified"; then
37508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37509$as_echo "not found" >&6; }
37510          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37511        fi
37512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37513$as_echo "$tool_specified" >&6; }
37514      fi
37515    fi
37516  fi
37517
37518
37519
37520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37521
37522  # First separate the path from the arguments. This will split at the first
37523  # space.
37524  complete="$STRIP"
37525  path="${complete%% *}"
37526  tmp="$complete EOL"
37527  arguments="${tmp#* }"
37528
37529  # Input might be given as Windows format, start by converting to
37530  # unix format.
37531  new_path=`$CYGPATH -u "$path"`
37532
37533  # Now try to locate executable using which
37534  new_path=`$WHICH "$new_path" 2> /dev/null`
37535  # bat and cmd files are not always considered executable in cygwin causing which
37536  # to not find them
37537  if test "x$new_path" = x \
37538      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37539      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37540    new_path=`$CYGPATH -u "$path"`
37541  fi
37542  if test "x$new_path" = x; then
37543    # Oops. Which didn't find the executable.
37544    # The splitting of arguments from the executable at a space might have been incorrect,
37545    # since paths with space are more likely in Windows. Give it another try with the whole
37546    # argument.
37547    path="$complete"
37548    arguments="EOL"
37549    new_path=`$CYGPATH -u "$path"`
37550    new_path=`$WHICH "$new_path" 2> /dev/null`
37551    # bat and cmd files are not always considered executable in cygwin causing which
37552    # to not find them
37553    if test "x$new_path" = x \
37554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37556      new_path=`$CYGPATH -u "$path"`
37557    fi
37558    if test "x$new_path" = x; then
37559      # It's still not found. Now this is an unrecoverable error.
37560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37561$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37562      has_space=`$ECHO "$complete" | $GREP " "`
37563      if test "x$has_space" != x; then
37564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37566      fi
37567      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37568    fi
37569  fi
37570
37571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37574  # "foo.exe" is OK but "foo" is an error.
37575  #
37576  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37577  # It is also a way to make sure we got the proper file name for the real test later on.
37578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37579  if test "x$test_shortpath" = x; then
37580    # Short path failed, file does not exist as specified.
37581    # Try adding .exe or .cmd
37582    if test -f "${new_path}.exe"; then
37583      input_to_shortpath="${new_path}.exe"
37584    elif test -f "${new_path}.cmd"; then
37585      input_to_shortpath="${new_path}.cmd"
37586    else
37587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37588$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37589      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37590$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37591      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37592    fi
37593  else
37594    input_to_shortpath="$new_path"
37595  fi
37596
37597  # Call helper function which possibly converts this using DOS-style short mode.
37598  # If so, the updated path is stored in $new_path.
37599  new_path="$input_to_shortpath"
37600
37601  input_path="$input_to_shortpath"
37602  # Check if we need to convert this using DOS-style short mode. If the path
37603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37604  # take no chances and rewrite it.
37605  # Note: m4 eats our [], so we need to use [ and ] instead.
37606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37607  if test "x$has_forbidden_chars" != x; then
37608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37612      # Going to short mode and back again did indeed matter. Since short mode is
37613      # case insensitive, let's make it lowercase to improve readability.
37614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37615      # Now convert it back to Unix-stile (cygpath)
37616      input_path=`$CYGPATH -u "$shortmode_path"`
37617      new_path="$input_path"
37618    fi
37619  fi
37620
37621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37622  if test "x$test_cygdrive_prefix" = x; then
37623    # As a simple fix, exclude /usr/bin since it's not a real path.
37624    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37626      # a path prefixed by /cygdrive for fixpath to work.
37627      new_path="$CYGWIN_ROOT_PATH$input_path"
37628    fi
37629  fi
37630
37631  # remove trailing .exe if any
37632  new_path="${new_path/%.exe/}"
37633
37634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37635
37636  # First separate the path from the arguments. This will split at the first
37637  # space.
37638  complete="$STRIP"
37639  path="${complete%% *}"
37640  tmp="$complete EOL"
37641  arguments="${tmp#* }"
37642
37643  # Input might be given as Windows format, start by converting to
37644  # unix format.
37645  new_path="$path"
37646
37647  windows_path="$new_path"
37648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37649    unix_path=`$CYGPATH -u "$windows_path"`
37650    new_path="$unix_path"
37651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37653    new_path="$unix_path"
37654  fi
37655
37656
37657  # Now try to locate executable using which
37658  new_path=`$WHICH "$new_path" 2> /dev/null`
37659
37660  if test "x$new_path" = x; then
37661    # Oops. Which didn't find the executable.
37662    # The splitting of arguments from the executable at a space might have been incorrect,
37663    # since paths with space are more likely in Windows. Give it another try with the whole
37664    # argument.
37665    path="$complete"
37666    arguments="EOL"
37667    new_path="$path"
37668
37669  windows_path="$new_path"
37670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37671    unix_path=`$CYGPATH -u "$windows_path"`
37672    new_path="$unix_path"
37673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37675    new_path="$unix_path"
37676  fi
37677
37678
37679    new_path=`$WHICH "$new_path" 2> /dev/null`
37680    # bat and cmd files are not always considered executable in MSYS causing which
37681    # to not find them
37682    if test "x$new_path" = x \
37683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37685      new_path="$path"
37686
37687  windows_path="$new_path"
37688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37689    unix_path=`$CYGPATH -u "$windows_path"`
37690    new_path="$unix_path"
37691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37693    new_path="$unix_path"
37694  fi
37695
37696    fi
37697
37698    if test "x$new_path" = x; then
37699      # It's still not found. Now this is an unrecoverable error.
37700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37701$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37702      has_space=`$ECHO "$complete" | $GREP " "`
37703      if test "x$has_space" != x; then
37704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37706      fi
37707      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37708    fi
37709  fi
37710
37711  # Now new_path has a complete unix path to the binary
37712  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37713    # Keep paths in /bin as-is, but remove trailing .exe if any
37714    new_path="${new_path/%.exe/}"
37715    # Do not save /bin paths to all_fixpath_prefixes!
37716  else
37717    # Not in mixed or Windows style, start by that.
37718    new_path=`cmd //c echo $new_path`
37719
37720  input_path="$new_path"
37721  # Check if we need to convert this using DOS-style short mode. If the path
37722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37723  # take no chances and rewrite it.
37724  # Note: m4 eats our [], so we need to use [ and ] instead.
37725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37726  if test "x$has_forbidden_chars" != x; then
37727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37729  fi
37730
37731    # Output is in $new_path
37732
37733  windows_path="$new_path"
37734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37735    unix_path=`$CYGPATH -u "$windows_path"`
37736    new_path="$unix_path"
37737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37739    new_path="$unix_path"
37740  fi
37741
37742    # remove trailing .exe if any
37743    new_path="${new_path/%.exe/}"
37744
37745    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37746    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37747  fi
37748
37749  else
37750    # We're on a unix platform. Hooray! :)
37751    # First separate the path from the arguments. This will split at the first
37752    # space.
37753    complete="$STRIP"
37754    path="${complete%% *}"
37755    tmp="$complete EOL"
37756    arguments="${tmp#* }"
37757
37758    # Cannot rely on the command "which" here since it doesn't always work.
37759    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37760    if test -z "$is_absolute_path"; then
37761      # Path to executable is not absolute. Find it.
37762      IFS_save="$IFS"
37763      IFS=:
37764      for p in $PATH; do
37765        if test -f "$p/$path" && test -x "$p/$path"; then
37766          new_path="$p/$path"
37767          break
37768        fi
37769      done
37770      IFS="$IFS_save"
37771    else
37772      # This is an absolute path, we can use it without further modifications.
37773      new_path="$path"
37774    fi
37775
37776    if test "x$new_path" = x; then
37777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37778$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37779      has_space=`$ECHO "$complete" | $GREP " "`
37780      if test "x$has_space" != x; then
37781        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37782$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37783      fi
37784      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37785    fi
37786  fi
37787
37788  # Now join together the path and the arguments once again
37789  if test "x$arguments" != xEOL; then
37790    new_complete="$new_path ${arguments% *}"
37791  else
37792    new_complete="$new_path"
37793  fi
37794
37795  if test "x$complete" != "x$new_complete"; then
37796    STRIP="$new_complete"
37797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37798$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37799  fi
37800
37801
37802
37803  # Publish this variable in the help.
37804
37805
37806  if test "x$NM" = x; then
37807    # The variable is not set by user, try to locate tool using the code snippet
37808    if test -n "$ac_tool_prefix"; then
37809  for ac_prog in nm
37810  do
37811    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37812set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37814$as_echo_n "checking for $ac_word... " >&6; }
37815if ${ac_cv_prog_NM+:} false; then :
37816  $as_echo_n "(cached) " >&6
37817else
37818  if test -n "$NM"; then
37819  ac_cv_prog_NM="$NM" # Let the user override the test.
37820else
37821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37822for as_dir in $PATH
37823do
37824  IFS=$as_save_IFS
37825  test -z "$as_dir" && as_dir=.
37826    for ac_exec_ext in '' $ac_executable_extensions; do
37827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37828    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37830    break 2
37831  fi
37832done
37833  done
37834IFS=$as_save_IFS
37835
37836fi
37837fi
37838NM=$ac_cv_prog_NM
37839if test -n "$NM"; then
37840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37841$as_echo "$NM" >&6; }
37842else
37843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37844$as_echo "no" >&6; }
37845fi
37846
37847
37848    test -n "$NM" && break
37849  done
37850fi
37851if test -z "$NM"; then
37852  ac_ct_NM=$NM
37853  for ac_prog in nm
37854do
37855  # Extract the first word of "$ac_prog", so it can be a program name with args.
37856set dummy $ac_prog; ac_word=$2
37857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37858$as_echo_n "checking for $ac_word... " >&6; }
37859if ${ac_cv_prog_ac_ct_NM+:} false; then :
37860  $as_echo_n "(cached) " >&6
37861else
37862  if test -n "$ac_ct_NM"; then
37863  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37864else
37865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37866for as_dir in $PATH
37867do
37868  IFS=$as_save_IFS
37869  test -z "$as_dir" && as_dir=.
37870    for ac_exec_ext in '' $ac_executable_extensions; do
37871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37872    ac_cv_prog_ac_ct_NM="$ac_prog"
37873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37874    break 2
37875  fi
37876done
37877  done
37878IFS=$as_save_IFS
37879
37880fi
37881fi
37882ac_ct_NM=$ac_cv_prog_ac_ct_NM
37883if test -n "$ac_ct_NM"; then
37884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37885$as_echo "$ac_ct_NM" >&6; }
37886else
37887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37888$as_echo "no" >&6; }
37889fi
37890
37891
37892  test -n "$ac_ct_NM" && break
37893done
37894
37895  if test "x$ac_ct_NM" = x; then
37896    NM=""
37897  else
37898    case $cross_compiling:$ac_tool_warned in
37899yes:)
37900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37902ac_tool_warned=yes ;;
37903esac
37904    NM=$ac_ct_NM
37905  fi
37906fi
37907
37908  else
37909    # The variable is set, but is it from the command line or the environment?
37910
37911    # Try to remove the string !NM! from our list.
37912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37914      # If it failed, the variable was not from the command line. Ignore it,
37915      # but warn the user (except for BASH, which is always set by the calling BASH).
37916      if test "xNM" != xBASH; then
37917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37918$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37919      fi
37920      # Try to locate tool using the code snippet
37921      if test -n "$ac_tool_prefix"; then
37922  for ac_prog in nm
37923  do
37924    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37925set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37927$as_echo_n "checking for $ac_word... " >&6; }
37928if ${ac_cv_prog_NM+:} false; then :
37929  $as_echo_n "(cached) " >&6
37930else
37931  if test -n "$NM"; then
37932  ac_cv_prog_NM="$NM" # Let the user override the test.
37933else
37934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37935for as_dir in $PATH
37936do
37937  IFS=$as_save_IFS
37938  test -z "$as_dir" && as_dir=.
37939    for ac_exec_ext in '' $ac_executable_extensions; do
37940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37941    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37943    break 2
37944  fi
37945done
37946  done
37947IFS=$as_save_IFS
37948
37949fi
37950fi
37951NM=$ac_cv_prog_NM
37952if test -n "$NM"; then
37953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37954$as_echo "$NM" >&6; }
37955else
37956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37957$as_echo "no" >&6; }
37958fi
37959
37960
37961    test -n "$NM" && break
37962  done
37963fi
37964if test -z "$NM"; then
37965  ac_ct_NM=$NM
37966  for ac_prog in nm
37967do
37968  # Extract the first word of "$ac_prog", so it can be a program name with args.
37969set dummy $ac_prog; ac_word=$2
37970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37971$as_echo_n "checking for $ac_word... " >&6; }
37972if ${ac_cv_prog_ac_ct_NM+:} false; then :
37973  $as_echo_n "(cached) " >&6
37974else
37975  if test -n "$ac_ct_NM"; then
37976  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37977else
37978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37979for as_dir in $PATH
37980do
37981  IFS=$as_save_IFS
37982  test -z "$as_dir" && as_dir=.
37983    for ac_exec_ext in '' $ac_executable_extensions; do
37984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37985    ac_cv_prog_ac_ct_NM="$ac_prog"
37986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37987    break 2
37988  fi
37989done
37990  done
37991IFS=$as_save_IFS
37992
37993fi
37994fi
37995ac_ct_NM=$ac_cv_prog_ac_ct_NM
37996if test -n "$ac_ct_NM"; then
37997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37998$as_echo "$ac_ct_NM" >&6; }
37999else
38000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38001$as_echo "no" >&6; }
38002fi
38003
38004
38005  test -n "$ac_ct_NM" && break
38006done
38007
38008  if test "x$ac_ct_NM" = x; then
38009    NM=""
38010  else
38011    case $cross_compiling:$ac_tool_warned in
38012yes:)
38013{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38014$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38015ac_tool_warned=yes ;;
38016esac
38017    NM=$ac_ct_NM
38018  fi
38019fi
38020
38021    else
38022      # If it succeeded, then it was overridden by the user. We will use it
38023      # for the tool.
38024
38025      # First remove it from the list of overridden variables, so we can test
38026      # for unknown variables in the end.
38027      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38028
38029      # Check if the provided tool contains a complete path.
38030      tool_specified="$NM"
38031      tool_basename="${tool_specified##*/}"
38032      if test "x$tool_basename" = "x$tool_specified"; then
38033        # A command without a complete path is provided, search $PATH.
38034        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38035$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38036        # Extract the first word of "$tool_basename", so it can be a program name with args.
38037set dummy $tool_basename; ac_word=$2
38038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38039$as_echo_n "checking for $ac_word... " >&6; }
38040if ${ac_cv_path_NM+:} false; then :
38041  $as_echo_n "(cached) " >&6
38042else
38043  case $NM in
38044  [\\/]* | ?:[\\/]*)
38045  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38046  ;;
38047  *)
38048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38049for as_dir in $PATH
38050do
38051  IFS=$as_save_IFS
38052  test -z "$as_dir" && as_dir=.
38053    for ac_exec_ext in '' $ac_executable_extensions; do
38054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38055    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38057    break 2
38058  fi
38059done
38060  done
38061IFS=$as_save_IFS
38062
38063  ;;
38064esac
38065fi
38066NM=$ac_cv_path_NM
38067if test -n "$NM"; then
38068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38069$as_echo "$NM" >&6; }
38070else
38071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38072$as_echo "no" >&6; }
38073fi
38074
38075
38076        if test "x$NM" = x; then
38077          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38078        fi
38079      else
38080        # Otherwise we believe it is a complete path. Use it as it is.
38081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38082$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38083        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38084$as_echo_n "checking for NM... " >&6; }
38085        if test ! -x "$tool_specified"; then
38086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38087$as_echo "not found" >&6; }
38088          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38089        fi
38090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38091$as_echo "$tool_specified" >&6; }
38092      fi
38093    fi
38094  fi
38095
38096
38097
38098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38099
38100  # First separate the path from the arguments. This will split at the first
38101  # space.
38102  complete="$NM"
38103  path="${complete%% *}"
38104  tmp="$complete EOL"
38105  arguments="${tmp#* }"
38106
38107  # Input might be given as Windows format, start by converting to
38108  # unix format.
38109  new_path=`$CYGPATH -u "$path"`
38110
38111  # Now try to locate executable using which
38112  new_path=`$WHICH "$new_path" 2> /dev/null`
38113  # bat and cmd files are not always considered executable in cygwin causing which
38114  # to not find them
38115  if test "x$new_path" = x \
38116      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38117      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38118    new_path=`$CYGPATH -u "$path"`
38119  fi
38120  if test "x$new_path" = x; then
38121    # Oops. Which didn't find the executable.
38122    # The splitting of arguments from the executable at a space might have been incorrect,
38123    # since paths with space are more likely in Windows. Give it another try with the whole
38124    # argument.
38125    path="$complete"
38126    arguments="EOL"
38127    new_path=`$CYGPATH -u "$path"`
38128    new_path=`$WHICH "$new_path" 2> /dev/null`
38129    # bat and cmd files are not always considered executable in cygwin causing which
38130    # to not find them
38131    if test "x$new_path" = x \
38132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38134      new_path=`$CYGPATH -u "$path"`
38135    fi
38136    if test "x$new_path" = x; then
38137      # It's still not found. Now this is an unrecoverable error.
38138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38139$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38140      has_space=`$ECHO "$complete" | $GREP " "`
38141      if test "x$has_space" != x; then
38142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38144      fi
38145      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38146    fi
38147  fi
38148
38149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38152  # "foo.exe" is OK but "foo" is an error.
38153  #
38154  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38155  # It is also a way to make sure we got the proper file name for the real test later on.
38156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38157  if test "x$test_shortpath" = x; then
38158    # Short path failed, file does not exist as specified.
38159    # Try adding .exe or .cmd
38160    if test -f "${new_path}.exe"; then
38161      input_to_shortpath="${new_path}.exe"
38162    elif test -f "${new_path}.cmd"; then
38163      input_to_shortpath="${new_path}.cmd"
38164    else
38165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38166$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38167      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38168$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38169      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38170    fi
38171  else
38172    input_to_shortpath="$new_path"
38173  fi
38174
38175  # Call helper function which possibly converts this using DOS-style short mode.
38176  # If so, the updated path is stored in $new_path.
38177  new_path="$input_to_shortpath"
38178
38179  input_path="$input_to_shortpath"
38180  # Check if we need to convert this using DOS-style short mode. If the path
38181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38182  # take no chances and rewrite it.
38183  # Note: m4 eats our [], so we need to use [ and ] instead.
38184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38185  if test "x$has_forbidden_chars" != x; then
38186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38190      # Going to short mode and back again did indeed matter. Since short mode is
38191      # case insensitive, let's make it lowercase to improve readability.
38192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38193      # Now convert it back to Unix-stile (cygpath)
38194      input_path=`$CYGPATH -u "$shortmode_path"`
38195      new_path="$input_path"
38196    fi
38197  fi
38198
38199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38200  if test "x$test_cygdrive_prefix" = x; then
38201    # As a simple fix, exclude /usr/bin since it's not a real path.
38202    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38204      # a path prefixed by /cygdrive for fixpath to work.
38205      new_path="$CYGWIN_ROOT_PATH$input_path"
38206    fi
38207  fi
38208
38209  # remove trailing .exe if any
38210  new_path="${new_path/%.exe/}"
38211
38212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38213
38214  # First separate the path from the arguments. This will split at the first
38215  # space.
38216  complete="$NM"
38217  path="${complete%% *}"
38218  tmp="$complete EOL"
38219  arguments="${tmp#* }"
38220
38221  # Input might be given as Windows format, start by converting to
38222  # unix format.
38223  new_path="$path"
38224
38225  windows_path="$new_path"
38226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38227    unix_path=`$CYGPATH -u "$windows_path"`
38228    new_path="$unix_path"
38229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38231    new_path="$unix_path"
38232  fi
38233
38234
38235  # Now try to locate executable using which
38236  new_path=`$WHICH "$new_path" 2> /dev/null`
38237
38238  if test "x$new_path" = x; then
38239    # Oops. Which didn't find the executable.
38240    # The splitting of arguments from the executable at a space might have been incorrect,
38241    # since paths with space are more likely in Windows. Give it another try with the whole
38242    # argument.
38243    path="$complete"
38244    arguments="EOL"
38245    new_path="$path"
38246
38247  windows_path="$new_path"
38248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38249    unix_path=`$CYGPATH -u "$windows_path"`
38250    new_path="$unix_path"
38251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38253    new_path="$unix_path"
38254  fi
38255
38256
38257    new_path=`$WHICH "$new_path" 2> /dev/null`
38258    # bat and cmd files are not always considered executable in MSYS causing which
38259    # to not find them
38260    if test "x$new_path" = x \
38261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38263      new_path="$path"
38264
38265  windows_path="$new_path"
38266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38267    unix_path=`$CYGPATH -u "$windows_path"`
38268    new_path="$unix_path"
38269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38271    new_path="$unix_path"
38272  fi
38273
38274    fi
38275
38276    if test "x$new_path" = x; then
38277      # It's still not found. Now this is an unrecoverable error.
38278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38279$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38280      has_space=`$ECHO "$complete" | $GREP " "`
38281      if test "x$has_space" != x; then
38282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38284      fi
38285      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38286    fi
38287  fi
38288
38289  # Now new_path has a complete unix path to the binary
38290  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38291    # Keep paths in /bin as-is, but remove trailing .exe if any
38292    new_path="${new_path/%.exe/}"
38293    # Do not save /bin paths to all_fixpath_prefixes!
38294  else
38295    # Not in mixed or Windows style, start by that.
38296    new_path=`cmd //c echo $new_path`
38297
38298  input_path="$new_path"
38299  # Check if we need to convert this using DOS-style short mode. If the path
38300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38301  # take no chances and rewrite it.
38302  # Note: m4 eats our [], so we need to use [ and ] instead.
38303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38304  if test "x$has_forbidden_chars" != x; then
38305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38307  fi
38308
38309    # Output is in $new_path
38310
38311  windows_path="$new_path"
38312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38313    unix_path=`$CYGPATH -u "$windows_path"`
38314    new_path="$unix_path"
38315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38317    new_path="$unix_path"
38318  fi
38319
38320    # remove trailing .exe if any
38321    new_path="${new_path/%.exe/}"
38322
38323    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38324    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38325  fi
38326
38327  else
38328    # We're on a unix platform. Hooray! :)
38329    # First separate the path from the arguments. This will split at the first
38330    # space.
38331    complete="$NM"
38332    path="${complete%% *}"
38333    tmp="$complete EOL"
38334    arguments="${tmp#* }"
38335
38336    # Cannot rely on the command "which" here since it doesn't always work.
38337    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38338    if test -z "$is_absolute_path"; then
38339      # Path to executable is not absolute. Find it.
38340      IFS_save="$IFS"
38341      IFS=:
38342      for p in $PATH; do
38343        if test -f "$p/$path" && test -x "$p/$path"; then
38344          new_path="$p/$path"
38345          break
38346        fi
38347      done
38348      IFS="$IFS_save"
38349    else
38350      # This is an absolute path, we can use it without further modifications.
38351      new_path="$path"
38352    fi
38353
38354    if test "x$new_path" = x; then
38355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38356$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38357      has_space=`$ECHO "$complete" | $GREP " "`
38358      if test "x$has_space" != x; then
38359        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38361      fi
38362      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38363    fi
38364  fi
38365
38366  # Now join together the path and the arguments once again
38367  if test "x$arguments" != xEOL; then
38368    new_complete="$new_path ${arguments% *}"
38369  else
38370    new_complete="$new_path"
38371  fi
38372
38373  if test "x$complete" != "x$new_complete"; then
38374    NM="$new_complete"
38375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38376$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38377  fi
38378
38379    GNM="$NM"
38380
38381  fi
38382
38383  # objcopy is used for moving debug symbols to separate files when
38384  # full debug symbols are enabled.
38385  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38386
38387
38388  # Publish this variable in the help.
38389
38390
38391  if test "x$OBJCOPY" = x; then
38392    # The variable is not set by user, try to locate tool using the code snippet
38393    if test -n "$ac_tool_prefix"; then
38394  for ac_prog in gobjcopy objcopy
38395  do
38396    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38397set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38399$as_echo_n "checking for $ac_word... " >&6; }
38400if ${ac_cv_prog_OBJCOPY+:} false; then :
38401  $as_echo_n "(cached) " >&6
38402else
38403  if test -n "$OBJCOPY"; then
38404  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38405else
38406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38407for as_dir in $PATH
38408do
38409  IFS=$as_save_IFS
38410  test -z "$as_dir" && as_dir=.
38411    for ac_exec_ext in '' $ac_executable_extensions; do
38412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38413    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38415    break 2
38416  fi
38417done
38418  done
38419IFS=$as_save_IFS
38420
38421fi
38422fi
38423OBJCOPY=$ac_cv_prog_OBJCOPY
38424if test -n "$OBJCOPY"; then
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38426$as_echo "$OBJCOPY" >&6; }
38427else
38428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38429$as_echo "no" >&6; }
38430fi
38431
38432
38433    test -n "$OBJCOPY" && break
38434  done
38435fi
38436if test -z "$OBJCOPY"; then
38437  ac_ct_OBJCOPY=$OBJCOPY
38438  for ac_prog in gobjcopy objcopy
38439do
38440  # Extract the first word of "$ac_prog", so it can be a program name with args.
38441set dummy $ac_prog; ac_word=$2
38442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38443$as_echo_n "checking for $ac_word... " >&6; }
38444if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  if test -n "$ac_ct_OBJCOPY"; then
38448  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38449else
38450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38451for as_dir in $PATH
38452do
38453  IFS=$as_save_IFS
38454  test -z "$as_dir" && as_dir=.
38455    for ac_exec_ext in '' $ac_executable_extensions; do
38456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38457    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38459    break 2
38460  fi
38461done
38462  done
38463IFS=$as_save_IFS
38464
38465fi
38466fi
38467ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38468if test -n "$ac_ct_OBJCOPY"; then
38469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38470$as_echo "$ac_ct_OBJCOPY" >&6; }
38471else
38472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38473$as_echo "no" >&6; }
38474fi
38475
38476
38477  test -n "$ac_ct_OBJCOPY" && break
38478done
38479
38480  if test "x$ac_ct_OBJCOPY" = x; then
38481    OBJCOPY=""
38482  else
38483    case $cross_compiling:$ac_tool_warned in
38484yes:)
38485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38487ac_tool_warned=yes ;;
38488esac
38489    OBJCOPY=$ac_ct_OBJCOPY
38490  fi
38491fi
38492
38493  else
38494    # The variable is set, but is it from the command line or the environment?
38495
38496    # Try to remove the string !OBJCOPY! from our list.
38497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38499      # If it failed, the variable was not from the command line. Ignore it,
38500      # but warn the user (except for BASH, which is always set by the calling BASH).
38501      if test "xOBJCOPY" != xBASH; then
38502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38503$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38504      fi
38505      # Try to locate tool using the code snippet
38506      if test -n "$ac_tool_prefix"; then
38507  for ac_prog in gobjcopy objcopy
38508  do
38509    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38512$as_echo_n "checking for $ac_word... " >&6; }
38513if ${ac_cv_prog_OBJCOPY+:} false; then :
38514  $as_echo_n "(cached) " >&6
38515else
38516  if test -n "$OBJCOPY"; then
38517  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38518else
38519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38520for as_dir in $PATH
38521do
38522  IFS=$as_save_IFS
38523  test -z "$as_dir" && as_dir=.
38524    for ac_exec_ext in '' $ac_executable_extensions; do
38525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38526    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38528    break 2
38529  fi
38530done
38531  done
38532IFS=$as_save_IFS
38533
38534fi
38535fi
38536OBJCOPY=$ac_cv_prog_OBJCOPY
38537if test -n "$OBJCOPY"; then
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38539$as_echo "$OBJCOPY" >&6; }
38540else
38541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38542$as_echo "no" >&6; }
38543fi
38544
38545
38546    test -n "$OBJCOPY" && break
38547  done
38548fi
38549if test -z "$OBJCOPY"; then
38550  ac_ct_OBJCOPY=$OBJCOPY
38551  for ac_prog in gobjcopy objcopy
38552do
38553  # Extract the first word of "$ac_prog", so it can be a program name with args.
38554set dummy $ac_prog; ac_word=$2
38555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38556$as_echo_n "checking for $ac_word... " >&6; }
38557if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38558  $as_echo_n "(cached) " >&6
38559else
38560  if test -n "$ac_ct_OBJCOPY"; then
38561  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38562else
38563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38564for as_dir in $PATH
38565do
38566  IFS=$as_save_IFS
38567  test -z "$as_dir" && as_dir=.
38568    for ac_exec_ext in '' $ac_executable_extensions; do
38569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38570    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38572    break 2
38573  fi
38574done
38575  done
38576IFS=$as_save_IFS
38577
38578fi
38579fi
38580ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38581if test -n "$ac_ct_OBJCOPY"; then
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38583$as_echo "$ac_ct_OBJCOPY" >&6; }
38584else
38585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38586$as_echo "no" >&6; }
38587fi
38588
38589
38590  test -n "$ac_ct_OBJCOPY" && break
38591done
38592
38593  if test "x$ac_ct_OBJCOPY" = x; then
38594    OBJCOPY=""
38595  else
38596    case $cross_compiling:$ac_tool_warned in
38597yes:)
38598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38600ac_tool_warned=yes ;;
38601esac
38602    OBJCOPY=$ac_ct_OBJCOPY
38603  fi
38604fi
38605
38606    else
38607      # If it succeeded, then it was overridden by the user. We will use it
38608      # for the tool.
38609
38610      # First remove it from the list of overridden variables, so we can test
38611      # for unknown variables in the end.
38612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38613
38614      # Check if the provided tool contains a complete path.
38615      tool_specified="$OBJCOPY"
38616      tool_basename="${tool_specified##*/}"
38617      if test "x$tool_basename" = "x$tool_specified"; then
38618        # A command without a complete path is provided, search $PATH.
38619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38620$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38621        # Extract the first word of "$tool_basename", so it can be a program name with args.
38622set dummy $tool_basename; ac_word=$2
38623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38624$as_echo_n "checking for $ac_word... " >&6; }
38625if ${ac_cv_path_OBJCOPY+:} false; then :
38626  $as_echo_n "(cached) " >&6
38627else
38628  case $OBJCOPY in
38629  [\\/]* | ?:[\\/]*)
38630  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38631  ;;
38632  *)
38633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38634for as_dir in $PATH
38635do
38636  IFS=$as_save_IFS
38637  test -z "$as_dir" && as_dir=.
38638    for ac_exec_ext in '' $ac_executable_extensions; do
38639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38640    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38642    break 2
38643  fi
38644done
38645  done
38646IFS=$as_save_IFS
38647
38648  ;;
38649esac
38650fi
38651OBJCOPY=$ac_cv_path_OBJCOPY
38652if test -n "$OBJCOPY"; then
38653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38654$as_echo "$OBJCOPY" >&6; }
38655else
38656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38657$as_echo "no" >&6; }
38658fi
38659
38660
38661        if test "x$OBJCOPY" = x; then
38662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38663        fi
38664      else
38665        # Otherwise we believe it is a complete path. Use it as it is.
38666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38667$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38669$as_echo_n "checking for OBJCOPY... " >&6; }
38670        if test ! -x "$tool_specified"; then
38671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38672$as_echo "not found" >&6; }
38673          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38674        fi
38675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38676$as_echo "$tool_specified" >&6; }
38677      fi
38678    fi
38679  fi
38680
38681
38682    # Only call fixup if objcopy was found.
38683    if test -n "$OBJCOPY"; then
38684
38685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38686
38687  # First separate the path from the arguments. This will split at the first
38688  # space.
38689  complete="$OBJCOPY"
38690  path="${complete%% *}"
38691  tmp="$complete EOL"
38692  arguments="${tmp#* }"
38693
38694  # Input might be given as Windows format, start by converting to
38695  # unix format.
38696  new_path=`$CYGPATH -u "$path"`
38697
38698  # Now try to locate executable using which
38699  new_path=`$WHICH "$new_path" 2> /dev/null`
38700  # bat and cmd files are not always considered executable in cygwin causing which
38701  # to not find them
38702  if test "x$new_path" = x \
38703      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38704      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38705    new_path=`$CYGPATH -u "$path"`
38706  fi
38707  if test "x$new_path" = x; then
38708    # Oops. Which didn't find the executable.
38709    # The splitting of arguments from the executable at a space might have been incorrect,
38710    # since paths with space are more likely in Windows. Give it another try with the whole
38711    # argument.
38712    path="$complete"
38713    arguments="EOL"
38714    new_path=`$CYGPATH -u "$path"`
38715    new_path=`$WHICH "$new_path" 2> /dev/null`
38716    # bat and cmd files are not always considered executable in cygwin causing which
38717    # to not find them
38718    if test "x$new_path" = x \
38719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38721      new_path=`$CYGPATH -u "$path"`
38722    fi
38723    if test "x$new_path" = x; then
38724      # It's still not found. Now this is an unrecoverable error.
38725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38726$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38727      has_space=`$ECHO "$complete" | $GREP " "`
38728      if test "x$has_space" != x; then
38729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38731      fi
38732      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38733    fi
38734  fi
38735
38736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38739  # "foo.exe" is OK but "foo" is an error.
38740  #
38741  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38742  # It is also a way to make sure we got the proper file name for the real test later on.
38743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38744  if test "x$test_shortpath" = x; then
38745    # Short path failed, file does not exist as specified.
38746    # Try adding .exe or .cmd
38747    if test -f "${new_path}.exe"; then
38748      input_to_shortpath="${new_path}.exe"
38749    elif test -f "${new_path}.cmd"; then
38750      input_to_shortpath="${new_path}.cmd"
38751    else
38752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38753$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38756      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38757    fi
38758  else
38759    input_to_shortpath="$new_path"
38760  fi
38761
38762  # Call helper function which possibly converts this using DOS-style short mode.
38763  # If so, the updated path is stored in $new_path.
38764  new_path="$input_to_shortpath"
38765
38766  input_path="$input_to_shortpath"
38767  # Check if we need to convert this using DOS-style short mode. If the path
38768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38769  # take no chances and rewrite it.
38770  # Note: m4 eats our [], so we need to use [ and ] instead.
38771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38772  if test "x$has_forbidden_chars" != x; then
38773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38777      # Going to short mode and back again did indeed matter. Since short mode is
38778      # case insensitive, let's make it lowercase to improve readability.
38779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38780      # Now convert it back to Unix-stile (cygpath)
38781      input_path=`$CYGPATH -u "$shortmode_path"`
38782      new_path="$input_path"
38783    fi
38784  fi
38785
38786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38787  if test "x$test_cygdrive_prefix" = x; then
38788    # As a simple fix, exclude /usr/bin since it's not a real path.
38789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38791      # a path prefixed by /cygdrive for fixpath to work.
38792      new_path="$CYGWIN_ROOT_PATH$input_path"
38793    fi
38794  fi
38795
38796  # remove trailing .exe if any
38797  new_path="${new_path/%.exe/}"
38798
38799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38800
38801  # First separate the path from the arguments. This will split at the first
38802  # space.
38803  complete="$OBJCOPY"
38804  path="${complete%% *}"
38805  tmp="$complete EOL"
38806  arguments="${tmp#* }"
38807
38808  # Input might be given as Windows format, start by converting to
38809  # unix format.
38810  new_path="$path"
38811
38812  windows_path="$new_path"
38813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38814    unix_path=`$CYGPATH -u "$windows_path"`
38815    new_path="$unix_path"
38816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38818    new_path="$unix_path"
38819  fi
38820
38821
38822  # Now try to locate executable using which
38823  new_path=`$WHICH "$new_path" 2> /dev/null`
38824
38825  if test "x$new_path" = x; then
38826    # Oops. Which didn't find the executable.
38827    # The splitting of arguments from the executable at a space might have been incorrect,
38828    # since paths with space are more likely in Windows. Give it another try with the whole
38829    # argument.
38830    path="$complete"
38831    arguments="EOL"
38832    new_path="$path"
38833
38834  windows_path="$new_path"
38835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38836    unix_path=`$CYGPATH -u "$windows_path"`
38837    new_path="$unix_path"
38838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38840    new_path="$unix_path"
38841  fi
38842
38843
38844    new_path=`$WHICH "$new_path" 2> /dev/null`
38845    # bat and cmd files are not always considered executable in MSYS causing which
38846    # to not find them
38847    if test "x$new_path" = x \
38848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38850      new_path="$path"
38851
38852  windows_path="$new_path"
38853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38854    unix_path=`$CYGPATH -u "$windows_path"`
38855    new_path="$unix_path"
38856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38858    new_path="$unix_path"
38859  fi
38860
38861    fi
38862
38863    if test "x$new_path" = x; then
38864      # It's still not found. Now this is an unrecoverable error.
38865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38866$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38867      has_space=`$ECHO "$complete" | $GREP " "`
38868      if test "x$has_space" != x; then
38869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38871      fi
38872      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38873    fi
38874  fi
38875
38876  # Now new_path has a complete unix path to the binary
38877  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38878    # Keep paths in /bin as-is, but remove trailing .exe if any
38879    new_path="${new_path/%.exe/}"
38880    # Do not save /bin paths to all_fixpath_prefixes!
38881  else
38882    # Not in mixed or Windows style, start by that.
38883    new_path=`cmd //c echo $new_path`
38884
38885  input_path="$new_path"
38886  # Check if we need to convert this using DOS-style short mode. If the path
38887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38888  # take no chances and rewrite it.
38889  # Note: m4 eats our [], so we need to use [ and ] instead.
38890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38891  if test "x$has_forbidden_chars" != x; then
38892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38894  fi
38895
38896    # Output is in $new_path
38897
38898  windows_path="$new_path"
38899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38900    unix_path=`$CYGPATH -u "$windows_path"`
38901    new_path="$unix_path"
38902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38904    new_path="$unix_path"
38905  fi
38906
38907    # remove trailing .exe if any
38908    new_path="${new_path/%.exe/}"
38909
38910    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38911    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38912  fi
38913
38914  else
38915    # We're on a unix platform. Hooray! :)
38916    # First separate the path from the arguments. This will split at the first
38917    # space.
38918    complete="$OBJCOPY"
38919    path="${complete%% *}"
38920    tmp="$complete EOL"
38921    arguments="${tmp#* }"
38922
38923    # Cannot rely on the command "which" here since it doesn't always work.
38924    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38925    if test -z "$is_absolute_path"; then
38926      # Path to executable is not absolute. Find it.
38927      IFS_save="$IFS"
38928      IFS=:
38929      for p in $PATH; do
38930        if test -f "$p/$path" && test -x "$p/$path"; then
38931          new_path="$p/$path"
38932          break
38933        fi
38934      done
38935      IFS="$IFS_save"
38936    else
38937      # This is an absolute path, we can use it without further modifications.
38938      new_path="$path"
38939    fi
38940
38941    if test "x$new_path" = x; then
38942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38943$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38944      has_space=`$ECHO "$complete" | $GREP " "`
38945      if test "x$has_space" != x; then
38946        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38947$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38948      fi
38949      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38950    fi
38951  fi
38952
38953  # Now join together the path and the arguments once again
38954  if test "x$arguments" != xEOL; then
38955    new_complete="$new_path ${arguments% *}"
38956  else
38957    new_complete="$new_path"
38958  fi
38959
38960  if test "x$complete" != "x$new_complete"; then
38961    OBJCOPY="$new_complete"
38962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38963$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38964  fi
38965
38966    fi
38967  fi
38968
38969
38970
38971  # Publish this variable in the help.
38972
38973
38974  if test "x$OBJDUMP" = x; then
38975    # The variable is not set by user, try to locate tool using the code snippet
38976    if test -n "$ac_tool_prefix"; then
38977  for ac_prog in gobjdump objdump
38978  do
38979    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38982$as_echo_n "checking for $ac_word... " >&6; }
38983if ${ac_cv_prog_OBJDUMP+:} false; then :
38984  $as_echo_n "(cached) " >&6
38985else
38986  if test -n "$OBJDUMP"; then
38987  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38988else
38989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38990for as_dir in $PATH
38991do
38992  IFS=$as_save_IFS
38993  test -z "$as_dir" && as_dir=.
38994    for ac_exec_ext in '' $ac_executable_extensions; do
38995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38996    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38998    break 2
38999  fi
39000done
39001  done
39002IFS=$as_save_IFS
39003
39004fi
39005fi
39006OBJDUMP=$ac_cv_prog_OBJDUMP
39007if test -n "$OBJDUMP"; then
39008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39009$as_echo "$OBJDUMP" >&6; }
39010else
39011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39012$as_echo "no" >&6; }
39013fi
39014
39015
39016    test -n "$OBJDUMP" && break
39017  done
39018fi
39019if test -z "$OBJDUMP"; then
39020  ac_ct_OBJDUMP=$OBJDUMP
39021  for ac_prog in gobjdump objdump
39022do
39023  # Extract the first word of "$ac_prog", so it can be a program name with args.
39024set dummy $ac_prog; ac_word=$2
39025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39026$as_echo_n "checking for $ac_word... " >&6; }
39027if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39028  $as_echo_n "(cached) " >&6
39029else
39030  if test -n "$ac_ct_OBJDUMP"; then
39031  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39032else
39033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39034for as_dir in $PATH
39035do
39036  IFS=$as_save_IFS
39037  test -z "$as_dir" && as_dir=.
39038    for ac_exec_ext in '' $ac_executable_extensions; do
39039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39040    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39042    break 2
39043  fi
39044done
39045  done
39046IFS=$as_save_IFS
39047
39048fi
39049fi
39050ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39051if test -n "$ac_ct_OBJDUMP"; then
39052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39053$as_echo "$ac_ct_OBJDUMP" >&6; }
39054else
39055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39056$as_echo "no" >&6; }
39057fi
39058
39059
39060  test -n "$ac_ct_OBJDUMP" && break
39061done
39062
39063  if test "x$ac_ct_OBJDUMP" = x; then
39064    OBJDUMP=""
39065  else
39066    case $cross_compiling:$ac_tool_warned in
39067yes:)
39068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39070ac_tool_warned=yes ;;
39071esac
39072    OBJDUMP=$ac_ct_OBJDUMP
39073  fi
39074fi
39075
39076  else
39077    # The variable is set, but is it from the command line or the environment?
39078
39079    # Try to remove the string !OBJDUMP! from our list.
39080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39082      # If it failed, the variable was not from the command line. Ignore it,
39083      # but warn the user (except for BASH, which is always set by the calling BASH).
39084      if test "xOBJDUMP" != xBASH; then
39085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39086$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39087      fi
39088      # Try to locate tool using the code snippet
39089      if test -n "$ac_tool_prefix"; then
39090  for ac_prog in gobjdump objdump
39091  do
39092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39095$as_echo_n "checking for $ac_word... " >&6; }
39096if ${ac_cv_prog_OBJDUMP+:} false; then :
39097  $as_echo_n "(cached) " >&6
39098else
39099  if test -n "$OBJDUMP"; then
39100  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39101else
39102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39103for as_dir in $PATH
39104do
39105  IFS=$as_save_IFS
39106  test -z "$as_dir" && as_dir=.
39107    for ac_exec_ext in '' $ac_executable_extensions; do
39108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39109    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39111    break 2
39112  fi
39113done
39114  done
39115IFS=$as_save_IFS
39116
39117fi
39118fi
39119OBJDUMP=$ac_cv_prog_OBJDUMP
39120if test -n "$OBJDUMP"; then
39121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39122$as_echo "$OBJDUMP" >&6; }
39123else
39124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39125$as_echo "no" >&6; }
39126fi
39127
39128
39129    test -n "$OBJDUMP" && break
39130  done
39131fi
39132if test -z "$OBJDUMP"; then
39133  ac_ct_OBJDUMP=$OBJDUMP
39134  for ac_prog in gobjdump objdump
39135do
39136  # Extract the first word of "$ac_prog", so it can be a program name with args.
39137set dummy $ac_prog; ac_word=$2
39138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39139$as_echo_n "checking for $ac_word... " >&6; }
39140if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39141  $as_echo_n "(cached) " >&6
39142else
39143  if test -n "$ac_ct_OBJDUMP"; then
39144  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39145else
39146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39147for as_dir in $PATH
39148do
39149  IFS=$as_save_IFS
39150  test -z "$as_dir" && as_dir=.
39151    for ac_exec_ext in '' $ac_executable_extensions; do
39152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39153    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39155    break 2
39156  fi
39157done
39158  done
39159IFS=$as_save_IFS
39160
39161fi
39162fi
39163ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39164if test -n "$ac_ct_OBJDUMP"; then
39165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39166$as_echo "$ac_ct_OBJDUMP" >&6; }
39167else
39168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39169$as_echo "no" >&6; }
39170fi
39171
39172
39173  test -n "$ac_ct_OBJDUMP" && break
39174done
39175
39176  if test "x$ac_ct_OBJDUMP" = x; then
39177    OBJDUMP=""
39178  else
39179    case $cross_compiling:$ac_tool_warned in
39180yes:)
39181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39183ac_tool_warned=yes ;;
39184esac
39185    OBJDUMP=$ac_ct_OBJDUMP
39186  fi
39187fi
39188
39189    else
39190      # If it succeeded, then it was overridden by the user. We will use it
39191      # for the tool.
39192
39193      # First remove it from the list of overridden variables, so we can test
39194      # for unknown variables in the end.
39195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39196
39197      # Check if the provided tool contains a complete path.
39198      tool_specified="$OBJDUMP"
39199      tool_basename="${tool_specified##*/}"
39200      if test "x$tool_basename" = "x$tool_specified"; then
39201        # A command without a complete path is provided, search $PATH.
39202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39203$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39204        # Extract the first word of "$tool_basename", so it can be a program name with args.
39205set dummy $tool_basename; ac_word=$2
39206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39207$as_echo_n "checking for $ac_word... " >&6; }
39208if ${ac_cv_path_OBJDUMP+:} false; then :
39209  $as_echo_n "(cached) " >&6
39210else
39211  case $OBJDUMP in
39212  [\\/]* | ?:[\\/]*)
39213  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39214  ;;
39215  *)
39216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39217for as_dir in $PATH
39218do
39219  IFS=$as_save_IFS
39220  test -z "$as_dir" && as_dir=.
39221    for ac_exec_ext in '' $ac_executable_extensions; do
39222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39223    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39225    break 2
39226  fi
39227done
39228  done
39229IFS=$as_save_IFS
39230
39231  ;;
39232esac
39233fi
39234OBJDUMP=$ac_cv_path_OBJDUMP
39235if test -n "$OBJDUMP"; then
39236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39237$as_echo "$OBJDUMP" >&6; }
39238else
39239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39240$as_echo "no" >&6; }
39241fi
39242
39243
39244        if test "x$OBJDUMP" = x; then
39245          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39246        fi
39247      else
39248        # Otherwise we believe it is a complete path. Use it as it is.
39249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39250$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39252$as_echo_n "checking for OBJDUMP... " >&6; }
39253        if test ! -x "$tool_specified"; then
39254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39255$as_echo "not found" >&6; }
39256          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39257        fi
39258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39259$as_echo "$tool_specified" >&6; }
39260      fi
39261    fi
39262  fi
39263
39264
39265  if test "x$OBJDUMP" != x; then
39266    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39267    # bails if argument is missing.
39268
39269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39270
39271  # First separate the path from the arguments. This will split at the first
39272  # space.
39273  complete="$OBJDUMP"
39274  path="${complete%% *}"
39275  tmp="$complete EOL"
39276  arguments="${tmp#* }"
39277
39278  # Input might be given as Windows format, start by converting to
39279  # unix format.
39280  new_path=`$CYGPATH -u "$path"`
39281
39282  # Now try to locate executable using which
39283  new_path=`$WHICH "$new_path" 2> /dev/null`
39284  # bat and cmd files are not always considered executable in cygwin causing which
39285  # to not find them
39286  if test "x$new_path" = x \
39287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39289    new_path=`$CYGPATH -u "$path"`
39290  fi
39291  if test "x$new_path" = x; then
39292    # Oops. Which didn't find the executable.
39293    # The splitting of arguments from the executable at a space might have been incorrect,
39294    # since paths with space are more likely in Windows. Give it another try with the whole
39295    # argument.
39296    path="$complete"
39297    arguments="EOL"
39298    new_path=`$CYGPATH -u "$path"`
39299    new_path=`$WHICH "$new_path" 2> /dev/null`
39300    # bat and cmd files are not always considered executable in cygwin causing which
39301    # to not find them
39302    if test "x$new_path" = x \
39303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39305      new_path=`$CYGPATH -u "$path"`
39306    fi
39307    if test "x$new_path" = x; then
39308      # It's still not found. Now this is an unrecoverable error.
39309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39310$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39311      has_space=`$ECHO "$complete" | $GREP " "`
39312      if test "x$has_space" != x; then
39313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39315      fi
39316      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39317    fi
39318  fi
39319
39320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39323  # "foo.exe" is OK but "foo" is an error.
39324  #
39325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39326  # It is also a way to make sure we got the proper file name for the real test later on.
39327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39328  if test "x$test_shortpath" = x; then
39329    # Short path failed, file does not exist as specified.
39330    # Try adding .exe or .cmd
39331    if test -f "${new_path}.exe"; then
39332      input_to_shortpath="${new_path}.exe"
39333    elif test -f "${new_path}.cmd"; then
39334      input_to_shortpath="${new_path}.cmd"
39335    else
39336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39337$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39340      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39341    fi
39342  else
39343    input_to_shortpath="$new_path"
39344  fi
39345
39346  # Call helper function which possibly converts this using DOS-style short mode.
39347  # If so, the updated path is stored in $new_path.
39348  new_path="$input_to_shortpath"
39349
39350  input_path="$input_to_shortpath"
39351  # Check if we need to convert this using DOS-style short mode. If the path
39352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39353  # take no chances and rewrite it.
39354  # Note: m4 eats our [], so we need to use [ and ] instead.
39355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39356  if test "x$has_forbidden_chars" != x; then
39357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39361      # Going to short mode and back again did indeed matter. Since short mode is
39362      # case insensitive, let's make it lowercase to improve readability.
39363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39364      # Now convert it back to Unix-stile (cygpath)
39365      input_path=`$CYGPATH -u "$shortmode_path"`
39366      new_path="$input_path"
39367    fi
39368  fi
39369
39370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39371  if test "x$test_cygdrive_prefix" = x; then
39372    # As a simple fix, exclude /usr/bin since it's not a real path.
39373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39375      # a path prefixed by /cygdrive for fixpath to work.
39376      new_path="$CYGWIN_ROOT_PATH$input_path"
39377    fi
39378  fi
39379
39380  # remove trailing .exe if any
39381  new_path="${new_path/%.exe/}"
39382
39383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39384
39385  # First separate the path from the arguments. This will split at the first
39386  # space.
39387  complete="$OBJDUMP"
39388  path="${complete%% *}"
39389  tmp="$complete EOL"
39390  arguments="${tmp#* }"
39391
39392  # Input might be given as Windows format, start by converting to
39393  # unix format.
39394  new_path="$path"
39395
39396  windows_path="$new_path"
39397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39398    unix_path=`$CYGPATH -u "$windows_path"`
39399    new_path="$unix_path"
39400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39402    new_path="$unix_path"
39403  fi
39404
39405
39406  # Now try to locate executable using which
39407  new_path=`$WHICH "$new_path" 2> /dev/null`
39408
39409  if test "x$new_path" = x; then
39410    # Oops. Which didn't find the executable.
39411    # The splitting of arguments from the executable at a space might have been incorrect,
39412    # since paths with space are more likely in Windows. Give it another try with the whole
39413    # argument.
39414    path="$complete"
39415    arguments="EOL"
39416    new_path="$path"
39417
39418  windows_path="$new_path"
39419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39420    unix_path=`$CYGPATH -u "$windows_path"`
39421    new_path="$unix_path"
39422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39424    new_path="$unix_path"
39425  fi
39426
39427
39428    new_path=`$WHICH "$new_path" 2> /dev/null`
39429    # bat and cmd files are not always considered executable in MSYS causing which
39430    # to not find them
39431    if test "x$new_path" = x \
39432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39434      new_path="$path"
39435
39436  windows_path="$new_path"
39437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39438    unix_path=`$CYGPATH -u "$windows_path"`
39439    new_path="$unix_path"
39440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39442    new_path="$unix_path"
39443  fi
39444
39445    fi
39446
39447    if test "x$new_path" = x; then
39448      # It's still not found. Now this is an unrecoverable error.
39449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39450$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39451      has_space=`$ECHO "$complete" | $GREP " "`
39452      if test "x$has_space" != x; then
39453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39455      fi
39456      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39457    fi
39458  fi
39459
39460  # Now new_path has a complete unix path to the binary
39461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39462    # Keep paths in /bin as-is, but remove trailing .exe if any
39463    new_path="${new_path/%.exe/}"
39464    # Do not save /bin paths to all_fixpath_prefixes!
39465  else
39466    # Not in mixed or Windows style, start by that.
39467    new_path=`cmd //c echo $new_path`
39468
39469  input_path="$new_path"
39470  # Check if we need to convert this using DOS-style short mode. If the path
39471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39472  # take no chances and rewrite it.
39473  # Note: m4 eats our [], so we need to use [ and ] instead.
39474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39475  if test "x$has_forbidden_chars" != x; then
39476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39478  fi
39479
39480    # Output is in $new_path
39481
39482  windows_path="$new_path"
39483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39484    unix_path=`$CYGPATH -u "$windows_path"`
39485    new_path="$unix_path"
39486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39488    new_path="$unix_path"
39489  fi
39490
39491    # remove trailing .exe if any
39492    new_path="${new_path/%.exe/}"
39493
39494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39496  fi
39497
39498  else
39499    # We're on a unix platform. Hooray! :)
39500    # First separate the path from the arguments. This will split at the first
39501    # space.
39502    complete="$OBJDUMP"
39503    path="${complete%% *}"
39504    tmp="$complete EOL"
39505    arguments="${tmp#* }"
39506
39507    # Cannot rely on the command "which" here since it doesn't always work.
39508    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39509    if test -z "$is_absolute_path"; then
39510      # Path to executable is not absolute. Find it.
39511      IFS_save="$IFS"
39512      IFS=:
39513      for p in $PATH; do
39514        if test -f "$p/$path" && test -x "$p/$path"; then
39515          new_path="$p/$path"
39516          break
39517        fi
39518      done
39519      IFS="$IFS_save"
39520    else
39521      # This is an absolute path, we can use it without further modifications.
39522      new_path="$path"
39523    fi
39524
39525    if test "x$new_path" = x; then
39526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39527$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39528      has_space=`$ECHO "$complete" | $GREP " "`
39529      if test "x$has_space" != x; then
39530        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39532      fi
39533      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39534    fi
39535  fi
39536
39537  # Now join together the path and the arguments once again
39538  if test "x$arguments" != xEOL; then
39539    new_complete="$new_path ${arguments% *}"
39540  else
39541    new_complete="$new_path"
39542  fi
39543
39544  if test "x$complete" != "x$new_complete"; then
39545    OBJDUMP="$new_complete"
39546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39547$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39548  fi
39549
39550  fi
39551
39552
39553  # Restore old path.
39554  PATH="$OLD_PATH"
39555
39556  # Restore the flags to the user specified values.
39557  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39558  CFLAGS="$ORG_CFLAGS"
39559  CXXFLAGS="$ORG_CXXFLAGS"
39560  OBJCFLAGS="$ORG_OBJCFLAGS"
39561
39562
39563# Finally do some processing after the detection phase
39564
39565  if test "x$COMPILE_TYPE" = "xcross"; then
39566    # Now we need to find a C/C++ compiler that can build executables for the
39567    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39568    # used once. Also, we need to do this without adding a tools dir to the
39569    # path, otherwise we might pick up cross-compilers which don't use standard
39570    # naming.
39571
39572    # FIXME: we should list the discovered compilers as an exclude pattern!
39573    # If we do that, we can do this detection before POST_DETECTION, and still
39574    # find the build compilers in the tools dir, if needed.
39575
39576
39577  # Publish this variable in the help.
39578
39579
39580  if test "x$BUILD_CC" = x; then
39581    # The variable is not set by user, try to locate tool using the code snippet
39582    for ac_prog in cl cc gcc
39583do
39584  # Extract the first word of "$ac_prog", so it can be a program name with args.
39585set dummy $ac_prog; ac_word=$2
39586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39587$as_echo_n "checking for $ac_word... " >&6; }
39588if ${ac_cv_path_BUILD_CC+:} false; then :
39589  $as_echo_n "(cached) " >&6
39590else
39591  case $BUILD_CC in
39592  [\\/]* | ?:[\\/]*)
39593  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39594  ;;
39595  *)
39596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39597for as_dir in $PATH
39598do
39599  IFS=$as_save_IFS
39600  test -z "$as_dir" && as_dir=.
39601    for ac_exec_ext in '' $ac_executable_extensions; do
39602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39603    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39605    break 2
39606  fi
39607done
39608  done
39609IFS=$as_save_IFS
39610
39611  ;;
39612esac
39613fi
39614BUILD_CC=$ac_cv_path_BUILD_CC
39615if test -n "$BUILD_CC"; then
39616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39617$as_echo "$BUILD_CC" >&6; }
39618else
39619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39620$as_echo "no" >&6; }
39621fi
39622
39623
39624  test -n "$BUILD_CC" && break
39625done
39626
39627  else
39628    # The variable is set, but is it from the command line or the environment?
39629
39630    # Try to remove the string !BUILD_CC! from our list.
39631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39633      # If it failed, the variable was not from the command line. Ignore it,
39634      # but warn the user (except for BASH, which is always set by the calling BASH).
39635      if test "xBUILD_CC" != xBASH; then
39636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39637$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39638      fi
39639      # Try to locate tool using the code snippet
39640      for ac_prog in cl cc gcc
39641do
39642  # Extract the first word of "$ac_prog", so it can be a program name with args.
39643set dummy $ac_prog; ac_word=$2
39644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39645$as_echo_n "checking for $ac_word... " >&6; }
39646if ${ac_cv_path_BUILD_CC+:} false; then :
39647  $as_echo_n "(cached) " >&6
39648else
39649  case $BUILD_CC in
39650  [\\/]* | ?:[\\/]*)
39651  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39652  ;;
39653  *)
39654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39655for as_dir in $PATH
39656do
39657  IFS=$as_save_IFS
39658  test -z "$as_dir" && as_dir=.
39659    for ac_exec_ext in '' $ac_executable_extensions; do
39660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39661    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39663    break 2
39664  fi
39665done
39666  done
39667IFS=$as_save_IFS
39668
39669  ;;
39670esac
39671fi
39672BUILD_CC=$ac_cv_path_BUILD_CC
39673if test -n "$BUILD_CC"; then
39674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39675$as_echo "$BUILD_CC" >&6; }
39676else
39677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39678$as_echo "no" >&6; }
39679fi
39680
39681
39682  test -n "$BUILD_CC" && break
39683done
39684
39685    else
39686      # If it succeeded, then it was overridden by the user. We will use it
39687      # for the tool.
39688
39689      # First remove it from the list of overridden variables, so we can test
39690      # for unknown variables in the end.
39691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39692
39693      # Check if the provided tool contains a complete path.
39694      tool_specified="$BUILD_CC"
39695      tool_basename="${tool_specified##*/}"
39696      if test "x$tool_basename" = "x$tool_specified"; then
39697        # A command without a complete path is provided, search $PATH.
39698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39699$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39700        # Extract the first word of "$tool_basename", so it can be a program name with args.
39701set dummy $tool_basename; ac_word=$2
39702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39703$as_echo_n "checking for $ac_word... " >&6; }
39704if ${ac_cv_path_BUILD_CC+:} false; then :
39705  $as_echo_n "(cached) " >&6
39706else
39707  case $BUILD_CC in
39708  [\\/]* | ?:[\\/]*)
39709  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39710  ;;
39711  *)
39712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39713for as_dir in $PATH
39714do
39715  IFS=$as_save_IFS
39716  test -z "$as_dir" && as_dir=.
39717    for ac_exec_ext in '' $ac_executable_extensions; do
39718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39719    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39721    break 2
39722  fi
39723done
39724  done
39725IFS=$as_save_IFS
39726
39727  ;;
39728esac
39729fi
39730BUILD_CC=$ac_cv_path_BUILD_CC
39731if test -n "$BUILD_CC"; then
39732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39733$as_echo "$BUILD_CC" >&6; }
39734else
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39736$as_echo "no" >&6; }
39737fi
39738
39739
39740        if test "x$BUILD_CC" = x; then
39741          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39742        fi
39743      else
39744        # Otherwise we believe it is a complete path. Use it as it is.
39745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39746$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39748$as_echo_n "checking for BUILD_CC... " >&6; }
39749        if test ! -x "$tool_specified"; then
39750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39751$as_echo "not found" >&6; }
39752          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39753        fi
39754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39755$as_echo "$tool_specified" >&6; }
39756      fi
39757    fi
39758  fi
39759
39760
39761
39762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39763
39764  # First separate the path from the arguments. This will split at the first
39765  # space.
39766  complete="$BUILD_CC"
39767  path="${complete%% *}"
39768  tmp="$complete EOL"
39769  arguments="${tmp#* }"
39770
39771  # Input might be given as Windows format, start by converting to
39772  # unix format.
39773  new_path=`$CYGPATH -u "$path"`
39774
39775  # Now try to locate executable using which
39776  new_path=`$WHICH "$new_path" 2> /dev/null`
39777  # bat and cmd files are not always considered executable in cygwin causing which
39778  # to not find them
39779  if test "x$new_path" = x \
39780      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39781      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39782    new_path=`$CYGPATH -u "$path"`
39783  fi
39784  if test "x$new_path" = x; then
39785    # Oops. Which didn't find the executable.
39786    # The splitting of arguments from the executable at a space might have been incorrect,
39787    # since paths with space are more likely in Windows. Give it another try with the whole
39788    # argument.
39789    path="$complete"
39790    arguments="EOL"
39791    new_path=`$CYGPATH -u "$path"`
39792    new_path=`$WHICH "$new_path" 2> /dev/null`
39793    # bat and cmd files are not always considered executable in cygwin causing which
39794    # to not find them
39795    if test "x$new_path" = x \
39796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39798      new_path=`$CYGPATH -u "$path"`
39799    fi
39800    if test "x$new_path" = x; then
39801      # It's still not found. Now this is an unrecoverable error.
39802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39803$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39804      has_space=`$ECHO "$complete" | $GREP " "`
39805      if test "x$has_space" != x; then
39806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39808      fi
39809      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39810    fi
39811  fi
39812
39813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39816  # "foo.exe" is OK but "foo" is an error.
39817  #
39818  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39819  # It is also a way to make sure we got the proper file name for the real test later on.
39820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39821  if test "x$test_shortpath" = x; then
39822    # Short path failed, file does not exist as specified.
39823    # Try adding .exe or .cmd
39824    if test -f "${new_path}.exe"; then
39825      input_to_shortpath="${new_path}.exe"
39826    elif test -f "${new_path}.cmd"; then
39827      input_to_shortpath="${new_path}.cmd"
39828    else
39829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39830$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39831      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39832$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39833      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39834    fi
39835  else
39836    input_to_shortpath="$new_path"
39837  fi
39838
39839  # Call helper function which possibly converts this using DOS-style short mode.
39840  # If so, the updated path is stored in $new_path.
39841  new_path="$input_to_shortpath"
39842
39843  input_path="$input_to_shortpath"
39844  # Check if we need to convert this using DOS-style short mode. If the path
39845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39846  # take no chances and rewrite it.
39847  # Note: m4 eats our [], so we need to use [ and ] instead.
39848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39849  if test "x$has_forbidden_chars" != x; then
39850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39854      # Going to short mode and back again did indeed matter. Since short mode is
39855      # case insensitive, let's make it lowercase to improve readability.
39856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39857      # Now convert it back to Unix-stile (cygpath)
39858      input_path=`$CYGPATH -u "$shortmode_path"`
39859      new_path="$input_path"
39860    fi
39861  fi
39862
39863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39864  if test "x$test_cygdrive_prefix" = x; then
39865    # As a simple fix, exclude /usr/bin since it's not a real path.
39866    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39868      # a path prefixed by /cygdrive for fixpath to work.
39869      new_path="$CYGWIN_ROOT_PATH$input_path"
39870    fi
39871  fi
39872
39873  # remove trailing .exe if any
39874  new_path="${new_path/%.exe/}"
39875
39876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39877
39878  # First separate the path from the arguments. This will split at the first
39879  # space.
39880  complete="$BUILD_CC"
39881  path="${complete%% *}"
39882  tmp="$complete EOL"
39883  arguments="${tmp#* }"
39884
39885  # Input might be given as Windows format, start by converting to
39886  # unix format.
39887  new_path="$path"
39888
39889  windows_path="$new_path"
39890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39891    unix_path=`$CYGPATH -u "$windows_path"`
39892    new_path="$unix_path"
39893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39895    new_path="$unix_path"
39896  fi
39897
39898
39899  # Now try to locate executable using which
39900  new_path=`$WHICH "$new_path" 2> /dev/null`
39901
39902  if test "x$new_path" = x; then
39903    # Oops. Which didn't find the executable.
39904    # The splitting of arguments from the executable at a space might have been incorrect,
39905    # since paths with space are more likely in Windows. Give it another try with the whole
39906    # argument.
39907    path="$complete"
39908    arguments="EOL"
39909    new_path="$path"
39910
39911  windows_path="$new_path"
39912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39913    unix_path=`$CYGPATH -u "$windows_path"`
39914    new_path="$unix_path"
39915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39917    new_path="$unix_path"
39918  fi
39919
39920
39921    new_path=`$WHICH "$new_path" 2> /dev/null`
39922    # bat and cmd files are not always considered executable in MSYS causing which
39923    # to not find them
39924    if test "x$new_path" = x \
39925        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39926        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39927      new_path="$path"
39928
39929  windows_path="$new_path"
39930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39931    unix_path=`$CYGPATH -u "$windows_path"`
39932    new_path="$unix_path"
39933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39935    new_path="$unix_path"
39936  fi
39937
39938    fi
39939
39940    if test "x$new_path" = x; then
39941      # It's still not found. Now this is an unrecoverable error.
39942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39943$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39944      has_space=`$ECHO "$complete" | $GREP " "`
39945      if test "x$has_space" != x; then
39946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39948      fi
39949      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39950    fi
39951  fi
39952
39953  # Now new_path has a complete unix path to the binary
39954  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39955    # Keep paths in /bin as-is, but remove trailing .exe if any
39956    new_path="${new_path/%.exe/}"
39957    # Do not save /bin paths to all_fixpath_prefixes!
39958  else
39959    # Not in mixed or Windows style, start by that.
39960    new_path=`cmd //c echo $new_path`
39961
39962  input_path="$new_path"
39963  # Check if we need to convert this using DOS-style short mode. If the path
39964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39965  # take no chances and rewrite it.
39966  # Note: m4 eats our [], so we need to use [ and ] instead.
39967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39968  if test "x$has_forbidden_chars" != x; then
39969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39971  fi
39972
39973    # Output is in $new_path
39974
39975  windows_path="$new_path"
39976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39977    unix_path=`$CYGPATH -u "$windows_path"`
39978    new_path="$unix_path"
39979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39981    new_path="$unix_path"
39982  fi
39983
39984    # remove trailing .exe if any
39985    new_path="${new_path/%.exe/}"
39986
39987    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39988    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39989  fi
39990
39991  else
39992    # We're on a unix platform. Hooray! :)
39993    # First separate the path from the arguments. This will split at the first
39994    # space.
39995    complete="$BUILD_CC"
39996    path="${complete%% *}"
39997    tmp="$complete EOL"
39998    arguments="${tmp#* }"
39999
40000    # Cannot rely on the command "which" here since it doesn't always work.
40001    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40002    if test -z "$is_absolute_path"; then
40003      # Path to executable is not absolute. Find it.
40004      IFS_save="$IFS"
40005      IFS=:
40006      for p in $PATH; do
40007        if test -f "$p/$path" && test -x "$p/$path"; then
40008          new_path="$p/$path"
40009          break
40010        fi
40011      done
40012      IFS="$IFS_save"
40013    else
40014      # This is an absolute path, we can use it without further modifications.
40015      new_path="$path"
40016    fi
40017
40018    if test "x$new_path" = x; then
40019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40020$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40021      has_space=`$ECHO "$complete" | $GREP " "`
40022      if test "x$has_space" != x; then
40023        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40024$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40025      fi
40026      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40027    fi
40028  fi
40029
40030  # Now join together the path and the arguments once again
40031  if test "x$arguments" != xEOL; then
40032    new_complete="$new_path ${arguments% *}"
40033  else
40034    new_complete="$new_path"
40035  fi
40036
40037  if test "x$complete" != "x$new_complete"; then
40038    BUILD_CC="$new_complete"
40039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40040$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40041  fi
40042
40043
40044
40045  # Publish this variable in the help.
40046
40047
40048  if test "x$BUILD_CXX" = x; then
40049    # The variable is not set by user, try to locate tool using the code snippet
40050    for ac_prog in cl CC g++
40051do
40052  # Extract the first word of "$ac_prog", so it can be a program name with args.
40053set dummy $ac_prog; ac_word=$2
40054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40055$as_echo_n "checking for $ac_word... " >&6; }
40056if ${ac_cv_path_BUILD_CXX+:} false; then :
40057  $as_echo_n "(cached) " >&6
40058else
40059  case $BUILD_CXX in
40060  [\\/]* | ?:[\\/]*)
40061  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40062  ;;
40063  *)
40064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40065for as_dir in $PATH
40066do
40067  IFS=$as_save_IFS
40068  test -z "$as_dir" && as_dir=.
40069    for ac_exec_ext in '' $ac_executable_extensions; do
40070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40071    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40073    break 2
40074  fi
40075done
40076  done
40077IFS=$as_save_IFS
40078
40079  ;;
40080esac
40081fi
40082BUILD_CXX=$ac_cv_path_BUILD_CXX
40083if test -n "$BUILD_CXX"; then
40084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40085$as_echo "$BUILD_CXX" >&6; }
40086else
40087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40088$as_echo "no" >&6; }
40089fi
40090
40091
40092  test -n "$BUILD_CXX" && break
40093done
40094
40095  else
40096    # The variable is set, but is it from the command line or the environment?
40097
40098    # Try to remove the string !BUILD_CXX! from our list.
40099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40101      # If it failed, the variable was not from the command line. Ignore it,
40102      # but warn the user (except for BASH, which is always set by the calling BASH).
40103      if test "xBUILD_CXX" != xBASH; then
40104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40105$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40106      fi
40107      # Try to locate tool using the code snippet
40108      for ac_prog in cl CC g++
40109do
40110  # Extract the first word of "$ac_prog", so it can be a program name with args.
40111set dummy $ac_prog; ac_word=$2
40112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40113$as_echo_n "checking for $ac_word... " >&6; }
40114if ${ac_cv_path_BUILD_CXX+:} false; then :
40115  $as_echo_n "(cached) " >&6
40116else
40117  case $BUILD_CXX in
40118  [\\/]* | ?:[\\/]*)
40119  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40120  ;;
40121  *)
40122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40123for as_dir in $PATH
40124do
40125  IFS=$as_save_IFS
40126  test -z "$as_dir" && as_dir=.
40127    for ac_exec_ext in '' $ac_executable_extensions; do
40128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40129    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40131    break 2
40132  fi
40133done
40134  done
40135IFS=$as_save_IFS
40136
40137  ;;
40138esac
40139fi
40140BUILD_CXX=$ac_cv_path_BUILD_CXX
40141if test -n "$BUILD_CXX"; then
40142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40143$as_echo "$BUILD_CXX" >&6; }
40144else
40145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40146$as_echo "no" >&6; }
40147fi
40148
40149
40150  test -n "$BUILD_CXX" && break
40151done
40152
40153    else
40154      # If it succeeded, then it was overridden by the user. We will use it
40155      # for the tool.
40156
40157      # First remove it from the list of overridden variables, so we can test
40158      # for unknown variables in the end.
40159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40160
40161      # Check if the provided tool contains a complete path.
40162      tool_specified="$BUILD_CXX"
40163      tool_basename="${tool_specified##*/}"
40164      if test "x$tool_basename" = "x$tool_specified"; then
40165        # A command without a complete path is provided, search $PATH.
40166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40167$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40168        # Extract the first word of "$tool_basename", so it can be a program name with args.
40169set dummy $tool_basename; ac_word=$2
40170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40171$as_echo_n "checking for $ac_word... " >&6; }
40172if ${ac_cv_path_BUILD_CXX+:} false; then :
40173  $as_echo_n "(cached) " >&6
40174else
40175  case $BUILD_CXX in
40176  [\\/]* | ?:[\\/]*)
40177  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40178  ;;
40179  *)
40180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40181for as_dir in $PATH
40182do
40183  IFS=$as_save_IFS
40184  test -z "$as_dir" && as_dir=.
40185    for ac_exec_ext in '' $ac_executable_extensions; do
40186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40187    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40189    break 2
40190  fi
40191done
40192  done
40193IFS=$as_save_IFS
40194
40195  ;;
40196esac
40197fi
40198BUILD_CXX=$ac_cv_path_BUILD_CXX
40199if test -n "$BUILD_CXX"; then
40200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40201$as_echo "$BUILD_CXX" >&6; }
40202else
40203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40204$as_echo "no" >&6; }
40205fi
40206
40207
40208        if test "x$BUILD_CXX" = x; then
40209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40210        fi
40211      else
40212        # Otherwise we believe it is a complete path. Use it as it is.
40213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40214$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40216$as_echo_n "checking for BUILD_CXX... " >&6; }
40217        if test ! -x "$tool_specified"; then
40218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40219$as_echo "not found" >&6; }
40220          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40221        fi
40222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40223$as_echo "$tool_specified" >&6; }
40224      fi
40225    fi
40226  fi
40227
40228
40229
40230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40231
40232  # First separate the path from the arguments. This will split at the first
40233  # space.
40234  complete="$BUILD_CXX"
40235  path="${complete%% *}"
40236  tmp="$complete EOL"
40237  arguments="${tmp#* }"
40238
40239  # Input might be given as Windows format, start by converting to
40240  # unix format.
40241  new_path=`$CYGPATH -u "$path"`
40242
40243  # Now try to locate executable using which
40244  new_path=`$WHICH "$new_path" 2> /dev/null`
40245  # bat and cmd files are not always considered executable in cygwin causing which
40246  # to not find them
40247  if test "x$new_path" = x \
40248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40250    new_path=`$CYGPATH -u "$path"`
40251  fi
40252  if test "x$new_path" = x; then
40253    # Oops. Which didn't find the executable.
40254    # The splitting of arguments from the executable at a space might have been incorrect,
40255    # since paths with space are more likely in Windows. Give it another try with the whole
40256    # argument.
40257    path="$complete"
40258    arguments="EOL"
40259    new_path=`$CYGPATH -u "$path"`
40260    new_path=`$WHICH "$new_path" 2> /dev/null`
40261    # bat and cmd files are not always considered executable in cygwin causing which
40262    # to not find them
40263    if test "x$new_path" = x \
40264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40266      new_path=`$CYGPATH -u "$path"`
40267    fi
40268    if test "x$new_path" = x; then
40269      # It's still not found. Now this is an unrecoverable error.
40270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40271$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40272      has_space=`$ECHO "$complete" | $GREP " "`
40273      if test "x$has_space" != x; then
40274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40276      fi
40277      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40278    fi
40279  fi
40280
40281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40284  # "foo.exe" is OK but "foo" is an error.
40285  #
40286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40287  # It is also a way to make sure we got the proper file name for the real test later on.
40288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40289  if test "x$test_shortpath" = x; then
40290    # Short path failed, file does not exist as specified.
40291    # Try adding .exe or .cmd
40292    if test -f "${new_path}.exe"; then
40293      input_to_shortpath="${new_path}.exe"
40294    elif test -f "${new_path}.cmd"; then
40295      input_to_shortpath="${new_path}.cmd"
40296    else
40297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40298$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40301      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40302    fi
40303  else
40304    input_to_shortpath="$new_path"
40305  fi
40306
40307  # Call helper function which possibly converts this using DOS-style short mode.
40308  # If so, the updated path is stored in $new_path.
40309  new_path="$input_to_shortpath"
40310
40311  input_path="$input_to_shortpath"
40312  # Check if we need to convert this using DOS-style short mode. If the path
40313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40314  # take no chances and rewrite it.
40315  # Note: m4 eats our [], so we need to use [ and ] instead.
40316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40317  if test "x$has_forbidden_chars" != x; then
40318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40322      # Going to short mode and back again did indeed matter. Since short mode is
40323      # case insensitive, let's make it lowercase to improve readability.
40324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40325      # Now convert it back to Unix-stile (cygpath)
40326      input_path=`$CYGPATH -u "$shortmode_path"`
40327      new_path="$input_path"
40328    fi
40329  fi
40330
40331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40332  if test "x$test_cygdrive_prefix" = x; then
40333    # As a simple fix, exclude /usr/bin since it's not a real path.
40334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40336      # a path prefixed by /cygdrive for fixpath to work.
40337      new_path="$CYGWIN_ROOT_PATH$input_path"
40338    fi
40339  fi
40340
40341  # remove trailing .exe if any
40342  new_path="${new_path/%.exe/}"
40343
40344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40345
40346  # First separate the path from the arguments. This will split at the first
40347  # space.
40348  complete="$BUILD_CXX"
40349  path="${complete%% *}"
40350  tmp="$complete EOL"
40351  arguments="${tmp#* }"
40352
40353  # Input might be given as Windows format, start by converting to
40354  # unix format.
40355  new_path="$path"
40356
40357  windows_path="$new_path"
40358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40359    unix_path=`$CYGPATH -u "$windows_path"`
40360    new_path="$unix_path"
40361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40363    new_path="$unix_path"
40364  fi
40365
40366
40367  # Now try to locate executable using which
40368  new_path=`$WHICH "$new_path" 2> /dev/null`
40369
40370  if test "x$new_path" = x; then
40371    # Oops. Which didn't find the executable.
40372    # The splitting of arguments from the executable at a space might have been incorrect,
40373    # since paths with space are more likely in Windows. Give it another try with the whole
40374    # argument.
40375    path="$complete"
40376    arguments="EOL"
40377    new_path="$path"
40378
40379  windows_path="$new_path"
40380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40381    unix_path=`$CYGPATH -u "$windows_path"`
40382    new_path="$unix_path"
40383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40385    new_path="$unix_path"
40386  fi
40387
40388
40389    new_path=`$WHICH "$new_path" 2> /dev/null`
40390    # bat and cmd files are not always considered executable in MSYS causing which
40391    # to not find them
40392    if test "x$new_path" = x \
40393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40395      new_path="$path"
40396
40397  windows_path="$new_path"
40398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40399    unix_path=`$CYGPATH -u "$windows_path"`
40400    new_path="$unix_path"
40401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40403    new_path="$unix_path"
40404  fi
40405
40406    fi
40407
40408    if test "x$new_path" = x; then
40409      # It's still not found. Now this is an unrecoverable error.
40410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40411$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40412      has_space=`$ECHO "$complete" | $GREP " "`
40413      if test "x$has_space" != x; then
40414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40416      fi
40417      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40418    fi
40419  fi
40420
40421  # Now new_path has a complete unix path to the binary
40422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40423    # Keep paths in /bin as-is, but remove trailing .exe if any
40424    new_path="${new_path/%.exe/}"
40425    # Do not save /bin paths to all_fixpath_prefixes!
40426  else
40427    # Not in mixed or Windows style, start by that.
40428    new_path=`cmd //c echo $new_path`
40429
40430  input_path="$new_path"
40431  # Check if we need to convert this using DOS-style short mode. If the path
40432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40433  # take no chances and rewrite it.
40434  # Note: m4 eats our [], so we need to use [ and ] instead.
40435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40436  if test "x$has_forbidden_chars" != x; then
40437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40439  fi
40440
40441    # Output is in $new_path
40442
40443  windows_path="$new_path"
40444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40445    unix_path=`$CYGPATH -u "$windows_path"`
40446    new_path="$unix_path"
40447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40449    new_path="$unix_path"
40450  fi
40451
40452    # remove trailing .exe if any
40453    new_path="${new_path/%.exe/}"
40454
40455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40457  fi
40458
40459  else
40460    # We're on a unix platform. Hooray! :)
40461    # First separate the path from the arguments. This will split at the first
40462    # space.
40463    complete="$BUILD_CXX"
40464    path="${complete%% *}"
40465    tmp="$complete EOL"
40466    arguments="${tmp#* }"
40467
40468    # Cannot rely on the command "which" here since it doesn't always work.
40469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40470    if test -z "$is_absolute_path"; then
40471      # Path to executable is not absolute. Find it.
40472      IFS_save="$IFS"
40473      IFS=:
40474      for p in $PATH; do
40475        if test -f "$p/$path" && test -x "$p/$path"; then
40476          new_path="$p/$path"
40477          break
40478        fi
40479      done
40480      IFS="$IFS_save"
40481    else
40482      # This is an absolute path, we can use it without further modifications.
40483      new_path="$path"
40484    fi
40485
40486    if test "x$new_path" = x; then
40487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40488$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40489      has_space=`$ECHO "$complete" | $GREP " "`
40490      if test "x$has_space" != x; then
40491        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40493      fi
40494      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40495    fi
40496  fi
40497
40498  # Now join together the path and the arguments once again
40499  if test "x$arguments" != xEOL; then
40500    new_complete="$new_path ${arguments% *}"
40501  else
40502    new_complete="$new_path"
40503  fi
40504
40505  if test "x$complete" != "x$new_complete"; then
40506    BUILD_CXX="$new_complete"
40507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40508$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40509  fi
40510
40511
40512
40513  # Publish this variable in the help.
40514
40515
40516  if test "x$BUILD_LD" = x; then
40517    # The variable is not set by user, try to locate tool using the code snippet
40518    for ac_prog in ld
40519do
40520  # Extract the first word of "$ac_prog", so it can be a program name with args.
40521set dummy $ac_prog; ac_word=$2
40522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40523$as_echo_n "checking for $ac_word... " >&6; }
40524if ${ac_cv_path_BUILD_LD+:} false; then :
40525  $as_echo_n "(cached) " >&6
40526else
40527  case $BUILD_LD in
40528  [\\/]* | ?:[\\/]*)
40529  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40530  ;;
40531  *)
40532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40533for as_dir in $PATH
40534do
40535  IFS=$as_save_IFS
40536  test -z "$as_dir" && as_dir=.
40537    for ac_exec_ext in '' $ac_executable_extensions; do
40538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40539    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40541    break 2
40542  fi
40543done
40544  done
40545IFS=$as_save_IFS
40546
40547  ;;
40548esac
40549fi
40550BUILD_LD=$ac_cv_path_BUILD_LD
40551if test -n "$BUILD_LD"; then
40552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40553$as_echo "$BUILD_LD" >&6; }
40554else
40555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40556$as_echo "no" >&6; }
40557fi
40558
40559
40560  test -n "$BUILD_LD" && break
40561done
40562
40563  else
40564    # The variable is set, but is it from the command line or the environment?
40565
40566    # Try to remove the string !BUILD_LD! from our list.
40567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40569      # If it failed, the variable was not from the command line. Ignore it,
40570      # but warn the user (except for BASH, which is always set by the calling BASH).
40571      if test "xBUILD_LD" != xBASH; then
40572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40573$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40574      fi
40575      # Try to locate tool using the code snippet
40576      for ac_prog in ld
40577do
40578  # Extract the first word of "$ac_prog", so it can be a program name with args.
40579set dummy $ac_prog; ac_word=$2
40580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40581$as_echo_n "checking for $ac_word... " >&6; }
40582if ${ac_cv_path_BUILD_LD+:} false; then :
40583  $as_echo_n "(cached) " >&6
40584else
40585  case $BUILD_LD in
40586  [\\/]* | ?:[\\/]*)
40587  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40588  ;;
40589  *)
40590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40591for as_dir in $PATH
40592do
40593  IFS=$as_save_IFS
40594  test -z "$as_dir" && as_dir=.
40595    for ac_exec_ext in '' $ac_executable_extensions; do
40596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40597    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40599    break 2
40600  fi
40601done
40602  done
40603IFS=$as_save_IFS
40604
40605  ;;
40606esac
40607fi
40608BUILD_LD=$ac_cv_path_BUILD_LD
40609if test -n "$BUILD_LD"; then
40610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40611$as_echo "$BUILD_LD" >&6; }
40612else
40613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40614$as_echo "no" >&6; }
40615fi
40616
40617
40618  test -n "$BUILD_LD" && break
40619done
40620
40621    else
40622      # If it succeeded, then it was overridden by the user. We will use it
40623      # for the tool.
40624
40625      # First remove it from the list of overridden variables, so we can test
40626      # for unknown variables in the end.
40627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40628
40629      # Check if the provided tool contains a complete path.
40630      tool_specified="$BUILD_LD"
40631      tool_basename="${tool_specified##*/}"
40632      if test "x$tool_basename" = "x$tool_specified"; then
40633        # A command without a complete path is provided, search $PATH.
40634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40635$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40636        # Extract the first word of "$tool_basename", so it can be a program name with args.
40637set dummy $tool_basename; ac_word=$2
40638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40639$as_echo_n "checking for $ac_word... " >&6; }
40640if ${ac_cv_path_BUILD_LD+:} false; then :
40641  $as_echo_n "(cached) " >&6
40642else
40643  case $BUILD_LD in
40644  [\\/]* | ?:[\\/]*)
40645  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40646  ;;
40647  *)
40648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40649for as_dir in $PATH
40650do
40651  IFS=$as_save_IFS
40652  test -z "$as_dir" && as_dir=.
40653    for ac_exec_ext in '' $ac_executable_extensions; do
40654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40655    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40657    break 2
40658  fi
40659done
40660  done
40661IFS=$as_save_IFS
40662
40663  ;;
40664esac
40665fi
40666BUILD_LD=$ac_cv_path_BUILD_LD
40667if test -n "$BUILD_LD"; then
40668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40669$as_echo "$BUILD_LD" >&6; }
40670else
40671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40672$as_echo "no" >&6; }
40673fi
40674
40675
40676        if test "x$BUILD_LD" = x; then
40677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40678        fi
40679      else
40680        # Otherwise we believe it is a complete path. Use it as it is.
40681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40682$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40684$as_echo_n "checking for BUILD_LD... " >&6; }
40685        if test ! -x "$tool_specified"; then
40686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40687$as_echo "not found" >&6; }
40688          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40689        fi
40690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40691$as_echo "$tool_specified" >&6; }
40692      fi
40693    fi
40694  fi
40695
40696
40697
40698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40699
40700  # First separate the path from the arguments. This will split at the first
40701  # space.
40702  complete="$BUILD_LD"
40703  path="${complete%% *}"
40704  tmp="$complete EOL"
40705  arguments="${tmp#* }"
40706
40707  # Input might be given as Windows format, start by converting to
40708  # unix format.
40709  new_path=`$CYGPATH -u "$path"`
40710
40711  # Now try to locate executable using which
40712  new_path=`$WHICH "$new_path" 2> /dev/null`
40713  # bat and cmd files are not always considered executable in cygwin causing which
40714  # to not find them
40715  if test "x$new_path" = x \
40716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40718    new_path=`$CYGPATH -u "$path"`
40719  fi
40720  if test "x$new_path" = x; then
40721    # Oops. Which didn't find the executable.
40722    # The splitting of arguments from the executable at a space might have been incorrect,
40723    # since paths with space are more likely in Windows. Give it another try with the whole
40724    # argument.
40725    path="$complete"
40726    arguments="EOL"
40727    new_path=`$CYGPATH -u "$path"`
40728    new_path=`$WHICH "$new_path" 2> /dev/null`
40729    # bat and cmd files are not always considered executable in cygwin causing which
40730    # to not find them
40731    if test "x$new_path" = x \
40732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40734      new_path=`$CYGPATH -u "$path"`
40735    fi
40736    if test "x$new_path" = x; then
40737      # It's still not found. Now this is an unrecoverable error.
40738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40739$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40740      has_space=`$ECHO "$complete" | $GREP " "`
40741      if test "x$has_space" != x; then
40742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40744      fi
40745      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40746    fi
40747  fi
40748
40749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40752  # "foo.exe" is OK but "foo" is an error.
40753  #
40754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40755  # It is also a way to make sure we got the proper file name for the real test later on.
40756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40757  if test "x$test_shortpath" = x; then
40758    # Short path failed, file does not exist as specified.
40759    # Try adding .exe or .cmd
40760    if test -f "${new_path}.exe"; then
40761      input_to_shortpath="${new_path}.exe"
40762    elif test -f "${new_path}.cmd"; then
40763      input_to_shortpath="${new_path}.cmd"
40764    else
40765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40766$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40769      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40770    fi
40771  else
40772    input_to_shortpath="$new_path"
40773  fi
40774
40775  # Call helper function which possibly converts this using DOS-style short mode.
40776  # If so, the updated path is stored in $new_path.
40777  new_path="$input_to_shortpath"
40778
40779  input_path="$input_to_shortpath"
40780  # Check if we need to convert this using DOS-style short mode. If the path
40781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40782  # take no chances and rewrite it.
40783  # Note: m4 eats our [], so we need to use [ and ] instead.
40784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40785  if test "x$has_forbidden_chars" != x; then
40786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40790      # Going to short mode and back again did indeed matter. Since short mode is
40791      # case insensitive, let's make it lowercase to improve readability.
40792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40793      # Now convert it back to Unix-stile (cygpath)
40794      input_path=`$CYGPATH -u "$shortmode_path"`
40795      new_path="$input_path"
40796    fi
40797  fi
40798
40799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40800  if test "x$test_cygdrive_prefix" = x; then
40801    # As a simple fix, exclude /usr/bin since it's not a real path.
40802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40804      # a path prefixed by /cygdrive for fixpath to work.
40805      new_path="$CYGWIN_ROOT_PATH$input_path"
40806    fi
40807  fi
40808
40809  # remove trailing .exe if any
40810  new_path="${new_path/%.exe/}"
40811
40812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40813
40814  # First separate the path from the arguments. This will split at the first
40815  # space.
40816  complete="$BUILD_LD"
40817  path="${complete%% *}"
40818  tmp="$complete EOL"
40819  arguments="${tmp#* }"
40820
40821  # Input might be given as Windows format, start by converting to
40822  # unix format.
40823  new_path="$path"
40824
40825  windows_path="$new_path"
40826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40827    unix_path=`$CYGPATH -u "$windows_path"`
40828    new_path="$unix_path"
40829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40831    new_path="$unix_path"
40832  fi
40833
40834
40835  # Now try to locate executable using which
40836  new_path=`$WHICH "$new_path" 2> /dev/null`
40837
40838  if test "x$new_path" = x; then
40839    # Oops. Which didn't find the executable.
40840    # The splitting of arguments from the executable at a space might have been incorrect,
40841    # since paths with space are more likely in Windows. Give it another try with the whole
40842    # argument.
40843    path="$complete"
40844    arguments="EOL"
40845    new_path="$path"
40846
40847  windows_path="$new_path"
40848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40849    unix_path=`$CYGPATH -u "$windows_path"`
40850    new_path="$unix_path"
40851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40853    new_path="$unix_path"
40854  fi
40855
40856
40857    new_path=`$WHICH "$new_path" 2> /dev/null`
40858    # bat and cmd files are not always considered executable in MSYS causing which
40859    # to not find them
40860    if test "x$new_path" = x \
40861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40863      new_path="$path"
40864
40865  windows_path="$new_path"
40866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40867    unix_path=`$CYGPATH -u "$windows_path"`
40868    new_path="$unix_path"
40869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40871    new_path="$unix_path"
40872  fi
40873
40874    fi
40875
40876    if test "x$new_path" = x; then
40877      # It's still not found. Now this is an unrecoverable error.
40878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40879$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40880      has_space=`$ECHO "$complete" | $GREP " "`
40881      if test "x$has_space" != x; then
40882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40884      fi
40885      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40886    fi
40887  fi
40888
40889  # Now new_path has a complete unix path to the binary
40890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40891    # Keep paths in /bin as-is, but remove trailing .exe if any
40892    new_path="${new_path/%.exe/}"
40893    # Do not save /bin paths to all_fixpath_prefixes!
40894  else
40895    # Not in mixed or Windows style, start by that.
40896    new_path=`cmd //c echo $new_path`
40897
40898  input_path="$new_path"
40899  # Check if we need to convert this using DOS-style short mode. If the path
40900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40901  # take no chances and rewrite it.
40902  # Note: m4 eats our [], so we need to use [ and ] instead.
40903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40904  if test "x$has_forbidden_chars" != x; then
40905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40907  fi
40908
40909    # Output is in $new_path
40910
40911  windows_path="$new_path"
40912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40913    unix_path=`$CYGPATH -u "$windows_path"`
40914    new_path="$unix_path"
40915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40917    new_path="$unix_path"
40918  fi
40919
40920    # remove trailing .exe if any
40921    new_path="${new_path/%.exe/}"
40922
40923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40925  fi
40926
40927  else
40928    # We're on a unix platform. Hooray! :)
40929    # First separate the path from the arguments. This will split at the first
40930    # space.
40931    complete="$BUILD_LD"
40932    path="${complete%% *}"
40933    tmp="$complete EOL"
40934    arguments="${tmp#* }"
40935
40936    # Cannot rely on the command "which" here since it doesn't always work.
40937    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40938    if test -z "$is_absolute_path"; then
40939      # Path to executable is not absolute. Find it.
40940      IFS_save="$IFS"
40941      IFS=:
40942      for p in $PATH; do
40943        if test -f "$p/$path" && test -x "$p/$path"; then
40944          new_path="$p/$path"
40945          break
40946        fi
40947      done
40948      IFS="$IFS_save"
40949    else
40950      # This is an absolute path, we can use it without further modifications.
40951      new_path="$path"
40952    fi
40953
40954    if test "x$new_path" = x; then
40955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40956$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40957      has_space=`$ECHO "$complete" | $GREP " "`
40958      if test "x$has_space" != x; then
40959        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40961      fi
40962      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40963    fi
40964  fi
40965
40966  # Now join together the path and the arguments once again
40967  if test "x$arguments" != xEOL; then
40968    new_complete="$new_path ${arguments% *}"
40969  else
40970    new_complete="$new_path"
40971  fi
40972
40973  if test "x$complete" != "x$new_complete"; then
40974    BUILD_LD="$new_complete"
40975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40976$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40977  fi
40978
40979  else
40980    # If we are not cross compiling, use the normal target compilers for
40981    # building the build platform executables.
40982    BUILD_CC="$CC"
40983    BUILD_CXX="$CXX"
40984    BUILD_LD="$LD"
40985  fi
40986
40987
40988
40989
40990
40991
40992  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40993    # For hotspot, we need these in Windows mixed path,
40994    # so rewrite them all. Need added .exe suffix.
40995    HOTSPOT_CXX="$CXX.exe"
40996    HOTSPOT_LD="$LD.exe"
40997    HOTSPOT_MT="$MT.exe"
40998    HOTSPOT_RC="$RC.exe"
40999
41000  unix_path="$HOTSPOT_CXX"
41001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41002    windows_path=`$CYGPATH -m "$unix_path"`
41003    HOTSPOT_CXX="$windows_path"
41004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41005    windows_path=`cmd //c echo $unix_path`
41006    HOTSPOT_CXX="$windows_path"
41007  fi
41008
41009
41010  unix_path="$HOTSPOT_LD"
41011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41012    windows_path=`$CYGPATH -m "$unix_path"`
41013    HOTSPOT_LD="$windows_path"
41014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41015    windows_path=`cmd //c echo $unix_path`
41016    HOTSPOT_LD="$windows_path"
41017  fi
41018
41019
41020  unix_path="$HOTSPOT_MT"
41021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41022    windows_path=`$CYGPATH -m "$unix_path"`
41023    HOTSPOT_MT="$windows_path"
41024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41025    windows_path=`cmd //c echo $unix_path`
41026    HOTSPOT_MT="$windows_path"
41027  fi
41028
41029
41030  unix_path="$HOTSPOT_RC"
41031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41032    windows_path=`$CYGPATH -m "$unix_path"`
41033    HOTSPOT_RC="$windows_path"
41034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41035    windows_path=`cmd //c echo $unix_path`
41036    HOTSPOT_RC="$windows_path"
41037  fi
41038
41039
41040
41041  else
41042    HOTSPOT_CXX="$CXX"
41043    HOTSPOT_LD="$LD"
41044  fi
41045
41046
41047
41048  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41049    USE_CLANG=true
41050  fi
41051
41052
41053  # LDEXE is the linker to use, when creating executables. Not really used.
41054  # FIXME: These should just be removed!
41055  LDEXE="$LD"
41056  LDEXECXX="$LDCXX"
41057
41058
41059
41060
41061
41062
41063  # The package path is used only on macosx?
41064  # FIXME: clean this up, and/or move it elsewhere.
41065  PACKAGE_PATH=/opt/local
41066
41067
41068  # Check for extra potential brokenness.
41069  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41070    # On Windows, double-check that we got the right compiler.
41071    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41072    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41073    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41074      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41075        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
41076      fi
41077    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41078      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41079        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41080      fi
41081    fi
41082  fi
41083
41084  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41085    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41086    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41087    # This is later checked when setting flags.
41088
41089    # "-Og" suppported for GCC 4.8 and later
41090    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41091
41092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41093$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41094  supports=yes
41095
41096  saved_cflags="$CFLAGS"
41097  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41098  ac_ext=c
41099ac_cpp='$CPP $CPPFLAGS'
41100ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41101ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41102ac_compiler_gnu=$ac_cv_c_compiler_gnu
41103
41104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41105/* end confdefs.h.  */
41106int i;
41107_ACEOF
41108if ac_fn_c_try_compile "$LINENO"; then :
41109
41110else
41111  supports=no
41112fi
41113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41114  ac_ext=cpp
41115ac_cpp='$CXXCPP $CPPFLAGS'
41116ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41117ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41118ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41119
41120  CFLAGS="$saved_cflags"
41121
41122  saved_cxxflags="$CXXFLAGS"
41123  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41124  ac_ext=cpp
41125ac_cpp='$CXXCPP $CPPFLAGS'
41126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41129
41130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41131/* end confdefs.h.  */
41132int i;
41133_ACEOF
41134if ac_fn_cxx_try_compile "$LINENO"; then :
41135
41136else
41137  supports=no
41138fi
41139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41140  ac_ext=cpp
41141ac_cpp='$CXXCPP $CPPFLAGS'
41142ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41143ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41144ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41145
41146  CXXFLAGS="$saved_cxxflags"
41147
41148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41149$as_echo "$supports" >&6; }
41150  if test "x$supports" = "xyes" ; then
41151    HAS_CFLAG_OPTIMIZE_DEBUG=true
41152  else
41153    HAS_CFLAG_OPTIMIZE_DEBUG=false
41154  fi
41155
41156
41157    # "-z relro" supported in GNU binutils 2.17 and later
41158    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41159
41160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41161$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41162  supports=yes
41163
41164  saved_ldflags="$LDFLAGS"
41165  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41166  ac_ext=c
41167ac_cpp='$CPP $CPPFLAGS'
41168ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41169ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41170ac_compiler_gnu=$ac_cv_c_compiler_gnu
41171
41172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41173/* end confdefs.h.  */
41174
41175int
41176main ()
41177{
41178
41179  ;
41180  return 0;
41181}
41182_ACEOF
41183if ac_fn_c_try_link "$LINENO"; then :
41184
41185else
41186  supports=no
41187fi
41188rm -f core conftest.err conftest.$ac_objext \
41189    conftest$ac_exeext conftest.$ac_ext
41190  ac_ext=cpp
41191ac_cpp='$CXXCPP $CPPFLAGS'
41192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41195
41196  LDFLAGS="$saved_ldflags"
41197
41198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41199$as_echo "$supports" >&6; }
41200  if test "x$supports" = "xyes" ; then
41201    HAS_LINKER_RELRO=true
41202  else
41203    HAS_LINKER_RELRO=false
41204  fi
41205
41206
41207    # "-z now" supported in GNU binutils 2.11 and later
41208    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41209
41210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41211$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41212  supports=yes
41213
41214  saved_ldflags="$LDFLAGS"
41215  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41216  ac_ext=c
41217ac_cpp='$CPP $CPPFLAGS'
41218ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41219ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41220ac_compiler_gnu=$ac_cv_c_compiler_gnu
41221
41222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41223/* end confdefs.h.  */
41224
41225int
41226main ()
41227{
41228
41229  ;
41230  return 0;
41231}
41232_ACEOF
41233if ac_fn_c_try_link "$LINENO"; then :
41234
41235else
41236  supports=no
41237fi
41238rm -f core conftest.err conftest.$ac_objext \
41239    conftest$ac_exeext conftest.$ac_ext
41240  ac_ext=cpp
41241ac_cpp='$CXXCPP $CPPFLAGS'
41242ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41243ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41244ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41245
41246  LDFLAGS="$saved_ldflags"
41247
41248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41249$as_echo "$supports" >&6; }
41250  if test "x$supports" = "xyes" ; then
41251    HAS_LINKER_NOW=true
41252  else
41253    HAS_LINKER_NOW=false
41254  fi
41255
41256  fi
41257
41258  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41259  # in executable.'
41260  USING_BROKEN_SUSE_LD=no
41261  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41263$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41264    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41265    $ECHO "int main() { }" > main.c
41266    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41268$as_echo "no" >&6; }
41269      USING_BROKEN_SUSE_LD=no
41270    else
41271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41272$as_echo "yes" >&6; }
41273      USING_BROKEN_SUSE_LD=yes
41274    fi
41275    rm -rf version-script.map main.c a.out
41276  fi
41277
41278
41279
41280# Setup the JTReg Regression Test Harness.
41281
41282
41283# Check whether --with-jtreg was given.
41284if test "${with_jtreg+set}" = set; then :
41285  withval=$with_jtreg;
41286else
41287  with_jtreg=no
41288fi
41289
41290
41291  if test "x$with_jtreg" = xno; then
41292    # jtreg disabled
41293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41294$as_echo_n "checking for jtreg... " >&6; }
41295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41296$as_echo "no" >&6; }
41297  else
41298    if test "x$with_jtreg" != xyes; then
41299      # with path specified.
41300      JT_HOME="$with_jtreg"
41301    fi
41302
41303    if test "x$JT_HOME" != x; then
41304      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41305$as_echo_n "checking for jtreg... " >&6; }
41306
41307      # use JT_HOME enviroment var.
41308
41309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41310
41311  # Input might be given as Windows format, start by converting to
41312  # unix format.
41313  path="$JT_HOME"
41314  new_path=`$CYGPATH -u "$path"`
41315
41316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41319  # "foo.exe" is OK but "foo" is an error.
41320  #
41321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41322  # It is also a way to make sure we got the proper file name for the real test later on.
41323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41324  if test "x$test_shortpath" = x; then
41325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41326$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41327    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41328  fi
41329
41330  # Call helper function which possibly converts this using DOS-style short mode.
41331  # If so, the updated path is stored in $new_path.
41332
41333  input_path="$new_path"
41334  # Check if we need to convert this using DOS-style short mode. If the path
41335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41336  # take no chances and rewrite it.
41337  # Note: m4 eats our [], so we need to use [ and ] instead.
41338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41339  if test "x$has_forbidden_chars" != x; then
41340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41344      # Going to short mode and back again did indeed matter. Since short mode is
41345      # case insensitive, let's make it lowercase to improve readability.
41346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41347      # Now convert it back to Unix-stile (cygpath)
41348      input_path=`$CYGPATH -u "$shortmode_path"`
41349      new_path="$input_path"
41350    fi
41351  fi
41352
41353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41354  if test "x$test_cygdrive_prefix" = x; then
41355    # As a simple fix, exclude /usr/bin since it's not a real path.
41356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41358      # a path prefixed by /cygdrive for fixpath to work.
41359      new_path="$CYGWIN_ROOT_PATH$input_path"
41360    fi
41361  fi
41362
41363
41364  if test "x$path" != "x$new_path"; then
41365    JT_HOME="$new_path"
41366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41367$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41368  fi
41369
41370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41371
41372  path="$JT_HOME"
41373  has_colon=`$ECHO $path | $GREP ^.:`
41374  new_path="$path"
41375  if test "x$has_colon" = x; then
41376    # Not in mixed or Windows style, start by that.
41377    new_path=`cmd //c echo $path`
41378  fi
41379
41380
41381  input_path="$new_path"
41382  # Check if we need to convert this using DOS-style short mode. If the path
41383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41384  # take no chances and rewrite it.
41385  # Note: m4 eats our [], so we need to use [ and ] instead.
41386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41387  if test "x$has_forbidden_chars" != x; then
41388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41390  fi
41391
41392
41393  windows_path="$new_path"
41394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41395    unix_path=`$CYGPATH -u "$windows_path"`
41396    new_path="$unix_path"
41397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41399    new_path="$unix_path"
41400  fi
41401
41402  if test "x$path" != "x$new_path"; then
41403    JT_HOME="$new_path"
41404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41405$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41406  fi
41407
41408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41410
41411  else
41412    # We're on a unix platform. Hooray! :)
41413    path="$JT_HOME"
41414    has_space=`$ECHO "$path" | $GREP " "`
41415    if test "x$has_space" != x; then
41416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41417$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41418      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41419    fi
41420
41421    # Use eval to expand a potential ~
41422    eval path="$path"
41423    if test ! -f "$path" && test ! -d "$path"; then
41424      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41425    fi
41426
41427    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41428  fi
41429
41430
41431      # jtreg win32 script works for everybody
41432      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41433
41434      if test ! -f "$JTREGEXE"; then
41435        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41436      fi
41437
41438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41439$as_echo "$JTREGEXE" >&6; }
41440    else
41441      # try to find jtreg on path
41442
41443
41444
41445  # Publish this variable in the help.
41446
41447
41448  if test "x$JTREGEXE" = x; then
41449    # The variable is not set by user, try to locate tool using the code snippet
41450    for ac_prog in jtreg
41451do
41452  # Extract the first word of "$ac_prog", so it can be a program name with args.
41453set dummy $ac_prog; ac_word=$2
41454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41455$as_echo_n "checking for $ac_word... " >&6; }
41456if ${ac_cv_path_JTREGEXE+:} false; then :
41457  $as_echo_n "(cached) " >&6
41458else
41459  case $JTREGEXE in
41460  [\\/]* | ?:[\\/]*)
41461  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41462  ;;
41463  *)
41464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41465for as_dir in $PATH
41466do
41467  IFS=$as_save_IFS
41468  test -z "$as_dir" && as_dir=.
41469    for ac_exec_ext in '' $ac_executable_extensions; do
41470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41471    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41473    break 2
41474  fi
41475done
41476  done
41477IFS=$as_save_IFS
41478
41479  ;;
41480esac
41481fi
41482JTREGEXE=$ac_cv_path_JTREGEXE
41483if test -n "$JTREGEXE"; then
41484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41485$as_echo "$JTREGEXE" >&6; }
41486else
41487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41488$as_echo "no" >&6; }
41489fi
41490
41491
41492  test -n "$JTREGEXE" && break
41493done
41494
41495  else
41496    # The variable is set, but is it from the command line or the environment?
41497
41498    # Try to remove the string !JTREGEXE! from our list.
41499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41501      # If it failed, the variable was not from the command line. Ignore it,
41502      # but warn the user (except for BASH, which is always set by the calling BASH).
41503      if test "xJTREGEXE" != xBASH; then
41504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41505$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41506      fi
41507      # Try to locate tool using the code snippet
41508      for ac_prog in jtreg
41509do
41510  # Extract the first word of "$ac_prog", so it can be a program name with args.
41511set dummy $ac_prog; ac_word=$2
41512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41513$as_echo_n "checking for $ac_word... " >&6; }
41514if ${ac_cv_path_JTREGEXE+:} false; then :
41515  $as_echo_n "(cached) " >&6
41516else
41517  case $JTREGEXE in
41518  [\\/]* | ?:[\\/]*)
41519  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41520  ;;
41521  *)
41522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41523for as_dir in $PATH
41524do
41525  IFS=$as_save_IFS
41526  test -z "$as_dir" && as_dir=.
41527    for ac_exec_ext in '' $ac_executable_extensions; do
41528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41529    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41531    break 2
41532  fi
41533done
41534  done
41535IFS=$as_save_IFS
41536
41537  ;;
41538esac
41539fi
41540JTREGEXE=$ac_cv_path_JTREGEXE
41541if test -n "$JTREGEXE"; then
41542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41543$as_echo "$JTREGEXE" >&6; }
41544else
41545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41546$as_echo "no" >&6; }
41547fi
41548
41549
41550  test -n "$JTREGEXE" && break
41551done
41552
41553    else
41554      # If it succeeded, then it was overridden by the user. We will use it
41555      # for the tool.
41556
41557      # First remove it from the list of overridden variables, so we can test
41558      # for unknown variables in the end.
41559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41560
41561      # Check if the provided tool contains a complete path.
41562      tool_specified="$JTREGEXE"
41563      tool_basename="${tool_specified##*/}"
41564      if test "x$tool_basename" = "x$tool_specified"; then
41565        # A command without a complete path is provided, search $PATH.
41566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41567$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41568        # Extract the first word of "$tool_basename", so it can be a program name with args.
41569set dummy $tool_basename; ac_word=$2
41570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41571$as_echo_n "checking for $ac_word... " >&6; }
41572if ${ac_cv_path_JTREGEXE+:} false; then :
41573  $as_echo_n "(cached) " >&6
41574else
41575  case $JTREGEXE in
41576  [\\/]* | ?:[\\/]*)
41577  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41578  ;;
41579  *)
41580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41581for as_dir in $PATH
41582do
41583  IFS=$as_save_IFS
41584  test -z "$as_dir" && as_dir=.
41585    for ac_exec_ext in '' $ac_executable_extensions; do
41586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41587    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41589    break 2
41590  fi
41591done
41592  done
41593IFS=$as_save_IFS
41594
41595  ;;
41596esac
41597fi
41598JTREGEXE=$ac_cv_path_JTREGEXE
41599if test -n "$JTREGEXE"; then
41600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41601$as_echo "$JTREGEXE" >&6; }
41602else
41603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41604$as_echo "no" >&6; }
41605fi
41606
41607
41608        if test "x$JTREGEXE" = x; then
41609          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41610        fi
41611      else
41612        # Otherwise we believe it is a complete path. Use it as it is.
41613        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41614$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41616$as_echo_n "checking for JTREGEXE... " >&6; }
41617        if test ! -x "$tool_specified"; then
41618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41619$as_echo "not found" >&6; }
41620          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41621        fi
41622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41623$as_echo "$tool_specified" >&6; }
41624      fi
41625    fi
41626  fi
41627
41628
41629
41630  if test "x$JTREGEXE" = x; then
41631    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41632  fi
41633
41634
41635      JT_HOME="`$DIRNAME $JTREGEXE`"
41636    fi
41637  fi
41638
41639
41640
41641
41642
41643
41644  # Option used to tell the compiler whether to create 32- or 64-bit executables
41645  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41646    COMPILER_TARGET_BITS_FLAG="-q"
41647  else
41648    COMPILER_TARGET_BITS_FLAG="-m"
41649  fi
41650
41651
41652  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41653  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41654    ARFLAGS="-r"
41655  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41656    ARFLAGS="-X64"
41657  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41658    # lib.exe is used as AR to create static libraries.
41659    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41660  else
41661    ARFLAGS=""
41662  fi
41663
41664
41665  ## Setup strip.
41666  # FIXME: should this really be per platform, or should it be per toolchain type?
41667  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41668  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41669  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41670    STRIPFLAGS="-g"
41671  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41672    STRIPFLAGS="-x"
41673  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41674    STRIPFLAGS="-S"
41675  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41676    STRIPFLAGS="-X32_64"
41677  fi
41678
41679  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41680    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41681  fi
41682
41683
41684  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41685    # FIXME: break out into MCSFLAGS
41686    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41687  fi
41688
41689
41690  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41691    CC_OUT_OPTION=-Fo
41692    EXE_OUT_OPTION=-out:
41693    LD_OUT_OPTION=-out:
41694    AR_OUT_OPTION=-out:
41695  else
41696    # The option used to specify the target .o,.a or .so file.
41697    # When compiling, how to specify the to be created object file.
41698    CC_OUT_OPTION='-o$(SPACE)'
41699    # When linking, how to specify the to be created executable.
41700    EXE_OUT_OPTION='-o$(SPACE)'
41701    # When linking, how to specify the to be created dynamically linkable library.
41702    LD_OUT_OPTION='-o$(SPACE)'
41703    # When archiving, how to specify the to be create static archive for object files.
41704    AR_OUT_OPTION='rcs$(SPACE)'
41705  fi
41706
41707
41708
41709
41710
41711  # On Windows, we need to set RC flags.
41712  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41713    RC_FLAGS="-nologo -l0x409"
41714    if test "x$VARIANT" = xOPT; then
41715      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41716    fi
41717
41718    # The version variables used to create RC_FLAGS may be overridden
41719    # in a custom configure script, or possibly the command line.
41720    # Let those variables be expanded at make time in spec.gmk.
41721    # The \$ are escaped to the shell, and the $(...) variables
41722    # are evaluated by make.
41723    RC_FLAGS="$RC_FLAGS \
41724        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41725        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41726        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41727        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41728        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41729        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41730        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41731  fi
41732
41733
41734  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41735    # silence copyright notice and other headers.
41736    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41737  fi
41738
41739  if test "x$SYSROOT" != "x"; then
41740    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41741      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41742        # Solaris Studio does not have a concept of sysroot. Instead we must
41743        # make sure the default include and lib dirs are appended to each
41744        # compile and link command line.
41745        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41746        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41747            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41748            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41749      fi
41750    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41751      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41752      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41753      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41754    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41755      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41756      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41757    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41758      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41759      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41760    fi
41761    # Propagate the sysroot args to hotspot
41762    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41763    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41764    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41765  fi
41766
41767  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41768  # set this here so it doesn't have to be peppered throughout the forest
41769  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41770    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41771    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41772  fi
41773
41774
41775
41776
41777
41778# FIXME: Currently we must test this after toolchain but before flags. Fix!
41779
41780# Now we can test some aspects on the target using configure macros.
41781
41782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41783$as_echo_n "checking for ANSI C header files... " >&6; }
41784if ${ac_cv_header_stdc+:} false; then :
41785  $as_echo_n "(cached) " >&6
41786else
41787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41788/* end confdefs.h.  */
41789#include <stdlib.h>
41790#include <stdarg.h>
41791#include <string.h>
41792#include <float.h>
41793
41794int
41795main ()
41796{
41797
41798  ;
41799  return 0;
41800}
41801_ACEOF
41802if ac_fn_cxx_try_compile "$LINENO"; then :
41803  ac_cv_header_stdc=yes
41804else
41805  ac_cv_header_stdc=no
41806fi
41807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41808
41809if test $ac_cv_header_stdc = yes; then
41810  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41812/* end confdefs.h.  */
41813#include <string.h>
41814
41815_ACEOF
41816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41817  $EGREP "memchr" >/dev/null 2>&1; then :
41818
41819else
41820  ac_cv_header_stdc=no
41821fi
41822rm -f conftest*
41823
41824fi
41825
41826if test $ac_cv_header_stdc = yes; then
41827  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41829/* end confdefs.h.  */
41830#include <stdlib.h>
41831
41832_ACEOF
41833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41834  $EGREP "free" >/dev/null 2>&1; then :
41835
41836else
41837  ac_cv_header_stdc=no
41838fi
41839rm -f conftest*
41840
41841fi
41842
41843if test $ac_cv_header_stdc = yes; then
41844  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41845  if test "$cross_compiling" = yes; then :
41846  :
41847else
41848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41849/* end confdefs.h.  */
41850#include <ctype.h>
41851#include <stdlib.h>
41852#if ((' ' & 0x0FF) == 0x020)
41853# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41854# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41855#else
41856# define ISLOWER(c) \
41857		   (('a' <= (c) && (c) <= 'i') \
41858		     || ('j' <= (c) && (c) <= 'r') \
41859		     || ('s' <= (c) && (c) <= 'z'))
41860# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41861#endif
41862
41863#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41864int
41865main ()
41866{
41867  int i;
41868  for (i = 0; i < 256; i++)
41869    if (XOR (islower (i), ISLOWER (i))
41870	|| toupper (i) != TOUPPER (i))
41871      return 2;
41872  return 0;
41873}
41874_ACEOF
41875if ac_fn_cxx_try_run "$LINENO"; then :
41876
41877else
41878  ac_cv_header_stdc=no
41879fi
41880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41881  conftest.$ac_objext conftest.beam conftest.$ac_ext
41882fi
41883
41884fi
41885fi
41886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41887$as_echo "$ac_cv_header_stdc" >&6; }
41888if test $ac_cv_header_stdc = yes; then
41889
41890$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41891
41892fi
41893
41894# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41895for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41896		  inttypes.h stdint.h unistd.h
41897do :
41898  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41899ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41900"
41901if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41902  cat >>confdefs.h <<_ACEOF
41903#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41904_ACEOF
41905
41906fi
41907
41908done
41909
41910
41911
41912  ###############################################################################
41913  #
41914  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41915  # (The JVM can use 32 or 64 bit Java pointers but that decision
41916  # is made at runtime.)
41917  #
41918
41919  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41920    # Always specify -m flag on Solaris
41921    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41922
41923  # When we add flags to the "official" CFLAGS etc, we need to
41924  # keep track of these additions in ADDED_CFLAGS etc. These
41925  # will later be checked to make sure only controlled additions
41926  # have been made to CFLAGS etc.
41927  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41928  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41929  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41930
41931  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41932  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41933  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41934
41935  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41936  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41937  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41938
41939  elif test "x$COMPILE_TYPE" = xreduced; then
41940    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41941      # Specify -m if running reduced on unix platforms
41942
41943  # When we add flags to the "official" CFLAGS etc, we need to
41944  # keep track of these additions in ADDED_CFLAGS etc. These
41945  # will later be checked to make sure only controlled additions
41946  # have been made to CFLAGS etc.
41947  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41948  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41949  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41950
41951  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41952  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41953  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41954
41955  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41956  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41957  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41958
41959    fi
41960  fi
41961
41962  # Make compilation sanity check
41963  for ac_header in stdio.h
41964do :
41965  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41966if test "x$ac_cv_header_stdio_h" = xyes; then :
41967  cat >>confdefs.h <<_ACEOF
41968#define HAVE_STDIO_H 1
41969_ACEOF
41970
41971else
41972
41973    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41974$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41975    if test "x$COMPILE_TYPE" = xreduced; then
41976      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41977$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41978    elif test "x$COMPILE_TYPE" = xcross; then
41979      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41980$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41981    fi
41982    as_fn_error $? "Cannot continue." "$LINENO" 5
41983
41984fi
41985
41986done
41987
41988
41989  # The cast to long int works around a bug in the HP C Compiler
41990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41992# This bug is HP SR number 8606223364.
41993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41994$as_echo_n "checking size of int *... " >&6; }
41995if ${ac_cv_sizeof_int_p+:} false; then :
41996  $as_echo_n "(cached) " >&6
41997else
41998  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41999
42000else
42001  if test "$ac_cv_type_int_p" = yes; then
42002     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42004as_fn_error 77 "cannot compute sizeof (int *)
42005See \`config.log' for more details" "$LINENO" 5; }
42006   else
42007     ac_cv_sizeof_int_p=0
42008   fi
42009fi
42010
42011fi
42012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42013$as_echo "$ac_cv_sizeof_int_p" >&6; }
42014
42015
42016
42017cat >>confdefs.h <<_ACEOF
42018#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42019_ACEOF
42020
42021
42022
42023  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42024  if test "x$ac_cv_sizeof_int_p" = x; then
42025    # The test failed, lets stick to the assumed value.
42026    { $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
42027$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42028  else
42029    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42030
42031    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42032      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42033      # Let's try to implicitely set the compilers target architecture and retry the test
42034      { $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
42035$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;}
42036      { $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
42037$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;}
42038
42039  # When we add flags to the "official" CFLAGS etc, we need to
42040  # keep track of these additions in ADDED_CFLAGS etc. These
42041  # will later be checked to make sure only controlled additions
42042  # have been made to CFLAGS etc.
42043  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42044  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42045  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42046
42047  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42048  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42049  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42050
42051  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42052  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42053  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42054
42055
42056      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42057      unset ac_cv_sizeof_int_p
42058      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42059      cat >>confdefs.h <<_ACEOF
42060#undef SIZEOF_INT_P
42061_ACEOF
42062
42063      # The cast to long int works around a bug in the HP C Compiler
42064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42066# This bug is HP SR number 8606223364.
42067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42068$as_echo_n "checking size of int *... " >&6; }
42069if ${ac_cv_sizeof_int_p+:} false; then :
42070  $as_echo_n "(cached) " >&6
42071else
42072  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42073
42074else
42075  if test "$ac_cv_type_int_p" = yes; then
42076     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42078as_fn_error 77 "cannot compute sizeof (int *)
42079See \`config.log' for more details" "$LINENO" 5; }
42080   else
42081     ac_cv_sizeof_int_p=0
42082   fi
42083fi
42084
42085fi
42086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42087$as_echo "$ac_cv_sizeof_int_p" >&6; }
42088
42089
42090
42091cat >>confdefs.h <<_ACEOF
42092#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42093_ACEOF
42094
42095
42096
42097      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42098
42099      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42100        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
42101      fi
42102    fi
42103  fi
42104
42105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42106$as_echo_n "checking for target address size... " >&6; }
42107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42108$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42109
42110
42111  ###############################################################################
42112  #
42113  # Is the target little of big endian?
42114  #
42115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42116$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42117if ${ac_cv_c_bigendian+:} false; then :
42118  $as_echo_n "(cached) " >&6
42119else
42120  ac_cv_c_bigendian=unknown
42121    # See if we're dealing with a universal compiler.
42122    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42123/* end confdefs.h.  */
42124#ifndef __APPLE_CC__
42125	       not a universal capable compiler
42126	     #endif
42127	     typedef int dummy;
42128
42129_ACEOF
42130if ac_fn_cxx_try_compile "$LINENO"; then :
42131
42132	# Check for potential -arch flags.  It is not universal unless
42133	# there are at least two -arch flags with different values.
42134	ac_arch=
42135	ac_prev=
42136	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42137	 if test -n "$ac_prev"; then
42138	   case $ac_word in
42139	     i?86 | x86_64 | ppc | ppc64)
42140	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42141		 ac_arch=$ac_word
42142	       else
42143		 ac_cv_c_bigendian=universal
42144		 break
42145	       fi
42146	       ;;
42147	   esac
42148	   ac_prev=
42149	 elif test "x$ac_word" = "x-arch"; then
42150	   ac_prev=arch
42151	 fi
42152       done
42153fi
42154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42155    if test $ac_cv_c_bigendian = unknown; then
42156      # See if sys/param.h defines the BYTE_ORDER macro.
42157      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42158/* end confdefs.h.  */
42159#include <sys/types.h>
42160	     #include <sys/param.h>
42161
42162int
42163main ()
42164{
42165#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42166		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42167		     && LITTLE_ENDIAN)
42168	      bogus endian macros
42169	     #endif
42170
42171  ;
42172  return 0;
42173}
42174_ACEOF
42175if ac_fn_cxx_try_compile "$LINENO"; then :
42176  # It does; now see whether it defined to BIG_ENDIAN or not.
42177	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42178/* end confdefs.h.  */
42179#include <sys/types.h>
42180		#include <sys/param.h>
42181
42182int
42183main ()
42184{
42185#if BYTE_ORDER != BIG_ENDIAN
42186		 not big endian
42187		#endif
42188
42189  ;
42190  return 0;
42191}
42192_ACEOF
42193if ac_fn_cxx_try_compile "$LINENO"; then :
42194  ac_cv_c_bigendian=yes
42195else
42196  ac_cv_c_bigendian=no
42197fi
42198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42199fi
42200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42201    fi
42202    if test $ac_cv_c_bigendian = unknown; then
42203      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42204      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42205/* end confdefs.h.  */
42206#include <limits.h>
42207
42208int
42209main ()
42210{
42211#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42212	      bogus endian macros
42213	     #endif
42214
42215  ;
42216  return 0;
42217}
42218_ACEOF
42219if ac_fn_cxx_try_compile "$LINENO"; then :
42220  # It does; now see whether it defined to _BIG_ENDIAN or not.
42221	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42222/* end confdefs.h.  */
42223#include <limits.h>
42224
42225int
42226main ()
42227{
42228#ifndef _BIG_ENDIAN
42229		 not big endian
42230		#endif
42231
42232  ;
42233  return 0;
42234}
42235_ACEOF
42236if ac_fn_cxx_try_compile "$LINENO"; then :
42237  ac_cv_c_bigendian=yes
42238else
42239  ac_cv_c_bigendian=no
42240fi
42241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42242fi
42243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42244    fi
42245    if test $ac_cv_c_bigendian = unknown; then
42246      # Compile a test program.
42247      if test "$cross_compiling" = yes; then :
42248  # Try to guess by grepping values from an object file.
42249	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42250/* end confdefs.h.  */
42251short int ascii_mm[] =
42252		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42253		short int ascii_ii[] =
42254		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42255		int use_ascii (int i) {
42256		  return ascii_mm[i] + ascii_ii[i];
42257		}
42258		short int ebcdic_ii[] =
42259		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42260		short int ebcdic_mm[] =
42261		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42262		int use_ebcdic (int i) {
42263		  return ebcdic_mm[i] + ebcdic_ii[i];
42264		}
42265		extern int foo;
42266
42267int
42268main ()
42269{
42270return use_ascii (foo) == use_ebcdic (foo);
42271  ;
42272  return 0;
42273}
42274_ACEOF
42275if ac_fn_cxx_try_compile "$LINENO"; then :
42276  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42277	      ac_cv_c_bigendian=yes
42278	    fi
42279	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42280	      if test "$ac_cv_c_bigendian" = unknown; then
42281		ac_cv_c_bigendian=no
42282	      else
42283		# finding both strings is unlikely to happen, but who knows?
42284		ac_cv_c_bigendian=unknown
42285	      fi
42286	    fi
42287fi
42288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42289else
42290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42291/* end confdefs.h.  */
42292$ac_includes_default
42293int
42294main ()
42295{
42296
42297	     /* Are we little or big endian?  From Harbison&Steele.  */
42298	     union
42299	     {
42300	       long int l;
42301	       char c[sizeof (long int)];
42302	     } u;
42303	     u.l = 1;
42304	     return u.c[sizeof (long int) - 1] == 1;
42305
42306  ;
42307  return 0;
42308}
42309_ACEOF
42310if ac_fn_cxx_try_run "$LINENO"; then :
42311  ac_cv_c_bigendian=no
42312else
42313  ac_cv_c_bigendian=yes
42314fi
42315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42316  conftest.$ac_objext conftest.beam conftest.$ac_ext
42317fi
42318
42319    fi
42320fi
42321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42322$as_echo "$ac_cv_c_bigendian" >&6; }
42323 case $ac_cv_c_bigendian in #(
42324   yes)
42325     ENDIAN="big";; #(
42326   no)
42327     ENDIAN="little" ;; #(
42328   universal)
42329     ENDIAN="universal_endianness"
42330     ;; #(
42331   *)
42332     ENDIAN="unknown" ;;
42333 esac
42334
42335
42336  if test "x$ENDIAN" = xuniversal_endianness; then
42337    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42338  fi
42339  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42340    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
42341  fi
42342
42343
42344# Configure flags for the tools
42345
42346  ###############################################################################
42347  #
42348  # How to compile shared libraries.
42349  #
42350
42351  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42352    PICFLAG="-fPIC"
42353    C_FLAG_REORDER=''
42354    CXX_FLAG_REORDER=''
42355
42356    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42357      # Linking is different on MacOSX
42358      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42359      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42360      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42361      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42362      SET_SHARED_LIBRARY_MAPFILE=''
42363    else
42364      # Default works for linux, might work on other platforms as well.
42365      SHARED_LIBRARY_FLAGS='-shared'
42366      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42367      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42368      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42369      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42370    fi
42371  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42372    PICFLAG=''
42373    C_FLAG_REORDER=''
42374    CXX_FLAG_REORDER=''
42375
42376    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42377      # Linking is different on MacOSX
42378      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42379      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42380      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42381      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42382      SET_SHARED_LIBRARY_MAPFILE=''
42383    else
42384      # Default works for linux, might work on other platforms as well.
42385      SHARED_LIBRARY_FLAGS='-shared'
42386      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42387      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42388      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42389      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42390    fi
42391  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42392    PICFLAG="-KPIC"
42393    C_FLAG_REORDER='-xF'
42394    CXX_FLAG_REORDER='-xF'
42395    SHARED_LIBRARY_FLAGS="-G"
42396    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42397    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42398    SET_SHARED_LIBRARY_NAME=''
42399    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42400  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42401    PICFLAG="-qpic=large"
42402    C_FLAG_REORDER=''
42403    CXX_FLAG_REORDER=''
42404    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42405    SET_EXECUTABLE_ORIGIN=""
42406    SET_SHARED_LIBRARY_ORIGIN=''
42407    SET_SHARED_LIBRARY_NAME=''
42408    SET_SHARED_LIBRARY_MAPFILE=''
42409  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42410    PICFLAG=""
42411    C_FLAG_REORDER=''
42412    CXX_FLAG_REORDER=''
42413    SHARED_LIBRARY_FLAGS="-LD"
42414    SET_EXECUTABLE_ORIGIN=''
42415    SET_SHARED_LIBRARY_ORIGIN=''
42416    SET_SHARED_LIBRARY_NAME=''
42417    SET_SHARED_LIBRARY_MAPFILE=''
42418  fi
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42429    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42430    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42431    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42432  fi
42433  # The (cross) compiler is now configured, we can now test capabilities
42434  # of the target platform.
42435
42436
42437
42438  ###############################################################################
42439  #
42440  # Setup the opt flags for different compilers
42441  # and different operating systems.
42442  #
42443
42444  # FIXME: this was indirectly the old default, but just inherited.
42445  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42446  #   C_FLAG_DEPS="-MMD -MF"
42447  # fi
42448
42449  # Generate make dependency files
42450  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42451    C_FLAG_DEPS="-MMD -MF"
42452  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42453    C_FLAG_DEPS="-MMD -MF"
42454  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42455    C_FLAG_DEPS="-xMMD -xMF"
42456  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42457    C_FLAG_DEPS="-qmakedep=gcc -MF"
42458  fi
42459  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42460
42461
42462
42463  # Debug symbols
42464  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42465    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42466      # reduce from default "-g2" option to save space
42467      CFLAGS_DEBUG_SYMBOLS="-g1"
42468      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42469    else
42470      CFLAGS_DEBUG_SYMBOLS="-g"
42471      CXXFLAGS_DEBUG_SYMBOLS="-g"
42472    fi
42473  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42474    CFLAGS_DEBUG_SYMBOLS="-g"
42475    CXXFLAGS_DEBUG_SYMBOLS="-g"
42476  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42477    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42478    # FIXME: likely a bug, this disables debug symbols rather than enables them
42479    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42480  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42481    CFLAGS_DEBUG_SYMBOLS="-g"
42482    CXXFLAGS_DEBUG_SYMBOLS="-g"
42483  fi
42484
42485
42486
42487  # bounds, memory and behavior checking options
42488  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42489    case $DEBUG_LEVEL in
42490    release )
42491      # no adjustment
42492      ;;
42493    fastdebug )
42494      # no adjustment
42495      ;;
42496    slowdebug )
42497      # Add runtime stack smashing and undefined behavior checks
42498      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42499      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42500      ;;
42501    esac
42502  fi
42503
42504
42505
42506  # Optimization levels
42507  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42508    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42509
42510    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42511      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42512      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42513      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42514      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42515      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42516      C_O_FLAG_NONE="-xregs=no%frameptr"
42517      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42518      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42519      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42520      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42521      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42522      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42523        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42524        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42525      fi
42526    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42527      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42528      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42529      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42530      C_O_FLAG_DEBUG=""
42531      C_O_FLAG_NONE=""
42532      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42533      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42534      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42535      C_O_FLAG_DEBUG=""
42536      CXX_O_FLAG_NONE=""
42537    fi
42538  else
42539    # The remaining toolchains share opt flags between CC and CXX;
42540    # setup for C and duplicate afterwards.
42541    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42542      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42543        # On MacOSX we optimize for size, something
42544        # we should do for all platforms?
42545        C_O_FLAG_HIGHEST="-Os"
42546        C_O_FLAG_HI="-Os"
42547        C_O_FLAG_NORM="-Os"
42548      else
42549        C_O_FLAG_HIGHEST="-O3"
42550        C_O_FLAG_HI="-O3"
42551        C_O_FLAG_NORM="-O2"
42552      fi
42553      C_O_FLAG_DEBUG="-O0"
42554      C_O_FLAG_NONE="-O0"
42555    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42556      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42557        # On MacOSX we optimize for size, something
42558        # we should do for all platforms?
42559        C_O_FLAG_HIGHEST="-Os"
42560        C_O_FLAG_HI="-Os"
42561        C_O_FLAG_NORM="-Os"
42562      else
42563        C_O_FLAG_HIGHEST="-O3"
42564        C_O_FLAG_HI="-O3"
42565        C_O_FLAG_NORM="-O2"
42566      fi
42567      C_O_FLAG_DEBUG="-O0"
42568      C_O_FLAG_NONE="-O0"
42569    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42570      C_O_FLAG_HIGHEST="-O3"
42571      C_O_FLAG_HI="-O3 -qstrict"
42572      C_O_FLAG_NORM="-O2"
42573      C_O_FLAG_DEBUG="-qnoopt"
42574      C_O_FLAG_NONE="-qnoop"
42575    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42576      C_O_FLAG_HIGHEST="-O2"
42577      C_O_FLAG_HI="-O1"
42578      C_O_FLAG_NORM="-O1"
42579      C_O_FLAG_DEBUG="-Od"
42580      C_O_FLAG_NONE="-Od"
42581    fi
42582    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42583    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42584    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42585    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42586    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42587  fi
42588
42589  # Adjust optimization flags according to debug level.
42590  case $DEBUG_LEVEL in
42591    release )
42592      # no adjustment
42593      ;;
42594    fastdebug )
42595      # Not quite so much optimization
42596      C_O_FLAG_HI="$C_O_FLAG_NORM"
42597      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42598      ;;
42599    slowdebug )
42600      # Disable optimization
42601      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42602      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42603      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42604      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42605      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42606      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42607      ;;
42608  esac
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622  # Special extras...
42623  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42624    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42625      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42626      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42627    fi
42628  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42629    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42630    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42631    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42632  fi
42633
42634  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42635    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42636$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42637  fi
42638
42639  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42641$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42642  fi
42643
42644  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42646$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42647  fi
42648
42649
42650# Check whether --with-extra-cflags was given.
42651if test "${with_extra_cflags+set}" = set; then :
42652  withval=$with_extra_cflags;
42653fi
42654
42655
42656
42657# Check whether --with-extra-cxxflags was given.
42658if test "${with_extra_cxxflags+set}" = set; then :
42659  withval=$with_extra_cxxflags;
42660fi
42661
42662
42663
42664# Check whether --with-extra-ldflags was given.
42665if test "${with_extra_ldflags+set}" = set; then :
42666  withval=$with_extra_ldflags;
42667fi
42668
42669
42670  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42671  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42672  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42673
42674  # Hotspot needs these set in their legacy form
42675  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42676  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42677  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42678
42679
42680
42681
42682
42683  ###############################################################################
42684  #
42685  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42686  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42687  #
42688
42689  # Setup compiler/platform specific flags into
42690  #    CFLAGS_JDK    - C Compiler flags
42691  #    CXXFLAGS_JDK  - C++ Compiler flags
42692  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42693  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42694    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42695        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42696    case $OPENJDK_TARGET_CPU_ARCH in
42697      arm )
42698        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42699        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42700        ;;
42701      ppc )
42702        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42703        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42704        ;;
42705      * )
42706        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42707        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42708        ;;
42709    esac
42710  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42711    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42712    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42713      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42714      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42715    fi
42716
42717    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42718    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42719  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42720    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42721    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42722  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42723    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42724        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42725        -DWIN32_LEAN_AND_MEAN \
42726        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42727        -DWIN32 -DIAL"
42728    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42729      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42730    else
42731      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42732    fi
42733    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42734    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42735    # studio.
42736    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42737      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42738          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42739    fi
42740  fi
42741
42742  ###############################################################################
42743
42744  # Adjust flags according to debug level.
42745  case $DEBUG_LEVEL in
42746    fastdebug | slowdebug )
42747      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42748      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42749      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42750      ;;
42751    release )
42752      ;;
42753    * )
42754      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42755      ;;
42756  esac
42757
42758  # Setup LP64
42759  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42760
42761  # Set some common defines. These works for all compilers, but assume
42762  # -D is universally accepted.
42763
42764  # Setup endianness
42765  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42766    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42767    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42768    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42769    #   Note: -Dmacro         is the same as    #define macro 1
42770    #         -Dmacro=        is the same as    #define macro
42771    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42772      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42773    else
42774      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42775    fi
42776  else
42777    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42778    # are defined in the system?
42779    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42780      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42781    else
42782      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42783    fi
42784  fi
42785
42786  # Setup target OS define. Use OS target name but in upper case.
42787  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42788  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42789
42790  # Setup target CPU
42791  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42792
42793  # Setup debug/release defines
42794  if test "x$DEBUG_LEVEL" = xrelease; then
42795    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42796    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42797      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42798    fi
42799  else
42800    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42801  fi
42802
42803  # Setup release name
42804  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42805
42806
42807  # Set some additional per-OS defines.
42808  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42809    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42810  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42811    # FIXME: PPC64 should not be here.
42812    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42813  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42814    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42815  fi
42816
42817  # Additional macosx handling
42818  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42819    # Setting these parameters makes it an error to link to macosx APIs that are
42820    # newer than the given OS version and makes the linked binaries compatible
42821    # even if built on a newer version of the OS.
42822    # The expected format is X.Y.Z
42823    MACOSX_VERSION_MIN=10.7.0
42824
42825
42826    # The macro takes the version with no dots, ex: 1070
42827    # Let the flags variables get resolved in make for easier override on make
42828    # command line.
42829    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42830    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42831  fi
42832
42833  # Setup some hard coded includes
42834  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42835      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42836      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42837      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42838
42839  # The shared libraries are compiled using the picflag.
42840  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42841  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42842
42843  # Executable flags
42844  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42845  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42846
42847
42848
42849
42850
42851
42852  # Setup LDFLAGS et al.
42853  #
42854
42855  # Now this is odd. The JDK native libraries have to link against libjvm.so
42856  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42857  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42858  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42859  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42860  # libraries will link to whatever is in memory. Yuck.
42861  #
42862  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42863  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42864    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42865    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42866      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42867    fi
42868    # TODO: make -debug optional "--disable-full-debug-symbols"
42869    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42870  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42871    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42872    # We have previously set HAS_GNU_HASH if this is the case
42873    if test -n "$HAS_GNU_HASH"; then
42874      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42875    fi
42876    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42877      # And since we now know that the linker is gnu, then add -z defs, to forbid
42878      # undefined symbols in object files.
42879      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42880      case $DEBUG_LEVEL in
42881        release )
42882          # tell linker to optimize libraries.
42883          # Should this be supplied to the OSS linker as well?
42884          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42885          ;;
42886        slowdebug )
42887          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42888            # do relocations at load
42889            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42890            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42891          fi
42892          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42893            # mark relocations read only
42894            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42895            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42896          fi
42897          ;;
42898        fastdebug )
42899          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42900            # mark relocations read only
42901            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42902            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42903          fi
42904          ;;
42905        * )
42906          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42907          ;;
42908        esac
42909    fi
42910  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42911    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42912    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42913  fi
42914
42915  # Customize LDFLAGS for executables
42916
42917  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42918
42919  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42920    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42921      LDFLAGS_STACK_SIZE=1048576
42922    else
42923      LDFLAGS_STACK_SIZE=327680
42924    fi
42925    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42926  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42927    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42928  fi
42929
42930  # Customize LDFLAGS for libs
42931  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42932
42933  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42934    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42935    LDFLAGS_JDKLIB_SUFFIX=""
42936  else
42937    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42938        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42939
42940    # On some platforms (mac) the linker warns about non existing -L dirs.
42941    # Add server first if available. Linking aginst client does not always produce the same results.
42942    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42943    # Default to server for other variants.
42944    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42945      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42946    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42947      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42948    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42949      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42950    else
42951      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42952    fi
42953
42954    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42955    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42956      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42957    fi
42958  fi
42959
42960
42961
42962
42963
42964
42965
42966
42967  # Some Zero and Shark settings.
42968  # ZERO_ARCHFLAG tells the compiler which mode to build for
42969  case "${OPENJDK_TARGET_CPU}" in
42970    s390)
42971      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42972      ;;
42973    *)
42974      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42975  esac
42976
42977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42978$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42979  supports=yes
42980
42981  saved_cflags="$CFLAGS"
42982  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42983  ac_ext=c
42984ac_cpp='$CPP $CPPFLAGS'
42985ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42986ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42987ac_compiler_gnu=$ac_cv_c_compiler_gnu
42988
42989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42990/* end confdefs.h.  */
42991int i;
42992_ACEOF
42993if ac_fn_c_try_compile "$LINENO"; then :
42994
42995else
42996  supports=no
42997fi
42998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42999  ac_ext=cpp
43000ac_cpp='$CXXCPP $CPPFLAGS'
43001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43004
43005  CFLAGS="$saved_cflags"
43006
43007  saved_cxxflags="$CXXFLAGS"
43008  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43009  ac_ext=cpp
43010ac_cpp='$CXXCPP $CPPFLAGS'
43011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43014
43015  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43016/* end confdefs.h.  */
43017int i;
43018_ACEOF
43019if ac_fn_cxx_try_compile "$LINENO"; then :
43020
43021else
43022  supports=no
43023fi
43024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43025  ac_ext=cpp
43026ac_cpp='$CXXCPP $CPPFLAGS'
43027ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43028ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43029ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43030
43031  CXXFLAGS="$saved_cxxflags"
43032
43033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43034$as_echo "$supports" >&6; }
43035  if test "x$supports" = "xyes" ; then
43036    :
43037  else
43038    ZERO_ARCHFLAG=""
43039  fi
43040
43041
43042
43043  # Check that the compiler supports -mX (or -qX on AIX) flags
43044  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43045
43046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43047$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43048  supports=yes
43049
43050  saved_cflags="$CFLAGS"
43051  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43052  ac_ext=c
43053ac_cpp='$CPP $CPPFLAGS'
43054ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43055ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43056ac_compiler_gnu=$ac_cv_c_compiler_gnu
43057
43058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43059/* end confdefs.h.  */
43060int i;
43061_ACEOF
43062if ac_fn_c_try_compile "$LINENO"; then :
43063
43064else
43065  supports=no
43066fi
43067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43068  ac_ext=cpp
43069ac_cpp='$CXXCPP $CPPFLAGS'
43070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43073
43074  CFLAGS="$saved_cflags"
43075
43076  saved_cxxflags="$CXXFLAGS"
43077  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43078  ac_ext=cpp
43079ac_cpp='$CXXCPP $CPPFLAGS'
43080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43083
43084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43085/* end confdefs.h.  */
43086int i;
43087_ACEOF
43088if ac_fn_cxx_try_compile "$LINENO"; then :
43089
43090else
43091  supports=no
43092fi
43093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43094  ac_ext=cpp
43095ac_cpp='$CXXCPP $CPPFLAGS'
43096ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43097ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43098ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43099
43100  CXXFLAGS="$saved_cxxflags"
43101
43102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43103$as_echo "$supports" >&6; }
43104  if test "x$supports" = "xyes" ; then
43105    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43106  else
43107    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43108  fi
43109
43110
43111
43112  case "${TOOLCHAIN_TYPE}" in
43113    microsoft)
43114      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43115      ;;
43116    solstudio)
43117      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43118      ;;
43119    gcc)
43120      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43121      ;;
43122    clang)
43123      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43124      ;;
43125  esac
43126
43127
43128
43129# Setup debug symbols (need objcopy from the toolchain for that)
43130
43131  #
43132  # ENABLE_DEBUG_SYMBOLS
43133  # This must be done after the toolchain is setup, since we're looking at objcopy.
43134  #
43135  # Check whether --enable-debug-symbols was given.
43136if test "${enable_debug_symbols+set}" = set; then :
43137  enableval=$enable_debug_symbols;
43138fi
43139
43140
43141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43142$as_echo_n "checking if we should generate debug symbols... " >&6; }
43143
43144  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43145    # explicit enabling of enable-debug-symbols and can't find objcopy
43146    #   this is an error
43147    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43148  fi
43149
43150  if test "x$enable_debug_symbols" = "xyes"; then
43151    ENABLE_DEBUG_SYMBOLS=true
43152  elif test "x$enable_debug_symbols" = "xno"; then
43153    ENABLE_DEBUG_SYMBOLS=false
43154  else
43155    # Default is on if objcopy is found
43156    if test "x$OBJCOPY" != x; then
43157      ENABLE_DEBUG_SYMBOLS=true
43158    # MacOS X and Windows don't use objcopy but default is on for those OSes
43159    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43160      ENABLE_DEBUG_SYMBOLS=true
43161    else
43162      ENABLE_DEBUG_SYMBOLS=false
43163    fi
43164  fi
43165
43166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43167$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43168
43169  #
43170  # ZIP_DEBUGINFO_FILES
43171  #
43172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43173$as_echo_n "checking if we should zip debug-info files... " >&6; }
43174  # Check whether --enable-zip-debug-info was given.
43175if test "${enable_zip_debug_info+set}" = set; then :
43176  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43177else
43178  enable_zip_debug_info="yes"
43179fi
43180
43181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43182$as_echo "${enable_zip_debug_info}" >&6; }
43183
43184  if test "x${enable_zip_debug_info}" = "xno"; then
43185    ZIP_DEBUGINFO_FILES=false
43186  else
43187    ZIP_DEBUGINFO_FILES=true
43188  fi
43189
43190
43191
43192
43193
43194###############################################################################
43195#
43196# Check dependencies for external and internal libraries.
43197#
43198###############################################################################
43199
43200# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43201
43202  # When using cygwin or msys, we need a wrapper binary that renames
43203  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43204  # @files and rewrites these too! This wrapper binary is
43205  # called fixpath.
43206  FIXPATH=
43207  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43209$as_echo_n "checking if fixpath can be created... " >&6; }
43210    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43211    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43212    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43213      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43214      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43215      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43216      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43217    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43218      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43219      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43220
43221      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43222      # @ was chosen as separator to minimize risk of other tools messing around with it
43223      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43224      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43225
43226      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43227    fi
43228    rm -f $OUTPUT_ROOT/fixpath*
43229    cd $OUTPUT_ROOT
43230    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43231    cd $CURDIR
43232
43233    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43235$as_echo "no" >&6; }
43236      cat $OUTPUT_ROOT/fixpath1.log
43237      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43238    fi
43239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43240$as_echo "yes" >&6; }
43241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43242$as_echo_n "checking if fixpath.exe works... " >&6; }
43243    cd $OUTPUT_ROOT
43244    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43245    cd $CURDIR
43246    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43248$as_echo "no" >&6; }
43249      cat $OUTPUT_ROOT/fixpath2.log
43250      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43251    fi
43252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43253$as_echo "yes" >&6; }
43254    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43255  fi
43256
43257
43258
43259
43260
43261
43262  ###############################################################################
43263  #
43264  # OS specific settings that we never will need to probe.
43265  #
43266  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43268$as_echo_n "checking what is not needed on Linux?... " >&6; }
43269    PULSE_NOT_NEEDED=yes
43270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43271$as_echo "pulse" >&6; }
43272  fi
43273
43274  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43276$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43277    ALSA_NOT_NEEDED=yes
43278    PULSE_NOT_NEEDED=yes
43279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43280$as_echo "alsa pulse" >&6; }
43281  fi
43282
43283  if test "x$OPENJDK_TARGET_OS" = xaix; then
43284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43285$as_echo_n "checking what is not needed on AIX?... " >&6; }
43286    ALSA_NOT_NEEDED=yes
43287    PULSE_NOT_NEEDED=yes
43288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43289$as_echo "alsa pulse" >&6; }
43290  fi
43291
43292
43293  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43295$as_echo_n "checking what is not needed on Windows?... " >&6; }
43296    CUPS_NOT_NEEDED=yes
43297    ALSA_NOT_NEEDED=yes
43298    PULSE_NOT_NEEDED=yes
43299    X11_NOT_NEEDED=yes
43300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43301$as_echo "alsa cups pulse x11" >&6; }
43302  fi
43303
43304  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43306$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43307    ALSA_NOT_NEEDED=yes
43308    PULSE_NOT_NEEDED=yes
43309    X11_NOT_NEEDED=yes
43310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43311$as_echo "alsa pulse x11" >&6; }
43312  fi
43313
43314  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43316$as_echo_n "checking what is not needed on bsd?... " >&6; }
43317    ALSA_NOT_NEEDED=yes
43318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43319$as_echo "alsa" >&6; }
43320  fi
43321
43322  if test "x$OPENJDK" = "xfalse"; then
43323    FREETYPE_NOT_NEEDED=yes
43324  fi
43325
43326  if test "x$SUPPORT_HEADFUL" = xno; then
43327    X11_NOT_NEEDED=yes
43328  fi
43329
43330
43331
43332  ###############################################################################
43333  #
43334  # Check for X Windows
43335  #
43336
43337  if test "x$X11_NOT_NEEDED" = xyes; then
43338    if test "x${with_x}" != x; then
43339      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43340$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43341    fi
43342    X_CFLAGS=
43343    X_LIBS=
43344  else
43345    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43346    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43347    # --x-libraries for the sysroot, if that seems to be correct.
43348    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43349      if test "x$SYSROOT" != "x"; then
43350        if test "x$x_includes" = xNONE; then
43351          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43352            x_includes="$SYSROOT/usr/X11R6/include"
43353          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43354            x_includes="$SYSROOT/usr/include"
43355          fi
43356        fi
43357        if test "x$x_libraries" = xNONE; then
43358          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43359            x_libraries="$SYSROOT/usr/X11R6/lib"
43360          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43361            x_libraries="$SYSROOT/usr/lib64"
43362          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43363            x_libraries="$SYSROOT/usr/lib"
43364          fi
43365        fi
43366      fi
43367    fi
43368
43369    # Now let autoconf do it's magic
43370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43371$as_echo_n "checking for X... " >&6; }
43372
43373
43374# Check whether --with-x was given.
43375if test "${with_x+set}" = set; then :
43376  withval=$with_x;
43377fi
43378
43379# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43380if test "x$with_x" = xno; then
43381  # The user explicitly disabled X.
43382  have_x=disabled
43383else
43384  case $x_includes,$x_libraries in #(
43385    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43386    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43387  $as_echo_n "(cached) " >&6
43388else
43389  # One or both of the vars are not set, and there is no cached value.
43390ac_x_includes=no ac_x_libraries=no
43391rm -f -r conftest.dir
43392if mkdir conftest.dir; then
43393  cd conftest.dir
43394  cat >Imakefile <<'_ACEOF'
43395incroot:
43396	@echo incroot='${INCROOT}'
43397usrlibdir:
43398	@echo usrlibdir='${USRLIBDIR}'
43399libdir:
43400	@echo libdir='${LIBDIR}'
43401_ACEOF
43402  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43403    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43404    for ac_var in incroot usrlibdir libdir; do
43405      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43406    done
43407    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43408    for ac_extension in a so sl dylib la dll; do
43409      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43410	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43411	ac_im_usrlibdir=$ac_im_libdir; break
43412      fi
43413    done
43414    # Screen out bogus values from the imake configuration.  They are
43415    # bogus both because they are the default anyway, and because
43416    # using them would break gcc on systems where it needs fixed includes.
43417    case $ac_im_incroot in
43418	/usr/include) ac_x_includes= ;;
43419	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43420    esac
43421    case $ac_im_usrlibdir in
43422	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43423	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43424    esac
43425  fi
43426  cd ..
43427  rm -f -r conftest.dir
43428fi
43429
43430# Standard set of common directories for X headers.
43431# Check X11 before X11Rn because it is often a symlink to the current release.
43432ac_x_header_dirs='
43433/usr/X11/include
43434/usr/X11R7/include
43435/usr/X11R6/include
43436/usr/X11R5/include
43437/usr/X11R4/include
43438
43439/usr/include/X11
43440/usr/include/X11R7
43441/usr/include/X11R6
43442/usr/include/X11R5
43443/usr/include/X11R4
43444
43445/usr/local/X11/include
43446/usr/local/X11R7/include
43447/usr/local/X11R6/include
43448/usr/local/X11R5/include
43449/usr/local/X11R4/include
43450
43451/usr/local/include/X11
43452/usr/local/include/X11R7
43453/usr/local/include/X11R6
43454/usr/local/include/X11R5
43455/usr/local/include/X11R4
43456
43457/usr/X386/include
43458/usr/x386/include
43459/usr/XFree86/include/X11
43460
43461/usr/include
43462/usr/local/include
43463/usr/unsupported/include
43464/usr/athena/include
43465/usr/local/x11r5/include
43466/usr/lpp/Xamples/include
43467
43468/usr/openwin/include
43469/usr/openwin/share/include'
43470
43471if test "$ac_x_includes" = no; then
43472  # Guess where to find include files, by looking for Xlib.h.
43473  # First, try using that file with no special directory specified.
43474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43475/* end confdefs.h.  */
43476#include <X11/Xlib.h>
43477_ACEOF
43478if ac_fn_cxx_try_cpp "$LINENO"; then :
43479  # We can compile using X headers with no special include directory.
43480ac_x_includes=
43481else
43482  for ac_dir in $ac_x_header_dirs; do
43483  if test -r "$ac_dir/X11/Xlib.h"; then
43484    ac_x_includes=$ac_dir
43485    break
43486  fi
43487done
43488fi
43489rm -f conftest.err conftest.i conftest.$ac_ext
43490fi # $ac_x_includes = no
43491
43492if test "$ac_x_libraries" = no; then
43493  # Check for the libraries.
43494  # See if we find them without any special options.
43495  # Don't add to $LIBS permanently.
43496  ac_save_LIBS=$LIBS
43497  LIBS="-lX11 $LIBS"
43498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43499/* end confdefs.h.  */
43500#include <X11/Xlib.h>
43501int
43502main ()
43503{
43504XrmInitialize ()
43505  ;
43506  return 0;
43507}
43508_ACEOF
43509if ac_fn_cxx_try_link "$LINENO"; then :
43510  LIBS=$ac_save_LIBS
43511# We can link X programs with no special library path.
43512ac_x_libraries=
43513else
43514  LIBS=$ac_save_LIBS
43515for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43516do
43517  # Don't even attempt the hair of trying to link an X program!
43518  for ac_extension in a so sl dylib la dll; do
43519    if test -r "$ac_dir/libX11.$ac_extension"; then
43520      ac_x_libraries=$ac_dir
43521      break 2
43522    fi
43523  done
43524done
43525fi
43526rm -f core conftest.err conftest.$ac_objext \
43527    conftest$ac_exeext conftest.$ac_ext
43528fi # $ac_x_libraries = no
43529
43530case $ac_x_includes,$ac_x_libraries in #(
43531  no,* | *,no | *\'*)
43532    # Didn't find X, or a directory has "'" in its name.
43533    ac_cv_have_x="have_x=no";; #(
43534  *)
43535    # Record where we found X for the cache.
43536    ac_cv_have_x="have_x=yes\
43537	ac_x_includes='$ac_x_includes'\
43538	ac_x_libraries='$ac_x_libraries'"
43539esac
43540fi
43541;; #(
43542    *) have_x=yes;;
43543  esac
43544  eval "$ac_cv_have_x"
43545fi # $with_x != no
43546
43547if test "$have_x" != yes; then
43548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43549$as_echo "$have_x" >&6; }
43550  no_x=yes
43551else
43552  # If each of the values was on the command line, it overrides each guess.
43553  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43554  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43555  # Update the cache value to reflect the command line values.
43556  ac_cv_have_x="have_x=yes\
43557	ac_x_includes='$x_includes'\
43558	ac_x_libraries='$x_libraries'"
43559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43560$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43561fi
43562
43563    if test "$no_x" = yes; then
43564  # Not all programs may use this symbol, but it does not hurt to define it.
43565
43566$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43567
43568  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43569else
43570  if test -n "$x_includes"; then
43571    X_CFLAGS="$X_CFLAGS -I$x_includes"
43572  fi
43573
43574  # It would also be nice to do this for all -L options, not just this one.
43575  if test -n "$x_libraries"; then
43576    X_LIBS="$X_LIBS -L$x_libraries"
43577    # For Solaris; some versions of Sun CC require a space after -R and
43578    # others require no space.  Words are not sufficient . . . .
43579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43580$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43581    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43582    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43583    ac_cxx_werror_flag=yes
43584    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43585/* end confdefs.h.  */
43586
43587int
43588main ()
43589{
43590
43591  ;
43592  return 0;
43593}
43594_ACEOF
43595if ac_fn_cxx_try_link "$LINENO"; then :
43596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43597$as_echo "no" >&6; }
43598       X_LIBS="$X_LIBS -R$x_libraries"
43599else
43600  LIBS="$ac_xsave_LIBS -R $x_libraries"
43601       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43602/* end confdefs.h.  */
43603
43604int
43605main ()
43606{
43607
43608  ;
43609  return 0;
43610}
43611_ACEOF
43612if ac_fn_cxx_try_link "$LINENO"; then :
43613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43614$as_echo "yes" >&6; }
43615	  X_LIBS="$X_LIBS -R $x_libraries"
43616else
43617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43618$as_echo "neither works" >&6; }
43619fi
43620rm -f core conftest.err conftest.$ac_objext \
43621    conftest$ac_exeext conftest.$ac_ext
43622fi
43623rm -f core conftest.err conftest.$ac_objext \
43624    conftest$ac_exeext conftest.$ac_ext
43625    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43626    LIBS=$ac_xsave_LIBS
43627  fi
43628
43629  # Check for system-dependent libraries X programs must link with.
43630  # Do this before checking for the system-independent R6 libraries
43631  # (-lICE), since we may need -lsocket or whatever for X linking.
43632
43633  if test "$ISC" = yes; then
43634    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43635  else
43636    # Martyn Johnson says this is needed for Ultrix, if the X
43637    # libraries were built with DECnet support.  And Karl Berry says
43638    # the Alpha needs dnet_stub (dnet does not exist).
43639    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43640    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43641/* end confdefs.h.  */
43642
43643/* Override any GCC internal prototype to avoid an error.
43644   Use char because int might match the return type of a GCC
43645   builtin and then its argument prototype would still apply.  */
43646#ifdef __cplusplus
43647extern "C"
43648#endif
43649char XOpenDisplay ();
43650int
43651main ()
43652{
43653return XOpenDisplay ();
43654  ;
43655  return 0;
43656}
43657_ACEOF
43658if ac_fn_cxx_try_link "$LINENO"; then :
43659
43660else
43661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43662$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43663if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43664  $as_echo_n "(cached) " >&6
43665else
43666  ac_check_lib_save_LIBS=$LIBS
43667LIBS="-ldnet  $LIBS"
43668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43669/* end confdefs.h.  */
43670
43671/* Override any GCC internal prototype to avoid an error.
43672   Use char because int might match the return type of a GCC
43673   builtin and then its argument prototype would still apply.  */
43674#ifdef __cplusplus
43675extern "C"
43676#endif
43677char dnet_ntoa ();
43678int
43679main ()
43680{
43681return dnet_ntoa ();
43682  ;
43683  return 0;
43684}
43685_ACEOF
43686if ac_fn_cxx_try_link "$LINENO"; then :
43687  ac_cv_lib_dnet_dnet_ntoa=yes
43688else
43689  ac_cv_lib_dnet_dnet_ntoa=no
43690fi
43691rm -f core conftest.err conftest.$ac_objext \
43692    conftest$ac_exeext conftest.$ac_ext
43693LIBS=$ac_check_lib_save_LIBS
43694fi
43695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43696$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43697if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43698  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43699fi
43700
43701    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43702      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43703$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43704if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43705  $as_echo_n "(cached) " >&6
43706else
43707  ac_check_lib_save_LIBS=$LIBS
43708LIBS="-ldnet_stub  $LIBS"
43709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43710/* end confdefs.h.  */
43711
43712/* Override any GCC internal prototype to avoid an error.
43713   Use char because int might match the return type of a GCC
43714   builtin and then its argument prototype would still apply.  */
43715#ifdef __cplusplus
43716extern "C"
43717#endif
43718char dnet_ntoa ();
43719int
43720main ()
43721{
43722return dnet_ntoa ();
43723  ;
43724  return 0;
43725}
43726_ACEOF
43727if ac_fn_cxx_try_link "$LINENO"; then :
43728  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43729else
43730  ac_cv_lib_dnet_stub_dnet_ntoa=no
43731fi
43732rm -f core conftest.err conftest.$ac_objext \
43733    conftest$ac_exeext conftest.$ac_ext
43734LIBS=$ac_check_lib_save_LIBS
43735fi
43736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43737$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43738if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43739  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43740fi
43741
43742    fi
43743fi
43744rm -f core conftest.err conftest.$ac_objext \
43745    conftest$ac_exeext conftest.$ac_ext
43746    LIBS="$ac_xsave_LIBS"
43747
43748    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43749    # to get the SysV transport functions.
43750    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43751    # needs -lnsl.
43752    # The nsl library prevents programs from opening the X display
43753    # on Irix 5.2, according to T.E. Dickey.
43754    # The functions gethostbyname, getservbyname, and inet_addr are
43755    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43756    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43757if test "x$ac_cv_func_gethostbyname" = xyes; then :
43758
43759fi
43760
43761    if test $ac_cv_func_gethostbyname = no; then
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43763$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43764if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43765  $as_echo_n "(cached) " >&6
43766else
43767  ac_check_lib_save_LIBS=$LIBS
43768LIBS="-lnsl  $LIBS"
43769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43770/* end confdefs.h.  */
43771
43772/* Override any GCC internal prototype to avoid an error.
43773   Use char because int might match the return type of a GCC
43774   builtin and then its argument prototype would still apply.  */
43775#ifdef __cplusplus
43776extern "C"
43777#endif
43778char gethostbyname ();
43779int
43780main ()
43781{
43782return gethostbyname ();
43783  ;
43784  return 0;
43785}
43786_ACEOF
43787if ac_fn_cxx_try_link "$LINENO"; then :
43788  ac_cv_lib_nsl_gethostbyname=yes
43789else
43790  ac_cv_lib_nsl_gethostbyname=no
43791fi
43792rm -f core conftest.err conftest.$ac_objext \
43793    conftest$ac_exeext conftest.$ac_ext
43794LIBS=$ac_check_lib_save_LIBS
43795fi
43796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43797$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43798if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43799  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43800fi
43801
43802      if test $ac_cv_lib_nsl_gethostbyname = no; then
43803	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43804$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43805if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43806  $as_echo_n "(cached) " >&6
43807else
43808  ac_check_lib_save_LIBS=$LIBS
43809LIBS="-lbsd  $LIBS"
43810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43811/* end confdefs.h.  */
43812
43813/* Override any GCC internal prototype to avoid an error.
43814   Use char because int might match the return type of a GCC
43815   builtin and then its argument prototype would still apply.  */
43816#ifdef __cplusplus
43817extern "C"
43818#endif
43819char gethostbyname ();
43820int
43821main ()
43822{
43823return gethostbyname ();
43824  ;
43825  return 0;
43826}
43827_ACEOF
43828if ac_fn_cxx_try_link "$LINENO"; then :
43829  ac_cv_lib_bsd_gethostbyname=yes
43830else
43831  ac_cv_lib_bsd_gethostbyname=no
43832fi
43833rm -f core conftest.err conftest.$ac_objext \
43834    conftest$ac_exeext conftest.$ac_ext
43835LIBS=$ac_check_lib_save_LIBS
43836fi
43837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43838$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43839if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43840  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43841fi
43842
43843      fi
43844    fi
43845
43846    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43847    # socket/setsockopt and other routines are undefined under SCO ODT
43848    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43849    # on later versions), says Simon Leinen: it contains gethostby*
43850    # variants that don't use the name server (or something).  -lsocket
43851    # must be given before -lnsl if both are needed.  We assume that
43852    # if connect needs -lnsl, so does gethostbyname.
43853    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43854if test "x$ac_cv_func_connect" = xyes; then :
43855
43856fi
43857
43858    if test $ac_cv_func_connect = no; then
43859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43860$as_echo_n "checking for connect in -lsocket... " >&6; }
43861if ${ac_cv_lib_socket_connect+:} false; then :
43862  $as_echo_n "(cached) " >&6
43863else
43864  ac_check_lib_save_LIBS=$LIBS
43865LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43867/* end confdefs.h.  */
43868
43869/* Override any GCC internal prototype to avoid an error.
43870   Use char because int might match the return type of a GCC
43871   builtin and then its argument prototype would still apply.  */
43872#ifdef __cplusplus
43873extern "C"
43874#endif
43875char connect ();
43876int
43877main ()
43878{
43879return connect ();
43880  ;
43881  return 0;
43882}
43883_ACEOF
43884if ac_fn_cxx_try_link "$LINENO"; then :
43885  ac_cv_lib_socket_connect=yes
43886else
43887  ac_cv_lib_socket_connect=no
43888fi
43889rm -f core conftest.err conftest.$ac_objext \
43890    conftest$ac_exeext conftest.$ac_ext
43891LIBS=$ac_check_lib_save_LIBS
43892fi
43893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43894$as_echo "$ac_cv_lib_socket_connect" >&6; }
43895if test "x$ac_cv_lib_socket_connect" = xyes; then :
43896  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43897fi
43898
43899    fi
43900
43901    # Guillermo Gomez says -lposix is necessary on A/UX.
43902    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43903if test "x$ac_cv_func_remove" = xyes; then :
43904
43905fi
43906
43907    if test $ac_cv_func_remove = no; then
43908      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43909$as_echo_n "checking for remove in -lposix... " >&6; }
43910if ${ac_cv_lib_posix_remove+:} false; then :
43911  $as_echo_n "(cached) " >&6
43912else
43913  ac_check_lib_save_LIBS=$LIBS
43914LIBS="-lposix  $LIBS"
43915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43916/* end confdefs.h.  */
43917
43918/* Override any GCC internal prototype to avoid an error.
43919   Use char because int might match the return type of a GCC
43920   builtin and then its argument prototype would still apply.  */
43921#ifdef __cplusplus
43922extern "C"
43923#endif
43924char remove ();
43925int
43926main ()
43927{
43928return remove ();
43929  ;
43930  return 0;
43931}
43932_ACEOF
43933if ac_fn_cxx_try_link "$LINENO"; then :
43934  ac_cv_lib_posix_remove=yes
43935else
43936  ac_cv_lib_posix_remove=no
43937fi
43938rm -f core conftest.err conftest.$ac_objext \
43939    conftest$ac_exeext conftest.$ac_ext
43940LIBS=$ac_check_lib_save_LIBS
43941fi
43942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43943$as_echo "$ac_cv_lib_posix_remove" >&6; }
43944if test "x$ac_cv_lib_posix_remove" = xyes; then :
43945  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43946fi
43947
43948    fi
43949
43950    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43951    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43952if test "x$ac_cv_func_shmat" = xyes; then :
43953
43954fi
43955
43956    if test $ac_cv_func_shmat = no; then
43957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43958$as_echo_n "checking for shmat in -lipc... " >&6; }
43959if ${ac_cv_lib_ipc_shmat+:} false; then :
43960  $as_echo_n "(cached) " >&6
43961else
43962  ac_check_lib_save_LIBS=$LIBS
43963LIBS="-lipc  $LIBS"
43964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43965/* end confdefs.h.  */
43966
43967/* Override any GCC internal prototype to avoid an error.
43968   Use char because int might match the return type of a GCC
43969   builtin and then its argument prototype would still apply.  */
43970#ifdef __cplusplus
43971extern "C"
43972#endif
43973char shmat ();
43974int
43975main ()
43976{
43977return shmat ();
43978  ;
43979  return 0;
43980}
43981_ACEOF
43982if ac_fn_cxx_try_link "$LINENO"; then :
43983  ac_cv_lib_ipc_shmat=yes
43984else
43985  ac_cv_lib_ipc_shmat=no
43986fi
43987rm -f core conftest.err conftest.$ac_objext \
43988    conftest$ac_exeext conftest.$ac_ext
43989LIBS=$ac_check_lib_save_LIBS
43990fi
43991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43992$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43993if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43994  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43995fi
43996
43997    fi
43998  fi
43999
44000  # Check for libraries that X11R6 Xt/Xaw programs need.
44001  ac_save_LDFLAGS=$LDFLAGS
44002  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44003  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44004  # check for ICE first), but we must link in the order -lSM -lICE or
44005  # we get undefined symbols.  So assume we have SM if we have ICE.
44006  # These have to be linked with before -lX11, unlike the other
44007  # libraries we check for below, so use a different variable.
44008  # John Interrante, Karl Berry
44009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44010$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44011if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44012  $as_echo_n "(cached) " >&6
44013else
44014  ac_check_lib_save_LIBS=$LIBS
44015LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44017/* end confdefs.h.  */
44018
44019/* Override any GCC internal prototype to avoid an error.
44020   Use char because int might match the return type of a GCC
44021   builtin and then its argument prototype would still apply.  */
44022#ifdef __cplusplus
44023extern "C"
44024#endif
44025char IceConnectionNumber ();
44026int
44027main ()
44028{
44029return IceConnectionNumber ();
44030  ;
44031  return 0;
44032}
44033_ACEOF
44034if ac_fn_cxx_try_link "$LINENO"; then :
44035  ac_cv_lib_ICE_IceConnectionNumber=yes
44036else
44037  ac_cv_lib_ICE_IceConnectionNumber=no
44038fi
44039rm -f core conftest.err conftest.$ac_objext \
44040    conftest$ac_exeext conftest.$ac_ext
44041LIBS=$ac_check_lib_save_LIBS
44042fi
44043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44044$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44045if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44046  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44047fi
44048
44049  LDFLAGS=$ac_save_LDFLAGS
44050
44051fi
44052
44053
44054    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44055    # this doesn't make sense so we remove it.
44056    if test "x$COMPILE_TYPE" = xcross; then
44057      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44058    fi
44059
44060    if test "x$no_x" = xyes; then
44061
44062  # Print a helpful message on how to acquire the necessary build dependency.
44063  # x11 is the help tag: freetype, cups, pulse, alsa etc
44064  MISSING_DEPENDENCY=x11
44065
44066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44067    cygwin_help $MISSING_DEPENDENCY
44068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44069    msys_help $MISSING_DEPENDENCY
44070  else
44071    PKGHANDLER_COMMAND=
44072
44073    case $PKGHANDLER in
44074      apt-get)
44075        apt_help     $MISSING_DEPENDENCY ;;
44076      yum)
44077        yum_help     $MISSING_DEPENDENCY ;;
44078      port)
44079        port_help    $MISSING_DEPENDENCY ;;
44080      pkgutil)
44081        pkgutil_help $MISSING_DEPENDENCY ;;
44082      pkgadd)
44083        pkgadd_help  $MISSING_DEPENDENCY ;;
44084    esac
44085
44086    if test "x$PKGHANDLER_COMMAND" != x; then
44087      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44088    fi
44089  fi
44090
44091      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44092    fi
44093
44094    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44095      OPENWIN_HOME="/usr/openwin"
44096      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44097      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44098          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44099          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44100          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44101    fi
44102
44103    ac_ext=c
44104ac_cpp='$CPP $CPPFLAGS'
44105ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44106ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44107ac_compiler_gnu=$ac_cv_c_compiler_gnu
44108
44109    OLD_CFLAGS="$CFLAGS"
44110    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44111
44112    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44113    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44114do :
44115  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44116ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44117          # include <X11/Xlib.h>
44118          # include <X11/Xutil.h>
44119
44120
44121"
44122if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44123  cat >>confdefs.h <<_ACEOF
44124#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44125_ACEOF
44126 X11_HEADERS_OK=yes
44127else
44128  X11_HEADERS_OK=no; break
44129fi
44130
44131done
44132
44133
44134    if test "x$X11_HEADERS_OK" = xno; then
44135
44136  # Print a helpful message on how to acquire the necessary build dependency.
44137  # x11 is the help tag: freetype, cups, pulse, alsa etc
44138  MISSING_DEPENDENCY=x11
44139
44140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44141    cygwin_help $MISSING_DEPENDENCY
44142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44143    msys_help $MISSING_DEPENDENCY
44144  else
44145    PKGHANDLER_COMMAND=
44146
44147    case $PKGHANDLER in
44148      apt-get)
44149        apt_help     $MISSING_DEPENDENCY ;;
44150      yum)
44151        yum_help     $MISSING_DEPENDENCY ;;
44152      port)
44153        port_help    $MISSING_DEPENDENCY ;;
44154      pkgutil)
44155        pkgutil_help $MISSING_DEPENDENCY ;;
44156      pkgadd)
44157        pkgadd_help  $MISSING_DEPENDENCY ;;
44158    esac
44159
44160    if test "x$PKGHANDLER_COMMAND" != x; then
44161      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44162    fi
44163  fi
44164
44165      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44166    fi
44167
44168    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44169    # defined in libawt_xawt.
44170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44171$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44172    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44173/* end confdefs.h.  */
44174#include <X11/extensions/Xrender.h>
44175int
44176main ()
44177{
44178XLinearGradient x;
44179  ;
44180  return 0;
44181}
44182_ACEOF
44183if ac_fn_c_try_compile "$LINENO"; then :
44184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44185$as_echo "yes" >&6; }
44186else
44187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44188$as_echo "no" >&6; }
44189         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44190fi
44191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44192
44193    CFLAGS="$OLD_CFLAGS"
44194    ac_ext=cpp
44195ac_cpp='$CXXCPP $CPPFLAGS'
44196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44199
44200  fi # X11_NOT_NEEDED
44201
44202
44203
44204
44205
44206
44207  ###############################################################################
44208  #
44209  # The common unix printing system cups is used to print from java.
44210  #
44211
44212# Check whether --with-cups was given.
44213if test "${with_cups+set}" = set; then :
44214  withval=$with_cups;
44215fi
44216
44217
44218# Check whether --with-cups-include was given.
44219if test "${with_cups_include+set}" = set; then :
44220  withval=$with_cups_include;
44221fi
44222
44223
44224  if test "x$CUPS_NOT_NEEDED" = xyes; then
44225    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44226      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44227$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44228    fi
44229    CUPS_CFLAGS=
44230  else
44231    CUPS_FOUND=no
44232
44233    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44234      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44235    fi
44236
44237    if test "x${with_cups}" != x; then
44238      CUPS_CFLAGS="-I${with_cups}/include"
44239      CUPS_FOUND=yes
44240    fi
44241    if test "x${with_cups_include}" != x; then
44242      CUPS_CFLAGS="-I${with_cups_include}"
44243      CUPS_FOUND=yes
44244    fi
44245    if test "x$CUPS_FOUND" = xno; then
44246
44247
44248  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44249    # Source the builddeps file again, to make sure it uses the latest variables!
44250    . $builddepsfile
44251    # Look for a target and build machine specific resource!
44252    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44253    if test "x$resource" = x; then
44254      # Ok, lets instead look for a target specific resource
44255      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44256    fi
44257    if test "x$resource" = x; then
44258      # Ok, lets instead look for a build specific resource
44259      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44260    fi
44261    if test "x$resource" = x; then
44262      # Ok, lets instead look for a generic resource
44263      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44264      resource=${builddep_cups}
44265    fi
44266    if test "x$resource" != x; then
44267      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44268$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44269      # If the resource in the builddeps.conf file is an existing directory,
44270      # for example /java/linux/cups
44271      if test -d ${resource}; then
44272        depdir=${resource}
44273      else
44274
44275  # cups is for example mymodule
44276  # $resource is for example libs/general/libmymod_1_2_3.zip
44277  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44278  # $with_builddeps_dir is for example /localhome/builddeps
44279  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44280  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44281  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44282  filename=`basename $resource`
44283  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44284  filebase=${filename%%.*}
44285  extension=${filename#*.}
44286  installdir=$with_builddeps_dir/$filebase
44287  if test ! -f $installdir/$filename.unpacked; then
44288    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44289$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44290    if test ! -d $installdir; then
44291      mkdir -p $installdir
44292    fi
44293    if test ! -d $installdir; then
44294      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44295    fi
44296    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44297    touch $tmpfile
44298    if test ! -f $tmpfile; then
44299      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44300    fi
44301
44302  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44303  # $tmpfile is the local file name for the downloaded file.
44304  VALID_TOOL=no
44305  if test "x$BDEPS_FTP" = xwget; then
44306    VALID_TOOL=yes
44307    wget -O $tmpfile $with_builddeps_server/$resource
44308  fi
44309  if test "x$BDEPS_FTP" = xlftp; then
44310    VALID_TOOL=yes
44311    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44312  fi
44313  if test "x$BDEPS_FTP" = xftp; then
44314    VALID_TOOL=yes
44315    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44316    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44317    FTPUSERPWD=${FTPSERVER%%@*}
44318    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44319      FTPUSER=${userpwd%%:*}
44320      FTPPWD=${userpwd#*@}
44321      FTPSERVER=${FTPSERVER#*@}
44322    else
44323      FTPUSER=ftp
44324      FTPPWD=ftp
44325    fi
44326    # the "pass" command does not work on some
44327    # ftp clients (read ftp.exe) but if it works,
44328    # passive mode is better!
44329    ( \
44330        echo "user $FTPUSER $FTPPWD"        ; \
44331        echo "pass"                         ; \
44332        echo "bin"                          ; \
44333        echo "get $FTPPATH $tmpfile"              ; \
44334    ) | ftp -in $FTPSERVER
44335  fi
44336  if test "x$VALID_TOOL" != xyes; then
44337    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44338  fi
44339
44340    mv $tmpfile $installdir/$filename
44341    if test ! -s $installdir/$filename; then
44342      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44343    fi
44344    case "$extension" in
44345      zip)  echo "Unzipping $installdir/$filename..."
44346        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44347        ;;
44348      tar.gz) echo "Untaring $installdir/$filename..."
44349        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44350        ;;
44351      tgz) echo "Untaring $installdir/$filename..."
44352        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44353        ;;
44354      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44355        ;;
44356    esac
44357  fi
44358  if test -f $installdir/$filename.unpacked; then
44359    depdir=$installdir
44360  fi
44361
44362      fi
44363      # Source the builddeps file again, because in the previous command, the depdir
44364      # was updated to point at the current build dependency install directory.
44365      . $builddepsfile
44366      # Now extract variables from the builddeps.conf files.
44367      theroot=${builddep_cups_ROOT}
44368      thecflags=${builddep_cups_CFLAGS}
44369      thelibs=${builddep_cups_LIBS}
44370      if test "x$depdir" = x; then
44371        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44372      fi
44373      CUPS=$depdir
44374      if test "x$theroot" != x; then
44375        CUPS="$theroot"
44376      fi
44377      if test "x$thecflags" != x; then
44378        CUPS_CFLAGS="$thecflags"
44379      fi
44380      if test "x$thelibs" != x; then
44381        CUPS_LIBS="$thelibs"
44382      fi
44383      CUPS_FOUND=yes
44384
44385    fi
44386
44387  fi
44388
44389    fi
44390    if test "x$CUPS_FOUND" = xno; then
44391      # Are the cups headers installed in the default /usr/include location?
44392      for ac_header in cups/cups.h cups/ppd.h
44393do :
44394  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44395ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44396if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44397  cat >>confdefs.h <<_ACEOF
44398#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44399_ACEOF
44400
44401            CUPS_FOUND=yes
44402            CUPS_CFLAGS=
44403            DEFAULT_CUPS=yes
44404
44405
44406fi
44407
44408done
44409
44410    fi
44411    if test "x$CUPS_FOUND" = xno; then
44412      # Getting nervous now? Lets poke around for standard Solaris third-party
44413      # package installation locations.
44414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44415$as_echo_n "checking for cups headers... " >&6; }
44416      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44417        # An SFW package seems to be installed!
44418        CUPS_FOUND=yes
44419        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44420      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44421        # A CSW package seems to be installed!
44422        CUPS_FOUND=yes
44423        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44424      fi
44425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44426$as_echo "$CUPS_FOUND" >&6; }
44427    fi
44428    if test "x$CUPS_FOUND" = xno; then
44429
44430  # Print a helpful message on how to acquire the necessary build dependency.
44431  # cups is the help tag: freetype, cups, pulse, alsa etc
44432  MISSING_DEPENDENCY=cups
44433
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435    cygwin_help $MISSING_DEPENDENCY
44436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44437    msys_help $MISSING_DEPENDENCY
44438  else
44439    PKGHANDLER_COMMAND=
44440
44441    case $PKGHANDLER in
44442      apt-get)
44443        apt_help     $MISSING_DEPENDENCY ;;
44444      yum)
44445        yum_help     $MISSING_DEPENDENCY ;;
44446      port)
44447        port_help    $MISSING_DEPENDENCY ;;
44448      pkgutil)
44449        pkgutil_help $MISSING_DEPENDENCY ;;
44450      pkgadd)
44451        pkgadd_help  $MISSING_DEPENDENCY ;;
44452    esac
44453
44454    if test "x$PKGHANDLER_COMMAND" != x; then
44455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44456    fi
44457  fi
44458
44459      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44460    fi
44461  fi
44462
44463
44464
44465
44466
44467
44468  ###############################################################################
44469  #
44470  # The ubiquitous freetype library is used to render fonts.
44471  #
44472
44473# Check whether --with-freetype was given.
44474if test "${with_freetype+set}" = set; then :
44475  withval=$with_freetype;
44476fi
44477
44478
44479# Check whether --with-freetype-include was given.
44480if test "${with_freetype_include+set}" = set; then :
44481  withval=$with_freetype_include;
44482fi
44483
44484
44485# Check whether --with-freetype-lib was given.
44486if test "${with_freetype_lib+set}" = set; then :
44487  withval=$with_freetype_lib;
44488fi
44489
44490
44491# Check whether --with-freetype-src was given.
44492if test "${with_freetype_src+set}" = set; then :
44493  withval=$with_freetype_src;
44494fi
44495
44496  # Check whether --enable-freetype-bundling was given.
44497if test "${enable_freetype_bundling+set}" = set; then :
44498  enableval=$enable_freetype_bundling;
44499fi
44500
44501
44502  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44503  FREETYPE_BASE_NAME=freetype
44504  FREETYPE_CFLAGS=
44505  FREETYPE_LIBS=
44506  FREETYPE_BUNDLE_LIB_PATH=
44507
44508  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44509    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
44510      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44511$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44512    fi
44513    if test "x$enable_freetype_bundling" != x; then
44514      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44515$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44516    fi
44517  else
44518    # freetype is needed to build; go get it!
44519
44520    BUNDLE_FREETYPE="$enable_freetype_bundling"
44521
44522    if  test "x$with_freetype_src" != x; then
44523      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44524        # Try to build freetype if --with-freetype-src was given on Windows
44525
44526  FREETYPE_SRC_PATH="$with_freetype_src"
44527  BUILD_FREETYPE=yes
44528
44529  # Check if the freetype sources are acessible..
44530  if ! test -d $FREETYPE_SRC_PATH; then
44531    { $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
44532$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44533    BUILD_FREETYPE=no
44534  fi
44535  # ..and contain a vc2010 project file
44536  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44537  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44538    { $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
44539$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44540    BUILD_FREETYPE=no
44541  fi
44542  # Now check if configure found a version of 'msbuild.exe'
44543  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44544    { $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
44545$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;}
44546    BUILD_FREETYPE=no
44547  fi
44548
44549  # Ready to go..
44550  if test "x$BUILD_FREETYPE" = xyes; then
44551
44552    # msbuild requires trailing slashes for output directories
44553    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44554    freetype_lib_path_unix="$freetype_lib_path"
44555    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44556
44557  unix_path="$vcxproj_path"
44558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44559    windows_path=`$CYGPATH -m "$unix_path"`
44560    vcxproj_path="$windows_path"
44561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44562    windows_path=`cmd //c echo $unix_path`
44563    vcxproj_path="$windows_path"
44564  fi
44565
44566
44567  unix_path="$freetype_lib_path"
44568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44569    windows_path=`$CYGPATH -m "$unix_path"`
44570    freetype_lib_path="$windows_path"
44571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44572    windows_path=`cmd //c echo $unix_path`
44573    freetype_lib_path="$windows_path"
44574  fi
44575
44576
44577  unix_path="$freetype_obj_path"
44578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44579    windows_path=`$CYGPATH -m "$unix_path"`
44580    freetype_obj_path="$windows_path"
44581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44582    windows_path=`cmd //c echo $unix_path`
44583    freetype_obj_path="$windows_path"
44584  fi
44585
44586    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44587      freetype_platform=x64
44588    else
44589      freetype_platform=win32
44590    fi
44591
44592    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44593    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44594    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44595    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44596    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44597$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44598
44599    # First we try to build the freetype.dll
44600    $ECHO -e "@echo off\n"\
44601	     "$MSBUILD $vcxproj_path "\
44602		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44603		       "/p:Configuration=\"Release Multithreaded\" "\
44604		       "/p:Platform=$freetype_platform "\
44605		       "/p:ConfigurationType=DynamicLibrary "\
44606		       "/p:TargetName=freetype "\
44607		       "/p:OutDir=\"$freetype_lib_path\" "\
44608		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44609    cmd /c freetype.bat
44610
44611    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44612      # If that succeeds we also build freetype.lib
44613      $ECHO -e "@echo off\n"\
44614	       "$MSBUILD $vcxproj_path "\
44615			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44616			 "/p:Configuration=\"Release Multithreaded\" "\
44617			 "/p:Platform=$freetype_platform "\
44618			 "/p:ConfigurationType=StaticLibrary "\
44619			 "/p:TargetName=freetype "\
44620			 "/p:OutDir=\"$freetype_lib_path\" "\
44621			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44622      cmd /c freetype.bat
44623
44624      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44625	# Once we build both, lib and dll, set freetype lib and include path appropriately
44626	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44627	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44628	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44629$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44630      else
44631	BUILD_FREETYPE=no
44632      fi
44633    else
44634      BUILD_FREETYPE=no
44635    fi
44636  fi
44637
44638        if test "x$BUILD_FREETYPE" = xyes; then
44639          # Okay, we built it. Check that it works.
44640
44641  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44642  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44643  METHOD="--with-freetype-src"
44644
44645  # Let's start with an optimistic view of the world :-)
44646  FOUND_FREETYPE=yes
44647
44648  # First look for the canonical freetype main include file ft2build.h.
44649  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44650    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44651    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44652    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44653      # Fail.
44654      FOUND_FREETYPE=no
44655    fi
44656  fi
44657
44658  if test "x$FOUND_FREETYPE" = xyes; then
44659    # Include file found, let's continue the sanity check.
44660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44661$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44662
44663    # Reset to default value
44664    FREETYPE_BASE_NAME=freetype
44665    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44666    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44667      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44668          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44669        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44670        # for the .6 version explicitly.
44671        FREETYPE_BASE_NAME=freetype.6
44672        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44673        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44674$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44675      else
44676        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44677$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44678        FOUND_FREETYPE=no
44679      fi
44680    else
44681      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44682        # On Windows, we will need both .lib and .dll file.
44683        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44684          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44685$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44686          FOUND_FREETYPE=no
44687        fi
44688      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44689          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44690        # Found lib in isa dir, use that instead.
44691        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44692        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44693$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44694      fi
44695    fi
44696  fi
44697
44698  if test "x$FOUND_FREETYPE" = xyes; then
44699
44700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44701
44702  # Input might be given as Windows format, start by converting to
44703  # unix format.
44704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44705  new_path=`$CYGPATH -u "$path"`
44706
44707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44710  # "foo.exe" is OK but "foo" is an error.
44711  #
44712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44713  # It is also a way to make sure we got the proper file name for the real test later on.
44714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44715  if test "x$test_shortpath" = x; then
44716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44717$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44718    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44719  fi
44720
44721  # Call helper function which possibly converts this using DOS-style short mode.
44722  # If so, the updated path is stored in $new_path.
44723
44724  input_path="$new_path"
44725  # Check if we need to convert this using DOS-style short mode. If the path
44726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44727  # take no chances and rewrite it.
44728  # Note: m4 eats our [], so we need to use [ and ] instead.
44729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44730  if test "x$has_forbidden_chars" != x; then
44731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44735      # Going to short mode and back again did indeed matter. Since short mode is
44736      # case insensitive, let's make it lowercase to improve readability.
44737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44738      # Now convert it back to Unix-stile (cygpath)
44739      input_path=`$CYGPATH -u "$shortmode_path"`
44740      new_path="$input_path"
44741    fi
44742  fi
44743
44744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44745  if test "x$test_cygdrive_prefix" = x; then
44746    # As a simple fix, exclude /usr/bin since it's not a real path.
44747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44749      # a path prefixed by /cygdrive for fixpath to work.
44750      new_path="$CYGWIN_ROOT_PATH$input_path"
44751    fi
44752  fi
44753
44754
44755  if test "x$path" != "x$new_path"; then
44756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44759  fi
44760
44761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44762
44763  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44764  has_colon=`$ECHO $path | $GREP ^.:`
44765  new_path="$path"
44766  if test "x$has_colon" = x; then
44767    # Not in mixed or Windows style, start by that.
44768    new_path=`cmd //c echo $path`
44769  fi
44770
44771
44772  input_path="$new_path"
44773  # Check if we need to convert this using DOS-style short mode. If the path
44774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44775  # take no chances and rewrite it.
44776  # Note: m4 eats our [], so we need to use [ and ] instead.
44777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44778  if test "x$has_forbidden_chars" != x; then
44779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44781  fi
44782
44783
44784  windows_path="$new_path"
44785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44786    unix_path=`$CYGPATH -u "$windows_path"`
44787    new_path="$unix_path"
44788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44790    new_path="$unix_path"
44791  fi
44792
44793  if test "x$path" != "x$new_path"; then
44794    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44796$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44797  fi
44798
44799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44801
44802  else
44803    # We're on a unix platform. Hooray! :)
44804    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44805    has_space=`$ECHO "$path" | $GREP " "`
44806    if test "x$has_space" != x; then
44807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44809      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44810    fi
44811
44812    # Use eval to expand a potential ~
44813    eval path="$path"
44814    if test ! -f "$path" && test ! -d "$path"; then
44815      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44816    fi
44817
44818    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44819  fi
44820
44821
44822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44823
44824  # Input might be given as Windows format, start by converting to
44825  # unix format.
44826  path="$POTENTIAL_FREETYPE_LIB_PATH"
44827  new_path=`$CYGPATH -u "$path"`
44828
44829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44832  # "foo.exe" is OK but "foo" is an error.
44833  #
44834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44835  # It is also a way to make sure we got the proper file name for the real test later on.
44836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44837  if test "x$test_shortpath" = x; then
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44840    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44841  fi
44842
44843  # Call helper function which possibly converts this using DOS-style short mode.
44844  # If so, the updated path is stored in $new_path.
44845
44846  input_path="$new_path"
44847  # Check if we need to convert this using DOS-style short mode. If the path
44848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44849  # take no chances and rewrite it.
44850  # Note: m4 eats our [], so we need to use [ and ] instead.
44851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44852  if test "x$has_forbidden_chars" != x; then
44853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44857      # Going to short mode and back again did indeed matter. Since short mode is
44858      # case insensitive, let's make it lowercase to improve readability.
44859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44860      # Now convert it back to Unix-stile (cygpath)
44861      input_path=`$CYGPATH -u "$shortmode_path"`
44862      new_path="$input_path"
44863    fi
44864  fi
44865
44866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44867  if test "x$test_cygdrive_prefix" = x; then
44868    # As a simple fix, exclude /usr/bin since it's not a real path.
44869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44871      # a path prefixed by /cygdrive for fixpath to work.
44872      new_path="$CYGWIN_ROOT_PATH$input_path"
44873    fi
44874  fi
44875
44876
44877  if test "x$path" != "x$new_path"; then
44878    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44881  fi
44882
44883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884
44885  path="$POTENTIAL_FREETYPE_LIB_PATH"
44886  has_colon=`$ECHO $path | $GREP ^.:`
44887  new_path="$path"
44888  if test "x$has_colon" = x; then
44889    # Not in mixed or Windows style, start by that.
44890    new_path=`cmd //c echo $path`
44891  fi
44892
44893
44894  input_path="$new_path"
44895  # Check if we need to convert this using DOS-style short mode. If the path
44896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44897  # take no chances and rewrite it.
44898  # Note: m4 eats our [], so we need to use [ and ] instead.
44899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44900  if test "x$has_forbidden_chars" != x; then
44901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44903  fi
44904
44905
44906  windows_path="$new_path"
44907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44908    unix_path=`$CYGPATH -u "$windows_path"`
44909    new_path="$unix_path"
44910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44912    new_path="$unix_path"
44913  fi
44914
44915  if test "x$path" != "x$new_path"; then
44916    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44919  fi
44920
44921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44923
44924  else
44925    # We're on a unix platform. Hooray! :)
44926    path="$POTENTIAL_FREETYPE_LIB_PATH"
44927    has_space=`$ECHO "$path" | $GREP " "`
44928    if test "x$has_space" != x; then
44929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44931      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44932    fi
44933
44934    # Use eval to expand a potential ~
44935    eval path="$path"
44936    if test ! -f "$path" && test ! -d "$path"; then
44937      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44938    fi
44939
44940    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44941  fi
44942
44943
44944    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44946$as_echo_n "checking for freetype includes... " >&6; }
44947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44948$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44949    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44951$as_echo_n "checking for freetype libraries... " >&6; }
44952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44953$as_echo "$FREETYPE_LIB_PATH" >&6; }
44954  fi
44955
44956          if test "x$FOUND_FREETYPE" != xyes; then
44957            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44958          fi
44959        else
44960          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44961$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44962          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44963        fi
44964      else
44965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44966$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44967      fi
44968    fi
44969
44970    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44971      # User has specified settings
44972
44973      if test "x$BUNDLE_FREETYPE" = x; then
44974        # If not specified, default is to bundle freetype
44975        BUNDLE_FREETYPE=yes
44976      fi
44977
44978      if test "x$with_freetype" != x; then
44979        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44980        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44981      fi
44982
44983      # Allow --with-freetype-lib and --with-freetype-include to override
44984      if test "x$with_freetype_include" != x; then
44985        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44986      fi
44987      if test "x$with_freetype_lib" != x; then
44988        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44989      fi
44990
44991      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44992        # Okay, we got it. Check that it works.
44993
44994  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44995  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44996  METHOD="--with-freetype"
44997
44998  # Let's start with an optimistic view of the world :-)
44999  FOUND_FREETYPE=yes
45000
45001  # First look for the canonical freetype main include file ft2build.h.
45002  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45003    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45004    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45005    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45006      # Fail.
45007      FOUND_FREETYPE=no
45008    fi
45009  fi
45010
45011  if test "x$FOUND_FREETYPE" = xyes; then
45012    # Include file found, let's continue the sanity check.
45013    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45014$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45015
45016    # Reset to default value
45017    FREETYPE_BASE_NAME=freetype
45018    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45019    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45020      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45021          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45022        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45023        # for the .6 version explicitly.
45024        FREETYPE_BASE_NAME=freetype.6
45025        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45026        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45027$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45028      else
45029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45030$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45031        FOUND_FREETYPE=no
45032      fi
45033    else
45034      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45035        # On Windows, we will need both .lib and .dll file.
45036        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45037          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45038$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45039          FOUND_FREETYPE=no
45040        fi
45041      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45042          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45043        # Found lib in isa dir, use that instead.
45044        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45045        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45046$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45047      fi
45048    fi
45049  fi
45050
45051  if test "x$FOUND_FREETYPE" = xyes; then
45052
45053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45054
45055  # Input might be given as Windows format, start by converting to
45056  # unix format.
45057  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45058  new_path=`$CYGPATH -u "$path"`
45059
45060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45063  # "foo.exe" is OK but "foo" is an error.
45064  #
45065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45066  # It is also a way to make sure we got the proper file name for the real test later on.
45067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45068  if test "x$test_shortpath" = x; then
45069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45071    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45072  fi
45073
45074  # Call helper function which possibly converts this using DOS-style short mode.
45075  # If so, the updated path is stored in $new_path.
45076
45077  input_path="$new_path"
45078  # Check if we need to convert this using DOS-style short mode. If the path
45079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45080  # take no chances and rewrite it.
45081  # Note: m4 eats our [], so we need to use [ and ] instead.
45082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45083  if test "x$has_forbidden_chars" != x; then
45084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45088      # Going to short mode and back again did indeed matter. Since short mode is
45089      # case insensitive, let's make it lowercase to improve readability.
45090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45091      # Now convert it back to Unix-stile (cygpath)
45092      input_path=`$CYGPATH -u "$shortmode_path"`
45093      new_path="$input_path"
45094    fi
45095  fi
45096
45097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45098  if test "x$test_cygdrive_prefix" = x; then
45099    # As a simple fix, exclude /usr/bin since it's not a real path.
45100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45102      # a path prefixed by /cygdrive for fixpath to work.
45103      new_path="$CYGWIN_ROOT_PATH$input_path"
45104    fi
45105  fi
45106
45107
45108  if test "x$path" != "x$new_path"; then
45109    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45112  fi
45113
45114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45115
45116  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45117  has_colon=`$ECHO $path | $GREP ^.:`
45118  new_path="$path"
45119  if test "x$has_colon" = x; then
45120    # Not in mixed or Windows style, start by that.
45121    new_path=`cmd //c echo $path`
45122  fi
45123
45124
45125  input_path="$new_path"
45126  # Check if we need to convert this using DOS-style short mode. If the path
45127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45128  # take no chances and rewrite it.
45129  # Note: m4 eats our [], so we need to use [ and ] instead.
45130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45131  if test "x$has_forbidden_chars" != x; then
45132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45134  fi
45135
45136
45137  windows_path="$new_path"
45138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45139    unix_path=`$CYGPATH -u "$windows_path"`
45140    new_path="$unix_path"
45141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45143    new_path="$unix_path"
45144  fi
45145
45146  if test "x$path" != "x$new_path"; then
45147    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45150  fi
45151
45152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45154
45155  else
45156    # We're on a unix platform. Hooray! :)
45157    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45158    has_space=`$ECHO "$path" | $GREP " "`
45159    if test "x$has_space" != x; then
45160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45162      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45163    fi
45164
45165    # Use eval to expand a potential ~
45166    eval path="$path"
45167    if test ! -f "$path" && test ! -d "$path"; then
45168      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45169    fi
45170
45171    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45172  fi
45173
45174
45175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45176
45177  # Input might be given as Windows format, start by converting to
45178  # unix format.
45179  path="$POTENTIAL_FREETYPE_LIB_PATH"
45180  new_path=`$CYGPATH -u "$path"`
45181
45182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45185  # "foo.exe" is OK but "foo" is an error.
45186  #
45187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45188  # It is also a way to make sure we got the proper file name for the real test later on.
45189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45190  if test "x$test_shortpath" = x; then
45191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45193    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45194  fi
45195
45196  # Call helper function which possibly converts this using DOS-style short mode.
45197  # If so, the updated path is stored in $new_path.
45198
45199  input_path="$new_path"
45200  # Check if we need to convert this using DOS-style short mode. If the path
45201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45202  # take no chances and rewrite it.
45203  # Note: m4 eats our [], so we need to use [ and ] instead.
45204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45205  if test "x$has_forbidden_chars" != x; then
45206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45210      # Going to short mode and back again did indeed matter. Since short mode is
45211      # case insensitive, let's make it lowercase to improve readability.
45212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45213      # Now convert it back to Unix-stile (cygpath)
45214      input_path=`$CYGPATH -u "$shortmode_path"`
45215      new_path="$input_path"
45216    fi
45217  fi
45218
45219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45220  if test "x$test_cygdrive_prefix" = x; then
45221    # As a simple fix, exclude /usr/bin since it's not a real path.
45222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45224      # a path prefixed by /cygdrive for fixpath to work.
45225      new_path="$CYGWIN_ROOT_PATH$input_path"
45226    fi
45227  fi
45228
45229
45230  if test "x$path" != "x$new_path"; then
45231    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45234  fi
45235
45236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45237
45238  path="$POTENTIAL_FREETYPE_LIB_PATH"
45239  has_colon=`$ECHO $path | $GREP ^.:`
45240  new_path="$path"
45241  if test "x$has_colon" = x; then
45242    # Not in mixed or Windows style, start by that.
45243    new_path=`cmd //c echo $path`
45244  fi
45245
45246
45247  input_path="$new_path"
45248  # Check if we need to convert this using DOS-style short mode. If the path
45249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45250  # take no chances and rewrite it.
45251  # Note: m4 eats our [], so we need to use [ and ] instead.
45252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45253  if test "x$has_forbidden_chars" != x; then
45254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45256  fi
45257
45258
45259  windows_path="$new_path"
45260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45261    unix_path=`$CYGPATH -u "$windows_path"`
45262    new_path="$unix_path"
45263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45265    new_path="$unix_path"
45266  fi
45267
45268  if test "x$path" != "x$new_path"; then
45269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45272  fi
45273
45274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45276
45277  else
45278    # We're on a unix platform. Hooray! :)
45279    path="$POTENTIAL_FREETYPE_LIB_PATH"
45280    has_space=`$ECHO "$path" | $GREP " "`
45281    if test "x$has_space" != x; then
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45284      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45285    fi
45286
45287    # Use eval to expand a potential ~
45288    eval path="$path"
45289    if test ! -f "$path" && test ! -d "$path"; then
45290      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45291    fi
45292
45293    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45294  fi
45295
45296
45297    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45299$as_echo_n "checking for freetype includes... " >&6; }
45300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45301$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45302    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45304$as_echo_n "checking for freetype libraries... " >&6; }
45305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45306$as_echo "$FREETYPE_LIB_PATH" >&6; }
45307  fi
45308
45309        if test "x$FOUND_FREETYPE" != xyes; then
45310          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45311        fi
45312      else
45313        # User specified only one of lib or include. This is an error.
45314        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45315          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45316$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45317          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45318        else
45319          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45320$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45321          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45322        fi
45323      fi
45324    else
45325      # User did not specify settings, but we need freetype. Try to locate it.
45326
45327      if test "x$BUNDLE_FREETYPE" = x; then
45328        # If not specified, default is to bundle freetype only on windows
45329        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45330          BUNDLE_FREETYPE=yes
45331        else
45332          BUNDLE_FREETYPE=no
45333        fi
45334      fi
45335
45336      if test "x$FOUND_FREETYPE" != xyes; then
45337        # Check builddeps
45338
45339
45340  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45341    # Source the builddeps file again, to make sure it uses the latest variables!
45342    . $builddepsfile
45343    # Look for a target and build machine specific resource!
45344    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45345    if test "x$resource" = x; then
45346      # Ok, lets instead look for a target specific resource
45347      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45348    fi
45349    if test "x$resource" = x; then
45350      # Ok, lets instead look for a build specific resource
45351      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45352    fi
45353    if test "x$resource" = x; then
45354      # Ok, lets instead look for a generic resource
45355      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45356      resource=${builddep_freetype2}
45357    fi
45358    if test "x$resource" != x; then
45359      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45360$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45361      # If the resource in the builddeps.conf file is an existing directory,
45362      # for example /java/linux/cups
45363      if test -d ${resource}; then
45364        depdir=${resource}
45365      else
45366
45367  # freetype2 is for example mymodule
45368  # $resource is for example libs/general/libmymod_1_2_3.zip
45369  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45370  # $with_builddeps_dir is for example /localhome/builddeps
45371  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45372  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45373  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45374  filename=`basename $resource`
45375  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45376  filebase=${filename%%.*}
45377  extension=${filename#*.}
45378  installdir=$with_builddeps_dir/$filebase
45379  if test ! -f $installdir/$filename.unpacked; then
45380    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45381$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45382    if test ! -d $installdir; then
45383      mkdir -p $installdir
45384    fi
45385    if test ! -d $installdir; then
45386      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45387    fi
45388    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45389    touch $tmpfile
45390    if test ! -f $tmpfile; then
45391      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45392    fi
45393
45394  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45395  # $tmpfile is the local file name for the downloaded file.
45396  VALID_TOOL=no
45397  if test "x$BDEPS_FTP" = xwget; then
45398    VALID_TOOL=yes
45399    wget -O $tmpfile $with_builddeps_server/$resource
45400  fi
45401  if test "x$BDEPS_FTP" = xlftp; then
45402    VALID_TOOL=yes
45403    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45404  fi
45405  if test "x$BDEPS_FTP" = xftp; then
45406    VALID_TOOL=yes
45407    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45408    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45409    FTPUSERPWD=${FTPSERVER%%@*}
45410    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45411      FTPUSER=${userpwd%%:*}
45412      FTPPWD=${userpwd#*@}
45413      FTPSERVER=${FTPSERVER#*@}
45414    else
45415      FTPUSER=ftp
45416      FTPPWD=ftp
45417    fi
45418    # the "pass" command does not work on some
45419    # ftp clients (read ftp.exe) but if it works,
45420    # passive mode is better!
45421    ( \
45422        echo "user $FTPUSER $FTPPWD"        ; \
45423        echo "pass"                         ; \
45424        echo "bin"                          ; \
45425        echo "get $FTPPATH $tmpfile"              ; \
45426    ) | ftp -in $FTPSERVER
45427  fi
45428  if test "x$VALID_TOOL" != xyes; then
45429    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45430  fi
45431
45432    mv $tmpfile $installdir/$filename
45433    if test ! -s $installdir/$filename; then
45434      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45435    fi
45436    case "$extension" in
45437      zip)  echo "Unzipping $installdir/$filename..."
45438        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45439        ;;
45440      tar.gz) echo "Untaring $installdir/$filename..."
45441        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45442        ;;
45443      tgz) echo "Untaring $installdir/$filename..."
45444        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45445        ;;
45446      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45447        ;;
45448    esac
45449  fi
45450  if test -f $installdir/$filename.unpacked; then
45451    depdir=$installdir
45452  fi
45453
45454      fi
45455      # Source the builddeps file again, because in the previous command, the depdir
45456      # was updated to point at the current build dependency install directory.
45457      . $builddepsfile
45458      # Now extract variables from the builddeps.conf files.
45459      theroot=${builddep_freetype2_ROOT}
45460      thecflags=${builddep_freetype2_CFLAGS}
45461      thelibs=${builddep_freetype2_LIBS}
45462      if test "x$depdir" = x; then
45463        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45464      fi
45465      FREETYPE=$depdir
45466      if test "x$theroot" != x; then
45467        FREETYPE="$theroot"
45468      fi
45469      if test "x$thecflags" != x; then
45470        FREETYPE_CFLAGS="$thecflags"
45471      fi
45472      if test "x$thelibs" != x; then
45473        FREETYPE_LIBS="$thelibs"
45474      fi
45475      FOUND_FREETYPE=yes
45476      else FOUND_FREETYPE=no
45477
45478    fi
45479    else FOUND_FREETYPE=no
45480
45481  fi
45482
45483        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45484        if test "x$FOUND_FREETYPE" = xyes; then
45485          if test "x$BUNDLE_FREETYPE" = xyes; then
45486            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45487$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45488            FOUND_FREETYPE=no
45489          else
45490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45491$as_echo_n "checking for freetype... " >&6; }
45492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45493$as_echo "yes (using builddeps)" >&6; }
45494          fi
45495        fi
45496      fi
45497
45498      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45499      if test "x$SYSROOT" = x; then
45500        if test "x$FOUND_FREETYPE" != xyes; then
45501          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45502          if test "x$PKG_CONFIG" != x; then
45503
45504pkg_failed=no
45505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45506$as_echo_n "checking for FREETYPE... " >&6; }
45507
45508if test -n "$FREETYPE_CFLAGS"; then
45509    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45510 elif test -n "$PKG_CONFIG"; then
45511    if test -n "$PKG_CONFIG" && \
45512    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45513  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45514  ac_status=$?
45515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45516  test $ac_status = 0; }; then
45517  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45518else
45519  pkg_failed=yes
45520fi
45521 else
45522    pkg_failed=untried
45523fi
45524if test -n "$FREETYPE_LIBS"; then
45525    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45526 elif test -n "$PKG_CONFIG"; then
45527    if test -n "$PKG_CONFIG" && \
45528    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45529  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45530  ac_status=$?
45531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45532  test $ac_status = 0; }; then
45533  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45534else
45535  pkg_failed=yes
45536fi
45537 else
45538    pkg_failed=untried
45539fi
45540
45541
45542
45543if test $pkg_failed = yes; then
45544
45545if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45546        _pkg_short_errors_supported=yes
45547else
45548        _pkg_short_errors_supported=no
45549fi
45550        if test $_pkg_short_errors_supported = yes; then
45551	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45552        else
45553	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45554        fi
45555	# Put the nasty error message in config.log where it belongs
45556	echo "$FREETYPE_PKG_ERRORS" >&5
45557
45558	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45559$as_echo "no" >&6; }
45560                FOUND_FREETYPE=no
45561elif test $pkg_failed = untried; then
45562	FOUND_FREETYPE=no
45563else
45564	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45565	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45567$as_echo "yes" >&6; }
45568	FOUND_FREETYPE=yes
45569fi
45570            if test "x$FOUND_FREETYPE" = xyes; then
45571              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45572              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45573              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45574              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45575                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45576              fi
45577              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45578              if test "x$BUNDLE_FREETYPE" = xyes; then
45579                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45580$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45581                FOUND_FREETYPE=no
45582              else
45583                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45584$as_echo_n "checking for freetype... " >&6; }
45585                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45586$as_echo "yes (using pkg-config)" >&6; }
45587              fi
45588            fi
45589          fi
45590        fi
45591      fi
45592
45593      if test "x$FOUND_FREETYPE" != xyes; then
45594        # Check in well-known locations
45595        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45596          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45597
45598  windows_path="$FREETYPE_BASE_DIR"
45599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45600    unix_path=`$CYGPATH -u "$windows_path"`
45601    FREETYPE_BASE_DIR="$unix_path"
45602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45604    FREETYPE_BASE_DIR="$unix_path"
45605  fi
45606
45607
45608  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45609  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45610  METHOD="well-known location"
45611
45612  # Let's start with an optimistic view of the world :-)
45613  FOUND_FREETYPE=yes
45614
45615  # First look for the canonical freetype main include file ft2build.h.
45616  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45617    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45618    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45619    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45620      # Fail.
45621      FOUND_FREETYPE=no
45622    fi
45623  fi
45624
45625  if test "x$FOUND_FREETYPE" = xyes; then
45626    # Include file found, let's continue the sanity check.
45627    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45628$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45629
45630    # Reset to default value
45631    FREETYPE_BASE_NAME=freetype
45632    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45633    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45634      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45635          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45636        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45637        # for the .6 version explicitly.
45638        FREETYPE_BASE_NAME=freetype.6
45639        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45640        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45641$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45642      else
45643        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45644$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45645        FOUND_FREETYPE=no
45646      fi
45647    else
45648      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45649        # On Windows, we will need both .lib and .dll file.
45650        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45651          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45652$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45653          FOUND_FREETYPE=no
45654        fi
45655      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45656          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45657        # Found lib in isa dir, use that instead.
45658        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45659        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45660$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45661      fi
45662    fi
45663  fi
45664
45665  if test "x$FOUND_FREETYPE" = xyes; then
45666
45667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45668
45669  # Input might be given as Windows format, start by converting to
45670  # unix format.
45671  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45672  new_path=`$CYGPATH -u "$path"`
45673
45674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45677  # "foo.exe" is OK but "foo" is an error.
45678  #
45679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45680  # It is also a way to make sure we got the proper file name for the real test later on.
45681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45682  if test "x$test_shortpath" = x; then
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45686  fi
45687
45688  # Call helper function which possibly converts this using DOS-style short mode.
45689  # If so, the updated path is stored in $new_path.
45690
45691  input_path="$new_path"
45692  # Check if we need to convert this using DOS-style short mode. If the path
45693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45694  # take no chances and rewrite it.
45695  # Note: m4 eats our [], so we need to use [ and ] instead.
45696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45697  if test "x$has_forbidden_chars" != x; then
45698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45702      # Going to short mode and back again did indeed matter. Since short mode is
45703      # case insensitive, let's make it lowercase to improve readability.
45704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45705      # Now convert it back to Unix-stile (cygpath)
45706      input_path=`$CYGPATH -u "$shortmode_path"`
45707      new_path="$input_path"
45708    fi
45709  fi
45710
45711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45712  if test "x$test_cygdrive_prefix" = x; then
45713    # As a simple fix, exclude /usr/bin since it's not a real path.
45714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45716      # a path prefixed by /cygdrive for fixpath to work.
45717      new_path="$CYGWIN_ROOT_PATH$input_path"
45718    fi
45719  fi
45720
45721
45722  if test "x$path" != "x$new_path"; then
45723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45726  fi
45727
45728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45729
45730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45731  has_colon=`$ECHO $path | $GREP ^.:`
45732  new_path="$path"
45733  if test "x$has_colon" = x; then
45734    # Not in mixed or Windows style, start by that.
45735    new_path=`cmd //c echo $path`
45736  fi
45737
45738
45739  input_path="$new_path"
45740  # Check if we need to convert this using DOS-style short mode. If the path
45741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45742  # take no chances and rewrite it.
45743  # Note: m4 eats our [], so we need to use [ and ] instead.
45744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45745  if test "x$has_forbidden_chars" != x; then
45746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45748  fi
45749
45750
45751  windows_path="$new_path"
45752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45753    unix_path=`$CYGPATH -u "$windows_path"`
45754    new_path="$unix_path"
45755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45757    new_path="$unix_path"
45758  fi
45759
45760  if test "x$path" != "x$new_path"; then
45761    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45764  fi
45765
45766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45768
45769  else
45770    # We're on a unix platform. Hooray! :)
45771    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45772    has_space=`$ECHO "$path" | $GREP " "`
45773    if test "x$has_space" != x; then
45774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45776      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45777    fi
45778
45779    # Use eval to expand a potential ~
45780    eval path="$path"
45781    if test ! -f "$path" && test ! -d "$path"; then
45782      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45783    fi
45784
45785    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45786  fi
45787
45788
45789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45790
45791  # Input might be given as Windows format, start by converting to
45792  # unix format.
45793  path="$POTENTIAL_FREETYPE_LIB_PATH"
45794  new_path=`$CYGPATH -u "$path"`
45795
45796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45799  # "foo.exe" is OK but "foo" is an error.
45800  #
45801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45802  # It is also a way to make sure we got the proper file name for the real test later on.
45803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45804  if test "x$test_shortpath" = x; then
45805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45807    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45808  fi
45809
45810  # Call helper function which possibly converts this using DOS-style short mode.
45811  # If so, the updated path is stored in $new_path.
45812
45813  input_path="$new_path"
45814  # Check if we need to convert this using DOS-style short mode. If the path
45815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45816  # take no chances and rewrite it.
45817  # Note: m4 eats our [], so we need to use [ and ] instead.
45818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45819  if test "x$has_forbidden_chars" != x; then
45820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45824      # Going to short mode and back again did indeed matter. Since short mode is
45825      # case insensitive, let's make it lowercase to improve readability.
45826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45827      # Now convert it back to Unix-stile (cygpath)
45828      input_path=`$CYGPATH -u "$shortmode_path"`
45829      new_path="$input_path"
45830    fi
45831  fi
45832
45833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45834  if test "x$test_cygdrive_prefix" = x; then
45835    # As a simple fix, exclude /usr/bin since it's not a real path.
45836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45838      # a path prefixed by /cygdrive for fixpath to work.
45839      new_path="$CYGWIN_ROOT_PATH$input_path"
45840    fi
45841  fi
45842
45843
45844  if test "x$path" != "x$new_path"; then
45845    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45848  fi
45849
45850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45851
45852  path="$POTENTIAL_FREETYPE_LIB_PATH"
45853  has_colon=`$ECHO $path | $GREP ^.:`
45854  new_path="$path"
45855  if test "x$has_colon" = x; then
45856    # Not in mixed or Windows style, start by that.
45857    new_path=`cmd //c echo $path`
45858  fi
45859
45860
45861  input_path="$new_path"
45862  # Check if we need to convert this using DOS-style short mode. If the path
45863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45864  # take no chances and rewrite it.
45865  # Note: m4 eats our [], so we need to use [ and ] instead.
45866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45867  if test "x$has_forbidden_chars" != x; then
45868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45870  fi
45871
45872
45873  windows_path="$new_path"
45874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45875    unix_path=`$CYGPATH -u "$windows_path"`
45876    new_path="$unix_path"
45877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45879    new_path="$unix_path"
45880  fi
45881
45882  if test "x$path" != "x$new_path"; then
45883    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45886  fi
45887
45888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45890
45891  else
45892    # We're on a unix platform. Hooray! :)
45893    path="$POTENTIAL_FREETYPE_LIB_PATH"
45894    has_space=`$ECHO "$path" | $GREP " "`
45895    if test "x$has_space" != x; then
45896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45898      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45899    fi
45900
45901    # Use eval to expand a potential ~
45902    eval path="$path"
45903    if test ! -f "$path" && test ! -d "$path"; then
45904      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45905    fi
45906
45907    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45908  fi
45909
45910
45911    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45913$as_echo_n "checking for freetype includes... " >&6; }
45914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45915$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45916    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45918$as_echo_n "checking for freetype libraries... " >&6; }
45919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45920$as_echo "$FREETYPE_LIB_PATH" >&6; }
45921  fi
45922
45923          if test "x$FOUND_FREETYPE" != xyes; then
45924            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45925
45926  windows_path="$FREETYPE_BASE_DIR"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    FREETYPE_BASE_DIR="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    FREETYPE_BASE_DIR="$unix_path"
45933  fi
45934
45935
45936  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45937  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45938  METHOD="well-known location"
45939
45940  # Let's start with an optimistic view of the world :-)
45941  FOUND_FREETYPE=yes
45942
45943  # First look for the canonical freetype main include file ft2build.h.
45944  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45945    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45946    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45947    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45948      # Fail.
45949      FOUND_FREETYPE=no
45950    fi
45951  fi
45952
45953  if test "x$FOUND_FREETYPE" = xyes; then
45954    # Include file found, let's continue the sanity check.
45955    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45956$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45957
45958    # Reset to default value
45959    FREETYPE_BASE_NAME=freetype
45960    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45961    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45962      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45963          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45964        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45965        # for the .6 version explicitly.
45966        FREETYPE_BASE_NAME=freetype.6
45967        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45968        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45969$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45970      else
45971        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45973        FOUND_FREETYPE=no
45974      fi
45975    else
45976      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45977        # On Windows, we will need both .lib and .dll file.
45978        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45979          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45980$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45981          FOUND_FREETYPE=no
45982        fi
45983      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45984          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45985        # Found lib in isa dir, use that instead.
45986        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45987        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45988$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45989      fi
45990    fi
45991  fi
45992
45993  if test "x$FOUND_FREETYPE" = xyes; then
45994
45995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45996
45997  # Input might be given as Windows format, start by converting to
45998  # unix format.
45999  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46000  new_path=`$CYGPATH -u "$path"`
46001
46002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46005  # "foo.exe" is OK but "foo" is an error.
46006  #
46007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46008  # It is also a way to make sure we got the proper file name for the real test later on.
46009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46010  if test "x$test_shortpath" = x; then
46011    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46012$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46013    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46014  fi
46015
46016  # Call helper function which possibly converts this using DOS-style short mode.
46017  # If so, the updated path is stored in $new_path.
46018
46019  input_path="$new_path"
46020  # Check if we need to convert this using DOS-style short mode. If the path
46021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46022  # take no chances and rewrite it.
46023  # Note: m4 eats our [], so we need to use [ and ] instead.
46024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46025  if test "x$has_forbidden_chars" != x; then
46026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46030      # Going to short mode and back again did indeed matter. Since short mode is
46031      # case insensitive, let's make it lowercase to improve readability.
46032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46033      # Now convert it back to Unix-stile (cygpath)
46034      input_path=`$CYGPATH -u "$shortmode_path"`
46035      new_path="$input_path"
46036    fi
46037  fi
46038
46039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46040  if test "x$test_cygdrive_prefix" = x; then
46041    # As a simple fix, exclude /usr/bin since it's not a real path.
46042    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46044      # a path prefixed by /cygdrive for fixpath to work.
46045      new_path="$CYGWIN_ROOT_PATH$input_path"
46046    fi
46047  fi
46048
46049
46050  if test "x$path" != "x$new_path"; then
46051    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46054  fi
46055
46056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46057
46058  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46059  has_colon=`$ECHO $path | $GREP ^.:`
46060  new_path="$path"
46061  if test "x$has_colon" = x; then
46062    # Not in mixed or Windows style, start by that.
46063    new_path=`cmd //c echo $path`
46064  fi
46065
46066
46067  input_path="$new_path"
46068  # Check if we need to convert this using DOS-style short mode. If the path
46069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46070  # take no chances and rewrite it.
46071  # Note: m4 eats our [], so we need to use [ and ] instead.
46072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46073  if test "x$has_forbidden_chars" != x; then
46074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46076  fi
46077
46078
46079  windows_path="$new_path"
46080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46081    unix_path=`$CYGPATH -u "$windows_path"`
46082    new_path="$unix_path"
46083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46085    new_path="$unix_path"
46086  fi
46087
46088  if test "x$path" != "x$new_path"; then
46089    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46091$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46092  fi
46093
46094  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46095  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46096
46097  else
46098    # We're on a unix platform. Hooray! :)
46099    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46100    has_space=`$ECHO "$path" | $GREP " "`
46101    if test "x$has_space" != x; then
46102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46103$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46104      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46105    fi
46106
46107    # Use eval to expand a potential ~
46108    eval path="$path"
46109    if test ! -f "$path" && test ! -d "$path"; then
46110      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46111    fi
46112
46113    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46114  fi
46115
46116
46117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46118
46119  # Input might be given as Windows format, start by converting to
46120  # unix format.
46121  path="$POTENTIAL_FREETYPE_LIB_PATH"
46122  new_path=`$CYGPATH -u "$path"`
46123
46124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46127  # "foo.exe" is OK but "foo" is an error.
46128  #
46129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46130  # It is also a way to make sure we got the proper file name for the real test later on.
46131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46132  if test "x$test_shortpath" = x; then
46133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46135    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46136  fi
46137
46138  # Call helper function which possibly converts this using DOS-style short mode.
46139  # If so, the updated path is stored in $new_path.
46140
46141  input_path="$new_path"
46142  # Check if we need to convert this using DOS-style short mode. If the path
46143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46144  # take no chances and rewrite it.
46145  # Note: m4 eats our [], so we need to use [ and ] instead.
46146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46147  if test "x$has_forbidden_chars" != x; then
46148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46152      # Going to short mode and back again did indeed matter. Since short mode is
46153      # case insensitive, let's make it lowercase to improve readability.
46154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46155      # Now convert it back to Unix-stile (cygpath)
46156      input_path=`$CYGPATH -u "$shortmode_path"`
46157      new_path="$input_path"
46158    fi
46159  fi
46160
46161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46162  if test "x$test_cygdrive_prefix" = x; then
46163    # As a simple fix, exclude /usr/bin since it's not a real path.
46164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46166      # a path prefixed by /cygdrive for fixpath to work.
46167      new_path="$CYGWIN_ROOT_PATH$input_path"
46168    fi
46169  fi
46170
46171
46172  if test "x$path" != "x$new_path"; then
46173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46176  fi
46177
46178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46179
46180  path="$POTENTIAL_FREETYPE_LIB_PATH"
46181  has_colon=`$ECHO $path | $GREP ^.:`
46182  new_path="$path"
46183  if test "x$has_colon" = x; then
46184    # Not in mixed or Windows style, start by that.
46185    new_path=`cmd //c echo $path`
46186  fi
46187
46188
46189  input_path="$new_path"
46190  # Check if we need to convert this using DOS-style short mode. If the path
46191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46192  # take no chances and rewrite it.
46193  # Note: m4 eats our [], so we need to use [ and ] instead.
46194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46195  if test "x$has_forbidden_chars" != x; then
46196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46198  fi
46199
46200
46201  windows_path="$new_path"
46202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46203    unix_path=`$CYGPATH -u "$windows_path"`
46204    new_path="$unix_path"
46205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46207    new_path="$unix_path"
46208  fi
46209
46210  if test "x$path" != "x$new_path"; then
46211    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46213$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46214  fi
46215
46216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46218
46219  else
46220    # We're on a unix platform. Hooray! :)
46221    path="$POTENTIAL_FREETYPE_LIB_PATH"
46222    has_space=`$ECHO "$path" | $GREP " "`
46223    if test "x$has_space" != x; then
46224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46225$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46226      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46227    fi
46228
46229    # Use eval to expand a potential ~
46230    eval path="$path"
46231    if test ! -f "$path" && test ! -d "$path"; then
46232      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46233    fi
46234
46235    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46236  fi
46237
46238
46239    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46241$as_echo_n "checking for freetype includes... " >&6; }
46242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46243$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46244    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46246$as_echo_n "checking for freetype libraries... " >&6; }
46247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46248$as_echo "$FREETYPE_LIB_PATH" >&6; }
46249  fi
46250
46251          fi
46252        else
46253          FREETYPE_BASE_DIR="$SYSROOT/usr"
46254
46255  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46256  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46257  METHOD="well-known location"
46258
46259  # Let's start with an optimistic view of the world :-)
46260  FOUND_FREETYPE=yes
46261
46262  # First look for the canonical freetype main include file ft2build.h.
46263  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46264    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46265    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46266    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46267      # Fail.
46268      FOUND_FREETYPE=no
46269    fi
46270  fi
46271
46272  if test "x$FOUND_FREETYPE" = xyes; then
46273    # Include file found, let's continue the sanity check.
46274    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46275$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46276
46277    # Reset to default value
46278    FREETYPE_BASE_NAME=freetype
46279    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46280    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46281      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46282          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46283        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46284        # for the .6 version explicitly.
46285        FREETYPE_BASE_NAME=freetype.6
46286        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46287        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46288$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46289      else
46290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46291$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46292        FOUND_FREETYPE=no
46293      fi
46294    else
46295      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46296        # On Windows, we will need both .lib and .dll file.
46297        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46298          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46299$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46300          FOUND_FREETYPE=no
46301        fi
46302      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46303          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46304        # Found lib in isa dir, use that instead.
46305        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46306        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46307$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46308      fi
46309    fi
46310  fi
46311
46312  if test "x$FOUND_FREETYPE" = xyes; then
46313
46314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46315
46316  # Input might be given as Windows format, start by converting to
46317  # unix format.
46318  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46319  new_path=`$CYGPATH -u "$path"`
46320
46321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46324  # "foo.exe" is OK but "foo" is an error.
46325  #
46326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46327  # It is also a way to make sure we got the proper file name for the real test later on.
46328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46329  if test "x$test_shortpath" = x; then
46330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46332    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46333  fi
46334
46335  # Call helper function which possibly converts this using DOS-style short mode.
46336  # If so, the updated path is stored in $new_path.
46337
46338  input_path="$new_path"
46339  # Check if we need to convert this using DOS-style short mode. If the path
46340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46341  # take no chances and rewrite it.
46342  # Note: m4 eats our [], so we need to use [ and ] instead.
46343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46344  if test "x$has_forbidden_chars" != x; then
46345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46349      # Going to short mode and back again did indeed matter. Since short mode is
46350      # case insensitive, let's make it lowercase to improve readability.
46351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46352      # Now convert it back to Unix-stile (cygpath)
46353      input_path=`$CYGPATH -u "$shortmode_path"`
46354      new_path="$input_path"
46355    fi
46356  fi
46357
46358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46359  if test "x$test_cygdrive_prefix" = x; then
46360    # As a simple fix, exclude /usr/bin since it's not a real path.
46361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46363      # a path prefixed by /cygdrive for fixpath to work.
46364      new_path="$CYGWIN_ROOT_PATH$input_path"
46365    fi
46366  fi
46367
46368
46369  if test "x$path" != "x$new_path"; then
46370    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46373  fi
46374
46375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46376
46377  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46378  has_colon=`$ECHO $path | $GREP ^.:`
46379  new_path="$path"
46380  if test "x$has_colon" = x; then
46381    # Not in mixed or Windows style, start by that.
46382    new_path=`cmd //c echo $path`
46383  fi
46384
46385
46386  input_path="$new_path"
46387  # Check if we need to convert this using DOS-style short mode. If the path
46388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46389  # take no chances and rewrite it.
46390  # Note: m4 eats our [], so we need to use [ and ] instead.
46391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46392  if test "x$has_forbidden_chars" != x; then
46393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46395  fi
46396
46397
46398  windows_path="$new_path"
46399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46400    unix_path=`$CYGPATH -u "$windows_path"`
46401    new_path="$unix_path"
46402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46404    new_path="$unix_path"
46405  fi
46406
46407  if test "x$path" != "x$new_path"; then
46408    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46410$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46411  fi
46412
46413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46415
46416  else
46417    # We're on a unix platform. Hooray! :)
46418    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46419    has_space=`$ECHO "$path" | $GREP " "`
46420    if test "x$has_space" != x; then
46421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46423      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46424    fi
46425
46426    # Use eval to expand a potential ~
46427    eval path="$path"
46428    if test ! -f "$path" && test ! -d "$path"; then
46429      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46430    fi
46431
46432    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46433  fi
46434
46435
46436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46437
46438  # Input might be given as Windows format, start by converting to
46439  # unix format.
46440  path="$POTENTIAL_FREETYPE_LIB_PATH"
46441  new_path=`$CYGPATH -u "$path"`
46442
46443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46446  # "foo.exe" is OK but "foo" is an error.
46447  #
46448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46449  # It is also a way to make sure we got the proper file name for the real test later on.
46450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46451  if test "x$test_shortpath" = x; then
46452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46455  fi
46456
46457  # Call helper function which possibly converts this using DOS-style short mode.
46458  # If so, the updated path is stored in $new_path.
46459
46460  input_path="$new_path"
46461  # Check if we need to convert this using DOS-style short mode. If the path
46462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46463  # take no chances and rewrite it.
46464  # Note: m4 eats our [], so we need to use [ and ] instead.
46465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46466  if test "x$has_forbidden_chars" != x; then
46467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46471      # Going to short mode and back again did indeed matter. Since short mode is
46472      # case insensitive, let's make it lowercase to improve readability.
46473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46474      # Now convert it back to Unix-stile (cygpath)
46475      input_path=`$CYGPATH -u "$shortmode_path"`
46476      new_path="$input_path"
46477    fi
46478  fi
46479
46480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46481  if test "x$test_cygdrive_prefix" = x; then
46482    # As a simple fix, exclude /usr/bin since it's not a real path.
46483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46485      # a path prefixed by /cygdrive for fixpath to work.
46486      new_path="$CYGWIN_ROOT_PATH$input_path"
46487    fi
46488  fi
46489
46490
46491  if test "x$path" != "x$new_path"; then
46492    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46495  fi
46496
46497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46498
46499  path="$POTENTIAL_FREETYPE_LIB_PATH"
46500  has_colon=`$ECHO $path | $GREP ^.:`
46501  new_path="$path"
46502  if test "x$has_colon" = x; then
46503    # Not in mixed or Windows style, start by that.
46504    new_path=`cmd //c echo $path`
46505  fi
46506
46507
46508  input_path="$new_path"
46509  # Check if we need to convert this using DOS-style short mode. If the path
46510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46511  # take no chances and rewrite it.
46512  # Note: m4 eats our [], so we need to use [ and ] instead.
46513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46514  if test "x$has_forbidden_chars" != x; then
46515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46517  fi
46518
46519
46520  windows_path="$new_path"
46521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46522    unix_path=`$CYGPATH -u "$windows_path"`
46523    new_path="$unix_path"
46524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46526    new_path="$unix_path"
46527  fi
46528
46529  if test "x$path" != "x$new_path"; then
46530    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46533  fi
46534
46535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46537
46538  else
46539    # We're on a unix platform. Hooray! :)
46540    path="$POTENTIAL_FREETYPE_LIB_PATH"
46541    has_space=`$ECHO "$path" | $GREP " "`
46542    if test "x$has_space" != x; then
46543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46546    fi
46547
46548    # Use eval to expand a potential ~
46549    eval path="$path"
46550    if test ! -f "$path" && test ! -d "$path"; then
46551      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46552    fi
46553
46554    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46555  fi
46556
46557
46558    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46560$as_echo_n "checking for freetype includes... " >&6; }
46561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46562$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46563    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46565$as_echo_n "checking for freetype libraries... " >&6; }
46566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46567$as_echo "$FREETYPE_LIB_PATH" >&6; }
46568  fi
46569
46570
46571          if test "x$FOUND_FREETYPE" != xyes; then
46572            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46573
46574  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46575  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46576  METHOD="well-known location"
46577
46578  # Let's start with an optimistic view of the world :-)
46579  FOUND_FREETYPE=yes
46580
46581  # First look for the canonical freetype main include file ft2build.h.
46582  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46583    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46584    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46585    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46586      # Fail.
46587      FOUND_FREETYPE=no
46588    fi
46589  fi
46590
46591  if test "x$FOUND_FREETYPE" = xyes; then
46592    # Include file found, let's continue the sanity check.
46593    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46594$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46595
46596    # Reset to default value
46597    FREETYPE_BASE_NAME=freetype
46598    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46599    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46600      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46601          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46602        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46603        # for the .6 version explicitly.
46604        FREETYPE_BASE_NAME=freetype.6
46605        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46606        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46607$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46608      else
46609        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46610$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46611        FOUND_FREETYPE=no
46612      fi
46613    else
46614      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46615        # On Windows, we will need both .lib and .dll file.
46616        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46617          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46619          FOUND_FREETYPE=no
46620        fi
46621      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46622          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46623        # Found lib in isa dir, use that instead.
46624        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46625        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46626$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46627      fi
46628    fi
46629  fi
46630
46631  if test "x$FOUND_FREETYPE" = xyes; then
46632
46633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46634
46635  # Input might be given as Windows format, start by converting to
46636  # unix format.
46637  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46638  new_path=`$CYGPATH -u "$path"`
46639
46640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46643  # "foo.exe" is OK but "foo" is an error.
46644  #
46645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46646  # It is also a way to make sure we got the proper file name for the real test later on.
46647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46648  if test "x$test_shortpath" = x; then
46649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46652  fi
46653
46654  # Call helper function which possibly converts this using DOS-style short mode.
46655  # If so, the updated path is stored in $new_path.
46656
46657  input_path="$new_path"
46658  # Check if we need to convert this using DOS-style short mode. If the path
46659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46660  # take no chances and rewrite it.
46661  # Note: m4 eats our [], so we need to use [ and ] instead.
46662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46663  if test "x$has_forbidden_chars" != x; then
46664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46668      # Going to short mode and back again did indeed matter. Since short mode is
46669      # case insensitive, let's make it lowercase to improve readability.
46670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46671      # Now convert it back to Unix-stile (cygpath)
46672      input_path=`$CYGPATH -u "$shortmode_path"`
46673      new_path="$input_path"
46674    fi
46675  fi
46676
46677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46678  if test "x$test_cygdrive_prefix" = x; then
46679    # As a simple fix, exclude /usr/bin since it's not a real path.
46680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46682      # a path prefixed by /cygdrive for fixpath to work.
46683      new_path="$CYGWIN_ROOT_PATH$input_path"
46684    fi
46685  fi
46686
46687
46688  if test "x$path" != "x$new_path"; then
46689    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46692  fi
46693
46694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46695
46696  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46697  has_colon=`$ECHO $path | $GREP ^.:`
46698  new_path="$path"
46699  if test "x$has_colon" = x; then
46700    # Not in mixed or Windows style, start by that.
46701    new_path=`cmd //c echo $path`
46702  fi
46703
46704
46705  input_path="$new_path"
46706  # Check if we need to convert this using DOS-style short mode. If the path
46707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46708  # take no chances and rewrite it.
46709  # Note: m4 eats our [], so we need to use [ and ] instead.
46710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46711  if test "x$has_forbidden_chars" != x; then
46712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46714  fi
46715
46716
46717  windows_path="$new_path"
46718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46719    unix_path=`$CYGPATH -u "$windows_path"`
46720    new_path="$unix_path"
46721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46723    new_path="$unix_path"
46724  fi
46725
46726  if test "x$path" != "x$new_path"; then
46727    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46730  fi
46731
46732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46734
46735  else
46736    # We're on a unix platform. Hooray! :)
46737    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46738    has_space=`$ECHO "$path" | $GREP " "`
46739    if test "x$has_space" != x; then
46740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46742      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46743    fi
46744
46745    # Use eval to expand a potential ~
46746    eval path="$path"
46747    if test ! -f "$path" && test ! -d "$path"; then
46748      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46749    fi
46750
46751    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46752  fi
46753
46754
46755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46756
46757  # Input might be given as Windows format, start by converting to
46758  # unix format.
46759  path="$POTENTIAL_FREETYPE_LIB_PATH"
46760  new_path=`$CYGPATH -u "$path"`
46761
46762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46765  # "foo.exe" is OK but "foo" is an error.
46766  #
46767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46768  # It is also a way to make sure we got the proper file name for the real test later on.
46769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46770  if test "x$test_shortpath" = x; then
46771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46773    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46774  fi
46775
46776  # Call helper function which possibly converts this using DOS-style short mode.
46777  # If so, the updated path is stored in $new_path.
46778
46779  input_path="$new_path"
46780  # Check if we need to convert this using DOS-style short mode. If the path
46781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46782  # take no chances and rewrite it.
46783  # Note: m4 eats our [], so we need to use [ and ] instead.
46784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46785  if test "x$has_forbidden_chars" != x; then
46786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46790      # Going to short mode and back again did indeed matter. Since short mode is
46791      # case insensitive, let's make it lowercase to improve readability.
46792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46793      # Now convert it back to Unix-stile (cygpath)
46794      input_path=`$CYGPATH -u "$shortmode_path"`
46795      new_path="$input_path"
46796    fi
46797  fi
46798
46799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46800  if test "x$test_cygdrive_prefix" = x; then
46801    # As a simple fix, exclude /usr/bin since it's not a real path.
46802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46804      # a path prefixed by /cygdrive for fixpath to work.
46805      new_path="$CYGWIN_ROOT_PATH$input_path"
46806    fi
46807  fi
46808
46809
46810  if test "x$path" != "x$new_path"; then
46811    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46814  fi
46815
46816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46817
46818  path="$POTENTIAL_FREETYPE_LIB_PATH"
46819  has_colon=`$ECHO $path | $GREP ^.:`
46820  new_path="$path"
46821  if test "x$has_colon" = x; then
46822    # Not in mixed or Windows style, start by that.
46823    new_path=`cmd //c echo $path`
46824  fi
46825
46826
46827  input_path="$new_path"
46828  # Check if we need to convert this using DOS-style short mode. If the path
46829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46830  # take no chances and rewrite it.
46831  # Note: m4 eats our [], so we need to use [ and ] instead.
46832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46833  if test "x$has_forbidden_chars" != x; then
46834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46836  fi
46837
46838
46839  windows_path="$new_path"
46840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46841    unix_path=`$CYGPATH -u "$windows_path"`
46842    new_path="$unix_path"
46843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46845    new_path="$unix_path"
46846  fi
46847
46848  if test "x$path" != "x$new_path"; then
46849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46852  fi
46853
46854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46856
46857  else
46858    # We're on a unix platform. Hooray! :)
46859    path="$POTENTIAL_FREETYPE_LIB_PATH"
46860    has_space=`$ECHO "$path" | $GREP " "`
46861    if test "x$has_space" != x; then
46862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46864      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46865    fi
46866
46867    # Use eval to expand a potential ~
46868    eval path="$path"
46869    if test ! -f "$path" && test ! -d "$path"; then
46870      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46871    fi
46872
46873    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46874  fi
46875
46876
46877    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46879$as_echo_n "checking for freetype includes... " >&6; }
46880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46881$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46882    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46884$as_echo_n "checking for freetype libraries... " >&6; }
46885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46886$as_echo "$FREETYPE_LIB_PATH" >&6; }
46887  fi
46888
46889          fi
46890
46891          if test "x$FOUND_FREETYPE" != xyes; then
46892            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46893
46894  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46895  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46896  METHOD="well-known location"
46897
46898  # Let's start with an optimistic view of the world :-)
46899  FOUND_FREETYPE=yes
46900
46901  # First look for the canonical freetype main include file ft2build.h.
46902  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46903    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46904    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46905    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46906      # Fail.
46907      FOUND_FREETYPE=no
46908    fi
46909  fi
46910
46911  if test "x$FOUND_FREETYPE" = xyes; then
46912    # Include file found, let's continue the sanity check.
46913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46914$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46915
46916    # Reset to default value
46917    FREETYPE_BASE_NAME=freetype
46918    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46919    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46920      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46921          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46922        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46923        # for the .6 version explicitly.
46924        FREETYPE_BASE_NAME=freetype.6
46925        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46926        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46927$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46928      else
46929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46930$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46931        FOUND_FREETYPE=no
46932      fi
46933    else
46934      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46935        # On Windows, we will need both .lib and .dll file.
46936        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46937          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46938$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46939          FOUND_FREETYPE=no
46940        fi
46941      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46942          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46943        # Found lib in isa dir, use that instead.
46944        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46945        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46946$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46947      fi
46948    fi
46949  fi
46950
46951  if test "x$FOUND_FREETYPE" = xyes; then
46952
46953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46954
46955  # Input might be given as Windows format, start by converting to
46956  # unix format.
46957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46958  new_path=`$CYGPATH -u "$path"`
46959
46960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46963  # "foo.exe" is OK but "foo" is an error.
46964  #
46965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46966  # It is also a way to make sure we got the proper file name for the real test later on.
46967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46968  if test "x$test_shortpath" = x; then
46969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46972  fi
46973
46974  # Call helper function which possibly converts this using DOS-style short mode.
46975  # If so, the updated path is stored in $new_path.
46976
46977  input_path="$new_path"
46978  # Check if we need to convert this using DOS-style short mode. If the path
46979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46980  # take no chances and rewrite it.
46981  # Note: m4 eats our [], so we need to use [ and ] instead.
46982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46983  if test "x$has_forbidden_chars" != x; then
46984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46988      # Going to short mode and back again did indeed matter. Since short mode is
46989      # case insensitive, let's make it lowercase to improve readability.
46990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46991      # Now convert it back to Unix-stile (cygpath)
46992      input_path=`$CYGPATH -u "$shortmode_path"`
46993      new_path="$input_path"
46994    fi
46995  fi
46996
46997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46998  if test "x$test_cygdrive_prefix" = x; then
46999    # As a simple fix, exclude /usr/bin since it's not a real path.
47000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47002      # a path prefixed by /cygdrive for fixpath to work.
47003      new_path="$CYGWIN_ROOT_PATH$input_path"
47004    fi
47005  fi
47006
47007
47008  if test "x$path" != "x$new_path"; then
47009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47012  fi
47013
47014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47015
47016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47017  has_colon=`$ECHO $path | $GREP ^.:`
47018  new_path="$path"
47019  if test "x$has_colon" = x; then
47020    # Not in mixed or Windows style, start by that.
47021    new_path=`cmd //c echo $path`
47022  fi
47023
47024
47025  input_path="$new_path"
47026  # Check if we need to convert this using DOS-style short mode. If the path
47027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47028  # take no chances and rewrite it.
47029  # Note: m4 eats our [], so we need to use [ and ] instead.
47030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47031  if test "x$has_forbidden_chars" != x; then
47032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47034  fi
47035
47036
47037  windows_path="$new_path"
47038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47039    unix_path=`$CYGPATH -u "$windows_path"`
47040    new_path="$unix_path"
47041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47043    new_path="$unix_path"
47044  fi
47045
47046  if test "x$path" != "x$new_path"; then
47047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47050  fi
47051
47052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47054
47055  else
47056    # We're on a unix platform. Hooray! :)
47057    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47058    has_space=`$ECHO "$path" | $GREP " "`
47059    if test "x$has_space" != x; then
47060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47062      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47063    fi
47064
47065    # Use eval to expand a potential ~
47066    eval path="$path"
47067    if test ! -f "$path" && test ! -d "$path"; then
47068      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47069    fi
47070
47071    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47072  fi
47073
47074
47075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47076
47077  # Input might be given as Windows format, start by converting to
47078  # unix format.
47079  path="$POTENTIAL_FREETYPE_LIB_PATH"
47080  new_path=`$CYGPATH -u "$path"`
47081
47082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47085  # "foo.exe" is OK but "foo" is an error.
47086  #
47087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47088  # It is also a way to make sure we got the proper file name for the real test later on.
47089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47090  if test "x$test_shortpath" = x; then
47091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47093    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47094  fi
47095
47096  # Call helper function which possibly converts this using DOS-style short mode.
47097  # If so, the updated path is stored in $new_path.
47098
47099  input_path="$new_path"
47100  # Check if we need to convert this using DOS-style short mode. If the path
47101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47102  # take no chances and rewrite it.
47103  # Note: m4 eats our [], so we need to use [ and ] instead.
47104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47105  if test "x$has_forbidden_chars" != x; then
47106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47110      # Going to short mode and back again did indeed matter. Since short mode is
47111      # case insensitive, let's make it lowercase to improve readability.
47112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47113      # Now convert it back to Unix-stile (cygpath)
47114      input_path=`$CYGPATH -u "$shortmode_path"`
47115      new_path="$input_path"
47116    fi
47117  fi
47118
47119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47120  if test "x$test_cygdrive_prefix" = x; then
47121    # As a simple fix, exclude /usr/bin since it's not a real path.
47122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47124      # a path prefixed by /cygdrive for fixpath to work.
47125      new_path="$CYGWIN_ROOT_PATH$input_path"
47126    fi
47127  fi
47128
47129
47130  if test "x$path" != "x$new_path"; then
47131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47134  fi
47135
47136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47137
47138  path="$POTENTIAL_FREETYPE_LIB_PATH"
47139  has_colon=`$ECHO $path | $GREP ^.:`
47140  new_path="$path"
47141  if test "x$has_colon" = x; then
47142    # Not in mixed or Windows style, start by that.
47143    new_path=`cmd //c echo $path`
47144  fi
47145
47146
47147  input_path="$new_path"
47148  # Check if we need to convert this using DOS-style short mode. If the path
47149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47150  # take no chances and rewrite it.
47151  # Note: m4 eats our [], so we need to use [ and ] instead.
47152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47153  if test "x$has_forbidden_chars" != x; then
47154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47156  fi
47157
47158
47159  windows_path="$new_path"
47160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47161    unix_path=`$CYGPATH -u "$windows_path"`
47162    new_path="$unix_path"
47163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47165    new_path="$unix_path"
47166  fi
47167
47168  if test "x$path" != "x$new_path"; then
47169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47172  fi
47173
47174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47176
47177  else
47178    # We're on a unix platform. Hooray! :)
47179    path="$POTENTIAL_FREETYPE_LIB_PATH"
47180    has_space=`$ECHO "$path" | $GREP " "`
47181    if test "x$has_space" != x; then
47182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47184      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47185    fi
47186
47187    # Use eval to expand a potential ~
47188    eval path="$path"
47189    if test ! -f "$path" && test ! -d "$path"; then
47190      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47191    fi
47192
47193    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47194  fi
47195
47196
47197    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47199$as_echo_n "checking for freetype includes... " >&6; }
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47201$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47202    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47204$as_echo_n "checking for freetype libraries... " >&6; }
47205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47206$as_echo "$FREETYPE_LIB_PATH" >&6; }
47207  fi
47208
47209          fi
47210
47211          if test "x$FOUND_FREETYPE" != xyes; then
47212            FREETYPE_BASE_DIR="$SYSROOT/usr"
47213            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47214
47215  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47216  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47217  METHOD="well-known location"
47218
47219  # Let's start with an optimistic view of the world :-)
47220  FOUND_FREETYPE=yes
47221
47222  # First look for the canonical freetype main include file ft2build.h.
47223  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47224    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47225    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47226    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47227      # Fail.
47228      FOUND_FREETYPE=no
47229    fi
47230  fi
47231
47232  if test "x$FOUND_FREETYPE" = xyes; then
47233    # Include file found, let's continue the sanity check.
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47235$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47236
47237    # Reset to default value
47238    FREETYPE_BASE_NAME=freetype
47239    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47240    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47241      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47242          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47243        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47244        # for the .6 version explicitly.
47245        FREETYPE_BASE_NAME=freetype.6
47246        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47247        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47248$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47249      else
47250        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47251$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47252        FOUND_FREETYPE=no
47253      fi
47254    else
47255      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47256        # On Windows, we will need both .lib and .dll file.
47257        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47258          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47259$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47260          FOUND_FREETYPE=no
47261        fi
47262      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47263          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47264        # Found lib in isa dir, use that instead.
47265        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47266        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47267$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47268      fi
47269    fi
47270  fi
47271
47272  if test "x$FOUND_FREETYPE" = xyes; then
47273
47274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47275
47276  # Input might be given as Windows format, start by converting to
47277  # unix format.
47278  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47279  new_path=`$CYGPATH -u "$path"`
47280
47281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47284  # "foo.exe" is OK but "foo" is an error.
47285  #
47286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47287  # It is also a way to make sure we got the proper file name for the real test later on.
47288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47289  if test "x$test_shortpath" = x; then
47290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47291$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47292    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47293  fi
47294
47295  # Call helper function which possibly converts this using DOS-style short mode.
47296  # If so, the updated path is stored in $new_path.
47297
47298  input_path="$new_path"
47299  # Check if we need to convert this using DOS-style short mode. If the path
47300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47301  # take no chances and rewrite it.
47302  # Note: m4 eats our [], so we need to use [ and ] instead.
47303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47304  if test "x$has_forbidden_chars" != x; then
47305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47309      # Going to short mode and back again did indeed matter. Since short mode is
47310      # case insensitive, let's make it lowercase to improve readability.
47311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47312      # Now convert it back to Unix-stile (cygpath)
47313      input_path=`$CYGPATH -u "$shortmode_path"`
47314      new_path="$input_path"
47315    fi
47316  fi
47317
47318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47319  if test "x$test_cygdrive_prefix" = x; then
47320    # As a simple fix, exclude /usr/bin since it's not a real path.
47321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47323      # a path prefixed by /cygdrive for fixpath to work.
47324      new_path="$CYGWIN_ROOT_PATH$input_path"
47325    fi
47326  fi
47327
47328
47329  if test "x$path" != "x$new_path"; then
47330    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47333  fi
47334
47335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47336
47337  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47338  has_colon=`$ECHO $path | $GREP ^.:`
47339  new_path="$path"
47340  if test "x$has_colon" = x; then
47341    # Not in mixed or Windows style, start by that.
47342    new_path=`cmd //c echo $path`
47343  fi
47344
47345
47346  input_path="$new_path"
47347  # Check if we need to convert this using DOS-style short mode. If the path
47348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47349  # take no chances and rewrite it.
47350  # Note: m4 eats our [], so we need to use [ and ] instead.
47351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47352  if test "x$has_forbidden_chars" != x; then
47353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47355  fi
47356
47357
47358  windows_path="$new_path"
47359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47360    unix_path=`$CYGPATH -u "$windows_path"`
47361    new_path="$unix_path"
47362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47364    new_path="$unix_path"
47365  fi
47366
47367  if test "x$path" != "x$new_path"; then
47368    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47371  fi
47372
47373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47375
47376  else
47377    # We're on a unix platform. Hooray! :)
47378    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47379    has_space=`$ECHO "$path" | $GREP " "`
47380    if test "x$has_space" != x; then
47381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47383      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47384    fi
47385
47386    # Use eval to expand a potential ~
47387    eval path="$path"
47388    if test ! -f "$path" && test ! -d "$path"; then
47389      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47390    fi
47391
47392    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47393  fi
47394
47395
47396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47397
47398  # Input might be given as Windows format, start by converting to
47399  # unix format.
47400  path="$POTENTIAL_FREETYPE_LIB_PATH"
47401  new_path=`$CYGPATH -u "$path"`
47402
47403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47406  # "foo.exe" is OK but "foo" is an error.
47407  #
47408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47409  # It is also a way to make sure we got the proper file name for the real test later on.
47410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47411  if test "x$test_shortpath" = x; then
47412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47414    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47415  fi
47416
47417  # Call helper function which possibly converts this using DOS-style short mode.
47418  # If so, the updated path is stored in $new_path.
47419
47420  input_path="$new_path"
47421  # Check if we need to convert this using DOS-style short mode. If the path
47422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47423  # take no chances and rewrite it.
47424  # Note: m4 eats our [], so we need to use [ and ] instead.
47425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47426  if test "x$has_forbidden_chars" != x; then
47427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47431      # Going to short mode and back again did indeed matter. Since short mode is
47432      # case insensitive, let's make it lowercase to improve readability.
47433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47434      # Now convert it back to Unix-stile (cygpath)
47435      input_path=`$CYGPATH -u "$shortmode_path"`
47436      new_path="$input_path"
47437    fi
47438  fi
47439
47440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47441  if test "x$test_cygdrive_prefix" = x; then
47442    # As a simple fix, exclude /usr/bin since it's not a real path.
47443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47445      # a path prefixed by /cygdrive for fixpath to work.
47446      new_path="$CYGWIN_ROOT_PATH$input_path"
47447    fi
47448  fi
47449
47450
47451  if test "x$path" != "x$new_path"; then
47452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47455  fi
47456
47457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47458
47459  path="$POTENTIAL_FREETYPE_LIB_PATH"
47460  has_colon=`$ECHO $path | $GREP ^.:`
47461  new_path="$path"
47462  if test "x$has_colon" = x; then
47463    # Not in mixed or Windows style, start by that.
47464    new_path=`cmd //c echo $path`
47465  fi
47466
47467
47468  input_path="$new_path"
47469  # Check if we need to convert this using DOS-style short mode. If the path
47470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47471  # take no chances and rewrite it.
47472  # Note: m4 eats our [], so we need to use [ and ] instead.
47473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47474  if test "x$has_forbidden_chars" != x; then
47475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47477  fi
47478
47479
47480  windows_path="$new_path"
47481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47482    unix_path=`$CYGPATH -u "$windows_path"`
47483    new_path="$unix_path"
47484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47486    new_path="$unix_path"
47487  fi
47488
47489  if test "x$path" != "x$new_path"; then
47490    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47493  fi
47494
47495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47497
47498  else
47499    # We're on a unix platform. Hooray! :)
47500    path="$POTENTIAL_FREETYPE_LIB_PATH"
47501    has_space=`$ECHO "$path" | $GREP " "`
47502    if test "x$has_space" != x; then
47503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47505      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47506    fi
47507
47508    # Use eval to expand a potential ~
47509    eval path="$path"
47510    if test ! -f "$path" && test ! -d "$path"; then
47511      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47512    fi
47513
47514    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47515  fi
47516
47517
47518    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47520$as_echo_n "checking for freetype includes... " >&6; }
47521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47522$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47523    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47525$as_echo_n "checking for freetype libraries... " >&6; }
47526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47527$as_echo "$FREETYPE_LIB_PATH" >&6; }
47528  fi
47529
47530            else
47531
47532  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47533  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47534  METHOD="well-known location"
47535
47536  # Let's start with an optimistic view of the world :-)
47537  FOUND_FREETYPE=yes
47538
47539  # First look for the canonical freetype main include file ft2build.h.
47540  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47541    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47542    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47543    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47544      # Fail.
47545      FOUND_FREETYPE=no
47546    fi
47547  fi
47548
47549  if test "x$FOUND_FREETYPE" = xyes; then
47550    # Include file found, let's continue the sanity check.
47551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47552$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47553
47554    # Reset to default value
47555    FREETYPE_BASE_NAME=freetype
47556    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47557    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47558      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47559          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47560        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47561        # for the .6 version explicitly.
47562        FREETYPE_BASE_NAME=freetype.6
47563        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47564        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47565$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47566      else
47567        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47568$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47569        FOUND_FREETYPE=no
47570      fi
47571    else
47572      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47573        # On Windows, we will need both .lib and .dll file.
47574        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47575          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47576$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47577          FOUND_FREETYPE=no
47578        fi
47579      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47580          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47581        # Found lib in isa dir, use that instead.
47582        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47583        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47584$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47585      fi
47586    fi
47587  fi
47588
47589  if test "x$FOUND_FREETYPE" = xyes; then
47590
47591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47592
47593  # Input might be given as Windows format, start by converting to
47594  # unix format.
47595  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47596  new_path=`$CYGPATH -u "$path"`
47597
47598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47601  # "foo.exe" is OK but "foo" is an error.
47602  #
47603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47604  # It is also a way to make sure we got the proper file name for the real test later on.
47605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47606  if test "x$test_shortpath" = x; then
47607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47610  fi
47611
47612  # Call helper function which possibly converts this using DOS-style short mode.
47613  # If so, the updated path is stored in $new_path.
47614
47615  input_path="$new_path"
47616  # Check if we need to convert this using DOS-style short mode. If the path
47617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47618  # take no chances and rewrite it.
47619  # Note: m4 eats our [], so we need to use [ and ] instead.
47620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47621  if test "x$has_forbidden_chars" != x; then
47622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47626      # Going to short mode and back again did indeed matter. Since short mode is
47627      # case insensitive, let's make it lowercase to improve readability.
47628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47629      # Now convert it back to Unix-stile (cygpath)
47630      input_path=`$CYGPATH -u "$shortmode_path"`
47631      new_path="$input_path"
47632    fi
47633  fi
47634
47635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47636  if test "x$test_cygdrive_prefix" = x; then
47637    # As a simple fix, exclude /usr/bin since it's not a real path.
47638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47640      # a path prefixed by /cygdrive for fixpath to work.
47641      new_path="$CYGWIN_ROOT_PATH$input_path"
47642    fi
47643  fi
47644
47645
47646  if test "x$path" != "x$new_path"; then
47647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47650  fi
47651
47652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47653
47654  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47655  has_colon=`$ECHO $path | $GREP ^.:`
47656  new_path="$path"
47657  if test "x$has_colon" = x; then
47658    # Not in mixed or Windows style, start by that.
47659    new_path=`cmd //c echo $path`
47660  fi
47661
47662
47663  input_path="$new_path"
47664  # Check if we need to convert this using DOS-style short mode. If the path
47665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47666  # take no chances and rewrite it.
47667  # Note: m4 eats our [], so we need to use [ and ] instead.
47668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47669  if test "x$has_forbidden_chars" != x; then
47670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47672  fi
47673
47674
47675  windows_path="$new_path"
47676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47677    unix_path=`$CYGPATH -u "$windows_path"`
47678    new_path="$unix_path"
47679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47681    new_path="$unix_path"
47682  fi
47683
47684  if test "x$path" != "x$new_path"; then
47685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47688  fi
47689
47690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47692
47693  else
47694    # We're on a unix platform. Hooray! :)
47695    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47696    has_space=`$ECHO "$path" | $GREP " "`
47697    if test "x$has_space" != x; then
47698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47700      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47701    fi
47702
47703    # Use eval to expand a potential ~
47704    eval path="$path"
47705    if test ! -f "$path" && test ! -d "$path"; then
47706      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47707    fi
47708
47709    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47710  fi
47711
47712
47713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47714
47715  # Input might be given as Windows format, start by converting to
47716  # unix format.
47717  path="$POTENTIAL_FREETYPE_LIB_PATH"
47718  new_path=`$CYGPATH -u "$path"`
47719
47720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47723  # "foo.exe" is OK but "foo" is an error.
47724  #
47725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47726  # It is also a way to make sure we got the proper file name for the real test later on.
47727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47728  if test "x$test_shortpath" = x; then
47729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47732  fi
47733
47734  # Call helper function which possibly converts this using DOS-style short mode.
47735  # If so, the updated path is stored in $new_path.
47736
47737  input_path="$new_path"
47738  # Check if we need to convert this using DOS-style short mode. If the path
47739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47740  # take no chances and rewrite it.
47741  # Note: m4 eats our [], so we need to use [ and ] instead.
47742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47743  if test "x$has_forbidden_chars" != x; then
47744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47748      # Going to short mode and back again did indeed matter. Since short mode is
47749      # case insensitive, let's make it lowercase to improve readability.
47750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47751      # Now convert it back to Unix-stile (cygpath)
47752      input_path=`$CYGPATH -u "$shortmode_path"`
47753      new_path="$input_path"
47754    fi
47755  fi
47756
47757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47758  if test "x$test_cygdrive_prefix" = x; then
47759    # As a simple fix, exclude /usr/bin since it's not a real path.
47760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47762      # a path prefixed by /cygdrive for fixpath to work.
47763      new_path="$CYGWIN_ROOT_PATH$input_path"
47764    fi
47765  fi
47766
47767
47768  if test "x$path" != "x$new_path"; then
47769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47772  fi
47773
47774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47775
47776  path="$POTENTIAL_FREETYPE_LIB_PATH"
47777  has_colon=`$ECHO $path | $GREP ^.:`
47778  new_path="$path"
47779  if test "x$has_colon" = x; then
47780    # Not in mixed or Windows style, start by that.
47781    new_path=`cmd //c echo $path`
47782  fi
47783
47784
47785  input_path="$new_path"
47786  # Check if we need to convert this using DOS-style short mode. If the path
47787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47788  # take no chances and rewrite it.
47789  # Note: m4 eats our [], so we need to use [ and ] instead.
47790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47791  if test "x$has_forbidden_chars" != x; then
47792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47794  fi
47795
47796
47797  windows_path="$new_path"
47798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47799    unix_path=`$CYGPATH -u "$windows_path"`
47800    new_path="$unix_path"
47801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47803    new_path="$unix_path"
47804  fi
47805
47806  if test "x$path" != "x$new_path"; then
47807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47810  fi
47811
47812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47814
47815  else
47816    # We're on a unix platform. Hooray! :)
47817    path="$POTENTIAL_FREETYPE_LIB_PATH"
47818    has_space=`$ECHO "$path" | $GREP " "`
47819    if test "x$has_space" != x; then
47820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47823    fi
47824
47825    # Use eval to expand a potential ~
47826    eval path="$path"
47827    if test ! -f "$path" && test ! -d "$path"; then
47828      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47829    fi
47830
47831    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47832  fi
47833
47834
47835    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47837$as_echo_n "checking for freetype includes... " >&6; }
47838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47839$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47840    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47842$as_echo_n "checking for freetype libraries... " >&6; }
47843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47844$as_echo "$FREETYPE_LIB_PATH" >&6; }
47845  fi
47846
47847              if test "x$FOUND_FREETYPE" != xyes; then
47848
47849  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47850  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47851  METHOD="well-known location"
47852
47853  # Let's start with an optimistic view of the world :-)
47854  FOUND_FREETYPE=yes
47855
47856  # First look for the canonical freetype main include file ft2build.h.
47857  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47858    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47859    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47860    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47861      # Fail.
47862      FOUND_FREETYPE=no
47863    fi
47864  fi
47865
47866  if test "x$FOUND_FREETYPE" = xyes; then
47867    # Include file found, let's continue the sanity check.
47868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47869$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47870
47871    # Reset to default value
47872    FREETYPE_BASE_NAME=freetype
47873    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47874    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47875      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47876          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47877        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47878        # for the .6 version explicitly.
47879        FREETYPE_BASE_NAME=freetype.6
47880        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47881        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47882$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47883      else
47884        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47885$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47886        FOUND_FREETYPE=no
47887      fi
47888    else
47889      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47890        # On Windows, we will need both .lib and .dll file.
47891        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47892          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47893$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47894          FOUND_FREETYPE=no
47895        fi
47896      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47897          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47898        # Found lib in isa dir, use that instead.
47899        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47900        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47901$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47902      fi
47903    fi
47904  fi
47905
47906  if test "x$FOUND_FREETYPE" = xyes; then
47907
47908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47909
47910  # Input might be given as Windows format, start by converting to
47911  # unix format.
47912  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47913  new_path=`$CYGPATH -u "$path"`
47914
47915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47918  # "foo.exe" is OK but "foo" is an error.
47919  #
47920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47921  # It is also a way to make sure we got the proper file name for the real test later on.
47922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47923  if test "x$test_shortpath" = x; then
47924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47926    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47927  fi
47928
47929  # Call helper function which possibly converts this using DOS-style short mode.
47930  # If so, the updated path is stored in $new_path.
47931
47932  input_path="$new_path"
47933  # Check if we need to convert this using DOS-style short mode. If the path
47934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47935  # take no chances and rewrite it.
47936  # Note: m4 eats our [], so we need to use [ and ] instead.
47937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47938  if test "x$has_forbidden_chars" != x; then
47939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47943      # Going to short mode and back again did indeed matter. Since short mode is
47944      # case insensitive, let's make it lowercase to improve readability.
47945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47946      # Now convert it back to Unix-stile (cygpath)
47947      input_path=`$CYGPATH -u "$shortmode_path"`
47948      new_path="$input_path"
47949    fi
47950  fi
47951
47952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47953  if test "x$test_cygdrive_prefix" = x; then
47954    # As a simple fix, exclude /usr/bin since it's not a real path.
47955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47957      # a path prefixed by /cygdrive for fixpath to work.
47958      new_path="$CYGWIN_ROOT_PATH$input_path"
47959    fi
47960  fi
47961
47962
47963  if test "x$path" != "x$new_path"; then
47964    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47966$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47967  fi
47968
47969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47970
47971  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47972  has_colon=`$ECHO $path | $GREP ^.:`
47973  new_path="$path"
47974  if test "x$has_colon" = x; then
47975    # Not in mixed or Windows style, start by that.
47976    new_path=`cmd //c echo $path`
47977  fi
47978
47979
47980  input_path="$new_path"
47981  # Check if we need to convert this using DOS-style short mode. If the path
47982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47983  # take no chances and rewrite it.
47984  # Note: m4 eats our [], so we need to use [ and ] instead.
47985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47986  if test "x$has_forbidden_chars" != x; then
47987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47989  fi
47990
47991
47992  windows_path="$new_path"
47993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47994    unix_path=`$CYGPATH -u "$windows_path"`
47995    new_path="$unix_path"
47996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47998    new_path="$unix_path"
47999  fi
48000
48001  if test "x$path" != "x$new_path"; then
48002    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48005  fi
48006
48007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48009
48010  else
48011    # We're on a unix platform. Hooray! :)
48012    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48013    has_space=`$ECHO "$path" | $GREP " "`
48014    if test "x$has_space" != x; then
48015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48017      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48018    fi
48019
48020    # Use eval to expand a potential ~
48021    eval path="$path"
48022    if test ! -f "$path" && test ! -d "$path"; then
48023      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48024    fi
48025
48026    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48027  fi
48028
48029
48030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48031
48032  # Input might be given as Windows format, start by converting to
48033  # unix format.
48034  path="$POTENTIAL_FREETYPE_LIB_PATH"
48035  new_path=`$CYGPATH -u "$path"`
48036
48037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48040  # "foo.exe" is OK but "foo" is an error.
48041  #
48042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48043  # It is also a way to make sure we got the proper file name for the real test later on.
48044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48045  if test "x$test_shortpath" = x; then
48046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48048    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48049  fi
48050
48051  # Call helper function which possibly converts this using DOS-style short mode.
48052  # If so, the updated path is stored in $new_path.
48053
48054  input_path="$new_path"
48055  # Check if we need to convert this using DOS-style short mode. If the path
48056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48057  # take no chances and rewrite it.
48058  # Note: m4 eats our [], so we need to use [ and ] instead.
48059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48060  if test "x$has_forbidden_chars" != x; then
48061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48065      # Going to short mode and back again did indeed matter. Since short mode is
48066      # case insensitive, let's make it lowercase to improve readability.
48067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48068      # Now convert it back to Unix-stile (cygpath)
48069      input_path=`$CYGPATH -u "$shortmode_path"`
48070      new_path="$input_path"
48071    fi
48072  fi
48073
48074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48075  if test "x$test_cygdrive_prefix" = x; then
48076    # As a simple fix, exclude /usr/bin since it's not a real path.
48077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48079      # a path prefixed by /cygdrive for fixpath to work.
48080      new_path="$CYGWIN_ROOT_PATH$input_path"
48081    fi
48082  fi
48083
48084
48085  if test "x$path" != "x$new_path"; then
48086    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48089  fi
48090
48091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48092
48093  path="$POTENTIAL_FREETYPE_LIB_PATH"
48094  has_colon=`$ECHO $path | $GREP ^.:`
48095  new_path="$path"
48096  if test "x$has_colon" = x; then
48097    # Not in mixed or Windows style, start by that.
48098    new_path=`cmd //c echo $path`
48099  fi
48100
48101
48102  input_path="$new_path"
48103  # Check if we need to convert this using DOS-style short mode. If the path
48104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48105  # take no chances and rewrite it.
48106  # Note: m4 eats our [], so we need to use [ and ] instead.
48107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48108  if test "x$has_forbidden_chars" != x; then
48109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48111  fi
48112
48113
48114  windows_path="$new_path"
48115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48116    unix_path=`$CYGPATH -u "$windows_path"`
48117    new_path="$unix_path"
48118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48120    new_path="$unix_path"
48121  fi
48122
48123  if test "x$path" != "x$new_path"; then
48124    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48127  fi
48128
48129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48131
48132  else
48133    # We're on a unix platform. Hooray! :)
48134    path="$POTENTIAL_FREETYPE_LIB_PATH"
48135    has_space=`$ECHO "$path" | $GREP " "`
48136    if test "x$has_space" != x; then
48137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48139      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48140    fi
48141
48142    # Use eval to expand a potential ~
48143    eval path="$path"
48144    if test ! -f "$path" && test ! -d "$path"; then
48145      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48146    fi
48147
48148    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48149  fi
48150
48151
48152    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48154$as_echo_n "checking for freetype includes... " >&6; }
48155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48156$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48157    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48159$as_echo_n "checking for freetype libraries... " >&6; }
48160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48161$as_echo "$FREETYPE_LIB_PATH" >&6; }
48162  fi
48163
48164              fi
48165            fi
48166          fi
48167        fi
48168      fi # end check in well-known locations
48169
48170      if test "x$FOUND_FREETYPE" != xyes; then
48171
48172  # Print a helpful message on how to acquire the necessary build dependency.
48173  # freetype is the help tag: freetype, cups, pulse, alsa etc
48174  MISSING_DEPENDENCY=freetype
48175
48176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48177    cygwin_help $MISSING_DEPENDENCY
48178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48179    msys_help $MISSING_DEPENDENCY
48180  else
48181    PKGHANDLER_COMMAND=
48182
48183    case $PKGHANDLER in
48184      apt-get)
48185        apt_help     $MISSING_DEPENDENCY ;;
48186      yum)
48187        yum_help     $MISSING_DEPENDENCY ;;
48188      port)
48189        port_help    $MISSING_DEPENDENCY ;;
48190      pkgutil)
48191        pkgutil_help $MISSING_DEPENDENCY ;;
48192      pkgadd)
48193        pkgadd_help  $MISSING_DEPENDENCY ;;
48194    esac
48195
48196    if test "x$PKGHANDLER_COMMAND" != x; then
48197      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48198    fi
48199  fi
48200
48201        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48202      fi
48203    fi # end user specified settings
48204
48205    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48206    if test "x$FREETYPE_CFLAGS" = x; then
48207
48208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48209
48210  # Input might be given as Windows format, start by converting to
48211  # unix format.
48212  path="$FREETYPE_INCLUDE_PATH"
48213  new_path=`$CYGPATH -u "$path"`
48214
48215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48218  # "foo.exe" is OK but "foo" is an error.
48219  #
48220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48221  # It is also a way to make sure we got the proper file name for the real test later on.
48222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48223  if test "x$test_shortpath" = x; then
48224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48225$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48226    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48227  fi
48228
48229  # Call helper function which possibly converts this using DOS-style short mode.
48230  # If so, the updated path is stored in $new_path.
48231
48232  input_path="$new_path"
48233  # Check if we need to convert this using DOS-style short mode. If the path
48234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48235  # take no chances and rewrite it.
48236  # Note: m4 eats our [], so we need to use [ and ] instead.
48237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48238  if test "x$has_forbidden_chars" != x; then
48239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48243      # Going to short mode and back again did indeed matter. Since short mode is
48244      # case insensitive, let's make it lowercase to improve readability.
48245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48246      # Now convert it back to Unix-stile (cygpath)
48247      input_path=`$CYGPATH -u "$shortmode_path"`
48248      new_path="$input_path"
48249    fi
48250  fi
48251
48252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48253  if test "x$test_cygdrive_prefix" = x; then
48254    # As a simple fix, exclude /usr/bin since it's not a real path.
48255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48257      # a path prefixed by /cygdrive for fixpath to work.
48258      new_path="$CYGWIN_ROOT_PATH$input_path"
48259    fi
48260  fi
48261
48262
48263  if test "x$path" != "x$new_path"; then
48264    FREETYPE_INCLUDE_PATH="$new_path"
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48266$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48267  fi
48268
48269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48270
48271  path="$FREETYPE_INCLUDE_PATH"
48272  has_colon=`$ECHO $path | $GREP ^.:`
48273  new_path="$path"
48274  if test "x$has_colon" = x; then
48275    # Not in mixed or Windows style, start by that.
48276    new_path=`cmd //c echo $path`
48277  fi
48278
48279
48280  input_path="$new_path"
48281  # Check if we need to convert this using DOS-style short mode. If the path
48282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48283  # take no chances and rewrite it.
48284  # Note: m4 eats our [], so we need to use [ and ] instead.
48285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48286  if test "x$has_forbidden_chars" != x; then
48287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48289  fi
48290
48291
48292  windows_path="$new_path"
48293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48294    unix_path=`$CYGPATH -u "$windows_path"`
48295    new_path="$unix_path"
48296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48298    new_path="$unix_path"
48299  fi
48300
48301  if test "x$path" != "x$new_path"; then
48302    FREETYPE_INCLUDE_PATH="$new_path"
48303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48304$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48305  fi
48306
48307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48309
48310  else
48311    # We're on a unix platform. Hooray! :)
48312    path="$FREETYPE_INCLUDE_PATH"
48313    has_space=`$ECHO "$path" | $GREP " "`
48314    if test "x$has_space" != x; then
48315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48316$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48318    fi
48319
48320    # Use eval to expand a potential ~
48321    eval path="$path"
48322    if test ! -f "$path" && test ! -d "$path"; then
48323      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48324    fi
48325
48326    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48327  fi
48328
48329      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48330        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48331      else
48332        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48333      fi
48334    fi
48335
48336    if test "x$FREETYPE_LIBS" = x; then
48337
48338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48339
48340  # Input might be given as Windows format, start by converting to
48341  # unix format.
48342  path="$FREETYPE_LIB_PATH"
48343  new_path=`$CYGPATH -u "$path"`
48344
48345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48348  # "foo.exe" is OK but "foo" is an error.
48349  #
48350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48351  # It is also a way to make sure we got the proper file name for the real test later on.
48352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48353  if test "x$test_shortpath" = x; then
48354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48355$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48356    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48357  fi
48358
48359  # Call helper function which possibly converts this using DOS-style short mode.
48360  # If so, the updated path is stored in $new_path.
48361
48362  input_path="$new_path"
48363  # Check if we need to convert this using DOS-style short mode. If the path
48364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48365  # take no chances and rewrite it.
48366  # Note: m4 eats our [], so we need to use [ and ] instead.
48367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48368  if test "x$has_forbidden_chars" != x; then
48369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48373      # Going to short mode and back again did indeed matter. Since short mode is
48374      # case insensitive, let's make it lowercase to improve readability.
48375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48376      # Now convert it back to Unix-stile (cygpath)
48377      input_path=`$CYGPATH -u "$shortmode_path"`
48378      new_path="$input_path"
48379    fi
48380  fi
48381
48382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48383  if test "x$test_cygdrive_prefix" = x; then
48384    # As a simple fix, exclude /usr/bin since it's not a real path.
48385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48387      # a path prefixed by /cygdrive for fixpath to work.
48388      new_path="$CYGWIN_ROOT_PATH$input_path"
48389    fi
48390  fi
48391
48392
48393  if test "x$path" != "x$new_path"; then
48394    FREETYPE_LIB_PATH="$new_path"
48395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48396$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48397  fi
48398
48399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48400
48401  path="$FREETYPE_LIB_PATH"
48402  has_colon=`$ECHO $path | $GREP ^.:`
48403  new_path="$path"
48404  if test "x$has_colon" = x; then
48405    # Not in mixed or Windows style, start by that.
48406    new_path=`cmd //c echo $path`
48407  fi
48408
48409
48410  input_path="$new_path"
48411  # Check if we need to convert this using DOS-style short mode. If the path
48412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48413  # take no chances and rewrite it.
48414  # Note: m4 eats our [], so we need to use [ and ] instead.
48415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48416  if test "x$has_forbidden_chars" != x; then
48417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48419  fi
48420
48421
48422  windows_path="$new_path"
48423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48424    unix_path=`$CYGPATH -u "$windows_path"`
48425    new_path="$unix_path"
48426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48428    new_path="$unix_path"
48429  fi
48430
48431  if test "x$path" != "x$new_path"; then
48432    FREETYPE_LIB_PATH="$new_path"
48433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48434$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48435  fi
48436
48437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48439
48440  else
48441    # We're on a unix platform. Hooray! :)
48442    path="$FREETYPE_LIB_PATH"
48443    has_space=`$ECHO "$path" | $GREP " "`
48444    if test "x$has_space" != x; then
48445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48446$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48447      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48448    fi
48449
48450    # Use eval to expand a potential ~
48451    eval path="$path"
48452    if test ! -f "$path" && test ! -d "$path"; then
48453      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48454    fi
48455
48456    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48457  fi
48458
48459      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48460        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48461      else
48462        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48463      fi
48464    fi
48465
48466    # Try to compile it
48467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48468$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48469    ac_ext=cpp
48470ac_cpp='$CXXCPP $CPPFLAGS'
48471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48474
48475    PREV_CXXCFLAGS="$CXXFLAGS"
48476    PREV_LIBS="$LIBS"
48477    PREV_CXX="$CXX"
48478    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48479    LIBS="$LIBS $FREETYPE_LIBS"
48480    CXX="$FIXPATH $CXX"
48481    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48482/* end confdefs.h.  */
48483
48484          #include<ft2build.h>
48485          #include FT_FREETYPE_H
48486          int main () {
48487            FT_Init_FreeType(NULL);
48488            return 0;
48489          }
48490
48491_ACEOF
48492if ac_fn_cxx_try_link "$LINENO"; then :
48493
48494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48495$as_echo "yes" >&6; }
48496
48497else
48498
48499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48500$as_echo "no" >&6; }
48501          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48502$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48503          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48504$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48505
48506
48507  # Print a helpful message on how to acquire the necessary build dependency.
48508  # freetype is the help tag: freetype, cups, pulse, alsa etc
48509  MISSING_DEPENDENCY=freetype
48510
48511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48512    cygwin_help $MISSING_DEPENDENCY
48513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48514    msys_help $MISSING_DEPENDENCY
48515  else
48516    PKGHANDLER_COMMAND=
48517
48518    case $PKGHANDLER in
48519      apt-get)
48520        apt_help     $MISSING_DEPENDENCY ;;
48521      yum)
48522        yum_help     $MISSING_DEPENDENCY ;;
48523      port)
48524        port_help    $MISSING_DEPENDENCY ;;
48525      pkgutil)
48526        pkgutil_help $MISSING_DEPENDENCY ;;
48527      pkgadd)
48528        pkgadd_help  $MISSING_DEPENDENCY ;;
48529    esac
48530
48531    if test "x$PKGHANDLER_COMMAND" != x; then
48532      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48533    fi
48534  fi
48535
48536
48537          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48538
48539
48540fi
48541rm -f core conftest.err conftest.$ac_objext \
48542    conftest$ac_exeext conftest.$ac_ext
48543    CXXCFLAGS="$PREV_CXXFLAGS"
48544    LIBS="$PREV_LIBS"
48545    CXX="$PREV_CXX"
48546    ac_ext=cpp
48547ac_cpp='$CXXCPP $CPPFLAGS'
48548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48551
48552
48553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48554$as_echo_n "checking if we should bundle freetype... " >&6; }
48555    if test "x$BUNDLE_FREETYPE" = xyes; then
48556      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48557    fi
48558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48559$as_echo "$BUNDLE_FREETYPE" >&6; }
48560
48561  fi # end freetype needed
48562
48563
48564
48565
48566
48567
48568
48569  ###############################################################################
48570  #
48571  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48572  #
48573
48574# Check whether --with-alsa was given.
48575if test "${with_alsa+set}" = set; then :
48576  withval=$with_alsa;
48577fi
48578
48579
48580# Check whether --with-alsa-include was given.
48581if test "${with_alsa_include+set}" = set; then :
48582  withval=$with_alsa_include;
48583fi
48584
48585
48586# Check whether --with-alsa-lib was given.
48587if test "${with_alsa_lib+set}" = set; then :
48588  withval=$with_alsa_lib;
48589fi
48590
48591
48592  if test "x$ALSA_NOT_NEEDED" = xyes; then
48593    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48594      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48595$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48596    fi
48597    ALSA_CFLAGS=
48598    ALSA_LIBS=
48599  else
48600    ALSA_FOUND=no
48601
48602    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48603      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48604    fi
48605
48606    if test "x${with_alsa}" != x; then
48607      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48608      ALSA_CFLAGS="-I${with_alsa}/include"
48609      ALSA_FOUND=yes
48610    fi
48611    if test "x${with_alsa_include}" != x; then
48612      ALSA_CFLAGS="-I${with_alsa_include}"
48613      ALSA_FOUND=yes
48614    fi
48615    if test "x${with_alsa_lib}" != x; then
48616      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48617      ALSA_FOUND=yes
48618    fi
48619    if test "x$ALSA_FOUND" = xno; then
48620
48621
48622  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48623    # Source the builddeps file again, to make sure it uses the latest variables!
48624    . $builddepsfile
48625    # Look for a target and build machine specific resource!
48626    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48627    if test "x$resource" = x; then
48628      # Ok, lets instead look for a target specific resource
48629      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48630    fi
48631    if test "x$resource" = x; then
48632      # Ok, lets instead look for a build specific resource
48633      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48634    fi
48635    if test "x$resource" = x; then
48636      # Ok, lets instead look for a generic resource
48637      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48638      resource=${builddep_alsa}
48639    fi
48640    if test "x$resource" != x; then
48641      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48642$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48643      # If the resource in the builddeps.conf file is an existing directory,
48644      # for example /java/linux/cups
48645      if test -d ${resource}; then
48646        depdir=${resource}
48647      else
48648
48649  # alsa is for example mymodule
48650  # $resource is for example libs/general/libmymod_1_2_3.zip
48651  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48652  # $with_builddeps_dir is for example /localhome/builddeps
48653  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48654  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48655  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48656  filename=`basename $resource`
48657  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48658  filebase=${filename%%.*}
48659  extension=${filename#*.}
48660  installdir=$with_builddeps_dir/$filebase
48661  if test ! -f $installdir/$filename.unpacked; then
48662    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48663$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48664    if test ! -d $installdir; then
48665      mkdir -p $installdir
48666    fi
48667    if test ! -d $installdir; then
48668      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48669    fi
48670    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48671    touch $tmpfile
48672    if test ! -f $tmpfile; then
48673      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48674    fi
48675
48676  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48677  # $tmpfile is the local file name for the downloaded file.
48678  VALID_TOOL=no
48679  if test "x$BDEPS_FTP" = xwget; then
48680    VALID_TOOL=yes
48681    wget -O $tmpfile $with_builddeps_server/$resource
48682  fi
48683  if test "x$BDEPS_FTP" = xlftp; then
48684    VALID_TOOL=yes
48685    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48686  fi
48687  if test "x$BDEPS_FTP" = xftp; then
48688    VALID_TOOL=yes
48689    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48690    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48691    FTPUSERPWD=${FTPSERVER%%@*}
48692    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48693      FTPUSER=${userpwd%%:*}
48694      FTPPWD=${userpwd#*@}
48695      FTPSERVER=${FTPSERVER#*@}
48696    else
48697      FTPUSER=ftp
48698      FTPPWD=ftp
48699    fi
48700    # the "pass" command does not work on some
48701    # ftp clients (read ftp.exe) but if it works,
48702    # passive mode is better!
48703    ( \
48704        echo "user $FTPUSER $FTPPWD"        ; \
48705        echo "pass"                         ; \
48706        echo "bin"                          ; \
48707        echo "get $FTPPATH $tmpfile"              ; \
48708    ) | ftp -in $FTPSERVER
48709  fi
48710  if test "x$VALID_TOOL" != xyes; then
48711    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48712  fi
48713
48714    mv $tmpfile $installdir/$filename
48715    if test ! -s $installdir/$filename; then
48716      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48717    fi
48718    case "$extension" in
48719      zip)  echo "Unzipping $installdir/$filename..."
48720        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48721        ;;
48722      tar.gz) echo "Untaring $installdir/$filename..."
48723        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48724        ;;
48725      tgz) echo "Untaring $installdir/$filename..."
48726        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48727        ;;
48728      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48729        ;;
48730    esac
48731  fi
48732  if test -f $installdir/$filename.unpacked; then
48733    depdir=$installdir
48734  fi
48735
48736      fi
48737      # Source the builddeps file again, because in the previous command, the depdir
48738      # was updated to point at the current build dependency install directory.
48739      . $builddepsfile
48740      # Now extract variables from the builddeps.conf files.
48741      theroot=${builddep_alsa_ROOT}
48742      thecflags=${builddep_alsa_CFLAGS}
48743      thelibs=${builddep_alsa_LIBS}
48744      if test "x$depdir" = x; then
48745        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48746      fi
48747      ALSA=$depdir
48748      if test "x$theroot" != x; then
48749        ALSA="$theroot"
48750      fi
48751      if test "x$thecflags" != x; then
48752        ALSA_CFLAGS="$thecflags"
48753      fi
48754      if test "x$thelibs" != x; then
48755        ALSA_LIBS="$thelibs"
48756      fi
48757      ALSA_FOUND=yes
48758      else ALSA_FOUND=no
48759
48760    fi
48761    else ALSA_FOUND=no
48762
48763  fi
48764
48765    fi
48766    # Do not try pkg-config if we have a sysroot set.
48767    if test "x$SYSROOT" = x; then
48768      if test "x$ALSA_FOUND" = xno; then
48769
48770pkg_failed=no
48771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48772$as_echo_n "checking for ALSA... " >&6; }
48773
48774if test -n "$ALSA_CFLAGS"; then
48775    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48776 elif test -n "$PKG_CONFIG"; then
48777    if test -n "$PKG_CONFIG" && \
48778    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48779  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48780  ac_status=$?
48781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48782  test $ac_status = 0; }; then
48783  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48784else
48785  pkg_failed=yes
48786fi
48787 else
48788    pkg_failed=untried
48789fi
48790if test -n "$ALSA_LIBS"; then
48791    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48792 elif test -n "$PKG_CONFIG"; then
48793    if test -n "$PKG_CONFIG" && \
48794    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48795  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48796  ac_status=$?
48797  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48798  test $ac_status = 0; }; then
48799  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48800else
48801  pkg_failed=yes
48802fi
48803 else
48804    pkg_failed=untried
48805fi
48806
48807
48808
48809if test $pkg_failed = yes; then
48810
48811if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48812        _pkg_short_errors_supported=yes
48813else
48814        _pkg_short_errors_supported=no
48815fi
48816        if test $_pkg_short_errors_supported = yes; then
48817	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48818        else
48819	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48820        fi
48821	# Put the nasty error message in config.log where it belongs
48822	echo "$ALSA_PKG_ERRORS" >&5
48823
48824	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48825$as_echo "no" >&6; }
48826                ALSA_FOUND=no
48827elif test $pkg_failed = untried; then
48828	ALSA_FOUND=no
48829else
48830	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48831	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48833$as_echo "yes" >&6; }
48834	ALSA_FOUND=yes
48835fi
48836      fi
48837    fi
48838    if test "x$ALSA_FOUND" = xno; then
48839      for ac_header in alsa/asoundlib.h
48840do :
48841  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48842if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48843  cat >>confdefs.h <<_ACEOF
48844#define HAVE_ALSA_ASOUNDLIB_H 1
48845_ACEOF
48846
48847            ALSA_FOUND=yes
48848            ALSA_CFLAGS=-Iignoreme
48849            ALSA_LIBS=-lasound
48850            DEFAULT_ALSA=yes
48851
48852else
48853  ALSA_FOUND=no
48854fi
48855
48856done
48857
48858    fi
48859    if test "x$ALSA_FOUND" = xno; then
48860
48861  # Print a helpful message on how to acquire the necessary build dependency.
48862  # alsa is the help tag: freetype, cups, pulse, alsa etc
48863  MISSING_DEPENDENCY=alsa
48864
48865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48866    cygwin_help $MISSING_DEPENDENCY
48867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48868    msys_help $MISSING_DEPENDENCY
48869  else
48870    PKGHANDLER_COMMAND=
48871
48872    case $PKGHANDLER in
48873      apt-get)
48874        apt_help     $MISSING_DEPENDENCY ;;
48875      yum)
48876        yum_help     $MISSING_DEPENDENCY ;;
48877      port)
48878        port_help    $MISSING_DEPENDENCY ;;
48879      pkgutil)
48880        pkgutil_help $MISSING_DEPENDENCY ;;
48881      pkgadd)
48882        pkgadd_help  $MISSING_DEPENDENCY ;;
48883    esac
48884
48885    if test "x$PKGHANDLER_COMMAND" != x; then
48886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48887    fi
48888  fi
48889
48890      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48891    fi
48892  fi
48893
48894
48895
48896
48897
48898
48899  ###############################################################################
48900  #
48901  # Check for the jpeg library
48902  #
48903
48904
48905# Check whether --with-libjpeg was given.
48906if test "${with_libjpeg+set}" = set; then :
48907  withval=$with_libjpeg;
48908fi
48909
48910
48911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48912$as_echo_n "checking for which libjpeg to use... " >&6; }
48913
48914  # default is bundled
48915  DEFAULT_LIBJPEG=bundled
48916
48917  #
48918  # if user didn't specify, use DEFAULT_LIBJPEG
48919  #
48920  if test "x${with_libjpeg}" = "x"; then
48921    with_libjpeg=${DEFAULT_LIBJPEG}
48922  fi
48923
48924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48925$as_echo "${with_libjpeg}" >&6; }
48926
48927  if test "x${with_libjpeg}" = "xbundled"; then
48928    USE_EXTERNAL_LIBJPEG=false
48929  elif test "x${with_libjpeg}" = "xsystem"; then
48930    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48931if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48932
48933else
48934   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48935fi
48936
48937
48938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48939$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48940if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48941  $as_echo_n "(cached) " >&6
48942else
48943  ac_check_lib_save_LIBS=$LIBS
48944LIBS="-ljpeg  $LIBS"
48945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48946/* end confdefs.h.  */
48947
48948/* Override any GCC internal prototype to avoid an error.
48949   Use char because int might match the return type of a GCC
48950   builtin and then its argument prototype would still apply.  */
48951#ifdef __cplusplus
48952extern "C"
48953#endif
48954char jpeg_CreateDecompress ();
48955int
48956main ()
48957{
48958return jpeg_CreateDecompress ();
48959  ;
48960  return 0;
48961}
48962_ACEOF
48963if ac_fn_cxx_try_link "$LINENO"; then :
48964  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48965else
48966  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48967fi
48968rm -f core conftest.err conftest.$ac_objext \
48969    conftest$ac_exeext conftest.$ac_ext
48970LIBS=$ac_check_lib_save_LIBS
48971fi
48972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48973$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48974if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48975  cat >>confdefs.h <<_ACEOF
48976#define HAVE_LIBJPEG 1
48977_ACEOF
48978
48979  LIBS="-ljpeg $LIBS"
48980
48981else
48982   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48983fi
48984
48985
48986    USE_EXTERNAL_LIBJPEG=true
48987  else
48988    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48989  fi
48990
48991
48992
48993  ###############################################################################
48994  #
48995  # Check for the gif library
48996  #
48997
48998
48999# Check whether --with-giflib was given.
49000if test "${with_giflib+set}" = set; then :
49001  withval=$with_giflib;
49002fi
49003
49004
49005
49006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49007$as_echo_n "checking for which giflib to use... " >&6; }
49008
49009  # default is bundled
49010  DEFAULT_GIFLIB=bundled
49011
49012  #
49013  # if user didn't specify, use DEFAULT_GIFLIB
49014  #
49015  if test "x${with_giflib}" = "x"; then
49016    with_giflib=${DEFAULT_GIFLIB}
49017  fi
49018
49019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49020$as_echo "${with_giflib}" >&6; }
49021
49022  if test "x${with_giflib}" = "xbundled"; then
49023    USE_EXTERNAL_LIBGIF=false
49024  elif test "x${with_giflib}" = "xsystem"; then
49025    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49026if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49027
49028else
49029   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49030fi
49031
49032
49033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49034$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49035if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49036  $as_echo_n "(cached) " >&6
49037else
49038  ac_check_lib_save_LIBS=$LIBS
49039LIBS="-lgif  $LIBS"
49040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49041/* end confdefs.h.  */
49042
49043/* Override any GCC internal prototype to avoid an error.
49044   Use char because int might match the return type of a GCC
49045   builtin and then its argument prototype would still apply.  */
49046#ifdef __cplusplus
49047extern "C"
49048#endif
49049char DGifGetCode ();
49050int
49051main ()
49052{
49053return DGifGetCode ();
49054  ;
49055  return 0;
49056}
49057_ACEOF
49058if ac_fn_cxx_try_link "$LINENO"; then :
49059  ac_cv_lib_gif_DGifGetCode=yes
49060else
49061  ac_cv_lib_gif_DGifGetCode=no
49062fi
49063rm -f core conftest.err conftest.$ac_objext \
49064    conftest$ac_exeext conftest.$ac_ext
49065LIBS=$ac_check_lib_save_LIBS
49066fi
49067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49068$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49069if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49070  cat >>confdefs.h <<_ACEOF
49071#define HAVE_LIBGIF 1
49072_ACEOF
49073
49074  LIBS="-lgif $LIBS"
49075
49076else
49077   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49078fi
49079
49080
49081    USE_EXTERNAL_LIBGIF=true
49082  else
49083    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49084  fi
49085
49086
49087  ###############################################################################
49088  #
49089  # Check for the lcms2 library
49090  #
49091
49092
49093# Check whether --with-lcms was given.
49094if test "${with_lcms+set}" = set; then :
49095  withval=$with_lcms;
49096fi
49097
49098
49099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49100$as_echo_n "checking for which lcms to use... " >&6; }
49101
49102  DEFAULT_LCMS=bundled
49103
49104  #
49105  # If user didn't specify, use DEFAULT_LCMS
49106  #
49107  if test "x${with_lcms}" = "x"; then
49108      with_lcms=${DEFAULT_LCMS}
49109  fi
49110
49111  if test "x${with_lcms}" = "xbundled"; then
49112    USE_EXTERNAL_LCMS=false
49113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49114$as_echo "bundled" >&6; }
49115  elif test "x${with_lcms}" = "xsystem"; then
49116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49117$as_echo "system" >&6; }
49118
49119pkg_failed=no
49120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49121$as_echo_n "checking for LCMS... " >&6; }
49122
49123if test -n "$LCMS_CFLAGS"; then
49124    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49125 elif test -n "$PKG_CONFIG"; then
49126    if test -n "$PKG_CONFIG" && \
49127    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49128  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49129  ac_status=$?
49130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49131  test $ac_status = 0; }; then
49132  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49133else
49134  pkg_failed=yes
49135fi
49136 else
49137    pkg_failed=untried
49138fi
49139if test -n "$LCMS_LIBS"; then
49140    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49141 elif test -n "$PKG_CONFIG"; then
49142    if test -n "$PKG_CONFIG" && \
49143    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49144  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49145  ac_status=$?
49146  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49147  test $ac_status = 0; }; then
49148  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49149else
49150  pkg_failed=yes
49151fi
49152 else
49153    pkg_failed=untried
49154fi
49155
49156
49157
49158if test $pkg_failed = yes; then
49159
49160if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49161        _pkg_short_errors_supported=yes
49162else
49163        _pkg_short_errors_supported=no
49164fi
49165        if test $_pkg_short_errors_supported = yes; then
49166	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49167        else
49168	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49169        fi
49170	# Put the nasty error message in config.log where it belongs
49171	echo "$LCMS_PKG_ERRORS" >&5
49172
49173	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49174$as_echo "no" >&6; }
49175                LCMS_FOUND=no
49176elif test $pkg_failed = untried; then
49177	LCMS_FOUND=no
49178else
49179	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49180	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49182$as_echo "yes" >&6; }
49183	LCMS_FOUND=yes
49184fi
49185    if test "x${LCMS_FOUND}" = "xyes"; then
49186      USE_EXTERNAL_LCMS=true
49187    else
49188      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49189    fi
49190  else
49191    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49192  fi
49193
49194
49195
49196  ###############################################################################
49197  #
49198  # Check for the png library
49199  #
49200
49201
49202# Check whether --with-libpng was given.
49203if test "${with_libpng+set}" = set; then :
49204  withval=$with_libpng;
49205fi
49206
49207
49208
49209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49210$as_echo_n "checking for which libpng to use... " >&6; }
49211
49212  # default is bundled
49213  DEFAULT_LIBPNG=bundled
49214
49215  #
49216  # if user didn't specify, use DEFAULT_LIBPNG
49217  #
49218  if test "x${with_libpng}" = "x"; then
49219      with_libpng=${DEFAULT_LIBPNG}
49220  fi
49221
49222  if test "x${with_libpng}" = "xbundled"; then
49223      USE_EXTERNAL_LIBPNG=false
49224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49225$as_echo "bundled" >&6; }
49226  elif test "x${with_libpng}" = "xsystem"; then
49227
49228pkg_failed=no
49229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49230$as_echo_n "checking for PNG... " >&6; }
49231
49232if test -n "$PNG_CFLAGS"; then
49233    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49234 elif test -n "$PKG_CONFIG"; then
49235    if test -n "$PKG_CONFIG" && \
49236    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49237  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49238  ac_status=$?
49239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49240  test $ac_status = 0; }; then
49241  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49242else
49243  pkg_failed=yes
49244fi
49245 else
49246    pkg_failed=untried
49247fi
49248if test -n "$PNG_LIBS"; then
49249    pkg_cv_PNG_LIBS="$PNG_LIBS"
49250 elif test -n "$PKG_CONFIG"; then
49251    if test -n "$PKG_CONFIG" && \
49252    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49253  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49254  ac_status=$?
49255  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49256  test $ac_status = 0; }; then
49257  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49258else
49259  pkg_failed=yes
49260fi
49261 else
49262    pkg_failed=untried
49263fi
49264
49265
49266
49267if test $pkg_failed = yes; then
49268
49269if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49270        _pkg_short_errors_supported=yes
49271else
49272        _pkg_short_errors_supported=no
49273fi
49274        if test $_pkg_short_errors_supported = yes; then
49275	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49276        else
49277	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49278        fi
49279	# Put the nasty error message in config.log where it belongs
49280	echo "$PNG_PKG_ERRORS" >&5
49281
49282	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49283$as_echo "no" >&6; }
49284                 LIBPNG_FOUND=no
49285elif test $pkg_failed = untried; then
49286	 LIBPNG_FOUND=no
49287else
49288	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49289	PNG_LIBS=$pkg_cv_PNG_LIBS
49290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49291$as_echo "yes" >&6; }
49292	 LIBPNG_FOUND=yes
49293fi
49294      if test "x${LIBPNG_FOUND}" = "xyes"; then
49295          USE_EXTERNAL_LIBPNG=true
49296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49297$as_echo "system" >&6; }
49298      else
49299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49300$as_echo "system not found" >&6; }
49301          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49302      fi
49303  else
49304      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49305  fi
49306
49307
49308  ###############################################################################
49309  #
49310  # Check for the zlib library
49311  #
49312
49313
49314# Check whether --with-zlib was given.
49315if test "${with_zlib+set}" = set; then :
49316  withval=$with_zlib;
49317fi
49318
49319
49320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49321$as_echo_n "checking for compress in -lz... " >&6; }
49322if ${ac_cv_lib_z_compress+:} false; then :
49323  $as_echo_n "(cached) " >&6
49324else
49325  ac_check_lib_save_LIBS=$LIBS
49326LIBS="-lz  $LIBS"
49327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49328/* end confdefs.h.  */
49329
49330/* Override any GCC internal prototype to avoid an error.
49331   Use char because int might match the return type of a GCC
49332   builtin and then its argument prototype would still apply.  */
49333#ifdef __cplusplus
49334extern "C"
49335#endif
49336char compress ();
49337int
49338main ()
49339{
49340return compress ();
49341  ;
49342  return 0;
49343}
49344_ACEOF
49345if ac_fn_cxx_try_link "$LINENO"; then :
49346  ac_cv_lib_z_compress=yes
49347else
49348  ac_cv_lib_z_compress=no
49349fi
49350rm -f core conftest.err conftest.$ac_objext \
49351    conftest$ac_exeext conftest.$ac_ext
49352LIBS=$ac_check_lib_save_LIBS
49353fi
49354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49355$as_echo "$ac_cv_lib_z_compress" >&6; }
49356if test "x$ac_cv_lib_z_compress" = xyes; then :
49357   ZLIB_FOUND=yes
49358else
49359   ZLIB_FOUND=no
49360fi
49361
49362
49363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49364$as_echo_n "checking for which zlib to use... " >&6; }
49365
49366  DEFAULT_ZLIB=bundled
49367  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49368    #
49369    # On macosx default is system...on others default is
49370    #
49371    DEFAULT_ZLIB=system
49372  fi
49373
49374  if test "x${ZLIB_FOUND}" != "xyes"; then
49375    #
49376    # If we don't find any system...set default to bundled
49377    #
49378    DEFAULT_ZLIB=bundled
49379  fi
49380
49381  #
49382  # If user didn't specify, use DEFAULT_ZLIB
49383  #
49384  if test "x${with_zlib}" = "x"; then
49385    with_zlib=${DEFAULT_ZLIB}
49386  fi
49387
49388  if test "x${with_zlib}" = "xbundled"; then
49389    USE_EXTERNAL_LIBZ=false
49390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49391$as_echo "bundled" >&6; }
49392  elif test "x${with_zlib}" = "xsystem"; then
49393    if test "x${ZLIB_FOUND}" = "xyes"; then
49394      USE_EXTERNAL_LIBZ=true
49395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49396$as_echo "system" >&6; }
49397    else
49398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49399$as_echo "system not found" >&6; }
49400      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49401    fi
49402  else
49403    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49404  fi
49405
49406
49407
49408  ###############################################################################
49409  LIBZIP_CAN_USE_MMAP=true
49410
49411
49412
49413  ###############################################################################
49414  #
49415  # Check if altzone exists in time.h
49416  #
49417
49418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49419/* end confdefs.h.  */
49420#include <time.h>
49421int
49422main ()
49423{
49424return (int)altzone;
49425  ;
49426  return 0;
49427}
49428_ACEOF
49429if ac_fn_cxx_try_link "$LINENO"; then :
49430  has_altzone=yes
49431else
49432  has_altzone=no
49433fi
49434rm -f core conftest.err conftest.$ac_objext \
49435    conftest$ac_exeext conftest.$ac_ext
49436  if test "x$has_altzone" = xyes; then
49437
49438$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49439
49440  fi
49441
49442  ###############################################################################
49443  #
49444  # Check the maths library
49445  #
49446
49447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49448$as_echo_n "checking for cos in -lm... " >&6; }
49449if ${ac_cv_lib_m_cos+:} false; then :
49450  $as_echo_n "(cached) " >&6
49451else
49452  ac_check_lib_save_LIBS=$LIBS
49453LIBS="-lm  $LIBS"
49454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49455/* end confdefs.h.  */
49456
49457/* Override any GCC internal prototype to avoid an error.
49458   Use char because int might match the return type of a GCC
49459   builtin and then its argument prototype would still apply.  */
49460#ifdef __cplusplus
49461extern "C"
49462#endif
49463char cos ();
49464int
49465main ()
49466{
49467return cos ();
49468  ;
49469  return 0;
49470}
49471_ACEOF
49472if ac_fn_cxx_try_link "$LINENO"; then :
49473  ac_cv_lib_m_cos=yes
49474else
49475  ac_cv_lib_m_cos=no
49476fi
49477rm -f core conftest.err conftest.$ac_objext \
49478    conftest$ac_exeext conftest.$ac_ext
49479LIBS=$ac_check_lib_save_LIBS
49480fi
49481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49482$as_echo "$ac_cv_lib_m_cos" >&6; }
49483if test "x$ac_cv_lib_m_cos" = xyes; then :
49484  cat >>confdefs.h <<_ACEOF
49485#define HAVE_LIBM 1
49486_ACEOF
49487
49488  LIBS="-lm $LIBS"
49489
49490else
49491
49492        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49493$as_echo "$as_me: Maths library was not found" >&6;}
49494
49495
49496fi
49497
49498
49499
49500  ###############################################################################
49501  #
49502  # Check for libdl.so
49503
49504  save_LIBS="$LIBS"
49505  LIBS=""
49506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49507$as_echo_n "checking for dlopen in -ldl... " >&6; }
49508if ${ac_cv_lib_dl_dlopen+:} false; then :
49509  $as_echo_n "(cached) " >&6
49510else
49511  ac_check_lib_save_LIBS=$LIBS
49512LIBS="-ldl  $LIBS"
49513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49514/* end confdefs.h.  */
49515
49516/* Override any GCC internal prototype to avoid an error.
49517   Use char because int might match the return type of a GCC
49518   builtin and then its argument prototype would still apply.  */
49519#ifdef __cplusplus
49520extern "C"
49521#endif
49522char dlopen ();
49523int
49524main ()
49525{
49526return dlopen ();
49527  ;
49528  return 0;
49529}
49530_ACEOF
49531if ac_fn_cxx_try_link "$LINENO"; then :
49532  ac_cv_lib_dl_dlopen=yes
49533else
49534  ac_cv_lib_dl_dlopen=no
49535fi
49536rm -f core conftest.err conftest.$ac_objext \
49537    conftest$ac_exeext conftest.$ac_ext
49538LIBS=$ac_check_lib_save_LIBS
49539fi
49540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49541$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49542if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49543  cat >>confdefs.h <<_ACEOF
49544#define HAVE_LIBDL 1
49545_ACEOF
49546
49547  LIBS="-ldl $LIBS"
49548
49549fi
49550
49551  LIBDL="$LIBS"
49552
49553  LIBS="$save_LIBS"
49554
49555
49556  ###############################################################################
49557  #
49558  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49559  # dynamic build is configured on command line.
49560  #
49561
49562# Check whether --with-stdc++lib was given.
49563if test "${with_stdc__lib+set}" = set; then :
49564  withval=$with_stdc__lib;
49565        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49566                && test "x$with_stdc__lib" != xdefault; then
49567          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49568        fi
49569
49570else
49571  with_stdc__lib=default
49572
49573fi
49574
49575
49576  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49577    # Test if -lstdc++ works.
49578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49579$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49580    ac_ext=cpp
49581ac_cpp='$CXXCPP $CPPFLAGS'
49582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49585
49586    OLD_CXXFLAGS="$CXXFLAGS"
49587    CXXFLAGS="$CXXFLAGS -lstdc++"
49588    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49589/* end confdefs.h.  */
49590
49591int
49592main ()
49593{
49594return 0;
49595  ;
49596  return 0;
49597}
49598_ACEOF
49599if ac_fn_cxx_try_link "$LINENO"; then :
49600  has_dynamic_libstdcxx=yes
49601else
49602  has_dynamic_libstdcxx=no
49603fi
49604rm -f core conftest.err conftest.$ac_objext \
49605    conftest$ac_exeext conftest.$ac_ext
49606    CXXFLAGS="$OLD_CXXFLAGS"
49607    ac_ext=cpp
49608ac_cpp='$CXXCPP $CPPFLAGS'
49609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49612
49613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49614$as_echo "$has_dynamic_libstdcxx" >&6; }
49615
49616    # Test if stdc++ can be linked statically.
49617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49618$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49619    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49620    ac_ext=cpp
49621ac_cpp='$CXXCPP $CPPFLAGS'
49622ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49623ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49624ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49625
49626    OLD_LIBS="$LIBS"
49627    OLD_CXX="$CXX"
49628    LIBS="$STATIC_STDCXX_FLAGS"
49629    CXX="$CC"
49630    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49631/* end confdefs.h.  */
49632
49633int
49634main ()
49635{
49636return 0;
49637  ;
49638  return 0;
49639}
49640_ACEOF
49641if ac_fn_cxx_try_link "$LINENO"; then :
49642  has_static_libstdcxx=yes
49643else
49644  has_static_libstdcxx=no
49645fi
49646rm -f core conftest.err conftest.$ac_objext \
49647    conftest$ac_exeext conftest.$ac_ext
49648    LIBS="$OLD_LIBS"
49649    CXX="$OLD_CXX"
49650    ac_ext=cpp
49651ac_cpp='$CXXCPP $CPPFLAGS'
49652ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49653ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49654ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49655
49656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49657$as_echo "$has_static_libstdcxx" >&6; }
49658
49659    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49660      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49661    fi
49662
49663    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49664      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49665    fi
49666
49667    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49668      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49669    fi
49670
49671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49672$as_echo_n "checking how to link with libstdc++... " >&6; }
49673    # If dynamic was requested, it's available since it would fail above otherwise.
49674    # If dynamic wasn't requested, go with static unless it isn't available.
49675    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49676      LIBCXX="$LIBCXX -lstdc++"
49677      LDCXX="$CXX"
49678      STATIC_CXX_SETTING="STATIC_CXX=false"
49679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49680$as_echo "dynamic" >&6; }
49681    else
49682      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49683      LDCXX="$CC"
49684      STATIC_CXX_SETTING="STATIC_CXX=true"
49685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49686$as_echo "static" >&6; }
49687    fi
49688  fi
49689
49690
49691  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49692    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49693
49694pkg_failed=no
49695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49696$as_echo_n "checking for LIBFFI... " >&6; }
49697
49698if test -n "$LIBFFI_CFLAGS"; then
49699    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49700 elif test -n "$PKG_CONFIG"; then
49701    if test -n "$PKG_CONFIG" && \
49702    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49703  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49704  ac_status=$?
49705  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49706  test $ac_status = 0; }; then
49707  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49708else
49709  pkg_failed=yes
49710fi
49711 else
49712    pkg_failed=untried
49713fi
49714if test -n "$LIBFFI_LIBS"; then
49715    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49716 elif test -n "$PKG_CONFIG"; then
49717    if test -n "$PKG_CONFIG" && \
49718    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49719  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49720  ac_status=$?
49721  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49722  test $ac_status = 0; }; then
49723  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49724else
49725  pkg_failed=yes
49726fi
49727 else
49728    pkg_failed=untried
49729fi
49730
49731
49732
49733if test $pkg_failed = yes; then
49734
49735if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49736        _pkg_short_errors_supported=yes
49737else
49738        _pkg_short_errors_supported=no
49739fi
49740        if test $_pkg_short_errors_supported = yes; then
49741	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49742        else
49743	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49744        fi
49745	# Put the nasty error message in config.log where it belongs
49746	echo "$LIBFFI_PKG_ERRORS" >&5
49747
49748	as_fn_error $? "Package requirements (libffi) were not met:
49749
49750$LIBFFI_PKG_ERRORS
49751
49752Consider adjusting the PKG_CONFIG_PATH environment variable if you
49753installed software in a non-standard prefix.
49754
49755Alternatively, you may set the environment variables LIBFFI_CFLAGS
49756and LIBFFI_LIBS to avoid the need to call pkg-config.
49757See the pkg-config man page for more details.
49758" "$LINENO" 5
49759elif test $pkg_failed = untried; then
49760	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49762as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49763is in your PATH or set the PKG_CONFIG environment variable to the full
49764path to pkg-config.
49765
49766Alternatively, you may set the environment variables LIBFFI_CFLAGS
49767and LIBFFI_LIBS to avoid the need to call pkg-config.
49768See the pkg-config man page for more details.
49769
49770To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49771See \`config.log' for more details" "$LINENO" 5; }
49772else
49773	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49774	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49776$as_echo "yes" >&6; }
49777	:
49778fi
49779
49780  fi
49781
49782  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49783    # Extract the first word of "llvm-config", so it can be a program name with args.
49784set dummy llvm-config; ac_word=$2
49785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49786$as_echo_n "checking for $ac_word... " >&6; }
49787if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49788  $as_echo_n "(cached) " >&6
49789else
49790  if test -n "$LLVM_CONFIG"; then
49791  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49792else
49793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49794for as_dir in $PATH
49795do
49796  IFS=$as_save_IFS
49797  test -z "$as_dir" && as_dir=.
49798    for ac_exec_ext in '' $ac_executable_extensions; do
49799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49800    ac_cv_prog_LLVM_CONFIG="llvm-config"
49801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49802    break 2
49803  fi
49804done
49805  done
49806IFS=$as_save_IFS
49807
49808fi
49809fi
49810LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49811if test -n "$LLVM_CONFIG"; then
49812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49813$as_echo "$LLVM_CONFIG" >&6; }
49814else
49815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49816$as_echo "no" >&6; }
49817fi
49818
49819
49820
49821    if test "x$LLVM_CONFIG" != xllvm-config; then
49822      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49823    fi
49824
49825    llvm_components="jit mcjit engine nativecodegen native"
49826    unset LLVM_CFLAGS
49827    for flag in $("$LLVM_CONFIG" --cxxflags); do
49828      if echo "${flag}" | grep -q '^-[ID]'; then
49829        if test "${flag}" != "-D_DEBUG" ; then
49830          if test "${LLVM_CFLAGS}" != "" ; then
49831            LLVM_CFLAGS="${LLVM_CFLAGS} "
49832          fi
49833          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49834        fi
49835      fi
49836    done
49837    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49838    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49839
49840    unset LLVM_LDFLAGS
49841    for flag in $("${LLVM_CONFIG}" --ldflags); do
49842      if echo "${flag}" | grep -q '^-L'; then
49843        if test "${LLVM_LDFLAGS}" != ""; then
49844          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49845        fi
49846        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49847      fi
49848    done
49849
49850    unset LLVM_LIBS
49851    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49852      if echo "${flag}" | grep -q '^-l'; then
49853        if test "${LLVM_LIBS}" != ""; then
49854          LLVM_LIBS="${LLVM_LIBS} "
49855        fi
49856        LLVM_LIBS="${LLVM_LIBS}${flag}"
49857      fi
49858    done
49859
49860
49861
49862
49863  fi
49864
49865  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49866  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49867    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49868  fi
49869
49870  # TODO better (platform agnostic) test
49871  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49872    LIBCXX="-lstdc++"
49873  fi
49874
49875
49876
49877
49878  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49879
49880
49881# Check whether --with-msvcr-dll was given.
49882if test "${with_msvcr_dll+set}" = set; then :
49883  withval=$with_msvcr_dll;
49884fi
49885
49886
49887  if test "x$with_msvcr_dll" != x; then
49888    # If given explicitely by user, do not probe. If not present, fail directly.
49889
49890  DLL_NAME="$DLL_NAME"
49891  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49892  METHOD="--with-msvcr-dll"
49893  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49895$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49896
49897    # Need to check if the found msvcr is correct architecture
49898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49899$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49900    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49902      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49903      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49904      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49905        CORRECT_MSVCR_ARCH="PE32 executable"
49906      else
49907        CORRECT_MSVCR_ARCH="PE32+ executable"
49908      fi
49909    else
49910      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49911        CORRECT_MSVCR_ARCH=386
49912      else
49913        CORRECT_MSVCR_ARCH=x86-64
49914      fi
49915    fi
49916    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49918$as_echo "ok" >&6; }
49919      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49920      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49921$as_echo_n "checking for $DLL_NAME... " >&6; }
49922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49923$as_echo "$MSVC_DLL" >&6; }
49924    else
49925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49926$as_echo "incorrect, ignoring" >&6; }
49927      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49928$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49929    fi
49930  fi
49931
49932    if test "x$MSVC_DLL" = x; then
49933      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49934    fi
49935  else
49936
49937  VAR_NAME="MSVCR_DLL"
49938  DLL_NAME="${MSVCR_NAME}"
49939  MSVC_DLL=
49940
49941  if test "x$MSVC_DLL" = x; then
49942    # Probe: Using well-known location from Visual Studio 10.0
49943    if test "x$VCINSTALLDIR" != x; then
49944      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49945
49946  windows_path="$CYGWIN_VC_INSTALL_DIR"
49947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49948    unix_path=`$CYGPATH -u "$windows_path"`
49949    CYGWIN_VC_INSTALL_DIR="$unix_path"
49950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49952    CYGWIN_VC_INSTALL_DIR="$unix_path"
49953  fi
49954
49955      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49956        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49957      else
49958        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49959      fi
49960      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49961
49962  DLL_NAME="$DLL_NAME"
49963  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49964  METHOD="well-known location in VCINSTALLDIR"
49965  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49966    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49967$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49968
49969    # Need to check if the found msvcr is correct architecture
49970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49971$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49972    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49974      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49975      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49976      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49977        CORRECT_MSVCR_ARCH="PE32 executable"
49978      else
49979        CORRECT_MSVCR_ARCH="PE32+ executable"
49980      fi
49981    else
49982      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49983        CORRECT_MSVCR_ARCH=386
49984      else
49985        CORRECT_MSVCR_ARCH=x86-64
49986      fi
49987    fi
49988    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49990$as_echo "ok" >&6; }
49991      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49992      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49993$as_echo_n "checking for $DLL_NAME... " >&6; }
49994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49995$as_echo "$MSVC_DLL" >&6; }
49996    else
49997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49998$as_echo "incorrect, ignoring" >&6; }
49999      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50000$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50001    fi
50002  fi
50003
50004    fi
50005  fi
50006
50007  if test "x$MSVC_DLL" = x; then
50008    # Probe: Check in the Boot JDK directory.
50009    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50010
50011  DLL_NAME="$DLL_NAME"
50012  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50013  METHOD="well-known location in Boot JDK"
50014  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50015    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50016$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50017
50018    # Need to check if the found msvcr is correct architecture
50019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50020$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50021    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50023      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50024      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50025      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50026        CORRECT_MSVCR_ARCH="PE32 executable"
50027      else
50028        CORRECT_MSVCR_ARCH="PE32+ executable"
50029      fi
50030    else
50031      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50032        CORRECT_MSVCR_ARCH=386
50033      else
50034        CORRECT_MSVCR_ARCH=x86-64
50035      fi
50036    fi
50037    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50039$as_echo "ok" >&6; }
50040      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50041      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50042$as_echo_n "checking for $DLL_NAME... " >&6; }
50043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50044$as_echo "$MSVC_DLL" >&6; }
50045    else
50046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50047$as_echo "incorrect, ignoring" >&6; }
50048      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50049$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50050    fi
50051  fi
50052
50053  fi
50054
50055  if test "x$MSVC_DLL" = x; then
50056    # Probe: Look in the Windows system32 directory
50057    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50058
50059  windows_path="$CYGWIN_SYSTEMROOT"
50060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50061    unix_path=`$CYGPATH -u "$windows_path"`
50062    CYGWIN_SYSTEMROOT="$unix_path"
50063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50065    CYGWIN_SYSTEMROOT="$unix_path"
50066  fi
50067
50068    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50069
50070  DLL_NAME="$DLL_NAME"
50071  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50072  METHOD="well-known location in SYSTEMROOT"
50073  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50074    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50075$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50076
50077    # Need to check if the found msvcr is correct architecture
50078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50079$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50080    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50082      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50083      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50084      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50085        CORRECT_MSVCR_ARCH="PE32 executable"
50086      else
50087        CORRECT_MSVCR_ARCH="PE32+ executable"
50088      fi
50089    else
50090      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50091        CORRECT_MSVCR_ARCH=386
50092      else
50093        CORRECT_MSVCR_ARCH=x86-64
50094      fi
50095    fi
50096    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50098$as_echo "ok" >&6; }
50099      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50101$as_echo_n "checking for $DLL_NAME... " >&6; }
50102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50103$as_echo "$MSVC_DLL" >&6; }
50104    else
50105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50106$as_echo "incorrect, ignoring" >&6; }
50107      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50108$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50109    fi
50110  fi
50111
50112  fi
50113
50114  if test "x$MSVC_DLL" = x; then
50115    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50116    if test "x$VS100COMNTOOLS" != x; then
50117      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50118
50119  windows_path="$CYGWIN_VS_TOOLS_DIR"
50120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50121    unix_path=`$CYGPATH -u "$windows_path"`
50122    CYGWIN_VS_TOOLS_DIR="$unix_path"
50123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50125    CYGWIN_VS_TOOLS_DIR="$unix_path"
50126  fi
50127
50128      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50129        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50130	    | $GREP -i /x64/ | $HEAD --lines 1`
50131      else
50132        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50133	    | $GREP -i /x86/ | $HEAD --lines 1`
50134      fi
50135
50136  DLL_NAME="$DLL_NAME"
50137  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50138  METHOD="search of VS100COMNTOOLS"
50139  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50141$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50142
50143    # Need to check if the found msvcr is correct architecture
50144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50145$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50146    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50148      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50149      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50150      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50151        CORRECT_MSVCR_ARCH="PE32 executable"
50152      else
50153        CORRECT_MSVCR_ARCH="PE32+ executable"
50154      fi
50155    else
50156      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50157        CORRECT_MSVCR_ARCH=386
50158      else
50159        CORRECT_MSVCR_ARCH=x86-64
50160      fi
50161    fi
50162    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50164$as_echo "ok" >&6; }
50165      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50167$as_echo_n "checking for $DLL_NAME... " >&6; }
50168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50169$as_echo "$MSVC_DLL" >&6; }
50170    else
50171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50172$as_echo "incorrect, ignoring" >&6; }
50173      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50174$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50175    fi
50176  fi
50177
50178    fi
50179  fi
50180
50181  if test "x$MSVC_DLL" = x; then
50182    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50183    # (This was the original behaviour; kept since it might turn something up)
50184    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50185      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50186        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50187	    | $GREP x64 | $HEAD --lines 1`
50188      else
50189        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50190	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50191        if test "x$POSSIBLE_MSVC_DLL" = x; then
50192          # We're grasping at straws now...
50193          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50194	      | $HEAD --lines 1`
50195        fi
50196      fi
50197
50198
50199  DLL_NAME="$DLL_NAME"
50200  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50201  METHOD="search of VCINSTALLDIR"
50202  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50203    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50204$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50205
50206    # Need to check if the found msvcr is correct architecture
50207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50208$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50209    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50211      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50212      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50213      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50214        CORRECT_MSVCR_ARCH="PE32 executable"
50215      else
50216        CORRECT_MSVCR_ARCH="PE32+ executable"
50217      fi
50218    else
50219      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50220        CORRECT_MSVCR_ARCH=386
50221      else
50222        CORRECT_MSVCR_ARCH=x86-64
50223      fi
50224    fi
50225    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50227$as_echo "ok" >&6; }
50228      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50230$as_echo_n "checking for $DLL_NAME... " >&6; }
50231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50232$as_echo "$MSVC_DLL" >&6; }
50233    else
50234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50235$as_echo "incorrect, ignoring" >&6; }
50236      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50237$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50238    fi
50239  fi
50240
50241    fi
50242  fi
50243
50244  if test "x$MSVC_DLL" = x; then
50245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50246$as_echo_n "checking for $DLL_NAME... " >&6; }
50247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50248$as_echo "no" >&6; }
50249    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50250  fi
50251
50252  MSVCR_DLL=$MSVC_DLL
50253
50254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50255
50256  # Input might be given as Windows format, start by converting to
50257  # unix format.
50258  path="$MSVCR_DLL"
50259  new_path=`$CYGPATH -u "$path"`
50260
50261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50264  # "foo.exe" is OK but "foo" is an error.
50265  #
50266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50267  # It is also a way to make sure we got the proper file name for the real test later on.
50268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50269  if test "x$test_shortpath" = x; then
50270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50271$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50272    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50273  fi
50274
50275  # Call helper function which possibly converts this using DOS-style short mode.
50276  # If so, the updated path is stored in $new_path.
50277
50278  input_path="$new_path"
50279  # Check if we need to convert this using DOS-style short mode. If the path
50280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50281  # take no chances and rewrite it.
50282  # Note: m4 eats our [], so we need to use [ and ] instead.
50283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50284  if test "x$has_forbidden_chars" != x; then
50285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50289      # Going to short mode and back again did indeed matter. Since short mode is
50290      # case insensitive, let's make it lowercase to improve readability.
50291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50292      # Now convert it back to Unix-stile (cygpath)
50293      input_path=`$CYGPATH -u "$shortmode_path"`
50294      new_path="$input_path"
50295    fi
50296  fi
50297
50298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50299  if test "x$test_cygdrive_prefix" = x; then
50300    # As a simple fix, exclude /usr/bin since it's not a real path.
50301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50303      # a path prefixed by /cygdrive for fixpath to work.
50304      new_path="$CYGWIN_ROOT_PATH$input_path"
50305    fi
50306  fi
50307
50308
50309  if test "x$path" != "x$new_path"; then
50310    MSVCR_DLL="$new_path"
50311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50312$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50313  fi
50314
50315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50316
50317  path="$MSVCR_DLL"
50318  has_colon=`$ECHO $path | $GREP ^.:`
50319  new_path="$path"
50320  if test "x$has_colon" = x; then
50321    # Not in mixed or Windows style, start by that.
50322    new_path=`cmd //c echo $path`
50323  fi
50324
50325
50326  input_path="$new_path"
50327  # Check if we need to convert this using DOS-style short mode. If the path
50328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50329  # take no chances and rewrite it.
50330  # Note: m4 eats our [], so we need to use [ and ] instead.
50331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50332  if test "x$has_forbidden_chars" != x; then
50333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50335  fi
50336
50337
50338  windows_path="$new_path"
50339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50340    unix_path=`$CYGPATH -u "$windows_path"`
50341    new_path="$unix_path"
50342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50344    new_path="$unix_path"
50345  fi
50346
50347  if test "x$path" != "x$new_path"; then
50348    MSVCR_DLL="$new_path"
50349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50350$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50351  fi
50352
50353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50355
50356  else
50357    # We're on a unix platform. Hooray! :)
50358    path="$MSVCR_DLL"
50359    has_space=`$ECHO "$path" | $GREP " "`
50360    if test "x$has_space" != x; then
50361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50362$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50363      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50364    fi
50365
50366    # Use eval to expand a potential ~
50367    eval path="$path"
50368    if test ! -f "$path" && test ! -d "$path"; then
50369      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50370    fi
50371
50372    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50373  fi
50374
50375  MSVCR_DLL=$MSVCR_DLL
50376
50377
50378  fi
50379
50380
50381# Check whether --with-msvcp-dll was given.
50382if test "${with_msvcp_dll+set}" = set; then :
50383  withval=$with_msvcp_dll;
50384fi
50385
50386
50387  if test "x$MSVCP_NAME" != "x"; then
50388    if test "x$with_msvcp_dll" != x; then
50389      # If given explicitely by user, do not probe. If not present, fail directly.
50390
50391  DLL_NAME="$DLL_NAME"
50392  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50393  METHOD="--with-msvcp-dll"
50394  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50395    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50396$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50397
50398    # Need to check if the found msvcr is correct architecture
50399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50400$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50401    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50403      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50404      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50405      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50406        CORRECT_MSVCR_ARCH="PE32 executable"
50407      else
50408        CORRECT_MSVCR_ARCH="PE32+ executable"
50409      fi
50410    else
50411      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50412        CORRECT_MSVCR_ARCH=386
50413      else
50414        CORRECT_MSVCR_ARCH=x86-64
50415      fi
50416    fi
50417    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50419$as_echo "ok" >&6; }
50420      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50422$as_echo_n "checking for $DLL_NAME... " >&6; }
50423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50424$as_echo "$MSVC_DLL" >&6; }
50425    else
50426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50427$as_echo "incorrect, ignoring" >&6; }
50428      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50429$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50430    fi
50431  fi
50432
50433      if test "x$MSVC_DLL" = x; then
50434        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50435      fi
50436    else
50437
50438  VAR_NAME="MSVCP_DLL"
50439  DLL_NAME="${MSVCP_NAME}"
50440  MSVC_DLL=
50441
50442  if test "x$MSVC_DLL" = x; then
50443    # Probe: Using well-known location from Visual Studio 10.0
50444    if test "x$VCINSTALLDIR" != x; then
50445      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50446
50447  windows_path="$CYGWIN_VC_INSTALL_DIR"
50448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50449    unix_path=`$CYGPATH -u "$windows_path"`
50450    CYGWIN_VC_INSTALL_DIR="$unix_path"
50451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50453    CYGWIN_VC_INSTALL_DIR="$unix_path"
50454  fi
50455
50456      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50457        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50458      else
50459        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50460      fi
50461      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50462
50463  DLL_NAME="$DLL_NAME"
50464  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50465  METHOD="well-known location in VCINSTALLDIR"
50466  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50467    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50468$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50469
50470    # Need to check if the found msvcr is correct architecture
50471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50472$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50473    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50475      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50476      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50477      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50478        CORRECT_MSVCR_ARCH="PE32 executable"
50479      else
50480        CORRECT_MSVCR_ARCH="PE32+ executable"
50481      fi
50482    else
50483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50484        CORRECT_MSVCR_ARCH=386
50485      else
50486        CORRECT_MSVCR_ARCH=x86-64
50487      fi
50488    fi
50489    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50491$as_echo "ok" >&6; }
50492      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50494$as_echo_n "checking for $DLL_NAME... " >&6; }
50495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50496$as_echo "$MSVC_DLL" >&6; }
50497    else
50498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50499$as_echo "incorrect, ignoring" >&6; }
50500      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50501$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50502    fi
50503  fi
50504
50505    fi
50506  fi
50507
50508  if test "x$MSVC_DLL" = x; then
50509    # Probe: Check in the Boot JDK directory.
50510    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50511
50512  DLL_NAME="$DLL_NAME"
50513  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50514  METHOD="well-known location in Boot JDK"
50515  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50517$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50518
50519    # Need to check if the found msvcr is correct architecture
50520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50521$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50522    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50524      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50525      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50526      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50527        CORRECT_MSVCR_ARCH="PE32 executable"
50528      else
50529        CORRECT_MSVCR_ARCH="PE32+ executable"
50530      fi
50531    else
50532      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50533        CORRECT_MSVCR_ARCH=386
50534      else
50535        CORRECT_MSVCR_ARCH=x86-64
50536      fi
50537    fi
50538    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50539      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50540$as_echo "ok" >&6; }
50541      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50543$as_echo_n "checking for $DLL_NAME... " >&6; }
50544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50545$as_echo "$MSVC_DLL" >&6; }
50546    else
50547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50548$as_echo "incorrect, ignoring" >&6; }
50549      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50550$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50551    fi
50552  fi
50553
50554  fi
50555
50556  if test "x$MSVC_DLL" = x; then
50557    # Probe: Look in the Windows system32 directory
50558    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50559
50560  windows_path="$CYGWIN_SYSTEMROOT"
50561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50562    unix_path=`$CYGPATH -u "$windows_path"`
50563    CYGWIN_SYSTEMROOT="$unix_path"
50564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50566    CYGWIN_SYSTEMROOT="$unix_path"
50567  fi
50568
50569    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50570
50571  DLL_NAME="$DLL_NAME"
50572  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50573  METHOD="well-known location in SYSTEMROOT"
50574  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50575    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50576$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50577
50578    # Need to check if the found msvcr is correct architecture
50579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50580$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50581    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50583      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50584      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50585      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50586        CORRECT_MSVCR_ARCH="PE32 executable"
50587      else
50588        CORRECT_MSVCR_ARCH="PE32+ executable"
50589      fi
50590    else
50591      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50592        CORRECT_MSVCR_ARCH=386
50593      else
50594        CORRECT_MSVCR_ARCH=x86-64
50595      fi
50596    fi
50597    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50599$as_echo "ok" >&6; }
50600      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50602$as_echo_n "checking for $DLL_NAME... " >&6; }
50603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50604$as_echo "$MSVC_DLL" >&6; }
50605    else
50606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50607$as_echo "incorrect, ignoring" >&6; }
50608      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50609$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50610    fi
50611  fi
50612
50613  fi
50614
50615  if test "x$MSVC_DLL" = x; then
50616    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50617    if test "x$VS100COMNTOOLS" != x; then
50618      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50619
50620  windows_path="$CYGWIN_VS_TOOLS_DIR"
50621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50622    unix_path=`$CYGPATH -u "$windows_path"`
50623    CYGWIN_VS_TOOLS_DIR="$unix_path"
50624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50626    CYGWIN_VS_TOOLS_DIR="$unix_path"
50627  fi
50628
50629      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50630        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50631	    | $GREP -i /x64/ | $HEAD --lines 1`
50632      else
50633        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50634	    | $GREP -i /x86/ | $HEAD --lines 1`
50635      fi
50636
50637  DLL_NAME="$DLL_NAME"
50638  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50639  METHOD="search of VS100COMNTOOLS"
50640  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50641    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50642$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50643
50644    # Need to check if the found msvcr is correct architecture
50645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50646$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50647    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50649      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50650      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50651      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50652        CORRECT_MSVCR_ARCH="PE32 executable"
50653      else
50654        CORRECT_MSVCR_ARCH="PE32+ executable"
50655      fi
50656    else
50657      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50658        CORRECT_MSVCR_ARCH=386
50659      else
50660        CORRECT_MSVCR_ARCH=x86-64
50661      fi
50662    fi
50663    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50665$as_echo "ok" >&6; }
50666      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50668$as_echo_n "checking for $DLL_NAME... " >&6; }
50669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50670$as_echo "$MSVC_DLL" >&6; }
50671    else
50672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50673$as_echo "incorrect, ignoring" >&6; }
50674      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50675$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50676    fi
50677  fi
50678
50679    fi
50680  fi
50681
50682  if test "x$MSVC_DLL" = x; then
50683    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50684    # (This was the original behaviour; kept since it might turn something up)
50685    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50686      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50687        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50688	    | $GREP x64 | $HEAD --lines 1`
50689      else
50690        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50691	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50692        if test "x$POSSIBLE_MSVC_DLL" = x; then
50693          # We're grasping at straws now...
50694          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50695	      | $HEAD --lines 1`
50696        fi
50697      fi
50698
50699
50700  DLL_NAME="$DLL_NAME"
50701  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50702  METHOD="search of VCINSTALLDIR"
50703  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50705$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50706
50707    # Need to check if the found msvcr is correct architecture
50708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50709$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50710    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50712      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50713      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50715        CORRECT_MSVCR_ARCH="PE32 executable"
50716      else
50717        CORRECT_MSVCR_ARCH="PE32+ executable"
50718      fi
50719    else
50720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50721        CORRECT_MSVCR_ARCH=386
50722      else
50723        CORRECT_MSVCR_ARCH=x86-64
50724      fi
50725    fi
50726    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50728$as_echo "ok" >&6; }
50729      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50731$as_echo_n "checking for $DLL_NAME... " >&6; }
50732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50733$as_echo "$MSVC_DLL" >&6; }
50734    else
50735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50736$as_echo "incorrect, ignoring" >&6; }
50737      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50738$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50739    fi
50740  fi
50741
50742    fi
50743  fi
50744
50745  if test "x$MSVC_DLL" = x; then
50746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50747$as_echo_n "checking for $DLL_NAME... " >&6; }
50748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50749$as_echo "no" >&6; }
50750    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50751  fi
50752
50753  MSVCP_DLL=$MSVC_DLL
50754
50755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50756
50757  # Input might be given as Windows format, start by converting to
50758  # unix format.
50759  path="$MSVCP_DLL"
50760  new_path=`$CYGPATH -u "$path"`
50761
50762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50765  # "foo.exe" is OK but "foo" is an error.
50766  #
50767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50768  # It is also a way to make sure we got the proper file name for the real test later on.
50769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50770  if test "x$test_shortpath" = x; then
50771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50772$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50773    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50774  fi
50775
50776  # Call helper function which possibly converts this using DOS-style short mode.
50777  # If so, the updated path is stored in $new_path.
50778
50779  input_path="$new_path"
50780  # Check if we need to convert this using DOS-style short mode. If the path
50781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50782  # take no chances and rewrite it.
50783  # Note: m4 eats our [], so we need to use [ and ] instead.
50784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50785  if test "x$has_forbidden_chars" != x; then
50786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50790      # Going to short mode and back again did indeed matter. Since short mode is
50791      # case insensitive, let's make it lowercase to improve readability.
50792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50793      # Now convert it back to Unix-stile (cygpath)
50794      input_path=`$CYGPATH -u "$shortmode_path"`
50795      new_path="$input_path"
50796    fi
50797  fi
50798
50799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50800  if test "x$test_cygdrive_prefix" = x; then
50801    # As a simple fix, exclude /usr/bin since it's not a real path.
50802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50804      # a path prefixed by /cygdrive for fixpath to work.
50805      new_path="$CYGWIN_ROOT_PATH$input_path"
50806    fi
50807  fi
50808
50809
50810  if test "x$path" != "x$new_path"; then
50811    MSVCP_DLL="$new_path"
50812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50813$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50814  fi
50815
50816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50817
50818  path="$MSVCP_DLL"
50819  has_colon=`$ECHO $path | $GREP ^.:`
50820  new_path="$path"
50821  if test "x$has_colon" = x; then
50822    # Not in mixed or Windows style, start by that.
50823    new_path=`cmd //c echo $path`
50824  fi
50825
50826
50827  input_path="$new_path"
50828  # Check if we need to convert this using DOS-style short mode. If the path
50829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50830  # take no chances and rewrite it.
50831  # Note: m4 eats our [], so we need to use [ and ] instead.
50832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50833  if test "x$has_forbidden_chars" != x; then
50834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50836  fi
50837
50838
50839  windows_path="$new_path"
50840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50841    unix_path=`$CYGPATH -u "$windows_path"`
50842    new_path="$unix_path"
50843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50845    new_path="$unix_path"
50846  fi
50847
50848  if test "x$path" != "x$new_path"; then
50849    MSVCP_DLL="$new_path"
50850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50851$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50852  fi
50853
50854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50856
50857  else
50858    # We're on a unix platform. Hooray! :)
50859    path="$MSVCP_DLL"
50860    has_space=`$ECHO "$path" | $GREP " "`
50861    if test "x$has_space" != x; then
50862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50863$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50864      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50865    fi
50866
50867    # Use eval to expand a potential ~
50868    eval path="$path"
50869    if test ! -f "$path" && test ! -d "$path"; then
50870      as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50871    fi
50872
50873    MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50874  fi
50875
50876  MSVCP_DLL=$MSVCP_DLL
50877
50878
50879    fi
50880  fi
50881
50882
50883
50884# Check whether --with-dxsdk was given.
50885if test "${with_dxsdk+set}" = set; then :
50886  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50887$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50888fi
50889
50890
50891
50892
50893# Check whether --with-dxsdk-lib was given.
50894if test "${with_dxsdk_lib+set}" = set; then :
50895  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50896$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50897fi
50898
50899
50900
50901
50902# Check whether --with-dxsdk-include was given.
50903if test "${with_dxsdk_include+set}" = set; then :
50904  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50905$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50906fi
50907
50908
50909  fi
50910
50911
50912###############################################################################
50913#
50914# We need to do some final tweaking, when everything else is done.
50915#
50916###############################################################################
50917
50918
50919  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50920
50921
50922  # The name of the Service Agent jar.
50923  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50924  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50925    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50926  fi
50927
50928
50929
50930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50931$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50932
50933    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50934      ENABLE_INTREE_EC=yes
50935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50936$as_echo "yes" >&6; }
50937    else
50938      ENABLE_INTREE_EC=no
50939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50940$as_echo "no" >&6; }
50941    fi
50942
50943
50944
50945
50946###############################################################################
50947#
50948# Configure parts of the build that only affect the build performance,
50949# not the result.
50950#
50951###############################################################################
50952
50953
50954  # How many cores do we have on this build system?
50955
50956# Check whether --with-num-cores was given.
50957if test "${with_num_cores+set}" = set; then :
50958  withval=$with_num_cores;
50959fi
50960
50961  if test "x$with_num_cores" = x; then
50962    # The number of cores were not specified, try to probe them.
50963
50964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50965$as_echo_n "checking for number of cores... " >&6; }
50966  NUM_CORES=1
50967  FOUND_CORES=no
50968
50969  if test -f /proc/cpuinfo; then
50970    # Looks like a Linux (or cygwin) system
50971    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50972    FOUND_CORES=yes
50973  elif test -x /usr/sbin/psrinfo; then
50974    # Looks like a Solaris system
50975    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50976    FOUND_CORES=yes
50977  elif test -x /usr/sbin/system_profiler; then
50978    # Looks like a MacOSX system
50979    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50980    FOUND_CORES=yes
50981  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50982    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50983    FOUND_CORES=yes
50984  elif test -n "$NUMBER_OF_PROCESSORS"; then
50985    # On windows, look in the env
50986    NUM_CORES=$NUMBER_OF_PROCESSORS
50987    FOUND_CORES=yes
50988  fi
50989
50990  if test "x$FOUND_CORES" = xyes; then
50991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50992$as_echo "$NUM_CORES" >&6; }
50993  else
50994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50995$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50996    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50997$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50998  fi
50999
51000  else
51001    NUM_CORES=$with_num_cores
51002  fi
51003
51004
51005
51006  # How much memory do we have on this build system?
51007
51008# Check whether --with-memory-size was given.
51009if test "${with_memory_size+set}" = set; then :
51010  withval=$with_memory_size;
51011fi
51012
51013  if test "x$with_memory_size" = x; then
51014    # The memory size was not specified, try to probe it.
51015
51016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51017$as_echo_n "checking for memory size... " >&6; }
51018  # Default to 1024 MB
51019  MEMORY_SIZE=1024
51020  FOUND_MEM=no
51021
51022  if test -f /proc/meminfo; then
51023    # Looks like a Linux (or cygwin) system
51024    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51025    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51026    FOUND_MEM=yes
51027  elif test -x /usr/sbin/prtconf; then
51028    # Looks like a Solaris or AIX system
51029    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51030    FOUND_MEM=yes
51031  elif test -x /usr/sbin/system_profiler; then
51032    # Looks like a MacOSX system
51033    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51034    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51035    FOUND_MEM=yes
51036  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51037    # Windows, but without cygwin
51038    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51039    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51040    FOUND_MEM=yes
51041  fi
51042
51043  if test "x$FOUND_MEM" = xyes; then
51044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51045$as_echo "$MEMORY_SIZE MB" >&6; }
51046  else
51047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51048$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51049    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51050$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51051  fi
51052
51053  else
51054    MEMORY_SIZE=$with_memory_size
51055  fi
51056
51057
51058
51059  # Provide a decent default number of parallel jobs for make depending on
51060  # number of cores, amount of memory and machine architecture.
51061
51062# Check whether --with-jobs was given.
51063if test "${with_jobs+set}" = set; then :
51064  withval=$with_jobs;
51065fi
51066
51067  if test "x$with_jobs" = x; then
51068    # Number of jobs was not specified, calculate.
51069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51070$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51071    # Approximate memory in GB.
51072    memory_gb=`expr $MEMORY_SIZE / 1024`
51073    # Pick the lowest of memory in gb and number of cores.
51074    if test "$memory_gb" -lt "$NUM_CORES"; then
51075      JOBS="$memory_gb"
51076    else
51077      JOBS="$NUM_CORES"
51078      # On bigger machines, leave some room for other processes to run
51079      if test "$JOBS" -gt "4"; then
51080        JOBS=`expr $JOBS '*' 90 / 100`
51081      fi
51082    fi
51083    # Cap number of jobs to 16
51084    if test "$JOBS" -gt "16"; then
51085      JOBS=16
51086    fi
51087    if test "$JOBS" -eq "0"; then
51088      JOBS=1
51089    fi
51090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51091$as_echo "$JOBS" >&6; }
51092  else
51093    JOBS=$with_jobs
51094  fi
51095
51096
51097
51098# Setup arguments for the boot jdk (after cores and memory have been setup)
51099
51100  ##############################################################################
51101  #
51102  # Specify jvm options for anything that is run with the Boot JDK.
51103  # Not all JVM:s accept the same arguments on the command line.
51104  #
51105
51106# Check whether --with-boot-jdk-jvmargs was given.
51107if test "${with_boot_jdk_jvmargs+set}" = set; then :
51108  withval=$with_boot_jdk_jvmargs;
51109fi
51110
51111
51112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51113$as_echo_n "checking flags for boot jdk java command ... " >&6; }
51114
51115  # Disable special log output when a debug build is used as Boot JDK...
51116
51117  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51118  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51119  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51120  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51121  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51122  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51123    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51124    JVM_ARG_OK=true
51125  else
51126    $ECHO "Arg failed:" >&5
51127    $ECHO "$OUTPUT" >&5
51128    JVM_ARG_OK=false
51129  fi
51130
51131
51132  # Apply user provided options.
51133
51134  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51135  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51136  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51137  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51138  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51139  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51140    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51141    JVM_ARG_OK=true
51142  else
51143    $ECHO "Arg failed:" >&5
51144    $ECHO "$OUTPUT" >&5
51145    JVM_ARG_OK=false
51146  fi
51147
51148
51149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51150$as_echo "$boot_jdk_jvmargs" >&6; }
51151
51152  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51153  JAVA_FLAGS=$boot_jdk_jvmargs
51154
51155
51156
51157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51158$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51159
51160  # Starting amount of heap memory.
51161
51162  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51163  $ECHO "Command: $JAVA -Xms64M -version" >&5
51164  OUTPUT=`$JAVA -Xms64M -version 2>&1`
51165  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51166  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51167  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51168    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51169    JVM_ARG_OK=true
51170  else
51171    $ECHO "Arg failed:" >&5
51172    $ECHO "$OUTPUT" >&5
51173    JVM_ARG_OK=false
51174  fi
51175
51176
51177  # Maximum amount of heap memory.
51178  # Maximum stack size.
51179  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51180  if test "x$BUILD_NUM_BITS" = x32; then
51181    if test "$JVM_MAX_HEAP" -gt "1100"; then
51182      JVM_MAX_HEAP=1100
51183    elif test "$JVM_MAX_HEAP" -lt "512"; then
51184      JVM_MAX_HEAP=512
51185    fi
51186    STACK_SIZE=768
51187  else
51188    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51189    # pointers are used. Apparently, we need to increase the heap and stack
51190    # space for the jvm. More specifically, when running javac to build huge
51191    # jdk batch
51192    if test "$JVM_MAX_HEAP" -gt "1600"; then
51193      JVM_MAX_HEAP=1600
51194    elif test "$JVM_MAX_HEAP" -lt "512"; then
51195      JVM_MAX_HEAP=512
51196    fi
51197    STACK_SIZE=1536
51198  fi
51199
51200  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51201  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51202  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51203  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51204  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51205  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51206    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51207    JVM_ARG_OK=true
51208  else
51209    $ECHO "Arg failed:" >&5
51210    $ECHO "$OUTPUT" >&5
51211    JVM_ARG_OK=false
51212  fi
51213
51214
51215  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51216  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51217  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51218  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51219  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51220  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51221    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51222    JVM_ARG_OK=true
51223  else
51224    $ECHO "Arg failed:" >&5
51225    $ECHO "$OUTPUT" >&5
51226    JVM_ARG_OK=false
51227  fi
51228
51229
51230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51231$as_echo "$boot_jdk_jvmargs_big" >&6; }
51232
51233  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51234
51235
51236
51237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51238$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51239
51240  # Use serial gc for small short lived tools if possible
51241
51242  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51243  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51244  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51245  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51246  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51247  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51248    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51249    JVM_ARG_OK=true
51250  else
51251    $ECHO "Arg failed:" >&5
51252    $ECHO "$OUTPUT" >&5
51253    JVM_ARG_OK=false
51254  fi
51255
51256
51257  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51258  $ECHO "Command: $JAVA -Xms32M -version" >&5
51259  OUTPUT=`$JAVA -Xms32M -version 2>&1`
51260  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51261  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51262  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51263    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51264    JVM_ARG_OK=true
51265  else
51266    $ECHO "Arg failed:" >&5
51267    $ECHO "$OUTPUT" >&5
51268    JVM_ARG_OK=false
51269  fi
51270
51271
51272  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51273  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51274  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51275  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51276  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51277  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51278    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51279    JVM_ARG_OK=true
51280  else
51281    $ECHO "Arg failed:" >&5
51282    $ECHO "$OUTPUT" >&5
51283    JVM_ARG_OK=false
51284  fi
51285
51286
51287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51288$as_echo "$boot_jdk_jvmargs_small" >&6; }
51289
51290  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51291
51292
51293  JAVA_TOOL_FLAGS_SMALL=""
51294  for f in $JAVA_FLAGS_SMALL; do
51295    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51296  done
51297
51298
51299
51300# Setup smart javac (after cores and memory have been setup)
51301
51302
51303# Check whether --with-sjavac-server-java was given.
51304if test "${with_sjavac_server_java+set}" = set; then :
51305  withval=$with_sjavac_server_java;
51306fi
51307
51308
51309  if test "x$with_sjavac_server_java" != x; then
51310    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51311    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51312    if test "x$FOUND_VERSION" = x; then
51313      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51314    fi
51315  else
51316    SJAVAC_SERVER_JAVA="$JAVA"
51317  fi
51318
51319
51320  if test "$MEMORY_SIZE" -gt "3000"; then
51321
51322  $ECHO "Check if jvm arg is ok: -d64" >&5
51323  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51324  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51325  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51326  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51327  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51328    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51329    JVM_ARG_OK=true
51330  else
51331    $ECHO "Arg failed:" >&5
51332    $ECHO "$OUTPUT" >&5
51333    JVM_ARG_OK=false
51334  fi
51335
51336    if test "$JVM_ARG_OK" = true; then
51337      JVM_64BIT=true
51338      JVM_ARG_OK=false
51339    fi
51340  fi
51341
51342  MX_VALUE=`expr $MEMORY_SIZE / 2`
51343  if test "$JVM_64BIT" = true; then
51344    # Set ms lower than mx since more than one instance of the server might
51345    # get launched at the same time before they figure out which instance won.
51346    MS_VALUE=512
51347    if test "$MX_VALUE" -gt "2048"; then
51348      MX_VALUE=2048
51349    fi
51350  else
51351    MS_VALUE=256
51352    if test "$MX_VALUE" -gt "1500"; then
51353      MX_VALUE=1500
51354    fi
51355  fi
51356  if test "$MX_VALUE" -lt "512"; then
51357    MX_VALUE=512
51358  fi
51359
51360  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51361  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51362  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51363  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51364  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51365  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51366    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51367    JVM_ARG_OK=true
51368  else
51369    $ECHO "Arg failed:" >&5
51370    $ECHO "$OUTPUT" >&5
51371    JVM_ARG_OK=false
51372  fi
51373
51374
51375
51376  # Check whether --enable-sjavac was given.
51377if test "${enable_sjavac+set}" = set; then :
51378  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51379else
51380  ENABLE_SJAVAC='no'
51381fi
51382
51383  if test "x$JVM_ARG_OK" = "xfalse"; then
51384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51385$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51386    ENABLE_SJAVAC=no;
51387  fi
51388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51389$as_echo_n "checking whether to use sjavac... " >&6; }
51390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51391$as_echo "$ENABLE_SJAVAC" >&6; }
51392
51393
51394  if test "x$ENABLE_SJAVAC" = xyes; then
51395    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51396  else
51397    SJAVAC_SERVER_DIR=
51398  fi
51399
51400
51401
51402# Can the C/C++ compiler use precompiled headers?
51403
51404
51405  ###############################################################################
51406  #
51407  # Can the C/C++ compiler use precompiled headers?
51408  #
51409  # Check whether --enable-precompiled-headers was given.
51410if test "${enable_precompiled_headers+set}" = set; then :
51411  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51412else
51413  ENABLE_PRECOMPH=yes
51414fi
51415
51416
51417  USE_PRECOMPILED_HEADER=1
51418  if test "x$ENABLE_PRECOMPH" = xno; then
51419    USE_PRECOMPILED_HEADER=0
51420  fi
51421
51422  if test "x$ENABLE_PRECOMPH" = xyes; then
51423    # Check that the compiler actually supports precomp headers.
51424    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51425      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51426$as_echo_n "checking that precompiled headers work... " >&6; }
51427      echo "int alfa();" > conftest.h
51428      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51429      if test ! -f conftest.hpp.gch; then
51430        USE_PRECOMPILED_HEADER=0
51431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51432$as_echo "no" >&6; }
51433      else
51434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51435$as_echo "yes" >&6; }
51436      fi
51437      rm -f conftest.h conftest.hpp.gch
51438    fi
51439  fi
51440
51441
51442
51443
51444# Setup use of ccache, if available
51445
51446  # Check whether --enable-ccache was given.
51447if test "${enable_ccache+set}" = set; then :
51448  enableval=$enable_ccache;
51449fi
51450
51451
51452  CCACHE=
51453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51454$as_echo_n "checking is ccache enabled... " >&6; }
51455  ENABLE_CCACHE=$enable_ccache
51456  if test "x$enable_ccache" = xyes; then
51457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51458$as_echo "yes" >&6; }
51459    OLD_PATH="$PATH"
51460    if test "x$TOOLCHAIN_PATH" != x; then
51461      PATH=$TOOLCHAIN_PATH:$PATH
51462    fi
51463
51464
51465
51466  # Publish this variable in the help.
51467
51468
51469  if test "x$CCACHE" = x; then
51470    # The variable is not set by user, try to locate tool using the code snippet
51471    for ac_prog in ccache
51472do
51473  # Extract the first word of "$ac_prog", so it can be a program name with args.
51474set dummy $ac_prog; ac_word=$2
51475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51476$as_echo_n "checking for $ac_word... " >&6; }
51477if ${ac_cv_path_CCACHE+:} false; then :
51478  $as_echo_n "(cached) " >&6
51479else
51480  case $CCACHE in
51481  [\\/]* | ?:[\\/]*)
51482  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51483  ;;
51484  *)
51485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51486for as_dir in $PATH
51487do
51488  IFS=$as_save_IFS
51489  test -z "$as_dir" && as_dir=.
51490    for ac_exec_ext in '' $ac_executable_extensions; do
51491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51492    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51494    break 2
51495  fi
51496done
51497  done
51498IFS=$as_save_IFS
51499
51500  ;;
51501esac
51502fi
51503CCACHE=$ac_cv_path_CCACHE
51504if test -n "$CCACHE"; then
51505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51506$as_echo "$CCACHE" >&6; }
51507else
51508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51509$as_echo "no" >&6; }
51510fi
51511
51512
51513  test -n "$CCACHE" && break
51514done
51515
51516  else
51517    # The variable is set, but is it from the command line or the environment?
51518
51519    # Try to remove the string !CCACHE! from our list.
51520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51522      # If it failed, the variable was not from the command line. Ignore it,
51523      # but warn the user (except for BASH, which is always set by the calling BASH).
51524      if test "xCCACHE" != xBASH; then
51525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51526$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51527      fi
51528      # Try to locate tool using the code snippet
51529      for ac_prog in ccache
51530do
51531  # Extract the first word of "$ac_prog", so it can be a program name with args.
51532set dummy $ac_prog; ac_word=$2
51533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51534$as_echo_n "checking for $ac_word... " >&6; }
51535if ${ac_cv_path_CCACHE+:} false; then :
51536  $as_echo_n "(cached) " >&6
51537else
51538  case $CCACHE in
51539  [\\/]* | ?:[\\/]*)
51540  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51541  ;;
51542  *)
51543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51544for as_dir in $PATH
51545do
51546  IFS=$as_save_IFS
51547  test -z "$as_dir" && as_dir=.
51548    for ac_exec_ext in '' $ac_executable_extensions; do
51549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51550    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51552    break 2
51553  fi
51554done
51555  done
51556IFS=$as_save_IFS
51557
51558  ;;
51559esac
51560fi
51561CCACHE=$ac_cv_path_CCACHE
51562if test -n "$CCACHE"; then
51563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51564$as_echo "$CCACHE" >&6; }
51565else
51566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51567$as_echo "no" >&6; }
51568fi
51569
51570
51571  test -n "$CCACHE" && break
51572done
51573
51574    else
51575      # If it succeeded, then it was overridden by the user. We will use it
51576      # for the tool.
51577
51578      # First remove it from the list of overridden variables, so we can test
51579      # for unknown variables in the end.
51580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51581
51582      # Check if the provided tool contains a complete path.
51583      tool_specified="$CCACHE"
51584      tool_basename="${tool_specified##*/}"
51585      if test "x$tool_basename" = "x$tool_specified"; then
51586        # A command without a complete path is provided, search $PATH.
51587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51588$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51589        # Extract the first word of "$tool_basename", so it can be a program name with args.
51590set dummy $tool_basename; ac_word=$2
51591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51592$as_echo_n "checking for $ac_word... " >&6; }
51593if ${ac_cv_path_CCACHE+:} false; then :
51594  $as_echo_n "(cached) " >&6
51595else
51596  case $CCACHE in
51597  [\\/]* | ?:[\\/]*)
51598  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51599  ;;
51600  *)
51601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51602for as_dir in $PATH
51603do
51604  IFS=$as_save_IFS
51605  test -z "$as_dir" && as_dir=.
51606    for ac_exec_ext in '' $ac_executable_extensions; do
51607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51608    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51610    break 2
51611  fi
51612done
51613  done
51614IFS=$as_save_IFS
51615
51616  ;;
51617esac
51618fi
51619CCACHE=$ac_cv_path_CCACHE
51620if test -n "$CCACHE"; then
51621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51622$as_echo "$CCACHE" >&6; }
51623else
51624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51625$as_echo "no" >&6; }
51626fi
51627
51628
51629        if test "x$CCACHE" = x; then
51630          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51631        fi
51632      else
51633        # Otherwise we believe it is a complete path. Use it as it is.
51634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51635$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51637$as_echo_n "checking for CCACHE... " >&6; }
51638        if test ! -x "$tool_specified"; then
51639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51640$as_echo "not found" >&6; }
51641          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51642        fi
51643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51644$as_echo "$tool_specified" >&6; }
51645      fi
51646    fi
51647  fi
51648
51649
51650
51651  if test "x$CCACHE" = x; then
51652    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51653  fi
51654
51655
51656    CCACHE_STATUS="enabled"
51657    PATH="$OLD_PATH"
51658  elif test "x$enable_ccache" = xno; then
51659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51660$as_echo "no, explicitly disabled" >&6; }
51661  elif test "x$enable_ccache" = x; then
51662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51663$as_echo "no" >&6; }
51664  else
51665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51666$as_echo "unknown" >&6; }
51667    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51668  fi
51669
51670
51671
51672# Check whether --with-ccache-dir was given.
51673if test "${with_ccache_dir+set}" = set; then :
51674  withval=$with_ccache_dir;
51675fi
51676
51677
51678  if test "x$with_ccache_dir" != x; then
51679    # When using a non home ccache directory, assume the use is to share ccache files
51680    # with other users. Thus change the umask.
51681    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51682    if test "x$CCACHE" = x; then
51683      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51684$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51685    fi
51686  fi
51687
51688  if test "x$CCACHE" != x; then
51689
51690  if test "x$CCACHE" != x; then
51691    # Only use ccache if it is 3.1.4 or later, which supports
51692    # precompiled headers.
51693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51694$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51695    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51696    if test "x$HAS_GOOD_CCACHE" = x; then
51697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51698$as_echo "no, disabling ccache" >&6; }
51699      CCACHE=
51700      CCACHE_STATUS="disabled"
51701    else
51702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51703$as_echo "yes" >&6; }
51704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51705$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51706      PUSHED_FLAGS="$CXXFLAGS"
51707      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51708      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51709/* end confdefs.h.  */
51710
51711int
51712main ()
51713{
51714
51715  ;
51716  return 0;
51717}
51718_ACEOF
51719if ac_fn_cxx_try_compile "$LINENO"; then :
51720  CC_KNOWS_CCACHE_TRICK=yes
51721else
51722  CC_KNOWS_CCACHE_TRICK=no
51723fi
51724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51725      CXXFLAGS="$PUSHED_FLAGS"
51726      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51728$as_echo "yes" >&6; }
51729      else
51730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51731$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51732        CCACHE=
51733        CCACHE_STATUS="disabled"
51734      fi
51735    fi
51736  fi
51737
51738  if test "x$CCACHE" != x; then
51739    CCACHE_SLOPPINESS=time_macros
51740    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51741    CCACHE_FLAGS=-fpch-preprocess
51742
51743    if test "x$SET_CCACHE_DIR" != x; then
51744      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51745      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51746    fi
51747  fi
51748
51749  fi
51750
51751
51752###############################################################################
51753#
51754# And now the finish...
51755#
51756###############################################################################
51757
51758# Check for some common pitfalls
51759
51760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51761    file_to_test="$SRC_ROOT/LICENSE"
51762    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51763      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
51764    fi
51765  fi
51766
51767
51768  # Did user specify any unknown variables?
51769
51770  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51771    # Replace the separating ! with spaces before presenting for end user.
51772    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51773    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51774$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51775  fi
51776
51777
51778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51779$as_echo_n "checking if build directory is on local disk... " >&6; }
51780
51781  # df -l lists only local disks; if the given directory is not found then
51782  # a non-zero exit code is given
51783  if test "x$DF" = x; then
51784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51785      # msys does not have df; use Windows "net use" instead.
51786      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51787      if test "x$IS_NETWORK_DISK" = x; then
51788        OUTPUT_DIR_IS_LOCAL="yes"
51789      else
51790        OUTPUT_DIR_IS_LOCAL="no"
51791      fi
51792    else
51793      # No df here, say it's local
51794      OUTPUT_DIR_IS_LOCAL="yes"
51795    fi
51796  else
51797    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51798      OUTPUT_DIR_IS_LOCAL="yes"
51799    else
51800      OUTPUT_DIR_IS_LOCAL="no"
51801    fi
51802  fi
51803
51804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51805$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51806
51807
51808
51809  # Check if the user has any old-style ALT_ variables set.
51810  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51811
51812  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51813  # Since we can't properly handle the dependencies for this, warn the user about the situation
51814  if test -e $OUTPUT_ROOT/spec.gmk; then
51815    IS_RECONFIGURE=yes
51816  else
51817    IS_RECONFIGURE=no
51818  fi
51819
51820
51821# At the end, call the custom hook. (Dummy macro if no custom sources available)
51822
51823
51824# We're messing a bit with internal autoconf variables to put the config.status
51825# in the output directory instead of the current directory.
51826CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51827
51828# Create the actual output files. Now the main work of configure is done.
51829cat >confcache <<\_ACEOF
51830# This file is a shell script that caches the results of configure
51831# tests run on this system so they can be shared between configure
51832# scripts and configure runs, see configure's option --config-cache.
51833# It is not useful on other systems.  If it contains results you don't
51834# want to keep, you may remove or edit it.
51835#
51836# config.status only pays attention to the cache file if you give it
51837# the --recheck option to rerun configure.
51838#
51839# `ac_cv_env_foo' variables (set or unset) will be overridden when
51840# loading this file, other *unset* `ac_cv_foo' will be assigned the
51841# following values.
51842
51843_ACEOF
51844
51845# The following way of writing the cache mishandles newlines in values,
51846# but we know of no workaround that is simple, portable, and efficient.
51847# So, we kill variables containing newlines.
51848# Ultrix sh set writes to stderr and can't be redirected directly,
51849# and sets the high bit in the cache file unless we assign to the vars.
51850(
51851  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51852    eval ac_val=\$$ac_var
51853    case $ac_val in #(
51854    *${as_nl}*)
51855      case $ac_var in #(
51856      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51857$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51858      esac
51859      case $ac_var in #(
51860      _ | IFS | as_nl) ;; #(
51861      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51862      *) { eval $ac_var=; unset $ac_var;} ;;
51863      esac ;;
51864    esac
51865  done
51866
51867  (set) 2>&1 |
51868    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51869    *${as_nl}ac_space=\ *)
51870      # `set' does not quote correctly, so add quotes: double-quote
51871      # substitution turns \\\\ into \\, and sed turns \\ into \.
51872      sed -n \
51873	"s/'/'\\\\''/g;
51874	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51875      ;; #(
51876    *)
51877      # `set' quotes correctly as required by POSIX, so do not add quotes.
51878      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51879      ;;
51880    esac |
51881    sort
51882) |
51883  sed '
51884     /^ac_cv_env_/b end
51885     t clear
51886     :clear
51887     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51888     t end
51889     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51890     :end' >>confcache
51891if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51892  if test -w "$cache_file"; then
51893    if test "x$cache_file" != "x/dev/null"; then
51894      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51895$as_echo "$as_me: updating cache $cache_file" >&6;}
51896      if test ! -f "$cache_file" || test -h "$cache_file"; then
51897	cat confcache >"$cache_file"
51898      else
51899        case $cache_file in #(
51900        */* | ?:*)
51901	  mv -f confcache "$cache_file"$$ &&
51902	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51903        *)
51904	  mv -f confcache "$cache_file" ;;
51905	esac
51906      fi
51907    fi
51908  else
51909    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51910$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51911  fi
51912fi
51913rm -f confcache
51914
51915test "x$prefix" = xNONE && prefix=$ac_default_prefix
51916# Let make expand exec_prefix.
51917test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51918
51919# Transform confdefs.h into DEFS.
51920# Protect against shell expansion while executing Makefile rules.
51921# Protect against Makefile macro expansion.
51922#
51923# If the first sed substitution is executed (which looks for macros that
51924# take arguments), then branch to the quote section.  Otherwise,
51925# look for a macro that doesn't take arguments.
51926ac_script='
51927:mline
51928/\\$/{
51929 N
51930 s,\\\n,,
51931 b mline
51932}
51933t clear
51934:clear
51935s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51936t quote
51937s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51938t quote
51939b any
51940:quote
51941s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51942s/\[/\\&/g
51943s/\]/\\&/g
51944s/\$/$$/g
51945H
51946:any
51947${
51948	g
51949	s/^\n//
51950	s/\n/ /g
51951	p
51952}
51953'
51954DEFS=`sed -n "$ac_script" confdefs.h`
51955
51956
51957ac_libobjs=
51958ac_ltlibobjs=
51959U=
51960for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51961  # 1. Remove the extension, and $U if already installed.
51962  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51963  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51964  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51965  #    will be set to the directory where LIBOBJS objects are built.
51966  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51967  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51968done
51969LIBOBJS=$ac_libobjs
51970
51971LTLIBOBJS=$ac_ltlibobjs
51972
51973
51974
51975: "${CONFIG_STATUS=./config.status}"
51976ac_write_fail=0
51977ac_clean_files_save=$ac_clean_files
51978ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51979{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51980$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51981as_write_fail=0
51982cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51983#! $SHELL
51984# Generated by $as_me.
51985# Run this file to recreate the current configuration.
51986# Compiler output produced by configure, useful for debugging
51987# configure, is in config.log if it exists.
51988
51989debug=false
51990ac_cs_recheck=false
51991ac_cs_silent=false
51992
51993SHELL=\${CONFIG_SHELL-$SHELL}
51994export SHELL
51995_ASEOF
51996cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51997## -------------------- ##
51998## M4sh Initialization. ##
51999## -------------------- ##
52000
52001# Be more Bourne compatible
52002DUALCASE=1; export DUALCASE # for MKS sh
52003if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52004  emulate sh
52005  NULLCMD=:
52006  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52007  # is contrary to our usage.  Disable this feature.
52008  alias -g '${1+"$@"}'='"$@"'
52009  setopt NO_GLOB_SUBST
52010else
52011  case `(set -o) 2>/dev/null` in #(
52012  *posix*) :
52013    set -o posix ;; #(
52014  *) :
52015     ;;
52016esac
52017fi
52018
52019
52020as_nl='
52021'
52022export as_nl
52023# Printing a long string crashes Solaris 7 /usr/bin/printf.
52024as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52025as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52026as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52027# Prefer a ksh shell builtin over an external printf program on Solaris,
52028# but without wasting forks for bash or zsh.
52029if test -z "$BASH_VERSION$ZSH_VERSION" \
52030    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52031  as_echo='print -r --'
52032  as_echo_n='print -rn --'
52033elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52034  as_echo='printf %s\n'
52035  as_echo_n='printf %s'
52036else
52037  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52038    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52039    as_echo_n='/usr/ucb/echo -n'
52040  else
52041    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52042    as_echo_n_body='eval
52043      arg=$1;
52044      case $arg in #(
52045      *"$as_nl"*)
52046	expr "X$arg" : "X\\(.*\\)$as_nl";
52047	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52048      esac;
52049      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52050    '
52051    export as_echo_n_body
52052    as_echo_n='sh -c $as_echo_n_body as_echo'
52053  fi
52054  export as_echo_body
52055  as_echo='sh -c $as_echo_body as_echo'
52056fi
52057
52058# The user is always right.
52059if test "${PATH_SEPARATOR+set}" != set; then
52060  PATH_SEPARATOR=:
52061  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52062    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52063      PATH_SEPARATOR=';'
52064  }
52065fi
52066
52067
52068# IFS
52069# We need space, tab and new line, in precisely that order.  Quoting is
52070# there to prevent editors from complaining about space-tab.
52071# (If _AS_PATH_WALK were called with IFS unset, it would disable word
52072# splitting by setting IFS to empty value.)
52073IFS=" ""	$as_nl"
52074
52075# Find who we are.  Look in the path if we contain no directory separator.
52076as_myself=
52077case $0 in #((
52078  *[\\/]* ) as_myself=$0 ;;
52079  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52080for as_dir in $PATH
52081do
52082  IFS=$as_save_IFS
52083  test -z "$as_dir" && as_dir=.
52084    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52085  done
52086IFS=$as_save_IFS
52087
52088     ;;
52089esac
52090# We did not find ourselves, most probably we were run as `sh COMMAND'
52091# in which case we are not to be found in the path.
52092if test "x$as_myself" = x; then
52093  as_myself=$0
52094fi
52095if test ! -f "$as_myself"; then
52096  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52097  exit 1
52098fi
52099
52100# Unset variables that we do not need and which cause bugs (e.g. in
52101# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52102# suppresses any "Segmentation fault" message there.  '((' could
52103# trigger a bug in pdksh 5.2.14.
52104for as_var in BASH_ENV ENV MAIL MAILPATH
52105do eval test x\${$as_var+set} = xset \
52106  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52107done
52108PS1='$ '
52109PS2='> '
52110PS4='+ '
52111
52112# NLS nuisances.
52113LC_ALL=C
52114export LC_ALL
52115LANGUAGE=C
52116export LANGUAGE
52117
52118# CDPATH.
52119(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52120
52121
52122# as_fn_error STATUS ERROR [LINENO LOG_FD]
52123# ----------------------------------------
52124# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52125# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52126# script with STATUS, using 1 if that was 0.
52127as_fn_error ()
52128{
52129  as_status=$1; test $as_status -eq 0 && as_status=1
52130  if test "$4"; then
52131    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52132    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52133  fi
52134  $as_echo "$as_me: error: $2" >&2
52135  as_fn_exit $as_status
52136} # as_fn_error
52137
52138
52139# as_fn_set_status STATUS
52140# -----------------------
52141# Set $? to STATUS, without forking.
52142as_fn_set_status ()
52143{
52144  return $1
52145} # as_fn_set_status
52146
52147# as_fn_exit STATUS
52148# -----------------
52149# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52150as_fn_exit ()
52151{
52152  set +e
52153  as_fn_set_status $1
52154  exit $1
52155} # as_fn_exit
52156
52157# as_fn_unset VAR
52158# ---------------
52159# Portably unset VAR.
52160as_fn_unset ()
52161{
52162  { eval $1=; unset $1;}
52163}
52164as_unset=as_fn_unset
52165# as_fn_append VAR VALUE
52166# ----------------------
52167# Append the text in VALUE to the end of the definition contained in VAR. Take
52168# advantage of any shell optimizations that allow amortized linear growth over
52169# repeated appends, instead of the typical quadratic growth present in naive
52170# implementations.
52171if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52172  eval 'as_fn_append ()
52173  {
52174    eval $1+=\$2
52175  }'
52176else
52177  as_fn_append ()
52178  {
52179    eval $1=\$$1\$2
52180  }
52181fi # as_fn_append
52182
52183# as_fn_arith ARG...
52184# ------------------
52185# Perform arithmetic evaluation on the ARGs, and store the result in the
52186# global $as_val. Take advantage of shells that can avoid forks. The arguments
52187# must be portable across $(()) and expr.
52188if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52189  eval 'as_fn_arith ()
52190  {
52191    as_val=$(( $* ))
52192  }'
52193else
52194  as_fn_arith ()
52195  {
52196    as_val=`expr "$@" || test $? -eq 1`
52197  }
52198fi # as_fn_arith
52199
52200
52201if expr a : '\(a\)' >/dev/null 2>&1 &&
52202   test "X`expr 00001 : '.*\(...\)'`" = X001; then
52203  as_expr=expr
52204else
52205  as_expr=false
52206fi
52207
52208if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52209  as_basename=basename
52210else
52211  as_basename=false
52212fi
52213
52214if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52215  as_dirname=dirname
52216else
52217  as_dirname=false
52218fi
52219
52220as_me=`$as_basename -- "$0" ||
52221$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52222	 X"$0" : 'X\(//\)$' \| \
52223	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52224$as_echo X/"$0" |
52225    sed '/^.*\/\([^/][^/]*\)\/*$/{
52226	    s//\1/
52227	    q
52228	  }
52229	  /^X\/\(\/\/\)$/{
52230	    s//\1/
52231	    q
52232	  }
52233	  /^X\/\(\/\).*/{
52234	    s//\1/
52235	    q
52236	  }
52237	  s/.*/./; q'`
52238
52239# Avoid depending upon Character Ranges.
52240as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52241as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52242as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52243as_cr_digits='0123456789'
52244as_cr_alnum=$as_cr_Letters$as_cr_digits
52245
52246ECHO_C= ECHO_N= ECHO_T=
52247case `echo -n x` in #(((((
52248-n*)
52249  case `echo 'xy\c'` in
52250  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52251  xy)  ECHO_C='\c';;
52252  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52253       ECHO_T='	';;
52254  esac;;
52255*)
52256  ECHO_N='-n';;
52257esac
52258
52259rm -f conf$$ conf$$.exe conf$$.file
52260if test -d conf$$.dir; then
52261  rm -f conf$$.dir/conf$$.file
52262else
52263  rm -f conf$$.dir
52264  mkdir conf$$.dir 2>/dev/null
52265fi
52266if (echo >conf$$.file) 2>/dev/null; then
52267  if ln -s conf$$.file conf$$ 2>/dev/null; then
52268    as_ln_s='ln -s'
52269    # ... but there are two gotchas:
52270    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52271    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52272    # In both cases, we have to default to `cp -pR'.
52273    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52274      as_ln_s='cp -pR'
52275  elif ln conf$$.file conf$$ 2>/dev/null; then
52276    as_ln_s=ln
52277  else
52278    as_ln_s='cp -pR'
52279  fi
52280else
52281  as_ln_s='cp -pR'
52282fi
52283rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52284rmdir conf$$.dir 2>/dev/null
52285
52286
52287# as_fn_mkdir_p
52288# -------------
52289# Create "$as_dir" as a directory, including parents if necessary.
52290as_fn_mkdir_p ()
52291{
52292
52293  case $as_dir in #(
52294  -*) as_dir=./$as_dir;;
52295  esac
52296  test -d "$as_dir" || eval $as_mkdir_p || {
52297    as_dirs=
52298    while :; do
52299      case $as_dir in #(
52300      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52301      *) as_qdir=$as_dir;;
52302      esac
52303      as_dirs="'$as_qdir' $as_dirs"
52304      as_dir=`$as_dirname -- "$as_dir" ||
52305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52306	 X"$as_dir" : 'X\(//\)[^/]' \| \
52307	 X"$as_dir" : 'X\(//\)$' \| \
52308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52309$as_echo X"$as_dir" |
52310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52311	    s//\1/
52312	    q
52313	  }
52314	  /^X\(\/\/\)[^/].*/{
52315	    s//\1/
52316	    q
52317	  }
52318	  /^X\(\/\/\)$/{
52319	    s//\1/
52320	    q
52321	  }
52322	  /^X\(\/\).*/{
52323	    s//\1/
52324	    q
52325	  }
52326	  s/.*/./; q'`
52327      test -d "$as_dir" && break
52328    done
52329    test -z "$as_dirs" || eval "mkdir $as_dirs"
52330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52331
52332
52333} # as_fn_mkdir_p
52334if mkdir -p . 2>/dev/null; then
52335  as_mkdir_p='mkdir -p "$as_dir"'
52336else
52337  test -d ./-p && rmdir ./-p
52338  as_mkdir_p=false
52339fi
52340
52341
52342# as_fn_executable_p FILE
52343# -----------------------
52344# Test if FILE is an executable regular file.
52345as_fn_executable_p ()
52346{
52347  test -f "$1" && test -x "$1"
52348} # as_fn_executable_p
52349as_test_x='test -x'
52350as_executable_p=as_fn_executable_p
52351
52352# Sed expression to map a string onto a valid CPP name.
52353as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52354
52355# Sed expression to map a string onto a valid variable name.
52356as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52357
52358
52359exec 6>&1
52360## ----------------------------------- ##
52361## Main body of $CONFIG_STATUS script. ##
52362## ----------------------------------- ##
52363_ASEOF
52364test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52365
52366cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52367# Save the log message, to keep $0 and so on meaningful, and to
52368# report actual input values of CONFIG_FILES etc. instead of their
52369# values after options handling.
52370ac_log="
52371This file was extended by OpenJDK $as_me jdk9, which was
52372generated by GNU Autoconf 2.69.  Invocation command line was
52373
52374  CONFIG_FILES    = $CONFIG_FILES
52375  CONFIG_HEADERS  = $CONFIG_HEADERS
52376  CONFIG_LINKS    = $CONFIG_LINKS
52377  CONFIG_COMMANDS = $CONFIG_COMMANDS
52378  $ $0 $@
52379
52380on `(hostname || uname -n) 2>/dev/null | sed 1q`
52381"
52382
52383_ACEOF
52384
52385case $ac_config_files in *"
52386"*) set x $ac_config_files; shift; ac_config_files=$*;;
52387esac
52388
52389
52390
52391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52392# Files that config.status was made for.
52393config_files="$ac_config_files"
52394
52395_ACEOF
52396
52397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52398ac_cs_usage="\
52399\`$as_me' instantiates files and other configuration actions
52400from templates according to the current configuration.  Unless the files
52401and actions are specified as TAGs, all are instantiated by default.
52402
52403Usage: $0 [OPTION]... [TAG]...
52404
52405  -h, --help       print this help, then exit
52406  -V, --version    print version number and configuration settings, then exit
52407      --config     print configuration, then exit
52408  -q, --quiet, --silent
52409                   do not print progress messages
52410  -d, --debug      don't remove temporary files
52411      --recheck    update $as_me by reconfiguring in the same conditions
52412      --file=FILE[:TEMPLATE]
52413                   instantiate the configuration file FILE
52414
52415Configuration files:
52416$config_files
52417
52418Report bugs to <build-dev@openjdk.java.net>.
52419OpenJDK home page: <http://openjdk.java.net>."
52420
52421_ACEOF
52422cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52423ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52424ac_cs_version="\\
52425OpenJDK config.status jdk9
52426configured by $0, generated by GNU Autoconf 2.69,
52427  with options \\"\$ac_cs_config\\"
52428
52429Copyright (C) 2012 Free Software Foundation, Inc.
52430This config.status script is free software; the Free Software Foundation
52431gives unlimited permission to copy, distribute and modify it."
52432
52433ac_pwd='$ac_pwd'
52434srcdir='$srcdir'
52435AWK='$AWK'
52436test -n "\$AWK" || AWK=awk
52437_ACEOF
52438
52439cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52440# The default lists apply if the user does not specify any file.
52441ac_need_defaults=:
52442while test $# != 0
52443do
52444  case $1 in
52445  --*=?*)
52446    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52447    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52448    ac_shift=:
52449    ;;
52450  --*=)
52451    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52452    ac_optarg=
52453    ac_shift=:
52454    ;;
52455  *)
52456    ac_option=$1
52457    ac_optarg=$2
52458    ac_shift=shift
52459    ;;
52460  esac
52461
52462  case $ac_option in
52463  # Handling of the options.
52464  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52465    ac_cs_recheck=: ;;
52466  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52467    $as_echo "$ac_cs_version"; exit ;;
52468  --config | --confi | --conf | --con | --co | --c )
52469    $as_echo "$ac_cs_config"; exit ;;
52470  --debug | --debu | --deb | --de | --d | -d )
52471    debug=: ;;
52472  --file | --fil | --fi | --f )
52473    $ac_shift
52474    case $ac_optarg in
52475    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52476    '') as_fn_error $? "missing file argument" ;;
52477    esac
52478    as_fn_append CONFIG_FILES " '$ac_optarg'"
52479    ac_need_defaults=false;;
52480  --he | --h |  --help | --hel | -h )
52481    $as_echo "$ac_cs_usage"; exit ;;
52482  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52483  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52484    ac_cs_silent=: ;;
52485
52486  # This is an error.
52487  -*) as_fn_error $? "unrecognized option: \`$1'
52488Try \`$0 --help' for more information." ;;
52489
52490  *) as_fn_append ac_config_targets " $1"
52491     ac_need_defaults=false ;;
52492
52493  esac
52494  shift
52495done
52496
52497ac_configure_extra_args=
52498
52499if $ac_cs_silent; then
52500  exec 6>/dev/null
52501  ac_configure_extra_args="$ac_configure_extra_args --silent"
52502fi
52503
52504_ACEOF
52505cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52506if \$ac_cs_recheck; then
52507  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52508  shift
52509  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52510  CONFIG_SHELL='$SHELL'
52511  export CONFIG_SHELL
52512  exec "\$@"
52513fi
52514
52515_ACEOF
52516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52517exec 5>>config.log
52518{
52519  echo
52520  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52521## Running $as_me. ##
52522_ASBOX
52523  $as_echo "$ac_log"
52524} >&5
52525
52526_ACEOF
52527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52528_ACEOF
52529
52530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52531
52532# Handling of arguments.
52533for ac_config_target in $ac_config_targets
52534do
52535  case $ac_config_target in
52536    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52537    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52538    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52539    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52540    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52541
52542  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52543  esac
52544done
52545
52546
52547# If the user did not use the arguments to specify the items to instantiate,
52548# then the envvar interface is used.  Set only those that are not.
52549# We use the long form for the default assignment because of an extremely
52550# bizarre bug on SunOS 4.1.3.
52551if $ac_need_defaults; then
52552  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52553fi
52554
52555# Have a temporary directory for convenience.  Make it in the build tree
52556# simply because there is no reason against having it here, and in addition,
52557# creating and moving files from /tmp can sometimes cause problems.
52558# Hook for its removal unless debugging.
52559# Note that there is a small window in which the directory will not be cleaned:
52560# after its creation but before its name has been assigned to `$tmp'.
52561$debug ||
52562{
52563  tmp= ac_tmp=
52564  trap 'exit_status=$?
52565  : "${ac_tmp:=$tmp}"
52566  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52567' 0
52568  trap 'as_fn_exit 1' 1 2 13 15
52569}
52570# Create a (secure) tmp directory for tmp files.
52571
52572{
52573  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52574  test -d "$tmp"
52575}  ||
52576{
52577  tmp=./conf$$-$RANDOM
52578  (umask 077 && mkdir "$tmp")
52579} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52580ac_tmp=$tmp
52581
52582# Set up the scripts for CONFIG_FILES section.
52583# No need to generate them if there are no CONFIG_FILES.
52584# This happens for instance with `./config.status config.h'.
52585if test -n "$CONFIG_FILES"; then
52586
52587
52588ac_cr=`echo X | tr X '\015'`
52589# On cygwin, bash can eat \r inside `` if the user requested igncr.
52590# But we know of no other shell where ac_cr would be empty at this
52591# point, so we can use a bashism as a fallback.
52592if test "x$ac_cr" = x; then
52593  eval ac_cr=\$\'\\r\'
52594fi
52595ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52596if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52597  ac_cs_awk_cr='\\r'
52598else
52599  ac_cs_awk_cr=$ac_cr
52600fi
52601
52602echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52603_ACEOF
52604
52605
52606{
52607  echo "cat >conf$$subs.awk <<_ACEOF" &&
52608  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52609  echo "_ACEOF"
52610} >conf$$subs.sh ||
52611  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52612ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52613ac_delim='%!_!# '
52614for ac_last_try in false false false false false :; do
52615  . ./conf$$subs.sh ||
52616    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52617
52618  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52619  if test $ac_delim_n = $ac_delim_num; then
52620    break
52621  elif $ac_last_try; then
52622    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52623  else
52624    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52625  fi
52626done
52627rm -f conf$$subs.sh
52628
52629cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52630cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52631_ACEOF
52632sed -n '
52633h
52634s/^/S["/; s/!.*/"]=/
52635p
52636g
52637s/^[^!]*!//
52638:repl
52639t repl
52640s/'"$ac_delim"'$//
52641t delim
52642:nl
52643h
52644s/\(.\{148\}\)..*/\1/
52645t more1
52646s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52647p
52648n
52649b repl
52650:more1
52651s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52652p
52653g
52654s/.\{148\}//
52655t nl
52656:delim
52657h
52658s/\(.\{148\}\)..*/\1/
52659t more2
52660s/["\\]/\\&/g; s/^/"/; s/$/"/
52661p
52662b
52663:more2
52664s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52665p
52666g
52667s/.\{148\}//
52668t delim
52669' <conf$$subs.awk | sed '
52670/^[^""]/{
52671  N
52672  s/\n//
52673}
52674' >>$CONFIG_STATUS || ac_write_fail=1
52675rm -f conf$$subs.awk
52676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52677_ACAWK
52678cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52679  for (key in S) S_is_set[key] = 1
52680  FS = ""
52681
52682}
52683{
52684  line = $ 0
52685  nfields = split(line, field, "@")
52686  substed = 0
52687  len = length(field[1])
52688  for (i = 2; i < nfields; i++) {
52689    key = field[i]
52690    keylen = length(key)
52691    if (S_is_set[key]) {
52692      value = S[key]
52693      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52694      len += length(value) + length(field[++i])
52695      substed = 1
52696    } else
52697      len += 1 + keylen
52698  }
52699
52700  print line
52701}
52702
52703_ACAWK
52704_ACEOF
52705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52706if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52707  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52708else
52709  cat
52710fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52711  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52712_ACEOF
52713
52714# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52715# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52716# trailing colons and then remove the whole line if VPATH becomes empty
52717# (actually we leave an empty line to preserve line numbers).
52718if test "x$srcdir" = x.; then
52719  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52720h
52721s///
52722s/^/:/
52723s/[	 ]*$/:/
52724s/:\$(srcdir):/:/g
52725s/:\${srcdir}:/:/g
52726s/:@srcdir@:/:/g
52727s/^:*//
52728s/:*$//
52729x
52730s/\(=[	 ]*\).*/\1/
52731G
52732s/\n//
52733s/^[^=]*=[	 ]*$//
52734}'
52735fi
52736
52737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52738fi # test -n "$CONFIG_FILES"
52739
52740
52741eval set X "  :F $CONFIG_FILES      "
52742shift
52743for ac_tag
52744do
52745  case $ac_tag in
52746  :[FHLC]) ac_mode=$ac_tag; continue;;
52747  esac
52748  case $ac_mode$ac_tag in
52749  :[FHL]*:*);;
52750  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52751  :[FH]-) ac_tag=-:-;;
52752  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52753  esac
52754  ac_save_IFS=$IFS
52755  IFS=:
52756  set x $ac_tag
52757  IFS=$ac_save_IFS
52758  shift
52759  ac_file=$1
52760  shift
52761
52762  case $ac_mode in
52763  :L) ac_source=$1;;
52764  :[FH])
52765    ac_file_inputs=
52766    for ac_f
52767    do
52768      case $ac_f in
52769      -) ac_f="$ac_tmp/stdin";;
52770      *) # Look for the file first in the build tree, then in the source tree
52771	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52772	 # because $ac_f cannot contain `:'.
52773	 test -f "$ac_f" ||
52774	   case $ac_f in
52775	   [\\/$]*) false;;
52776	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52777	   esac ||
52778	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52779      esac
52780      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52781      as_fn_append ac_file_inputs " '$ac_f'"
52782    done
52783
52784    # Let's still pretend it is `configure' which instantiates (i.e., don't
52785    # use $as_me), people would be surprised to read:
52786    #    /* config.h.  Generated by config.status.  */
52787    configure_input='Generated from '`
52788	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52789	`' by configure.'
52790    if test x"$ac_file" != x-; then
52791      configure_input="$ac_file.  $configure_input"
52792      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52793$as_echo "$as_me: creating $ac_file" >&6;}
52794    fi
52795    # Neutralize special characters interpreted by sed in replacement strings.
52796    case $configure_input in #(
52797    *\&* | *\|* | *\\* )
52798       ac_sed_conf_input=`$as_echo "$configure_input" |
52799       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52800    *) ac_sed_conf_input=$configure_input;;
52801    esac
52802
52803    case $ac_tag in
52804    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52805      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52806    esac
52807    ;;
52808  esac
52809
52810  ac_dir=`$as_dirname -- "$ac_file" ||
52811$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52812	 X"$ac_file" : 'X\(//\)[^/]' \| \
52813	 X"$ac_file" : 'X\(//\)$' \| \
52814	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52815$as_echo X"$ac_file" |
52816    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52817	    s//\1/
52818	    q
52819	  }
52820	  /^X\(\/\/\)[^/].*/{
52821	    s//\1/
52822	    q
52823	  }
52824	  /^X\(\/\/\)$/{
52825	    s//\1/
52826	    q
52827	  }
52828	  /^X\(\/\).*/{
52829	    s//\1/
52830	    q
52831	  }
52832	  s/.*/./; q'`
52833  as_dir="$ac_dir"; as_fn_mkdir_p
52834  ac_builddir=.
52835
52836case "$ac_dir" in
52837.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52838*)
52839  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52840  # A ".." for each directory in $ac_dir_suffix.
52841  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52842  case $ac_top_builddir_sub in
52843  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52844  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52845  esac ;;
52846esac
52847ac_abs_top_builddir=$ac_pwd
52848ac_abs_builddir=$ac_pwd$ac_dir_suffix
52849# for backward compatibility:
52850ac_top_builddir=$ac_top_build_prefix
52851
52852case $srcdir in
52853  .)  # We are building in place.
52854    ac_srcdir=.
52855    ac_top_srcdir=$ac_top_builddir_sub
52856    ac_abs_top_srcdir=$ac_pwd ;;
52857  [\\/]* | ?:[\\/]* )  # Absolute name.
52858    ac_srcdir=$srcdir$ac_dir_suffix;
52859    ac_top_srcdir=$srcdir
52860    ac_abs_top_srcdir=$srcdir ;;
52861  *) # Relative name.
52862    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52863    ac_top_srcdir=$ac_top_build_prefix$srcdir
52864    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52865esac
52866ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52867
52868
52869  case $ac_mode in
52870  :F)
52871  #
52872  # CONFIG_FILE
52873  #
52874
52875_ACEOF
52876
52877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52878# If the template does not know about datarootdir, expand it.
52879# FIXME: This hack should be removed a few years after 2.60.
52880ac_datarootdir_hack=; ac_datarootdir_seen=
52881ac_sed_dataroot='
52882/datarootdir/ {
52883  p
52884  q
52885}
52886/@datadir@/p
52887/@docdir@/p
52888/@infodir@/p
52889/@localedir@/p
52890/@mandir@/p'
52891case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52892*datarootdir*) ac_datarootdir_seen=yes;;
52893*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52894  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52895$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52896_ACEOF
52897cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52898  ac_datarootdir_hack='
52899  s&@datadir@&$datadir&g
52900  s&@docdir@&$docdir&g
52901  s&@infodir@&$infodir&g
52902  s&@localedir@&$localedir&g
52903  s&@mandir@&$mandir&g
52904  s&\\\${datarootdir}&$datarootdir&g' ;;
52905esac
52906_ACEOF
52907
52908# Neutralize VPATH when `$srcdir' = `.'.
52909# Shell code in configure.ac might set extrasub.
52910# FIXME: do we really want to maintain this feature?
52911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52912ac_sed_extra="$ac_vpsub
52913$extrasub
52914_ACEOF
52915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52916:t
52917/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52918s|@configure_input@|$ac_sed_conf_input|;t t
52919s&@top_builddir@&$ac_top_builddir_sub&;t t
52920s&@top_build_prefix@&$ac_top_build_prefix&;t t
52921s&@srcdir@&$ac_srcdir&;t t
52922s&@abs_srcdir@&$ac_abs_srcdir&;t t
52923s&@top_srcdir@&$ac_top_srcdir&;t t
52924s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52925s&@builddir@&$ac_builddir&;t t
52926s&@abs_builddir@&$ac_abs_builddir&;t t
52927s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52928$ac_datarootdir_hack
52929"
52930eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52931  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52932
52933test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52934  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52935  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52936      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52937  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52938which seems to be undefined.  Please make sure it is defined" >&5
52939$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52940which seems to be undefined.  Please make sure it is defined" >&2;}
52941
52942  rm -f "$ac_tmp/stdin"
52943  case $ac_file in
52944  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52945  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52946  esac \
52947  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52948 ;;
52949
52950
52951
52952  esac
52953
52954done # for ac_tag
52955
52956
52957as_fn_exit 0
52958_ACEOF
52959ac_clean_files=$ac_clean_files_save
52960
52961test $ac_write_fail = 0 ||
52962  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52963
52964
52965# configure is writing to config.log, and then calls config.status.
52966# config.status does its own redirection, appending to config.log.
52967# Unfortunately, on DOS this fails, as config.log is still kept open
52968# by configure, so config.status won't be able to write to it; its
52969# output is simply discarded.  So we exec the FD to /dev/null,
52970# effectively closing config.log, so it can be properly (re)opened and
52971# appended to by config.status.  When coming back to configure, we
52972# need to make the FD available again.
52973if test "$no_create" != yes; then
52974  ac_cs_success=:
52975  ac_config_status_args=
52976  test "$silent" = yes &&
52977    ac_config_status_args="$ac_config_status_args --quiet"
52978  exec 5>/dev/null
52979  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52980  exec 5>>config.log
52981  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52982  # would make configure fail if this is the last instruction.
52983  $ac_cs_success || as_fn_exit 1
52984fi
52985if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52986  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52987$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52988fi
52989
52990
52991# Try to move the config.log file to the output directory.
52992if test -e ./config.log; then
52993  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52994fi
52995
52996# Make the compare script executable
52997$CHMOD +x $OUTPUT_ROOT/compare.sh
52998
52999# Finally output some useful information to the user
53000
53001  # Finally output some useful information to the user
53002
53003  printf "\n"
53004  printf "====================================================\n"
53005  if test "x$no_create" != "xyes"; then
53006    if test "x$IS_RECONFIGURE" != "xyes"; then
53007      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
53008    else
53009      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
53010    fi
53011  else
53012    if test "x$IS_RECONFIGURE" != "xyes"; then
53013      printf "A configuration has been successfully checked but not created\n"
53014    else
53015      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
53016    fi
53017  fi
53018  if test "x$CONFIGURE_COMMAND_LINE" != x; then
53019    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53020  else
53021    printf "using default settings.\n"
53022  fi
53023
53024  printf "\n"
53025  printf "Configuration summary:\n"
53026  printf "* Debug level:    $DEBUG_LEVEL\n"
53027  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53028  printf "* JDK variant:    $JDK_VARIANT\n"
53029  printf "* JVM variants:   $with_jvm_variants\n"
53030  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53031
53032  printf "\n"
53033  printf "Tools summary:\n"
53034  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53035    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53036  fi
53037  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53038  if test "x$TOOLCHAIN_VERSION" != "x"; then
53039    print_version=" $TOOLCHAIN_VERSION"
53040  fi
53041  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53042  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53043  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53044
53045  printf "\n"
53046  printf "Build performance summary:\n"
53047  printf "* Cores to use:   $JOBS\n"
53048  printf "* Memory limit:   $MEMORY_SIZE MB\n"
53049  if test "x$CCACHE_STATUS" != "x"; then
53050    printf "* ccache status:  $CCACHE_STATUS\n"
53051  fi
53052  printf "\n"
53053
53054  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53055    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53056    printf "will result in longer build times.\n"
53057    printf "\n"
53058  fi
53059
53060  if test "x$FOUND_ALT_VARIABLES" != "x"; then
53061    printf "WARNING: You have old-style ALT_ environment variables set.\n"
53062    printf "These are not respected, and will be ignored. It is recommended\n"
53063    printf "that you clean your environment. The following variables are set:\n"
53064    printf "$FOUND_ALT_VARIABLES\n"
53065    printf "\n"
53066  fi
53067
53068  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53069    printf "WARNING: Your build output directory is not on a local disk.\n"
53070    printf "This will severely degrade build performance!\n"
53071    printf "It is recommended that you create an output directory on a local disk,\n"
53072    printf "and run the configure script again from that directory.\n"
53073    printf "\n"
53074  fi
53075
53076  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53077    printf "WARNING: The result of this configuration has overridden an older\n"
53078    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53079    printf "proper build. Failure to do so might result in strange build problems.\n"
53080    printf "\n"
53081  fi
53082
53083  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53084    printf "WARNING: The result of this configuration was not saved.\n"
53085    printf "You should run without '--no-create | -n' to create the configuration.\n"
53086    printf "\n"
53087  fi
53088
53089
53090
53091if test -e "$OUTPUT_ROOT/config.log"; then
53092  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53093  if test $? -eq 0; then
53094    printf "The following warnings were produced. Repeated here for convenience:\n"
53095    # We must quote sed expression (using []) to stop m4 from eating the [].
53096    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53097    printf "\n"
53098  fi
53099fi
53100
53101
53102